Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 39 additions & 18 deletions tools/topology/topology2/cavs-sdw-src-gain-mixin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<tokens.conf>
<virtual.conf>
<src-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<mixout-gain-alh-dai-copier-playback.conf>
<host-gateway-capture.conf>
<io-gateway-capture.conf>
<data.conf>
Expand Down Expand Up @@ -93,14 +93,12 @@ Object.Pipeline {
}
]

mixout-gain-dai-copier-playback [
mixout-gain-alh-dai-copier-playback [
{
index 2

Object.Widget.copier.1 {
Object.Widget.alh-copier.1 {
stream_name $SDW_PLAYBACK_PCM
dai_type "ALH"
copier_type "ALH"
type "dai_in"
node_type $ALH_LINK_OUTPUT_CLASS
}
Expand Down Expand Up @@ -128,19 +126,42 @@ Object.Pipeline {
}
}
]
}

io-gateway-capture [
# Capture pipeline widgets
Object.Widget {
alh-copier [
{
stream_name $SDW_CAPTURE_PCM
direction "capture"
index 3
copier_type "ALH"
Object.Widget.copier.1 {
stream_name $SDW_CAPTURE_PCM
dai_type "ALH"
copier_type "ALH"
type "dai_out"
node_type $ALH_LINK_INPUT_CLASS
}
type "dai_out"
index 3
node_type $ALH_LINK_INPUT_CLASS
num_input_audio_formats 1
num_output_audio_formats 1
num_output_pins 1

Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
]

pipeline [
{
index 3
priority 0
lp_mode 0
dynamic_pipeline 1
}
]
}
Expand Down Expand Up @@ -183,14 +204,14 @@ Object.Base.route [
}
{
source 'gain.2.1'
sink 'copier.ALH.2.1'
sink 'alh-copier.$SDW_PLAYBACK_PCM.0'
}
{
source "copier.ALH.3.1"
source "alh-copier.$SDW_CAPTURE_PCM.0"
sink "host-copier.1.capture"
}
{
source 'host-copier.0.playback'
sink 'gain.1.1'
sink 'src.1.1'
}
]
3 changes: 2 additions & 1 deletion tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<tokens.conf>
<virtual.conf>
<host-copier-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<mixout-gain-alh-dai-copier-playback.conf>
<dai-copier-eqiir-module-copier-capture.conf>
<gain-capture.conf>
<gain-copier-capture.conf>
Expand All @@ -33,6 +33,7 @@
<route.conf>
<intel/common_definitions.conf>
<copier.conf>
<alh-dai-copier.conf>
<module-copier.conf>
<pipeline.conf>
<dai.conf>
Expand Down
143 changes: 143 additions & 0 deletions tools/topology/topology2/include/components/alh-dai-copier.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
#

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit title: topology2: componenets:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed now

# ALH DAI gateway copier
#
# ALH DAI copier widget. All attributes defined herein are namespaced
# by alsatplg to "Object.Widget.alh-copier.N.attribute_name"
#
# Usage: this component can be used by instantiating it in the parent object. i.e.
#
# Object.Widget.alh-copier."N" {
# dai_index 0
# stream_name "SDW1-Playback"
# }
#
# Where N is the unique instance number for the alh-copier object within the same alsaconf node.

Class.Widget."alh-copier" {
#
# Pipeline ID for the alh-copier object
#
DefineAttribute."index" {}

# DAI index: this is always 0 when there is no aggregation.
DefineAttribute."dai_index" {
token_ref "sof_tkn_dai.word"
}

#
# alh-copier object instance
#
DefineAttribute."instance" {}

#include common component definition
<include/components/widget-common.conf>

#
# alh-copier component UUID
#
DefineAttribute."uuid" {
type "string"
# Token set reference name and type
token_ref "sof_tkn_comp.uuid"
}

#
# Bespoke Attribute Definitions for alh-copier
#

DefineAttribute."dai_type" {
type "string"
token_ref "sof_tkn_dai.string"
}

DefineAttribute."direction" {
type "string"
token_ref "sof_tkn_dai.word"
constraints {
!valid_values [
"playback"
"capture"
]
!tuple_values [
0
1
]
}
}

#
# cycles per chunk processed
#
DefineAttribute."cpc" {
# Token set reference name and type
token_ref "sof_tkn_comp.word"
}

DefineAttribute."bss_size" {}

DefineAttribute."is_pages" {
# Token set reference name and type
token_ref "sof_tkn_comp.word"
}

DefineAttribute."node_type" {
# Token set reference name and type
token_ref "sof_tkn_copier.word"
constraints {
!valid_values [
$ALH_LINK_OUTPUT_CLASS # ALH link output, legacy for SNDW (DSP ->)
$ALH_LINK_INPUT_CLASS # ALH link input, legacy for SNDW (DSP <-)
]
}
}

attributes {
#
# The alh-copier widget name would be constructed using the stream_name,
# direction and dai_index attributes. For ex: "alh-copier.SDW1-Playback.0".
#
!constructor [
"stream_name"
"dai_index"
]

#
# mandatory attributes that must be provided when the alh-copier class is
# instantiated
#
!mandatory [
"no_pm"
"num_input_audio_formats"
"num_output_audio_formats"
"node_type"
]

#
# immutable attributes cannot be modified in the object instance
# num_input_audio_formats for capture and num_output_formats for playback are
# mandatory even though the num_input_pins/num_output_pins are 0 because
# these are used to set the DMA buffer format.
#
!immutable [
"uuid"
"dai_type"
Comment thread
ranj063 marked this conversation as resolved.
Outdated
]

unique "instance"
}

#
# Default attributes for alh-copier
#
#UUID: 9BA00C83-CA12-4A83-943C-1FA2E82F9DDA
uuid "83:0c:a0:9b:12:CA:83:4a:94:3c:1f:a2:e8:2f:9d:da"
no_pm "true"
core_id 0
cpc 1647
bss_size 280
dai_type "ALH"
dai_index 0

# math expression for computing is_pages
is_pages "$[(($bss_size + 4095) & -4095) / 4096]"
}
8 changes: 0 additions & 8 deletions tools/topology/topology2/include/components/copier.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ Class.Widget."copier" {
!valid_values [
"HDA"
"SSP"
"ALH"
"DMIC"
]
}
Expand All @@ -66,7 +65,6 @@ Class.Widget."copier" {
"SSP"
"DMIC"
"HDA"
"ALH"
]
}
}
Expand Down Expand Up @@ -112,12 +110,6 @@ Class.Widget."copier" {
$DMIC_LINK_INPUT_CLASS # DMIC link input (DSP <-)
$I2S_LINK_OUTPUT_CLASS # I2S link output (DSP ->)
$I2S_LINK_INPUT_CLASS # I2S link input (DSP <-)
$ALH_LINK_OUTPUT_CLASS # ALH link output, legacy for SNDW (DSP ->)
$ALH_LINK_INPUT_CLASS # ALH link input, legacy for SNDW (DSP <-)
$ALH_SNDWIRE_STREAM_LINK_OUTPUT_CLASS # SNDW link output (DSP ->)
$ALH_SNDWIRE_STREAM_LINK_INPUT_CLASS # SNDW link input (DSP <-)
$ALH_UAOL_STREAM_LINK_OUTPUT_CLASS # UAOL link output (DSP ->)
$ALH_UAOL_STREAM_LINK_INPUT_CLASS # UAOL link input (DSP <-)
$IPC_OUTPUT_CLASS # IPC output (DSP ->)
$IPC_INPUT_CLASS # IPC input (DSP <-)
$I2S_MULTILINK_OUTPUT_CLASS # I2S Multi gtw output (DSP ->)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#
# BE playback pipeline: mixout-gain-alh-dai-copier.
#
# All attributes defined herein are namespaced
# by alsatplg to "Object.Pipeline.mixout-gain-alh-dai-copier-playback.N.attribute_name"
#
# Usage: mixout-gain-alh-dai-copier-playback pipeline object can be instantiated as:
#
# Object.Pipeline.mixout-gain-alh-dai-copier-playback."N" {
# time_domain "timer"
# rate 48000
# }
#
# Where N is the unique pipeline ID within the same alsaconf node.
#

<include/common/audio_format.conf>
<include/components/alh-dai-copier.conf>
<include/components/gain.conf>
<include/components/mixout.conf>
<include/components/pipeline.conf>

Class.Pipeline."mixout-gain-alh-dai-copier-playback" {

DefineAttribute."index" {}

<include/pipelines/pipeline-common.conf>

attributes {
!constructor [
"index"
]

!immutable [
"direction"
]

#
# mixout-gain-alh-dai-copier-playback objects instantiated within the same alsaconf
# node must have unique instance attribute
#
unique "instance"
}

Object.Widget {
mixout."1" {}
alh-copier."1" {
type dai_in
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1

# copier only supports one format based on mixin/mixout requirements:
# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
Comment thread
ranj063 marked this conversation as resolved.
Outdated
]
}
gain."1" {
num_input_audio_formats 1
num_output_audio_formats 1

# 32-bit 48KHz 2ch
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]
}

pipeline."1" {
priority 0
lp_mode 0
}
}

Object.Base {
route.1 {
source mixout.$index.1
sink gain.$index.1
}
}

direction "playback"
dynamic_pipeline 1
time_domain "timer"
channels 2
channels_min 2
channels_max 2
rate 48000
rate_min 48000
rate_max 48000
}
Loading