diff options
Diffstat (limited to 'sound/soc/sof/intel/hda-codec.c')
| -rw-r--r-- | sound/soc/sof/intel/hda-codec.c | 22 | 
1 files changed, 18 insertions, 4 deletions
diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index 3ca6795a89ba..827f84a0722e 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -84,6 +84,8 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address)  {  #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)  	struct hdac_hda_priv *hda_priv; +	struct snd_soc_acpi_mach_params *mach_params = NULL; +	struct snd_sof_pdata *pdata = sdev->pdata;  #endif  	struct hda_bus *hbus = sof_to_hbus(sdev);  	struct hdac_device *hdev; @@ -113,8 +115,19 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address)  	if (ret < 0)  		return ret; -	/* use legacy bus only for HDA codecs, idisp uses ext bus */ -	if ((resp & 0xFFFF0000) != IDISP_VID_INTEL) { +	if (pdata->machine) +		mach_params = (struct snd_soc_acpi_mach_params *) +			&pdata->machine->mach_params; + +	if ((resp & 0xFFFF0000) == IDISP_VID_INTEL) +		hda_priv->need_display_power = true; + +	/* +	 * if common HDMI codec driver is not used, codec load +	 * is skipped here and hdac_hdmi is used instead +	 */ +	if ((mach_params && mach_params->common_hdmi_codec_drv) || +	    (resp & 0xFFFF0000) != IDISP_VID_INTEL) {  		hdev->type = HDA_DEV_LEGACY;  		hda_codec_load_module(&hda_priv->codec);  	} @@ -155,7 +168,8 @@ int hda_codec_probe_bus(struct snd_sof_dev *sdev)  }  EXPORT_SYMBOL(hda_codec_probe_bus); -#if IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI) +#if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI) || \ +	IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)  void hda_codec_i915_get(struct snd_sof_dev *sdev)  { @@ -204,6 +218,6 @@ int hda_codec_i915_exit(struct snd_sof_dev *sdev)  }  EXPORT_SYMBOL(hda_codec_i915_exit); -#endif /* CONFIG_SND_SOC_HDAC_HDMI */ +#endif  MODULE_LICENSE("Dual BSD/GPL");  |