diff mbox series

[09/23] ASoC: Intel: sof_nau8825: remove hdac-hdmi support

Message ID 20231012190826.142619-10-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit 3f95969ec478ffd0c40544b1611e82271926377a
Headers show
Series ASoC: Intel: boards: updates for 6.7 | expand

Commit Message

Pierre-Louis Bossart Oct. 12, 2023, 7:08 p.m. UTC
From: Brent Lu <brent.lu@intel.com>

Remove hdac-hdmi support code since we are now using
snd-hda-codec-hdmi codec driver for hdmi.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/Kconfig       |  1 -
 sound/soc/intel/boards/sof_nau8825.c | 11 ++---------
 2 files changed, 2 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index d130244c8705..b5f3887e0323 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -564,7 +564,6 @@  config SND_SOC_INTEL_SOF_NAU8825_MACH
 	select SND_SOC_MAX98357A
 	select SND_SOC_NAU8315
 	select SND_SOC_DMIC
-	select SND_SOC_HDAC_HDMI
 	select SND_SOC_INTEL_HDA_DSP_COMMON
 	select SND_SOC_INTEL_SOF_MAXIM_COMMON
 	select SND_SOC_INTEL_SOF_NUVOTON_COMMON
diff --git a/sound/soc/intel/boards/sof_nau8825.c b/sound/soc/intel/boards/sof_nau8825.c
index f9a52dab034f..496a6401404d 100644
--- a/sound/soc/intel/boards/sof_nau8825.c
+++ b/sound/soc/intel/boards/sof_nau8825.c
@@ -26,8 +26,6 @@ 
 #include "sof_nuvoton_common.h"
 #include "sof_ssp_common.h"
 
-#define NAME_SIZE 32
-
 #define SOF_NAU8825_SSP_CODEC(quirk)		((quirk) & GENMASK(2, 0))
 #define SOF_NAU8825_SSP_CODEC_MASK		(GENMASK(2, 0))
 #define SOF_NAU8825_SSP_AMP_SHIFT		4
@@ -51,7 +49,6 @@  static unsigned long sof_nau8825_quirk = SOF_NAU8825_SSP_CODEC(0);
 struct sof_hdmi_pcm {
 	struct list_head head;
 	struct snd_soc_dai *codec_dai;
-	int device;
 };
 
 struct sof_card_private {
@@ -72,8 +69,6 @@  static int sof_hdmi_init(struct snd_soc_pcm_runtime *rtd)
 	if (!pcm)
 		return -ENOMEM;
 
-	/* dai_link id is 1:1 mapped to the PCM device */
-	pcm->device = rtd->dai_link->id;
 	pcm->codec_dai = dai;
 
 	list_add_tail(&pcm->head, &ctx->hdmi_pcm_list);
@@ -398,7 +393,7 @@  sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
 		links[id].num_codecs = 1;
 		links[id].platforms = platform_component;
 		links[id].num_platforms = ARRAY_SIZE(platform_component);
-		links[id].init = sof_hdmi_init;
+		links[id].init = (i == 1) ? sof_hdmi_init : NULL;
 		links[id].dpcm_playback = 1;
 		links[id].no_pcm = 1;
 		id++;
@@ -485,8 +480,8 @@  sof_card_dai_links_create(struct device *dev, enum sof_ssp_codec amp_type,
 
 static int sof_audio_probe(struct platform_device *pdev)
 {
+	struct snd_soc_acpi_mach *mach = pdev->dev.platform_data;
 	struct snd_soc_dai_link *dai_links;
-	struct snd_soc_acpi_mach *mach;
 	struct sof_card_private *ctx;
 	int dmic_be_num, hdmi_num;
 	int ret, ssp_amp, ssp_codec;
@@ -498,8 +493,6 @@  static int sof_audio_probe(struct platform_device *pdev)
 	if (pdev->id_entry && pdev->id_entry->driver_data)
 		sof_nau8825_quirk = (unsigned long)pdev->id_entry->driver_data;
 
-	mach = pdev->dev.platform_data;
-
 	ctx->codec_type = sof_ssp_detect_codec_type(&pdev->dev);
 	ctx->amp_type = sof_ssp_detect_amp_type(&pdev->dev);