-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
topology2: add simple passthrough for HDA tests
Long overdue, I don't know why we keep adding complicated stuff without having a simpler baseline. Two configurations are provided, one with default copiers and another with CHAIN_DMA. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
- Loading branch information
Showing
3 changed files
with
368 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,362 @@ | ||
Define { | ||
ANALOG_PLAYBACK_PCM 'Analog Playback' | ||
ANALOG_CAPTURE_PCM 'Analog Capture' | ||
HDA_ANALOG_DAI_NAME 'Analog' | ||
CODEC_HDA_CHAIN_DMA 'false' | ||
} | ||
|
||
Object.Dai.HDA [ | ||
{ | ||
name $HDA_ANALOG_DAI_NAME | ||
dai_index 0 | ||
id 4 | ||
default_hw_conf_id 4 | ||
Object.Base.hw_config.1 { | ||
name "HDA0" | ||
} | ||
direction duplex | ||
} | ||
] | ||
|
||
Object.Pipeline { | ||
|
||
host-gateway-playback [ | ||
{ | ||
index 0 | ||
use_chain_dma $CODEC_HDA_CHAIN_DMA | ||
|
||
Object.Widget.host-copier.1 { | ||
stream_name $ANALOG_PLAYBACK_PCM | ||
pcm_id 0 | ||
num_output_pins 1 | ||
IncludeByKey.CODEC_HDA_CHAIN_DMA { | ||
"false" { | ||
num_input_audio_formats 3 | ||
num_output_audio_formats 3 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 24 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 24 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
"true" { | ||
num_input_audio_formats 2 | ||
num_output_audio_formats 2 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
|
||
} | ||
} | ||
} | ||
} | ||
] | ||
io-gateway [ | ||
{ | ||
direction "playback" | ||
index 1 | ||
use_chain_dma $CODEC_HDA_CHAIN_DMA | ||
|
||
Object.Widget.dai-copier.1 { | ||
dai_type "HDA" | ||
type "dai_in" | ||
copier_type "HDA" | ||
stream_name $HDA_ANALOG_DAI_NAME | ||
node_type $HDA_LINK_OUTPUT_CLASS | ||
direction playback | ||
num_input_pins 1 | ||
IncludeByKey.CODEC_HDA_CHAIN_DMA { | ||
"false" { | ||
num_input_audio_formats 3 | ||
num_output_audio_formats 3 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 24 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 24 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
"true" { | ||
num_input_audio_formats 2 | ||
num_output_audio_formats 2 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
|
||
} | ||
} | ||
} | ||
} | ||
{ | ||
direction "capture" | ||
index 2 | ||
use_chain_dma $CODEC_HDA_CHAIN_DMA | ||
|
||
Object.Widget.dai-copier.1 { | ||
dai_type "HDA" | ||
type "dai_out" | ||
copier_type "HDA" | ||
stream_name $HDA_ANALOG_DAI_NAME | ||
node_type $HDA_LINK_INPUT_CLASS | ||
direction capture | ||
num_output_pins 1 | ||
IncludeByKey.CODEC_HDA_CHAIN_DMA { | ||
"false" { | ||
num_input_audio_formats 3 | ||
num_output_audio_formats 3 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 24 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 24 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
"true" { | ||
num_input_audio_formats 2 | ||
num_output_audio_formats 2 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
|
||
} | ||
} | ||
} | ||
} | ||
] | ||
host-gateway-capture [ | ||
{ | ||
index 3 | ||
use_chain_dma $CODEC_HDA_CHAIN_DMA | ||
|
||
Object.Widget.host-copier.1 { | ||
stream_name $ANALOG_CAPTURE_PCM | ||
pcm_id 0 | ||
num_input_pins 1 | ||
IncludeByKey.CODEC_HDA_CHAIN_DMA { | ||
"false" { | ||
num_input_audio_formats 3 | ||
num_output_audio_formats 3 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 24 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 24 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
} | ||
"true" { | ||
num_input_audio_formats 2 | ||
num_output_audio_formats 2 | ||
Object.Base.input_audio_format [ | ||
{ | ||
in_bit_depth 16 | ||
in_valid_bit_depth 16 | ||
} | ||
{ | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
} | ||
] | ||
Object.Base.output_audio_format [ | ||
{ | ||
out_bit_depth 16 | ||
out_valid_bit_depth 16 | ||
} | ||
{ | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
} | ||
] | ||
|
||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
|
||
Object.PCM.pcm [ | ||
{ | ||
id 0 | ||
name 'HDA Analog' | ||
Object.Base.fe_dai.1 { | ||
name "HDA Analog" | ||
} | ||
Object.PCM.pcm_caps.1 { | ||
direction "playback" | ||
name $ANALOG_PLAYBACK_PCM | ||
IncludeByKey.CODEC_HDA_CHAIN_DMA { | ||
"true" { | ||
formats 'S32_LE,S16_LE' | ||
} | ||
"false" { | ||
formats 'S32_LE,S24_LE,S16_LE' | ||
} | ||
} | ||
} | ||
Object.PCM.pcm_caps.2 { | ||
direction "capture" | ||
name $ANALOG_CAPTURE_PCM | ||
IncludeByKey.CODEC_HDA_CHAIN_DMA { | ||
"true" { | ||
formats 'S32_LE,S16_LE' | ||
} | ||
"false" { | ||
formats 'S32_LE,S24_LE,S16_LE' | ||
} | ||
} | ||
} | ||
direction duplex | ||
} | ||
] | ||
|
||
# top-level pipeline connections | ||
Object.Base.route [ | ||
{ | ||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback' | ||
source 'host-copier.0.playback' | ||
} | ||
{ | ||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture' | ||
sink 'host-copier.0.capture' | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters