-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tools: Topology2: Add topology to test playback SRC conversions
This patch adds to development topologies a topology sof-hda-src-generic.tplg. It is similar to sof-hda-generic but adds to first playback PCM pipeline a SRC component after gain. The pipeline supports playback of S32_LE with 8 - 192 kHz rates. The cavs/src.conf is merged to src.conf, and the SRC format include files are brought up from cavs directory. The topology cavs-sdw-src-gain-mixin.tplg related .conf files are updated for common location. The missing rate_out attribute is added. Signed-off-by: Seppo Ingalsuo <[email protected]>
- Loading branch information
Showing
10 changed files
with
249 additions
and
108 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
126 changes: 126 additions & 0 deletions
126
tools/topology/topology2/cavs-src-mixin-mixout-hda.conf
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,126 @@ | ||
Define { | ||
ANALOG_PLAYBACK_PCM 'Analog Playback' | ||
ANALOG_CAPTURE_PCM 'Analog Capture' | ||
HDA_ANALOG_DAI_NAME 'Analog Playback and Capture' | ||
DEEP_BUFFER_PIPELINE_ID 15 | ||
DEEP_BUFFER_PCM_ID 31 | ||
DEEP_BUFFER_PIPELINE_SRC 'mixin.15.1' | ||
DEEP_BUFFER_PIPELINE_SINK 'mixout.2.1' | ||
DEEP_BUFFER_PCM_NAME 'Deepbuffer HDA Analog' | ||
} | ||
|
||
# include deep buffer config if buffer size is in 1 - 1000 ms. | ||
IncludeByKey.DEEPBUFFER_FW_DMA_MS{ | ||
"[1-1000]" "platform/intel/deep-buffer.conf" | ||
} | ||
|
||
Object.Dai { | ||
HDA.0 { | ||
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 { | ||
mixout-gain-dai-copier-playback.0 { | ||
index 2 | ||
|
||
Object.Widget.copier.1 { | ||
stream_name $HDA_ANALOG_DAI_NAME | ||
dai_type "HDA" | ||
copier_type "HDA" | ||
} | ||
Object.Widget.gain.1 { | ||
Object.Control.mixer.1 { | ||
name '2 Main Playback Volume' | ||
} | ||
} | ||
} | ||
|
||
host-copier-gain-src-mixin-playback.0 { | ||
index 1 | ||
|
||
Object.Widget.copier.1 { | ||
stream_name $ANALOG_PLAYBACK_PCM | ||
} | ||
|
||
Object.Widget.src.1 { | ||
} | ||
|
||
Object.Widget.gain.1 { | ||
Object.Control.mixer.1 { | ||
name '1 2nd Playback Volume' | ||
} | ||
} | ||
} | ||
|
||
passthrough-capture.1 { | ||
index 3 | ||
Object.Widget.copier.1 { | ||
stream_name $ANALOG_CAPTURE_PCM | ||
} | ||
} | ||
|
||
passthrough-be.1 { | ||
index 4 | ||
direction capture | ||
|
||
Object.Widget.copier."1" { | ||
dai_type "HDA" | ||
type "dai_out" | ||
copier_type "HDA" | ||
stream_name $HDA_ANALOG_DAI_NAME | ||
node_type $HDA_LINK_INPUT_CLASS | ||
Object.Base.audio_format.1 { | ||
in_bit_depth 32 | ||
in_valid_bit_depth 32 | ||
out_bit_depth 32 | ||
out_valid_bit_depth 32 | ||
dma_buffer_size "$[$ibs * 2]" | ||
} | ||
} | ||
} | ||
} | ||
Object.PCM { | ||
pcm.0 { | ||
id 0 | ||
name 'HDA Analog' | ||
Object.Base.fe_dai.1 { | ||
name "HDA Analog" | ||
} | ||
Object.PCM.pcm_caps.1 { | ||
direction "playback" | ||
name $ANALOG_PLAYBACK_PCM | ||
formats 'S32_LE,S24_LE,S16_LE' | ||
rate_min 8000 | ||
rate_max 192000 | ||
} | ||
Object.PCM.pcm_caps.2 { | ||
direction "capture" | ||
name $ANALOG_CAPTURE_PCM | ||
formats 'S32_LE,S24_LE,S16_LE' | ||
} | ||
direction duplex | ||
} | ||
} | ||
|
||
# top-level pipeline connections | ||
Object.Base { | ||
route.1 { | ||
sink 'copier.HDA.2.1' | ||
source 'gain.2.1' | ||
} | ||
route.2 { | ||
source 'mixin.1.1' | ||
sink 'mixout.2.1' | ||
} | ||
route.3 { | ||
source 'copier.HDA.4.1' | ||
sink 'copier.host.3.1' | ||
} | ||
} |
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
100 changes: 0 additions & 100 deletions
100
tools/topology/topology2/include/components/cavs/src.conf
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
99 changes: 99 additions & 0 deletions
99
tools/topology/topology2/include/pipelines/cavs/host-copier-gain-src-mixin-playback.conf
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,99 @@ | ||
# | ||
# FE playback pipeline: host-copier-gain-mixin-playback | ||
# | ||
# All attributes defined herein are namespaced | ||
# by alsatplg to "Object.Pipeline.host-copier-gain-src-mixin-playback.N.attribute_name" | ||
# | ||
# Usage: host-copier-gain-src-mixin-playback pipeline object can be instantiated as: | ||
# | ||
# Object.Pipeline.host-copier-gain-src-mixin-playback."N" { | ||
# period 1000 | ||
# time_domain "timer" | ||
# channels 2 | ||
# rate 48000 | ||
# } | ||
# | ||
# Where N is the unique pipeline ID within the same alsaconf node. | ||
# | ||
|
||
<include/common/audio_format.conf> | ||
<include/components/copier.conf> | ||
<include/components/mixin.conf> | ||
<include/components/pipeline.conf> | ||
<include/components/gain.conf> | ||
<include/components/src.conf> | ||
|
||
Class.Pipeline."host-copier-gain-src-mixin-playback" { | ||
|
||
DefineAttribute."index" {} | ||
|
||
<include/pipelines/pipeline-common.conf> | ||
|
||
attributes { | ||
!constructor [ | ||
"index" | ||
] | ||
|
||
!immutable [ | ||
"direction" | ||
] | ||
|
||
# | ||
# host-copier-gain-src-mixin-playback objects instantiated within the same | ||
# alsaconf node must have unique pipeline_id attribute | ||
# | ||
unique "instance" | ||
} | ||
|
||
Object.Widget { | ||
copier."1" { | ||
copier_type "host" | ||
type "aif_in" | ||
node_type $HDA_HOST_OUTPUT_CLASS | ||
|
||
<include/components/src_passthrough_format.conf> | ||
} | ||
|
||
gain."1" { | ||
<include/components/src_passthrough_format.conf> | ||
} | ||
|
||
src."1" { | ||
rate_out 48000 | ||
|
||
<include/components/src_format.conf> | ||
} | ||
|
||
mixin."1" {} | ||
|
||
pipeline."1" { | ||
priority 0 | ||
lp_mode 0 | ||
} | ||
} | ||
|
||
Object.Base { | ||
route.1 { | ||
source copier.host..1 | ||
sink gain..1 | ||
} | ||
route.2 { | ||
source gain..1 | ||
sink src..1 | ||
} | ||
route.3 { | ||
source src..1 | ||
sink mixin..1 | ||
} | ||
} | ||
|
||
direction "playback" | ||
dynamic_pipeline 1 | ||
time_domain "timer" | ||
channels 2 | ||
channels_min 2 | ||
channels_max 2 | ||
rate 48000 | ||
rate_min 8000 | ||
rate_max 192000 | ||
} |
Oops, something went wrong.