alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
To: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
Cc: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Maxime Ripard
	<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org"
	<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
	"linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org"
	<linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Re: [PATCH v2 03/12] ASoC: sun8i-codec-analog: split out mbias
Date: Mon, 6 Mar 2017 11:46:22 +0800	[thread overview]
Message-ID: <CAGb2v65zaUEDc4BtEKA=zN17hGeQZaCmX3xROM8KGSxtDPZ2mg@mail.gmail.com> (raw)
In-Reply-To: <6803451488721799-eo/M/X53CP1xpj1cXAZ9Bg@public.gmane.org>

On Sun, Mar 5, 2017 at 9:49 PM, Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> wrote:
>
>
> 05.03.2017, 21:38, "Icenowy Zheng" <icenowy-ymACFijhrKM@public.gmane.org>:
>> Allwinner V3s features an analog codec without MBIAS pin.
>>
>> Split out this part, in order to prepare for the V3s analog codec.
>>
>> Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
>> ---
>>  sound/soc/sunxi/sun8i-codec-analog.c | 34 +++++++++++++++++++++++++++++-----
>>  1 file changed, 29 insertions(+), 5 deletions(-)
>>
>
> Sorry a definiation of has_mbias is mising in the patch...
>
> It's
>
> diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c
> index af56afe5c403..edcc3eb7cd9a 100644
> --- a/sound/soc/sunxi/sun8i-codec-analog.c
> +++ b/sound/soc/sunxi/sun8i-codec-analog.c
> @@ -695,6 +695,7 @@ struct sun8i_codec_analog_quirks {
>         bool has_hmic;
>         bool has_linein;
>         bool has_lineout;
> +       bool has_mbias;
>         bool has_mic2;
>  };

Please incorporate this into the patch in the next version, with

Acked-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

>
>
>> diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c
>> index 6c17c99c2c8d..af56afe5c403 100644
>> --- a/sound/soc/sunxi/sun8i-codec-analog.c
>> +++ b/sound/soc/sunxi/sun8i-codec-analog.c
>> @@ -289,11 +289,6 @@ static const struct snd_soc_dapm_widget sun8i_codec_common_widgets[] = {
>>          /* Microphone input */
>>          SND_SOC_DAPM_INPUT("MIC1"),
>>
>> - /* Microphone Bias */
>> - SND_SOC_DAPM_SUPPLY("MBIAS", SUN8I_ADDA_MIC1G_MICBIAS_CTRL,
>> - SUN8I_ADDA_MIC1G_MICBIAS_CTRL_MMICBIASEN,
>> - 0, NULL, 0),
>> -
>>          /* Mic input path */
>>          SND_SOC_DAPM_PGA("Mic1 Amplifier", SUN8I_ADDA_MIC1G_MICBIAS_CTRL,
>>                           SUN8I_ADDA_MIC1G_MICBIAS_CTRL_MIC1AMPEN, 0, NULL, 0),
>> @@ -453,6 +448,27 @@ static int sun8i_codec_add_headphone(struct snd_soc_component *cmpnt)
>>          return 0;
>>  }
>>
>> +/* mbias specific widget */
>> +static const struct snd_soc_dapm_widget sun8i_codec_mbias_widgets[] = {
>> + SND_SOC_DAPM_SUPPLY("MBIAS", SUN8I_ADDA_MIC1G_MICBIAS_CTRL,
>> + SUN8I_ADDA_MIC1G_MICBIAS_CTRL_MMICBIASEN,
>> + 0, NULL, 0),
>> +};
>> +
>> +static int sun8i_codec_add_mbias(struct snd_soc_component *cmpnt)
>> +{
>> + struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt);
>> + struct device *dev = cmpnt->dev;
>> + int ret;
>> +
>> + ret = snd_soc_dapm_new_controls(dapm, sun8i_codec_mbias_widgets,
>> + ARRAY_SIZE(sun8i_codec_mbias_widgets));
>> + if (ret)
>> + dev_err(dev, "Failed to add MBIAS DAPM widgets: %d\n", ret);
>> +
>> + return ret;
>> +}
>> +
>>  /* hmic specific widget */
>>  static const struct snd_soc_dapm_widget sun8i_codec_hmic_widgets[] = {
>>          SND_SOC_DAPM_SUPPLY("HBIAS", SUN8I_ADDA_MIC1G_MICBIAS_CTRL,
>> @@ -686,12 +702,14 @@ static const struct sun8i_codec_analog_quirks sun8i_a23_quirks = {
>>          .has_headphone = true,
>>          .has_hmic = true,
>>          .has_linein = true,
>> + .has_mbias = true,
>>          .has_mic2 = true,
>>  };
>>
>>  static const struct sun8i_codec_analog_quirks sun8i_h3_quirks = {
>>          .has_linein = true,
>>          .has_lineout = true,
>> + .has_mbias = true,
>>          .has_mic2 = true,
>>  };
>>
>> @@ -734,6 +752,12 @@ static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt)
>>                          return ret;
>>          }
>>
>> + if (quirks->has_mbias) {
>> + ret = sun8i_codec_add_mbias(cmpnt);
>> + if (ret)
>> + return ret;
>> + }
>> +
>>          if (quirks->has_mic2) {
>>                  ret = sun8i_codec_add_mic2(cmpnt);
>>                  if (ret)
>> --
>> 2.11.1
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit https://groups.google.com/d/optout.

  parent reply	other threads:[~2017-03-06  3:46 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05 13:36 [PATCH v2 00/12] Add support for the audio codec on Allwinner V3s Icenowy Zheng
     [not found] ` <20170305133709.6288-1-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-05 13:36   ` [PATCH v2 01/12] ASoC: sun8i-codec-analog: split out mic2 Icenowy Zheng
     [not found]     ` <20170305133709.6288-2-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  3:43       ` Chen-Yu Tsai
2017-03-15 18:13       ` Applied "ASoC: sun8i-codec-analog: split out mic2" to the asoc tree Mark Brown
2017-03-05 13:36   ` [PATCH v2 02/12] ASoC: sun8i-codec-analog: split out line in Icenowy Zheng
     [not found]     ` <20170305133709.6288-3-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  3:45       ` Chen-Yu Tsai
2017-03-15 18:13       ` Applied "ASoC: sun8i-codec-analog: split out line in" to the asoc tree Mark Brown
2017-03-05 13:37   ` [PATCH v2 03/12] ASoC: sun8i-codec-analog: split out mbias Icenowy Zheng
     [not found]     ` <20170305133709.6288-4-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-05 13:49       ` Icenowy Zheng
     [not found]         ` <6803451488721799-eo/M/X53CP1xpj1cXAZ9Bg@public.gmane.org>
2017-03-06  3:46           ` Chen-Yu Tsai [this message]
2017-03-07  0:15       ` [alsa-devel] " kbuild test robot
2017-03-05 13:37   ` [PATCH v2 04/12] ASoC: sun8i-codec-analog: add support for V3s SoC Icenowy Zheng
     [not found]     ` <20170305133709.6288-5-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  3:53       ` Chen-Yu Tsai
2017-03-05 13:37   ` [PATCH v2 05/12] ASoC: sun4i-codec: Add support for V3s codec Icenowy Zheng
     [not found]     ` <20170305133709.6288-6-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  4:05       ` Chen-Yu Tsai
     [not found]         ` <CAGb2v66TZj7EjcAf3PyYky5adjTc4xdHUAh7jFChe2LWs7cYjA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-06  4:15           ` Chen-Yu Tsai
2017-03-05 13:37   ` [PATCH v2 06/12] dmaengine: sun6i: make gate bit in sun8i's DMA engines a common quirk Icenowy Zheng
     [not found]     ` <20170305133709.6288-7-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  3:50       ` Chen-Yu Tsai
2017-03-14  4:10       ` Vinod Koul
2017-03-05 13:37   ` [PATCH v2 07/12] dmaengine: sun6i: support V3s SoC variant Icenowy Zheng
2017-03-06  3:58     ` [linux-sunxi] " Chen-Yu Tsai
2017-03-05 13:37   ` [PATCH v2 08/12] ARM: dts: sun8i: restore the inclusion of ccu headers in V3s DTSI Icenowy Zheng
     [not found]     ` <20170305133709.6288-9-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  4:12       ` Chen-Yu Tsai
2017-03-05 13:37   ` [PATCH v2 09/12] ARM: dts: sun8i: add DMA engine " Icenowy Zheng
     [not found]     ` <20170305133709.6288-10-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  4:13       ` Chen-Yu Tsai
2017-03-05 13:37   ` [PATCH v2 10/12] ARM: dts: sun8i: add audio codec support into " Icenowy Zheng
     [not found]     ` <20170305133709.6288-11-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  4:17       ` Chen-Yu Tsai
2017-03-05 13:37   ` [PATCH v2 11/12] ARM: dts: sun8i: add pinmux for V3s mmc1 Icenowy Zheng
     [not found]     ` <20170305133709.6288-12-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  4:22       ` Chen-Yu Tsai
2017-03-05 13:37   ` [PATCH v2 12/12] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock Icenowy Zheng
     [not found]     ` <20170305133709.6288-13-icenowy-ymACFijhrKM@public.gmane.org>
2017-03-06  4:28       ` Chen-Yu Tsai
2017-03-07  8:57   ` [PATCH v2 00/12] Add support for the audio codec on Allwinner V3s Vinod Koul

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='CAGb2v65zaUEDc4BtEKA=zN17hGeQZaCmX3xROM8KGSxtDPZ2mg@mail.gmail.com' \
    --to=wens-jday2fn1rrm@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=icenowy-ymACFijhrKM@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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).