All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: Intel: sof_rt5682: add mtl_rt5650 support
@ 2023-11-02 16:48 Mac Chiang
  2023-11-02 17:16 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 2+ messages in thread
From: Mac Chiang @ 2023-11-02 16:48 UTC (permalink / raw)
  To: alsa-devel
  Cc: cezary.rojewski, pierre-louis.bossart, liam.r.girdwood,
	peter.ujfalusi, yung-chuan.liao, ranjani.sridharan, kai.vehmanen,
	mac.chiang

RT5650 is I2S codec integrated with HP and SPK.
The HW board connects SoC I2S to RT5650 codec as below:

I2S0: ALC5650 aif1 for Speaker
I2S2: ALC5650 aif2 for Headphone

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
---
pick up from Link: https://github.com/thesofproject/linux/pull/4661
for Chrome MTL projects.

Changes v2:
  - regen format patch due to v1 from github remote
---
 sound/soc/intel/boards/sof_rt5682.c               |  9 +++++++++
 sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 12 ++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
index 06ad15af46de..9723479f43da 100644
--- a/sound/soc/intel/boards/sof_rt5682.c
+++ b/sound/soc/intel/boards/sof_rt5682.c
@@ -1147,6 +1147,15 @@ static const struct platform_device_id board_ids[] = {
 					SOF_RT5682_SSP_AMP(0) |
 					SOF_RT5682_NUM_HDMIDEV(3)),
 	},
+	{
+		.name = "mtl_rt5650",
+		.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
+					SOF_RT5682_SSP_CODEC(2) |
+					SOF_RT5682_SSP_AMP(0) |
+					SOF_RT5682_NUM_HDMIDEV(3) |
+					SOF_BT_OFFLOAD_SSP(1) |
+					SOF_SSP_BT_OFFLOAD_PRESENT),
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(platform, board_ids);
diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c
index 301b8142d554..af4224bff718 100644
--- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c
+++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c
@@ -40,6 +40,11 @@ static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
 	.codecs = {"INTC10B0"}
 };
 
+static const struct snd_soc_acpi_codecs mtl_rt5650_amp = {
+	.num_codecs = 1,
+	.codecs = {"10EC5650"}
+};
+
 struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
 	{
 		.comp_ids = &mtl_rt5682_rt5682s_hp,
@@ -77,6 +82,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
 					SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
 					SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
 	},
+	{
+		.id = "10EC5650",
+		.drv_name = "mtl_rt5650",
+		.machine_quirk = snd_soc_acpi_codec_list,
+		.quirk_data = &mtl_rt5650_amp,
+		.sof_tplg_filename = "sof-mtl-rt5650.tplg",
+	},
 	/* place amp-only boards in the end of table */
 	{
 		.id = "INTC10B0",
-- 
2.20.1


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

* Re: [PATCH v2] ASoC: Intel: sof_rt5682: add mtl_rt5650 support
  2023-11-02 16:48 [PATCH v2] ASoC: Intel: sof_rt5682: add mtl_rt5650 support Mac Chiang
@ 2023-11-02 17:16 ` Pierre-Louis Bossart
  0 siblings, 0 replies; 2+ messages in thread
From: Pierre-Louis Bossart @ 2023-11-02 17:16 UTC (permalink / raw)
  To: Mac Chiang, alsa-devel
  Cc: cezary.rojewski, liam.r.girdwood, peter.ujfalusi, yung-chuan.liao,
	ranjani.sridharan, kai.vehmanen

The code is fine but this patch is problematic on three counts:

a) you didn't Cc: maintainers
b) by sending this directly, you lost Bard and my Reviewed-by tags
c) the timing is bad, we don't send patches during the merge window
(unless they are critical fixes)

On 11/2/23 11:48, Mac Chiang wrote:
> RT5650 is I2S codec integrated with HP and SPK.
> The HW board connects SoC I2S to RT5650 codec as below:
> 
> I2S0: ALC5650 aif1 for Speaker
> I2S2: ALC5650 aif2 for Headphone
> 
> Signed-off-by: Mac Chiang <mac.chiang@intel.com>
> ---
> pick up from Link: https://github.com/thesofproject/linux/pull/4661
> for Chrome MTL projects.
> 
> Changes v2:
>   - regen format patch due to v1 from github remote
> ---
>  sound/soc/intel/boards/sof_rt5682.c               |  9 +++++++++
>  sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 12 ++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
> index 06ad15af46de..9723479f43da 100644
> --- a/sound/soc/intel/boards/sof_rt5682.c
> +++ b/sound/soc/intel/boards/sof_rt5682.c
> @@ -1147,6 +1147,15 @@ static const struct platform_device_id board_ids[] = {
>  					SOF_RT5682_SSP_AMP(0) |
>  					SOF_RT5682_NUM_HDMIDEV(3)),
>  	},
> +	{
> +		.name = "mtl_rt5650",
> +		.driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN |
> +					SOF_RT5682_SSP_CODEC(2) |
> +					SOF_RT5682_SSP_AMP(0) |
> +					SOF_RT5682_NUM_HDMIDEV(3) |
> +					SOF_BT_OFFLOAD_SSP(1) |
> +					SOF_SSP_BT_OFFLOAD_PRESENT),
> +	},
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(platform, board_ids);
> diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c
> index 301b8142d554..af4224bff718 100644
> --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c
> +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c
> @@ -40,6 +40,11 @@ static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = {
>  	.codecs = {"INTC10B0"}
>  };
>  
> +static const struct snd_soc_acpi_codecs mtl_rt5650_amp = {
> +	.num_codecs = 1,
> +	.codecs = {"10EC5650"}
> +};
> +
>  struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
>  	{
>  		.comp_ids = &mtl_rt5682_rt5682s_hp,
> @@ -77,6 +82,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = {
>  					SND_SOC_ACPI_TPLG_INTEL_SSP_MSB |
>  					SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER,
>  	},
> +	{
> +		.id = "10EC5650",
> +		.drv_name = "mtl_rt5650",
> +		.machine_quirk = snd_soc_acpi_codec_list,
> +		.quirk_data = &mtl_rt5650_amp,
> +		.sof_tplg_filename = "sof-mtl-rt5650.tplg",
> +	},
>  	/* place amp-only boards in the end of table */
>  	{
>  		.id = "INTC10B0",

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

end of thread, other threads:[~2023-11-02 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 16:48 [PATCH v2] ASoC: Intel: sof_rt5682: add mtl_rt5650 support Mac Chiang
2023-11-02 17:16 ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.