From f84b7c11156827a0ca88dd38ff097a8a944f9507 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Tue, 10 Oct 2023 20:20:39 -0400 Subject: [PATCH 1/2] Revert "ASoC: hdac_hda: Conditionally register dais for HDMI and Analog" This reverts commit a2d0f50e3c4b49100eaec4a4e9e4dcea161596c3. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/hdac_hda.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c index 72916a387ad6d9..355f30779a3487 100644 --- a/sound/soc/codecs/hdac_hda.c +++ b/sound/soc/codecs/hdac_hda.c @@ -132,9 +132,6 @@ static struct snd_soc_dai_driver hdac_hda_dais[] = { .sig_bits = 24, }, }, -}; - -static struct snd_soc_dai_driver hdac_hda_hdmi_dais[] = { { .id = HDAC_HDMI_0_DAI_ID, .name = "intel-hdmi-hifi1", @@ -610,13 +607,6 @@ static const struct snd_soc_component_driver hdac_hda_codec = { .endianness = 1, }; -static const struct snd_soc_component_driver hdac_hda_hdmi_codec = { - .probe = hdac_hda_codec_probe, - .remove = hdac_hda_codec_remove, - .idle_bias_on = false, - .endianness = 1, -}; - static int hdac_hda_dev_probe(struct hdac_device *hdev) { struct hdac_ext_link *hlink; @@ -631,15 +621,9 @@ static int hdac_hda_dev_probe(struct hdac_device *hdev) snd_hdac_ext_bus_link_get(hdev->bus, hlink); /* ASoC specific initialization */ - if (snd_hda_device_is_hdmi(hdev)) - ret = devm_snd_soc_register_component(&hdev->dev, - &hdac_hda_hdmi_codec, hdac_hda_hdmi_dais, - ARRAY_SIZE(hdac_hda_hdmi_dais)); - else - ret = devm_snd_soc_register_component(&hdev->dev, - &hdac_hda_codec, hdac_hda_dais, - ARRAY_SIZE(hdac_hda_dais)); - + ret = devm_snd_soc_register_component(&hdev->dev, + &hdac_hda_codec, hdac_hda_dais, + ARRAY_SIZE(hdac_hda_dais)); if (ret < 0) { dev_err(&hdev->dev, "failed to register HDA codec %d\n", ret); return ret; From cfd32457555717766d8d51257e28b11854f37338 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Tue, 10 Oct 2023 20:21:01 -0400 Subject: [PATCH 2/2] Revert "ALSA: hda/hdmi: Add helper function to check if a device is HDMI codec" This reverts commit f3eac85ed41b0ebd6ae01763417c753b2523c7d9. Signed-off-by: Pierre-Louis Bossart --- include/sound/hdaudio.h | 10 ---------- sound/pci/hda/patch_hdmi.c | 13 ------------- 2 files changed, 23 deletions(-) diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index 5205d9507c0e9e..32c59053b48edc 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -158,16 +158,6 @@ bool snd_hdac_check_power_state(struct hdac_device *hdac, hda_nid_t nid, unsigned int target_state); unsigned int snd_hdac_sync_power_state(struct hdac_device *hdac, hda_nid_t nid, unsigned int target_state); - -#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC) -bool snd_hda_device_is_hdmi(struct hdac_device *hdev); -#else -static inline bool snd_hda_device_is_hdmi(struct hdac_device *hdev) -{ - return false; -} -#endif - /** * snd_hdac_read_parm - read a codec parameter * @codec: the codec object diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index d6943575c8c724..1cde2a69bdb4ba 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -4645,19 +4645,6 @@ HDA_CODEC_ENTRY(HDA_CODEC_ID_GENERIC_HDMI, "Generic HDMI", patch_generic_hdmi), }; MODULE_DEVICE_TABLE(hdaudio, snd_hda_id_hdmi); -bool snd_hda_device_is_hdmi(struct hdac_device *hdev) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(snd_hda_id_hdmi); i++) { - if (snd_hda_id_hdmi[i].vendor_id == hdev->vendor_id) - return true; - } - - return false; -} -EXPORT_SYMBOL_GPL(snd_hda_device_is_hdmi); - MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("HDMI HD-audio codec"); MODULE_ALIAS("snd-hda-codec-intelhdmi");