]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: Intel: skl_hda_dsp_generic: remove hdac-hdmi support
authorBrent Lu <brent.lu@intel.com>
Tue, 27 Aug 2024 12:32:10 +0000 (20:32 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 28 Aug 2024 12:02:01 +0000 (13:02 +0100)
Since this machine driver has no longer been enumerated by SKL
platform driver, we could remove hdac-hdmi support code just like
what we did to other SOF machine drivers.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20240827123215.258859-13-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/Kconfig
sound/soc/intel/boards/skl_hda_dsp_common.c
sound/soc/intel/boards/skl_hda_dsp_common.h
sound/soc/intel/boards/skl_hda_dsp_generic.c

index 1141fe1263cec00c7f7d268a7a51557dfc25ca9e..793a9170513aacae3c956ce690440d1615a3d46d 100644 (file)
@@ -305,7 +305,6 @@ if SND_SOC_SOF_HDA_AUDIO_CODEC
 config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
        tristate "Skylake+ with HDA Codecs"
        depends on SND_HDA_CODEC_HDMI
-       select SND_SOC_HDAC_HDMI
        select SND_SOC_INTEL_HDA_DSP_COMMON
        select SND_SOC_DMIC
        # SND_SOC_HDAC_HDA is already selected
index 5eb63f4df24103b221c18309765373b6fcda1e85..d1de772e9304fa4e49c9fd72e36782d98a8d0e35 100644 (file)
@@ -11,7 +11,6 @@
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
-#include "../../codecs/hdac_hdmi.h"
 #include "skl_hda_dsp_common.h"
 
 #include <sound/hda_codec.h>
@@ -35,7 +34,6 @@ int skl_hda_hdmi_add_pcm(struct snd_soc_card *card, int device)
        if (!pcm->codec_dai)
                return -EINVAL;
 
-       pcm->device = device;
        list_add_tail(&pcm->head, &ctx->hdmi_pcm_list);
 
        return 0;
@@ -150,32 +148,18 @@ struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS] = {
 int skl_hda_hdmi_jack_init(struct snd_soc_card *card)
 {
        struct skl_hda_private *ctx = snd_soc_card_get_drvdata(card);
-       struct snd_soc_component *component = NULL;
+       struct snd_soc_component *component;
        struct skl_hda_hdmi_pcm *pcm;
-       char jack_name[NAME_SIZE];
-       int err;
 
-       if (ctx->common_hdmi_codec_drv)
-               return skl_hda_hdmi_build_controls(card);
-
-       list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
-               component = pcm->codec_dai->component;
-               snprintf(jack_name, sizeof(jack_name),
-                        "HDMI/DP, pcm=%d Jack", pcm->device);
-               err = snd_soc_card_jack_new(card, jack_name,
-                                           SND_JACK_AVOUT, &pcm->hdmi_jack);
-
-               if (err)
-                       return err;
-
-               err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device,
-                                         &pcm->hdmi_jack);
-               if (err < 0)
-                       return err;
-       }
+       /* HDMI disabled, do not create controls */
+       if (list_empty(&ctx->hdmi_pcm_list))
+               return 0;
 
+       pcm = list_first_entry(&ctx->hdmi_pcm_list, struct skl_hda_hdmi_pcm,
+                              head);
+       component = pcm->codec_dai->component;
        if (!component)
                return -EINVAL;
 
-       return hdac_hdmi_jack_port_init(component, &card->dapm);
+       return hda_dsp_hdmi_build_controls(card, component);
 }
index 9d714f747dcad4721a2cc3878cd1eaa200023780..8455f953f4b83498ed7b05b75f3791d8529627c1 100644 (file)
@@ -23,8 +23,6 @@
 struct skl_hda_hdmi_pcm {
        struct list_head head;
        struct snd_soc_dai *codec_dai;
-       struct snd_soc_jack hdmi_jack;
-       int device;
 };
 
 struct skl_hda_private {
@@ -33,7 +31,6 @@ struct skl_hda_private {
        int pcm_count;
        int dai_index;
        const char *platform_name;
-       bool common_hdmi_codec_drv;
        bool idisp_codec;
        bool bt_offload_present;
        int ssp_bt;
@@ -43,27 +40,4 @@ extern struct snd_soc_dai_link skl_hda_be_dai_links[HDA_DSP_MAX_BE_DAI_LINKS];
 int skl_hda_hdmi_jack_init(struct snd_soc_card *card);
 int skl_hda_hdmi_add_pcm(struct snd_soc_card *card, int device);
 
-/*
- * Search card topology and register HDMI PCM related controls
- * to codec driver.
- */
-static inline int skl_hda_hdmi_build_controls(struct snd_soc_card *card)
-{
-       struct skl_hda_private *ctx = snd_soc_card_get_drvdata(card);
-       struct snd_soc_component *component;
-       struct skl_hda_hdmi_pcm *pcm;
-
-       /* HDMI disabled, do not create controls */
-       if (list_empty(&ctx->hdmi_pcm_list))
-               return 0;
-
-       pcm = list_first_entry(&ctx->hdmi_pcm_list, struct skl_hda_hdmi_pcm,
-                              head);
-       component = pcm->codec_dai->component;
-       if (!component)
-               return -EINVAL;
-
-       return hda_dsp_hdmi_build_controls(card, component);
-}
-
 #endif /* __SOUND_SOC_HDA_DSP_COMMON_H */
index 927c73bef06514df3d9f8c30aa64cc2a074dc9e0..860a21915bce67eeba679f1216b2d7c41df36674 100644 (file)
@@ -13,7 +13,6 @@
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/soc-acpi.h>
-#include "../../codecs/hdac_hdmi.h"
 #include "skl_hda_dsp_common.h"
 
 static const struct snd_soc_dapm_widget skl_hda_widgets[] = {
@@ -208,7 +207,7 @@ static void skl_set_hda_codec_autosuspend_delay(struct snd_soc_card *card)
 
 static int skl_hda_audio_probe(struct platform_device *pdev)
 {
-       struct snd_soc_acpi_mach *mach;
+       struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
        struct skl_hda_private *ctx;
        struct snd_soc_card *card;
        int ret;
@@ -221,10 +220,6 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
 
        INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
 
-       mach = pdev->dev.platform_data;
-       if (!mach)
-               return -EINVAL;
-
        card = &ctx->card;
        card->name = "hda-dsp",
        card->owner = THIS_MODULE,
@@ -251,7 +246,6 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
        ctx->pcm_count = card->num_links;
        ctx->dai_index = 1; /* hdmi codec dai name starts from index 1 */
        ctx->platform_name = mach->mach_params.platform;
-       ctx->common_hdmi_codec_drv = mach->mach_params.common_hdmi_codec_drv;
 
        card->dev = &pdev->dev;
        if (!snd_soc_acpi_sof_parent(&pdev->dev))