public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support
@ 2020-05-29 19:35 Pierre-Louis Bossart
  2020-05-29 19:35 ` [PATCH v2 1/3] ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmi Pierre-Louis Bossart
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2020-05-29 19:35 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, broonie, Pierre-Louis Bossart

This series provides the following updates to the Intel machine driver
Kconfig:

1. The first patch adds the explicit dependency on GPIOLIB when
SND_SOC_DMIC is selected.

2. SND_SOC_SOF_HDA_AUDIO_CODEC is required for using the legacy
HDA codec driver for HDMI support in SOF. The last 3 three patches
make the required changes to account for this.

changes since v1:
first patch for DMIC was merged already
rebase for HDMI on top of Arnd's RT5682 changes.

Libin Yang (3):
  ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common
    hdmi
  ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition
  ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition

 sound/soc/intel/boards/Kconfig        | 20 ++++++++++----------
 sound/soc/intel/boards/sof_pcm512x.c  |  9 ---------
 sound/soc/intel/boards/sof_sdw.c      |  8 --------
 sound/soc/intel/boards/sof_sdw_hdmi.c |  7 -------
 4 files changed, 10 insertions(+), 34 deletions(-)


base-commit: 89d73ccab20a684d8446cea4d8ac6a2608c8d390
-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/3] ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmi
  2020-05-29 19:35 [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Pierre-Louis Bossart
@ 2020-05-29 19:35 ` Pierre-Louis Bossart
  2020-05-29 19:35 ` [PATCH v2 2/3] ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2020-05-29 19:35 UTC (permalink / raw)
  To: alsa-devel
  Cc: Kai Vehmanen, tiwai, Ranjani Sridharan, Pierre-Louis Bossart,
	broonie, Libin Yang

From: Libin Yang <libin.yang@linux.intel.com>

If the driver uses common hdmi, SND_SOC_SOF_HDA_AUDIO_CODEC is required
to be enabled. Otherwise, the legacy hda codec driver will not be used.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/Kconfig | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 46073c04364a..a2a5798c9139 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -411,13 +411,13 @@ config SND_SOC_INTEL_KBL_RT5660_MACH
 
 endif ## SND_SOC_INTEL_KBL
 
-if SND_SOC_SOF_GEMINILAKE  && SND_SOC_SOF_HDA_LINK
+if SND_SOC_SOF_GEMINILAKE
 
 config SND_SOC_INTEL_GLK_DA7219_MAX98357A_MACH
 	tristate "GLK with DA7219 and MAX98357A in I2S Mode"
 	depends on I2C && ACPI && GPIOLIB
 	depends on MFD_INTEL_LPSS || COMPILE_TEST
-	depends on SND_HDA_CODEC_HDMI
+	depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
 	select SND_SOC_INTEL_BXT_DA7219_MAX98357A_COMMON
 	help
 	   This adds support for ASoC machine driver for Geminilake platforms
@@ -429,7 +429,7 @@ config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH
 	tristate "GLK with RT5682 and MAX98357A in I2S Mode"
 	depends on I2C && ACPI && GPIOLIB
 	depends on MFD_INTEL_LPSS || COMPILE_TEST
-	depends on SND_HDA_CODEC_HDMI
+	depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
 	select SND_SOC_RT5682_I2C
 	select SND_SOC_MAX98357A
 	select SND_SOC_DMIC
@@ -440,7 +440,7 @@ config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH
 	   Say Y if you have such a device.
 	   If unsure select "N".
 
-endif ## SND_SOC_SOF_GEMINILAKE  && SND_SOC_SOF_HDA_LINK
+endif ## SND_SOC_SOF_GEMINILAKE
 
 if SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || SND_SOC_SOF_HDA_AUDIO_CODEC
 
@@ -463,9 +463,9 @@ if SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL
 config SND_SOC_INTEL_SOF_RT5682_MACH
 	tristate "SOF with rt5682 codec in I2S Mode"
 	depends on I2C && ACPI && GPIOLIB
-	depends on (SND_SOC_SOF_HDA_LINK && (MFD_INTEL_LPSS || COMPILE_TEST)) ||\
+	depends on ((SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC) &&\
+		    (MFD_INTEL_LPSS || COMPILE_TEST)) ||\
 		   (SND_SOC_SOF_BAYTRAIL && (X86_INTEL_LPSS || COMPILE_TEST))
-	depends on SND_HDA_CODEC_HDMI
 	select SND_SOC_MAX98373
 	select SND_SOC_RT1015
 	select SND_SOC_RT5682_I2C
@@ -509,7 +509,7 @@ config SND_SOC_INTEL_SOF_CML_RT1011_RT5682_MACH
 	tristate "CML with RT1011 and RT5682 in I2S Mode"
 	depends on I2C && ACPI && GPIOLIB
 	depends on MFD_INTEL_LPSS || COMPILE_TEST
-	depends on SND_HDA_CODEC_HDMI
+	depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
 	select SND_SOC_RT1011
 	select SND_SOC_RT5682_I2C
 	select SND_SOC_DMIC
@@ -528,7 +528,7 @@ config SND_SOC_INTEL_SOF_DA7219_MAX98373_MACH
 	tristate "SOF with DA7219 and MAX98373/MAX98360A in I2S Mode"
 	depends on I2C && ACPI && GPIOLIB
 	depends on MFD_INTEL_LPSS || COMPILE_TEST
-	depends on SND_HDA_CODEC_HDMI
+	depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
 	select SND_SOC_DA7219
 	select SND_SOC_MAX98373
 	select SND_SOC_DMIC
@@ -546,7 +546,7 @@ config SND_SOC_INTEL_EHL_RT5660_MACH
 	tristate "EHL with RT5660 in I2S mode"
 	depends on I2C && ACPI && GPIOLIB
 	depends on MFD_INTEL_LPSS || COMPILE_TEST
-	depends on SND_HDA_CODEC_HDMI
+	depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
 	select SND_SOC_RT5660
 	select SND_SOC_DMIC
 	help
@@ -563,7 +563,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
 	depends on MFD_INTEL_LPSS || COMPILE_TEST
 	depends on SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES || COMPILE_TEST
 	depends on SOUNDWIRE
-	depends on SND_HDA_CODEC_HDMI
+	depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC
 	select SND_SOC_RT700_SDW
 	select SND_SOC_RT711_SDW
 	select SND_SOC_RT1308_SDW
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition
  2020-05-29 19:35 [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Pierre-Louis Bossart
  2020-05-29 19:35 ` [PATCH v2 1/3] ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmi Pierre-Louis Bossart
@ 2020-05-29 19:35 ` Pierre-Louis Bossart
  2020-05-29 19:35 ` [PATCH v2 3/3] ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition Pierre-Louis Bossart
  2020-05-29 21:05 ` [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2020-05-29 19:35 UTC (permalink / raw)
  To: alsa-devel
  Cc: Kai Vehmanen, tiwai, Ranjani Sridharan, Pierre-Louis Bossart,
	broonie, Libin Yang

From: Libin Yang <libin.yang@linux.intel.com>

As CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC is always enabled in sof-soundwire
driver, let's remove the test of CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC
in the code.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_sdw.c      | 8 --------
 sound/soc/intel/boards/sof_sdw_hdmi.c | 7 -------
 2 files changed, 15 deletions(-)

diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index 47820316df57..e1c1a8ba78e6 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -663,9 +663,7 @@ static int sof_card_dai_links_create(struct device *dev,
 				     struct snd_soc_card *card)
 {
 	int ssp_num, sdw_be_num = 0, hdmi_num = 0, dmic_num;
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
 	struct snd_soc_dai_link_component *idisp_components;
-#endif
 	struct snd_soc_dai_link_component *ssp_components;
 	struct snd_soc_acpi_mach_params *mach_params;
 	const struct snd_soc_acpi_link_adr *adr_link;
@@ -686,10 +684,8 @@ static int sof_card_dai_links_create(struct device *dev,
 	for (i = 0; i < ARRAY_SIZE(codec_info_list); i++)
 		codec_info_list[i].amp_num = 0;
 
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
 	hdmi_num = sof_sdw_quirk & SOF_SDW_TGL_HDMI ?
 				SOF_TGL_HDMI_COUNT : SOF_PRE_TGL_HDMI_COUNT;
-#endif
 
 	ssp_mask = SOF_SSP_GET_PORT(sof_sdw_quirk);
 	/*
@@ -849,7 +845,6 @@ static int sof_card_dai_links_create(struct device *dev,
 		INC_ID(be_id, cpu_id, link_id);
 	}
 
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
 	/* HDMI */
 	if (hdmi_num > 0) {
 		idisp_components = devm_kcalloc(dev, hdmi_num,
@@ -886,7 +881,6 @@ static int sof_card_dai_links_create(struct device *dev,
 			      sof_sdw_hdmi_init, NULL);
 		INC_ID(be_id, cpu_id, link_id);
 	}
-#endif
 
 	card->dai_link = links;
 	card->num_links = num_links;
@@ -920,9 +914,7 @@ static int mc_probe(struct platform_device *pdev)
 
 	dmi_check_system(sof_sdw_quirk_table);
 
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
 	INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
-#endif
 
 	card->dev = &pdev->dev;
 
diff --git a/sound/soc/intel/boards/sof_sdw_hdmi.c b/sound/soc/intel/boards/sof_sdw_hdmi.c
index b60852339330..0654b38a7e0d 100644
--- a/sound/soc/intel/boards/sof_sdw_hdmi.c
+++ b/sound/soc/intel/boards/sof_sdw_hdmi.c
@@ -16,7 +16,6 @@
 #include "../../codecs/hdac_hdmi.h"
 #include "hda_dsp_common.h"
 
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
 static struct snd_soc_jack hdmi[MAX_HDMI_NUM];
 
 struct hdmi_pcm {
@@ -89,9 +88,3 @@ int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
 
 	return hdac_hdmi_jack_port_init(component, &card->dapm);
 }
-#else
-int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card)
-{
-	return 0;
-}
-#endif
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition
  2020-05-29 19:35 [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Pierre-Louis Bossart
  2020-05-29 19:35 ` [PATCH v2 1/3] ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmi Pierre-Louis Bossart
  2020-05-29 19:35 ` [PATCH v2 2/3] ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition Pierre-Louis Bossart
@ 2020-05-29 19:35 ` Pierre-Louis Bossart
  2020-05-29 21:05 ` [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2020-05-29 19:35 UTC (permalink / raw)
  To: alsa-devel
  Cc: Kai Vehmanen, tiwai, Ranjani Sridharan, Pierre-Louis Bossart,
	broonie, Libin Yang

From: Libin Yang <libin.yang@linux.intel.com>

As CONFIG_SND_HDA_CODEC_HDMI is always enabled in sof_pcm512x,
let's remove the test of CONFIG_SND_HDA_CODEC_HDMI in the
sof_pcm512x driver.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_pcm512x.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/sound/soc/intel/boards/sof_pcm512x.c b/sound/soc/intel/boards/sof_pcm512x.c
index f983c7fbb1d1..9fa8a4911276 100644
--- a/sound/soc/intel/boards/sof_pcm512x.c
+++ b/sound/soc/intel/boards/sof_pcm512x.c
@@ -126,7 +126,6 @@ static struct snd_soc_dai_link_component platform_component[] = {
 	}
 };
 
-#if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI)
 static int sof_card_late_probe(struct snd_soc_card *card)
 {
 	struct sof_card_private *ctx = snd_soc_card_get_drvdata(card);
@@ -146,12 +145,6 @@ static int sof_card_late_probe(struct snd_soc_card *card)
 
 	return hda_dsp_hdmi_build_controls(card, pcm->codec_dai->component);
 }
-#else
-static int sof_card_late_probe(struct snd_soc_card *card)
-{
-	return 0;
-}
-#endif
 
 static const struct snd_kcontrol_new sof_controls[] = {
 	SOC_DAPM_PIN_SWITCH("Ext Spk"),
@@ -374,14 +367,12 @@ static int sof_audio_probe(struct platform_device *pdev)
 		sof_pcm512x_quirk = SOF_PCM512X_SSP_CODEC(2);
 	} else {
 		dmic_be_num = 2;
-#if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI)
 		if (mach->mach_params.common_hdmi_codec_drv &&
 		    (mach->mach_params.codec_mask & IDISP_CODEC_MASK))
 			ctx->idisp_codec = true;
 
 		/* links are always present in topology */
 		hdmi_num = 3;
-#endif
 	}
 
 	dmi_check_system(sof_pcm512x_quirk_table);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support
  2020-05-29 19:35 [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Pierre-Louis Bossart
                   ` (2 preceding siblings ...)
  2020-05-29 19:35 ` [PATCH v2 3/3] ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition Pierre-Louis Bossart
@ 2020-05-29 21:05 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2020-05-29 21:05 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel; +Cc: tiwai

On Fri, 29 May 2020 14:35:44 -0500, Pierre-Louis Bossart wrote:
> This series provides the following updates to the Intel machine driver
> Kconfig:
> 
> 1. The first patch adds the explicit dependency on GPIOLIB when
> SND_SOC_DMIC is selected.
> 
> 2. SND_SOC_SOF_HDA_AUDIO_CODEC is required for using the legacy
> HDA codec driver for HDMI support in SOF. The last 3 three patches
> make the required changes to account for this.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmi
      commit: 8f529f0175aa02266542714a569b885dd145b61c
[2/3] ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition
      commit: 38acab2d61073ed4a684533d46505feba3eecf67
[3/3] ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition
      commit: 1e7cb64b0ab5a810b05ed49dd263605add41ac5d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-29 21:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-29 19:35 [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Pierre-Louis Bossart
2020-05-29 19:35 ` [PATCH v2 1/3] ASoC: intel: add depends on SND_SOC_SOF_HDA_AUDIO_CODEC for common hdmi Pierre-Louis Bossart
2020-05-29 19:35 ` [PATCH v2 2/3] ASoC: sof-sdw: remove CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC condition Pierre-Louis Bossart
2020-05-29 19:35 ` [PATCH v2 3/3] ASoC: sof_pcm512x: remove CONFIG_SND_HDA_CODEC_HDMI condition Pierre-Louis Bossart
2020-05-29 21:05 ` [PATCH v2 0/3] Kconfig updates for DMIC and SOF HDMI support Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox