diff --git a/tools/topology/topology2/cavs/cavs-mixin-mixout-hda.conf b/tools/topology/topology2/cavs/cavs-mixin-mixout-hda.conf index df822184b..43c75e2e9 100644 --- a/tools/topology/topology2/cavs/cavs-mixin-mixout-hda.conf +++ b/tools/topology/topology2/cavs/cavs-mixin-mixout-hda.conf @@ -43,6 +43,20 @@ Object.Pipeline { } } + deepbuffer-playback.0 { + index 5 + + Object.Widget.copier.1 { + stream_name 'Analog Deepbuffer Playback' + } + + Object.Widget.gain.1 { + Object.Control.mixer.1 { + name '5 3nd Playback Volume' + } + } + } + mixout-gain-host-copier-capture.0 { index 3 @@ -88,6 +102,18 @@ Object.PCM { } direction duplex } + + pcm.1 { + id 1 + name 'DeepBuffer' + Object.Base.fe_dai.'DeepBuffer' {} + Object.PCM.pcm_caps.playback { + name 'Analog Deepbuffer Playback' + formats 'S32_LE,S24_LE,S16_LE' + } + direction playback + } + } # top-level pipeline connections @@ -108,4 +134,8 @@ Object.Base { source 'mixin.4.1' sink 'mixout.3.1' } + route.5 { + source 'mixin.5.1' + sink 'mixout.2.1' + } } diff --git a/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf b/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf index f4e45ca1e..a6fac36b8 100644 --- a/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf +++ b/tools/topology/topology2/cavs/cavs-passthrough-hdmi.conf @@ -14,6 +14,7 @@ + diff --git a/tools/topology/topology2/cavs/common_definitions.conf b/tools/topology/topology2/cavs/common_definitions.conf index 06206c5f2..fa740341a 100644 --- a/tools/topology/topology2/cavs/common_definitions.conf +++ b/tools/topology/topology2/cavs/common_definitions.conf @@ -56,4 +56,6 @@ Define { GPIO_CLASS 24 # GPIO SPI_OUTPUT_CLASS 25 # SPI Output (DSP ->) SPI_INPUT_CLASS 26 # SPI Input (DSP <-) + + DEEPBUFFER_FW_DMA_MS 100 # 100 ms copier dma size } diff --git a/tools/topology/topology2/include/pipelines/cavs/deepbuffer-playback.conf b/tools/topology/topology2/include/pipelines/cavs/deepbuffer-playback.conf new file mode 100644 index 000000000..a2ff26463 --- /dev/null +++ b/tools/topology/topology2/include/pipelines/cavs/deepbuffer-playback.conf @@ -0,0 +1,121 @@ +# +# FE playback pipeline: deepbuffer-playback +# +# All attributes defined herein are namespaced +# by alsatplg to "Object.Pipeline.deepbuffer-playback.N.attribute_name" +# +# Usage: deepbuffer-playback pipeline object can be instantiated as: +# +# Object.Pipeline.deepbuffer-playback."N" { +# period 1000 +# time_domain "timer" +# channels 2 +# rate 48000 +# } +# +# Where N is the unique pipeline ID within the same alsaconf node. +# + + + + + + + +Class.Pipeline."deepbuffer-playback" { + + DefineAttribute."index" {} + + + + attributes { + !constructor [ + "index" + ] + + !immutable [ + "direction" + ] + + # + # deepbuffer-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 + num_audio_formats 3 + # 16-bit 48KHz 2ch + Object.Base.audio_format.1 { + out_bit_depth 32 + out_valid_bit_depth 24 + # 100ms buffer + dma_buffer_size "$[$ibs * $DEEPBUFFER_FW_DMA_MS]" + } + # 24-bit 48KHz 2ch + Object.Base.audio_format.2 { + in_bit_depth 32 + in_valid_bit_depth 24 + out_bit_depth 32 + out_valid_bit_depth 24 + # 100ms buffer + dma_buffer_size "$[$obs * $DEEPBUFFER_FW_DMA_MS]" + } + # 32-bit 48KHz 2ch + Object.Base.audio_format.3 { + in_bit_depth 32 + in_valid_bit_depth 32 + out_bit_depth 32 + out_valid_bit_depth 32 + # 100ms buffer + dma_buffer_size "$[$ibs * $DEEPBUFFER_FW_DMA_MS]" + } + } + + gain."1" { + num_audio_formats 1 + + # 32-bit 48KHz 2ch + Object.Base.audio_format.1 { + in_bit_depth 32 + in_valid_bit_depth 24 + out_bit_depth 32 + out_valid_bit_depth 24 + } + } + + mixin."1" {} + + pipeline."1" { + priority 0 + # enable lp mode + lp_mode 1 + } + } + + Object.Base { + route.1 { + source copier.host..1 + sink gain..1 + } + route.2 { + source gain..1 + sink mixin..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 +}