Skip to content

Commit a84a453

Browse files
committed
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 <pierre-louis.bossart@linux.intel.com>
1 parent 3dc7d4c commit a84a453

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
@@ -1396,12 +1396,22 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev,
13961396
hda_mach->mach_params.dmic_num = dmic_num;
13971397
pdata->tplg_filename = tplg_filename;
13981398

1399-
if (codec_num == 2) {
1399+
if (codec_num == 2 ||
1400+
(codec_num == 1 && !HDA_IDISP_CODEC(bus->codec_mask))) {
14001401
/*
14011402
* Prevent SoundWire links from starting when an external
14021403
* HDaudio codec is used
14031404
*/
14041405
hda_mach->mach_params.link_mask = 0;
1406+
} else {
1407+
/*
1408+
* Allow SoundWire links to start when no external HDaudio codec
1409+
* was detected. This will not create a SoundWire card but
1410+
* will help detect if any SoundWire codec reports as ATTACHED.
1411+
*/
1412+
struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
1413+
1414+
hda_mach->mach_params.link_mask = hdev->info.link_mask;
14051415
}
14061416

14071417
*mach = hda_mach;

0 commit comments

Comments
 (0)