From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: xiazhengqiao <xiazhengqiao@huaqin.corp-partner.google.com>,
lgirdwood@gmail.com, robh+dt@kernel.org, broonie@kernel.org,
matthias.bgg@gmail.com, perex@perex.cz, tiwai@suse.com,
trevor.wu@mediatek.com, maso.huang@mediatek.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [v4 2/2] ASoC: mediatek: mt8188-mt6359: add rt5682s support
Date: Mon, 9 Oct 2023 14:20:43 +0200 [thread overview]
Message-ID: <9c28b84e-2d4e-7bc2-88f3-ad5b30d2c727@collabora.com> (raw)
In-Reply-To: <20231008014629.4971-3-xiazhengqiao@huaqin.corp-partner.google.com>
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
next parent reply other threads:[~2023-10-09 12:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 ` AngeloGioacchino Del Regno [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c28b84e-2d4e-7bc2-88f3-ad5b30d2c727@collabora.com \
--to=angelogioacchino.delregno@collabora.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=maso.huang@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
--cc=trevor.wu@mediatek.com \
--cc=xiazhengqiao@huaqin.corp-partner.google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®