mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [v4 2/2] ASoC: mediatek: mt8188-mt6359: add rt5682s support
       [not found] ` <20231008014629.4971-3-xiazhengqiao@huaqin.corp-partner.google.com>
@ 2023-10-09 12:20   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-10-09 12:20 UTC (permalink / raw)
  To: xiazhengqiao, lgirdwood, robh+dt, broonie, matthias.bgg, perex,
	tiwai, trevor.wu, maso.huang
  Cc: alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

Il 08/10/23 03:46, xiazhengqiao ha scritto:
> To use RT5682S as the codec and MAX98390 as the amp, add a new
> sound card named mt8188_rt5682s.
> 
> Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>
> Reviewed-by: Trevor Wu <trevor.wu@mediatek.com>
> ---
>   sound/soc/mediatek/Kconfig                |   1 +
>   sound/soc/mediatek/mt8188/mt8188-mt6359.c | 141 +++++++++++++++++++++-
>   2 files changed, 140 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig
> index 8d1bc8814486..43c8fea00439 100644
> --- a/sound/soc/mediatek/Kconfig
> +++ b/sound/soc/mediatek/Kconfig
> @@ -250,6 +250,7 @@ config SND_SOC_MT8188_MT6359
>   	select SND_SOC_MAX98390
>   	select SND_SOC_NAU8315
>   	select SND_SOC_NAU8825
> +	select SND_SOC_RT5682S
>   	help
>   	  This adds support for ASoC machine driver for MediaTek MT8188
>   	  boards with the MT6359 and other I2S audio codecs.
> diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> index e2416b981e1f..66f246126728 100644
> --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> @@ -17,6 +17,7 @@
>   #include "mt8188-afe-common.h"
>   #include "../../codecs/nau8825.h"
>   #include "../../codecs/mt6359.h"
> +#include "../../codecs/rt5682.h"
>   #include "../common/mtk-afe-platform-driver.h"
>   #include "../common/mtk-soundcard-driver.h"
>   #include "../common/mtk-dsp-sof-common.h"
> @@ -32,7 +33,7 @@
>    #define TEST_MISO_DONE_2	BIT(29)
>   
>   #define NAU8825_HS_PRESENT	BIT(0)
> -
> +#define RT5682S_HS_PRESENT	BIT(1)
>   /*
>    * Maxim MAX98390
>    */
> @@ -52,6 +53,8 @@
>   #define SOF_DMA_UL4 "SOF_DMA_UL4"
>   #define SOF_DMA_UL5 "SOF_DMA_UL5"
>   
> +#define RT5682S_CODEC_DAI     "rt5682s-aif1"
> +
>   /* FE */
>   SND_SOC_DAILINK_DEFS(playback2,
>   		     DAILINK_COMP_ARRAY(COMP_CPU("DL2")),
> @@ -258,6 +261,17 @@ static struct snd_soc_jack_pin nau8825_jack_pins[] = {
>   	},
>   };
>   
> +static struct snd_soc_jack_pin rt5682s_jack_pins[] = {

nau8825_jack_pins is exactly the same as this one, can we please commonize
and avoid duplicate declarations?

> +	{
> +		.pin    = "Headphone Jack",
> +		.mask   = SND_JACK_HEADPHONE,
> +	},
> +	{
> +		.pin    = "Headset Mic",
> +		.mask   = SND_JACK_MICROPHONE,
> +	},
> +};
> +
>   struct mt8188_card_data {
>   	const char *name;
>   	unsigned long quirk;
> @@ -316,10 +330,18 @@ static const struct snd_soc_dapm_widget mt8188_nau8825_widgets[] = {
>   	SND_SOC_DAPM_HP("Headphone Jack", NULL),
>   };
>   
> +static const struct snd_soc_dapm_widget mt8188_rt5682s_widgets[] = {
> +	SND_SOC_DAPM_HP("Headphone Jack", NULL),
> +};

Same here...

> +
>   static const struct snd_kcontrol_new mt8188_nau8825_controls[] = {
>   	SOC_DAPM_PIN_SWITCH("Headphone Jack"),
>   };
>   
> +static const struct snd_kcontrol_new mt8188_rt5682s_controls[] = {
> +	SOC_DAPM_PIN_SWITCH("Headphone Jack"),
> +};

...and here.

Regards,
Angelo


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

* Re: [v4 1/2] ASoC: dt-bindings: mediatek,mt8188-mt6359: add RT5682S support
       [not found] ` <20231008014629.4971-2-xiazhengqiao@huaqin.corp-partner.google.com>
@ 2023-10-09 12:20   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 2+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-10-09 12:20 UTC (permalink / raw)
  To: xiazhengqiao, lgirdwood, robh+dt, broonie, matthias.bgg, perex,
	tiwai, trevor.wu, maso.huang
  Cc: alsa-devel, linux-kernel, linux-arm-kernel, linux-mediatek

Il 08/10/23 03:46, xiazhengqiao ha scritto:
> Add compatible string "mediatek,mt8188-rt5682s" to support new board
> with rt5682s codec.
> 
> Signed-off-by: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>
> Acked-by: Rob Herring <robh@kernel.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>


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

end of thread, other threads:[~2023-10-09 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20231008014629.4971-1-xiazhengqiao@huaqin.corp-partner.google.com>
     [not found] ` <20231008014629.4971-3-xiazhengqiao@huaqin.corp-partner.google.com>
2023-10-09 12:20   ` [v4 2/2] ASoC: mediatek: mt8188-mt6359: add rt5682s support AngeloGioacchino Del Regno
     [not found] ` <20231008014629.4971-2-xiazhengqiao@huaqin.corp-partner.google.com>
2023-10-09 12:20   ` [v4 1/2] ASoC: dt-bindings: mediatek,mt8188-mt6359: add RT5682S support AngeloGioacchino Del Regno

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

all inboxes | Powered by JetHome®