summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-10-27 15:35:20 -0400
committerMark Brown <broonie@kernel.org>2022-10-28 13:04:41 +0100
commit834c69d3b849625d5c5bb81a3425fc8deef5f16d (patch)
treef2e0f8537408982ed3c6bd13b0cb11e6c1acff42
parentce992ff38e1ed495be202c22d065b42c942e0475 (diff)
downloadlwn-834c69d3b849625d5c5bb81a3425fc8deef5f16d.tar.gz
lwn-834c69d3b849625d5c5bb81a3425fc8deef5f16d.zip
ASoC: SOF: Intel: remove option to disable the common_hdmi handling
We've been using the same option for quite some time now, it's time to remove the kernel parameter to disable the common HDaudio codec handling. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221027193540.259520-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sof/intel/hda-codec.c12
-rw-r--r--sound/soc/sof/intel/hda.c10
-rw-r--r--sound/soc/sof/intel/hda.h6
3 files changed, 7 insertions, 21 deletions
diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c
index 1e9afc48394c..977b35d09782 100644
--- a/sound/soc/sof/intel/hda-codec.c
+++ b/sound/soc/sof/intel/hda-codec.c
@@ -139,8 +139,7 @@ static struct hda_codec *hda_codec_device_init(struct hdac_bus *bus, int addr, i
}
/* probe individual codec */
-static int hda_codec_probe(struct snd_sof_dev *sdev, int address,
- bool hda_codec_use_common_hdmi)
+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;
@@ -170,10 +169,6 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address,
if (!hda_priv)
return -ENOMEM;
- /* only probe ASoC codec drivers for HDAC-HDMI */
- if (!hda_codec_use_common_hdmi && (resp & 0xFFFF0000) == IDISP_VID_INTEL)
- type = HDA_DEV_ASOC;
-
codec = hda_codec_device_init(&hbus->core, address, type);
ret = PTR_ERR_OR_ZERO(codec);
if (ret < 0)
@@ -221,8 +216,7 @@ out:
}
/* Codec initialization */
-void hda_codec_probe_bus(struct snd_sof_dev *sdev,
- bool hda_codec_use_common_hdmi)
+void hda_codec_probe_bus(struct snd_sof_dev *sdev)
{
struct hdac_bus *bus = sof_to_bus(sdev);
int i, ret;
@@ -233,7 +227,7 @@ void hda_codec_probe_bus(struct snd_sof_dev *sdev,
if (!(bus->codec_mask & (1 << i)))
continue;
- ret = hda_codec_probe(sdev, i, hda_codec_use_common_hdmi);
+ ret = hda_codec_probe(sdev, i);
if (ret < 0) {
dev_warn(bus->dev, "codec #%d probe error, ret: %d\n",
i, ret);
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 79c32d948b2d..fe0e8221534e 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -383,12 +383,6 @@ static int mclk_id_override = -1;
module_param_named(mclk_id, mclk_id_override, int, 0444);
MODULE_PARM_DESC(mclk_id, "SOF SSP mclk_id");
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
-static bool hda_codec_use_common_hdmi = IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI);
-module_param_named(use_common_hdmi, hda_codec_use_common_hdmi, bool, 0444);
-MODULE_PARM_DESC(use_common_hdmi, "SOF HDA use common HDMI codec driver");
-#endif
-
static const struct hda_dsp_msg_code hda_dsp_rom_fw_error_texts[] = {
{HDA_DSP_ROM_CSE_ERROR, "error: cse error"},
{HDA_DSP_ROM_CSE_WRONG_RESPONSE, "error: cse wrong response"},
@@ -929,7 +923,7 @@ skip_soundwire:
snd_hdac_ext_bus_get_ml_capabilities(bus);
/* create codec instances */
- hda_codec_probe_bus(sdev, hda_codec_use_common_hdmi);
+ hda_codec_probe_bus(sdev);
if (!HDA_IDISP_CODEC(bus->codec_mask))
hda_codec_i915_display_power(sdev, false);
@@ -1335,7 +1329,7 @@ static void hda_generic_machine_select(struct snd_sof_dev *sdev,
if (*mach) {
mach_params = &(*mach)->mach_params;
mach_params->codec_mask = bus->codec_mask;
- mach_params->common_hdmi_codec_drv = hda_codec_use_common_hdmi;
+ mach_params->common_hdmi_codec_drv = true;
}
}
#else
diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h
index 17ed7e60cae8..e715bae32cad 100644
--- a/sound/soc/sof/intel/hda.h
+++ b/sound/soc/sof/intel/hda.h
@@ -714,8 +714,7 @@ void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev);
/*
* HDA Codec operations.
*/
-void hda_codec_probe_bus(struct snd_sof_dev *sdev,
- bool hda_codec_use_common_hdmi);
+void hda_codec_probe_bus(struct snd_sof_dev *sdev);
void hda_codec_jack_wake_enable(struct snd_sof_dev *sdev, bool enable);
void hda_codec_jack_check(struct snd_sof_dev *sdev);
@@ -731,8 +730,7 @@ int hda_codec_i915_exit(struct snd_sof_dev *sdev);
#else
-static inline void hda_codec_i915_display_power(struct snd_sof_dev *sdev,
- bool enable) { }
+static inline void hda_codec_i915_display_power(struct snd_sof_dev *sdev, bool enable) { }
static inline int hda_codec_i915_init(struct snd_sof_dev *sdev) { return 0; }
static inline int hda_codec_i915_exit(struct snd_sof_dev *sdev) { return 0; }