ASoC: sdw_utils: Add quirk for disabling capture ch - #5958
niranjanhyti wants to merge 1 commit into
Conversation
|
Can one of the admins verify this patch?
|
Amps can provide reference stream to hosts DSP which can be used for input audio proocessing. But some AMD HW doesn't support such a feature and hence reference stream should be selectively disabled for those. This patch adds the following quirk for the same. ASOC_SDW_CODEC_EXCLUDE_SPK_REF_STREAM Signed-off-by: Niranjan H Y <niranjan.hy@ti.com> Suggested-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
DMI overrides discard the new quirk, while global codec metadata mutation can leak into unrelated card probes.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds an AMD SoundWire quirk to suppress unsupported amplifier reference capture streams.
Changes:
- Defines the speaker-reference exclusion quirk.
- Adds a helper to disable amplifier capture directions.
- Enables the quirk for the AMD legacy machine driver.
| File | Description |
|---|---|
sound/soc/sdw_utils/soc_sdw_utils.c |
Adds the capture-disable helper. |
sound/soc/amd/acp/acp-sdw-legacy-mach.c |
Applies the new quirk during probing. |
include/sound/soc_sdw_utils.h |
Defines the quirk and exposes mutable directions/helper API. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| #include "../../codecs/rt711.h" | ||
|
|
||
| static unsigned long soc_sdw_quirk = RT711_JD1; | ||
| static unsigned long soc_sdw_quirk = RT711_JD1 | ASOC_SDW_CODEC_EXCLUDE_SPK_REF_STREAM;; |
| if (dais[j].dai_type == SOC_SDW_DAI_TYPE_AMP) | ||
| dais[j].direction[SNDRV_PCM_STREAM_CAPTURE] = false; |
|
diff --git a/sound/soc/amd/acp/acp-sdw-legacy-mach.c b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
index 6eac42bac855..9a975a3c7b97 100644
--- a/sound/soc/amd/acp/acp-sdw-legacy-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-legacy-mach.c
@@ -254,6 +254,8 @@ static int create_sdw_dailink(struct snd_soc_card *card,
list_for_each_entry(soc_end, &soc_dai->endpoints, list) {
if (!soc_end->dai_info->direction[stream])
continue;
+ if (dais[j].dai_type == SOC_SDW_DAI_TYPE_AMP && stream == SNDRV_PCM_STREAM_CAPTURE)
+ continue;
int link_num = ffs(soc_end->link_mask) - 1; |

Amps can provide reference stream to hosts DSP which can be used for input audio proocessing. But some AMD HW doesn't
support such a feature and hence reference stream should be selectively disabled for those. This patch adds the following quirk for the same
Suggested-by: Vijendar Mukunda Vijendar.Mukunda@amd.com