Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f751b99

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion
The functionality described in Commit 61bef9e ("ASoC: SOF: Intel: hda: enforce exclusion between HDaudio and SoundWire") does not seem to be properly implemented with two issues that need to be corrected. a) The test used is incorrect when DisplayAudio codecs are not supported. b) Conversely when only Display Audio codecs can be found, we do want to start the SoundWire links, if any. That will help add the relevant topologies and machine descriptors, and identify cases where the SoundWire information in ACPI needs to be modified with a quirk. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 59960e6 commit f751b99

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,12 +1368,22 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev,
13681368
hda_mach->mach_params.dmic_num = dmic_num;
13691369
pdata->tplg_filename = tplg_filename;
13701370

1371-
if (codec_num == 2) {
1371+
if (codec_num == 2 ||
1372+
(codec_num == 1 && !HDA_IDISP_CODEC(bus->codec_mask))) {
13721373
/*
13731374
* Prevent SoundWire links from starting when an external
13741375
* HDaudio codec is used
13751376
*/
13761377
hda_mach->mach_params.link_mask = 0;
1378+
} else {
1379+
/*
1380+
* Allow SoundWire links to start when no external HDaudio codec
1381+
* was detected. This will not create a SoundWire card but
1382+
* will help detect if any SoundWire codec reports as ATTACHED.
1383+
*/
1384+
struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
1385+
1386+
hda_mach->mach_params.link_mask = hdev->info.link_mask;
13771387
}
13781388

13791389
*mach = hda_mach;

0 commit comments

Comments
 (0)