devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Trevor Wu (吳文良)" <Trevor.Wu@mediatek.com>
To: "robh+dt@kernel.org" <robh+dt@kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"tiwai@suse.com" <tiwai@suse.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"perex@perex.cz" <perex@perex.cz>,
	"angelogioacchino.delregno@collabora.com" 
	<angelogioacchino.delregno@collabora.com>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org" 
	<linux-mediatek@lists.infradead.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 4/5] ASoC: mediatek: mt8188-mt6359: support new board with nau88255
Date: Wed, 17 May 2023 12:41:59 +0000	[thread overview]
Message-ID: <c24d9d21aae0977c98f4901692ec2dc12122c2d8.camel@mediatek.com> (raw)
In-Reply-To: <8b76c893-e7bc-7a99-b86d-74e3378f9b4e@collabora.com>

On Wed, 2023-05-17 at 13:54 +0200, AngeloGioacchino Del Regno wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 
> 
> Il 17/05/23 13:15, Trevor Wu ha scritto:
> > This patch adds multiple i2s codecs support including NAU88L25,
> > MAX98390, and the dumb amp like NAU8318 usage. In addition, dmic-
> > codec
> > is also added to skip the beginning pop noise.
> > 
> > Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
> > ---
> >   sound/soc/mediatek/Kconfig                |   4 +
> >   sound/soc/mediatek/mt8188/mt8188-mt6359.c | 267
> > +++++++++++++++++++++-
> >   2 files changed, 270 insertions(+), 1 deletion(-)
> > 
> > diff --git a/sound/soc/mediatek/Kconfig
> > b/sound/soc/mediatek/Kconfig
> > index 4baac72677d9..4ea012342b52 100644
> > --- a/sound/soc/mediatek/Kconfig
> > +++ b/sound/soc/mediatek/Kconfig
> > @@ -225,6 +225,10 @@ config SND_SOC_MT8188_MT6359
> >       depends on SND_SOC_MT8188 && MTK_PMIC_WRAP
> >       select SND_SOC_MT6359
> >       select SND_SOC_HDMI_CODEC
> > +     select SND_SOC_DMIC
> > +     select SND_SOC_MAX98390
> > +     select SND_SOC_NAU8315
> > +     select SND_SOC_NAU8825
> >       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 6c3f36e2fffd..15fce2741f01 100644
> > --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> > +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c
> > @@ -6,6 +6,7 @@
> >    * Author: Trevor Wu <trevor.wu@mediatek.com>
> >    */
> > 
> > +#include <linux/input.h>
> >   #include <linux/module.h>
> >   #include <linux/of_device.h>
> >   #include <linux/pm_runtime.h>
> > @@ -13,10 +14,25 @@
> >   #include <sound/pcm_params.h>
> >   #include <sound/soc.h>
> >   #include "mt8188-afe-common.h"
> > +#include "../../codecs/nau8825.h"
> >   #include "../../codecs/mt6359.h"
> >   #include "../common/mtk-afe-platform-driver.h"
> >   #include "../common/mtk-soundcard-driver.h"
> > 
> > +/*
> > + * Maxim MAX98390
> > + */
> > +#define MAX98390_CODEC_DAI     "max98390-aif1"
> > +#define MAX98390_DEV0_NAME     "max98390.0-0038" /* rear right */
> > +#define MAX98390_DEV1_NAME     "max98390.0-0039" /* rear left */
> > +#define MAX98390_DEV2_NAME     "max98390.0-003a" /* front right */
> > +#define MAX98390_DEV3_NAME     "max98390.0-003b" /* front left */
> > +
> > +/*
> > + * Nau88l25
> > + */
> > +#define NAU8825_CODEC_DAI  "nau8825-hifi"
> > +
> >   /* FE */
> >   SND_SOC_DAILINK_DEFS(playback2,
> >                    DAILINK_COMP_ARRAY(COMP_CPU("DL2")),
> > @@ -143,12 +159,15 @@ SND_SOC_DAILINK_DEFS(pcm1,
> >   SND_SOC_DAILINK_DEFS(ul_src,
> >                    DAILINK_COMP_ARRAY(COMP_CPU("UL_SRC")),
> >                    DAILINK_COMP_ARRAY(COMP_CODEC("mt6359-sound",
> > -                                                "mt6359-snd-codec-
> > aif1")),
> > +                                                "mt6359-snd-codec-
> > aif1"),
> > +                                     COMP_CODEC("dmic-codec",
> > +                                                "dmic-hifi")),
> >                    DAILINK_COMP_ARRAY(COMP_EMPTY()));
> > 
> >   struct mt8188_mt6359_priv {
> >       struct snd_soc_jack dp_jack;
> >       struct snd_soc_jack hdmi_jack;
> > +     struct snd_soc_jack headset_jack;
> >   };
> > 
> >   static struct snd_soc_jack_pin mt8188_hdmi_jack_pins[] = {
> > @@ -165,11 +184,50 @@ static struct snd_soc_jack_pin
> > mt8188_dp_jack_pins[] = {
> >       },
> >   };
> > 
> > +static struct snd_soc_jack_pin nau8825_jack_pins[] = {
> > +     {
> > +             .pin    = "Headphone",
> 
> One Intel driver using NAU8825 declares this as
> 
>                 .pin    = "Headphone Jack",
> 
> can we please use the same name, so that we're able to eventually
> share the
> same configuration in the userspace?
> 
> For reference, please check intel/avs/boards/nau8825.c
> 
> Thanks,
> Angelo

OK. I will replace "Headphone" with "Headphone Jack" in V2.

Thanks,
Trevor


  reply	other threads:[~2023-05-17 12:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 11:15 [PATCH 0/5] ASoC: mt8188: add new board support Trevor Wu
2023-05-17 11:15 ` [PATCH 1/5] ASoC: mediatek: mt8188: separate ADDA playback dai from capture dai Trevor Wu
2023-05-17 11:40   ` AngeloGioacchino Del Regno
2023-05-17 12:13     ` Trevor Wu (吳文良)
2023-05-17 11:15 ` [PATCH 2/5] ASoC: mediatek: mt8188-mt6359: register hdmi/dp jack pins Trevor Wu
2023-05-17 11:31   ` AngeloGioacchino Del Regno
2023-05-17 12:10     ` Trevor Wu (吳文良)
2023-05-17 15:10       ` AngeloGioacchino Del Regno
2023-05-18  2:01         ` Trevor Wu (吳文良)
2023-05-17 11:15 ` [PATCH 3/5] ASoC: mediatek: common: soundcard driver add dai_fmt support Trevor Wu
2023-05-17 11:48   ` AngeloGioacchino Del Regno
2023-05-17 12:28     ` Trevor Wu (吳文良)
2023-05-17 11:15 ` [PATCH 4/5] ASoC: mediatek: mt8188-mt6359: support new board with nau88255 Trevor Wu
2023-05-17 11:54   ` AngeloGioacchino Del Regno
2023-05-17 12:41     ` Trevor Wu (吳文良) [this message]
2023-05-17 11:15 ` [PATCH 5/5] ASoC: dt-bindings: mediatek,mt8188-mt6359: update properties Trevor Wu
2023-05-17 14:43   ` Krzysztof Kozlowski
2023-05-18  2:37     ` Trevor Wu (吳文良)
2023-05-18  7:36       ` Krzysztof Kozlowski

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=c24d9d21aae0977c98f4901692ec2dc12122c2d8.camel@mediatek.com \
    --to=trevor.wu@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.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=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).