lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <9c28b84e-2d4e-7bc2-88f3-ad5b30d2c727@collabora.com>
Date:   Mon, 9 Oct 2023 14:20:43 +0200
From:   AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
To:     xiazhengqiao <xiazhengqiao@...qin.corp-partner.google.com>,
        lgirdwood@...il.com, robh+dt@...nel.org, broonie@...nel.org,
        matthias.bgg@...il.com, perex@...ex.cz, tiwai@...e.com,
        trevor.wu@...iatek.com, maso.huang@...iatek.com
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: Re: [v4 2/2] ASoC: mediatek: mt8188-mt6359: add rt5682s support

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@...qin.corp-partner.google.com>
> Reviewed-by: Trevor Wu <trevor.wu@...iatek.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ