Skip to content

Commit

Permalink
topology1: sof-tgl-rt711-rt1308: add NOJACK support
Browse files Browse the repository at this point in the history
The NO_JACK flag is just to adjust the JACK_OFFSET to calculate the DMIC
link ID. But it doesn't remove the jack PCMs. However, the way that
machine driver set the link ID is changed. Now the formula
define(DMIC_DAI_LINK_48k_ID, eval(JACK_OFFSET+AMP_OFFSET+AMP_REF_OFFSET))
is not always true. To not impact the existing topologies, the commit
suggests to add a NOJACK flag like sof-icl-rt711-rt1308-rt715-hdmi.m4
does to remove the JACK PCMs.

Signed-off-by: Bard Liao <[email protected]>
  • Loading branch information
bardliao committed Dec 19, 2024
1 parent 84209f6 commit d22a348
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tools/topology/topology1/sof-tgl-rt711-rt1308.m4
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,13 @@ ifdef(`BT_OFFLOAD',

# Low Latency capture pipeline 2 on PCM 1 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline with priority 0 on core 0
ifdef(`NOJACK', `',
`
PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4,
2, 1, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
')

ifdef(`EXT_AMP',
`
Expand Down Expand Up @@ -163,6 +166,8 @@ dnl pipe id, dai type, dai_index, dai_be,
dnl buffer, periods, format,
dnl deadline, priority, core, time_domain)

ifdef(`NOJACK', `',
`
# playback DAI is ALH(SDW0 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-mixer-volume-dai-playback.m4,
Expand Down Expand Up @@ -214,6 +219,7 @@ ifdef(`HEADSET_DEEP_BUFFER',
)
]
}
')

ifdef(`EXT_AMP',
`
Expand Down Expand Up @@ -255,13 +261,16 @@ DAI_ADD(sof/pipe-dai-playback.m4,

# PCM Low Latency, id 0
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
ifdef(`NOJACK', `',
`
PCM_PLAYBACK_ADD(Jack Out, 0, PIPELINE_PCM_30)
ifdef(`HEADSET_DEEP_BUFFER',
`
PCM_PLAYBACK_ADD(Jack Out DeepBuffer, 31, PIPELINE_PCM_31)
'
)
PCM_CAPTURE_ADD(Jack In, 1, PIPELINE_PCM_2)
')
ifdef(`EXT_AMP',
`
PCM_PLAYBACK_ADD(Speaker, 2, PIPELINE_PCM_3)
Expand All @@ -276,12 +285,15 @@ PCM_PLAYBACK_ADD(HDMI 4, 8, PIPELINE_PCM_9)

#ALH dai index = ((link_id << 8) | PDI id)
#ALH SDW0 Pin2 (ID: 0)
ifdef(`NOJACK', `',
`
DAI_CONFIG(ALH, 2, 0, SDW0-Playback,
ALH_CONFIG(ALH_CONFIG_DATA(ALH, 2, 48000, 2)))

#ALH SDW0 Pin3 (ID: 1)
DAI_CONFIG(ALH, 3, 1, SDW0-Capture,
ALH_CONFIG(ALH_CONFIG_DATA(ALH, 3, 48000, 2)))
')

ifdef(`EXT_AMP',
`
Expand Down

0 comments on commit d22a348

Please sign in to comment.