Skip to content

Commit c7ad7fa

Browse files
committed
ASoC: SOF: Intel: hda: enforce exclusion between HDaudio and SoundWire
On some platforms with an external HDaudio codec, the DSDT reports the presence of SoundWire devices. Pin-mux restrictions and board reworkds usually prevent coexistence between the two types of links, let's prevent unnecessary operations from starting. In the case of a single iDISP codec being detected, we still start the links even if no SoundWire machine configuration was detected, so that we can double-check what the hardware is and add the missing configuration if applicable. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent 91628ed commit c7ad7fa

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

sound/soc/sof/intel/hda.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,16 @@ static int hda_sdw_probe(struct snd_sof_dev *sdev)
291291
int hda_sdw_startup(struct snd_sof_dev *sdev)
292292
{
293293
struct sof_intel_hda_dev *hdev;
294+
struct snd_sof_pdata *pdata = sdev->pdata;
294295

295296
hdev = sdev->pdata->hw_pdata;
296297

297298
if (!hdev->sdw)
298299
return 0;
299300

301+
if (pdata->machine && !pdata->machine->mach_params.link_mask)
302+
return 0;
303+
300304
return sdw_intel_startup(hdev->sdw);
301305
}
302306

@@ -1136,6 +1140,14 @@ static int hda_generic_machine_select(struct snd_sof_dev *sdev)
11361140
hda_mach->mach_params.dmic_num = dmic_num;
11371141
pdata->machine = hda_mach;
11381142
pdata->tplg_filename = tplg_filename;
1143+
1144+
if (codec_num == 2) {
1145+
/*
1146+
* Prevent SoundWire links from starting when an external
1147+
* HDaudio codec is used
1148+
*/
1149+
hda_mach->mach_params.link_mask = 0;
1150+
}
11391151
}
11401152
}
11411153

0 commit comments

Comments
 (0)