Skip to content

Commit

Permalink
topology1: sof-hda-generic: enable Waves playback
Browse files Browse the repository at this point in the history
Reuse the pipe-wave-codec-playback.m4 and
enable this pipeline on HDA0 for speaker/headphone playaback.
HDA0.OUT dai pipeline is included for codec adapter widget connection.

Signed-off-by: Mac Chiang <[email protected]>
  • Loading branch information
macchian authored and mwasko committed Sep 11, 2024
1 parent 8c1cf55 commit 181bfe1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions tools/topology/topology1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ set(TPLGS
"sof-hda-generic\;sof-hda-generic-4ch\;-DCHANNELS=4\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1"
"sof-hda-generic\;sof-hda-generic-4ch-bt\;-DCHANNELS=4\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1\;-DBT_OFFLOAD"
"sof-hda-generic\;sof-hda-generic-4ch-dts\;-DCHANNELS=4\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1\;-DDTS=`DTS'"
"sof-hda-generic\;sof-hda-generic-4ch-waves\;-DCHANNELS=4\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1\;-DWAVES"
## end HDaudio codec topologies

"sof-hda-generic-idisp\;sof-hda-generic-idisp\;-DCHANNELS=0\;-DDYNAMIC=1"
Expand Down
17 changes: 12 additions & 5 deletions tools/topology/topology1/sof-hda-generic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ define(`BT_PCM_ID', `8')
define(`HW_CONFIG_ID', 8)
include(`platform/intel/intel-generic-bt.m4')')

# define HDA0_OUT DAI pipeline if the codec adapter is included.
ifdef(`DTS',`define(PIPELINE_HDA0_OUT)')
ifdef(`WAVES',`
define(PIPELINE_HDA0_OUT)
define(`ENDPOINT_NAME', `Codec')')

# The pipeline naming notation is pipe-mixer-PROCESSING-dai-DIRECTION.m4
# HSPROC is set by makefile, if not the default above is applied
define(PIPE_HEADSET_PLAYBACK, `sof/pipe-mixer-`HSPROC'-dai-playback.m4')
Expand Down Expand Up @@ -107,18 +113,19 @@ DAI_ADD(PIPE_HEADSET_PLAYBACK,
# Low Latency playback pipeline 1 on PCM 30 using max 2 channels of s32le.
# 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(
ifdef(`DTS', sof/pipe-eq-iir-dts-codec-playback.m4, sof/pipe-host-volume-playback.m4),
ifdef(`DTS', sof/pipe-eq-iir-dts-codec-playback.m4,
ifdef(`WAVES', sof/pipe-waves-codec-playback.m4, sof/pipe-host-volume-playback.m4)),
30, 0, 2, s32le,
1000, 0, 0,
48000, 48000, 48000,
SCHEDULE_TIME_DOMAIN_TIMER,
PIPELINE_PLAYBACK_SCHED_COMP_1)

ifdef(`DTS',
ifdef(`PIPELINE_HDA0_OUT',
`
# Because there is no dai pipeline.30 for HDA0.OUT in pipe-eq-iir-dts-codec-playback.m4, so
# using macro defined W_PIPELINE_TOP() to add missing dai pipeline back. Instead of
# modifying in pipe-eq-iir-dts-codec-playback.m4, these changes are not necessary for all others.
# Because there is no dai pipeline.30 for HDA0.OUT in corresponding m4 file, so
# using macro defined W_PIPELINE_TOP() to add missing dai pipeline back.
# The changes are applying to connect codec adapter widget configuration.
W_PIPELINE_TOP(30, HDA0.OUT, 1000, 0, 0, 1, pipe_dai_schedule_plat)
')

Expand Down

0 comments on commit 181bfe1

Please sign in to comment.