devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: AS50 KCHsu0 <KCHSU0@nuvoton.com>
To: Marco Felsch <m.felsch@pengutronix.de>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"thomas.fehrenbacher@siedle.de" <thomas.fehrenbacher@siedle.de>
Cc: "kernel@pengutronix.de" <kernel@pengutronix.de>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	AS50 CTLin0 <CTLIN0@nuvoton.com>, AS50 WTLi <WTLI@nuvoton.com>
Subject: Re: [PATCH 3/3] ASoC: nau8810: add aux input control, available on NAU8812
Date: Sat, 16 Nov 2019 01:43:08 +0000	[thread overview]
Message-ID: <55560429-3504-d2f3-2ce5-c8644fbeb333@nuvoton.com> (raw)
In-Reply-To: <20191115160819.15557-4-m.felsch@pengutronix.de>


Marco Felsch 於 2019/11/16 上午 12:08 寫道:
> From: Thomas Fehrenbacher <thomas.fehrenbacher@siedle.de>
>
> This commit adds the support to control the aux-port on the nau8812
> devices. We don't need to differentiate the aux-port registers since
> those bitfields are set to '0' on the nau8810 devices [1,2].
>
> [1] http://www.nuvoton.com/resource-files/NAU8810_Datasheet_Rev_2.8.pdf
> [2] http://www.nuvoton.com/resource-files/NAU8812DatasheetRev2.7.pdf
>
> Signed-off-by: Thomas Fehrenbacher <thomas.fehrenbacher@siedle.de>
> [m.felsch@pengutronix.de: add commit message]
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
>   sound/soc/codecs/nau8810.c | 7 +++++++
>   sound/soc/codecs/nau8810.h | 2 ++
>   2 files changed, 9 insertions(+)
>
> diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
> index a32a4a8d5f50..b1024d24d413 100644
> --- a/sound/soc/codecs/nau8810.c
> +++ b/sound/soc/codecs/nau8810.c
> @@ -351,6 +351,9 @@ static const struct snd_kcontrol_new nau8810_snd_controls[] = {
>   NAU8810_DACOS_SFT, 1, 0),
>   SOC_SINGLE("ADC Oversampling Rate(128x) Switch", NAU8810_REG_ADC,
>   NAU8810_ADCOS_SFT, 1, 0),
> +
> +SOC_SINGLE("AUX Input Enable Switch", NAU8810_REG_POWER1,
> +NAU8810_AUX_EN_SFT, 1, 0),
>   };
>


The power control has to move to the nau8810_dapm_widgets.

The DAPM can just control the power switch of AUXI dynamically.


>   /* Speaker Output Mixer */
> @@ -383,6 +386,8 @@ static const struct snd_kcontrol_new nau8810_inpga[] = {
>   NAU8810_NMICPGA_SFT, 1, 0),
>   SOC_DAPM_SINGLE("MicP Switch", NAU8810_REG_INPUT_SIGNAL,
>   NAU8810_PMICPGA_SFT, 1, 0),
> +SOC_DAPM_SINGLE("AUX Switch", NAU8810_REG_INPUT_SIGNAL,
> +NAU8810_AUXPGA_SFT, 1, 0),
>   };
>
>   /* Loopback Switch */
> @@ -436,6 +441,7 @@ static const struct snd_soc_dapm_widget nau8810_dapm_widgets[] = {
>
>   SND_SOC_DAPM_INPUT("MICN"),
>   SND_SOC_DAPM_INPUT("MICP"),
> +SND_SOC_DAPM_INPUT("AUX"),
>   SND_SOC_DAPM_OUTPUT("MONOOUT"),
>   SND_SOC_DAPM_OUTPUT("SPKOUTP"),
>   SND_SOC_DAPM_OUTPUT("SPKOUTN"),
> @@ -470,6 +476,7 @@ static const struct snd_soc_dapm_route nau8810_dapm_routes[] = {
>   {"Input PGA", NULL, "Mic Bias"},
>   {"Input PGA", "MicN Switch", "MICN"},
>   {"Input PGA", "MicP Switch", "MICP"},
> +{"Input PGA", "AUX Switch", "AUX"},
>
>   /* Digital Looptack */
>   {"Digital Loopback", "Switch", "ADC"},
> diff --git a/sound/soc/codecs/nau8810.h b/sound/soc/codecs/nau8810.h
> index 1ada31883dc6..7b5ecad173d3 100644
> --- a/sound/soc/codecs/nau8810.h
> +++ b/sound/soc/codecs/nau8810.h
> @@ -69,6 +69,7 @@
>
>   /* NAU8810_REG_POWER1 (0x1) */
>   #define NAU8810_DCBUF_EN(0x1 << 8)
> +#define NAU8810_AUX_EN_SFT6
>   #define NAU8810_PLL_EN_SFT5
>   #define NAU8810_MICBIAS_EN_SFT4
>   #define NAU8810_ABIAS_EN(0x1 << 3)
> @@ -229,6 +230,7 @@
>   /* NAU8810_REG_INPUT_SIGNAL (0x2C) */
>   #define NAU8810_PMICPGA_SFT0
>   #define NAU8810_NMICPGA_SFT1
> +#define NAU8810_AUXPGA_SFT2
>
>   /* NAU8810_REG_PGAGAIN (0x2D) */
>   #define NAU8810_PGAGAIN_SFT0
________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

  parent reply	other threads:[~2019-11-16  1:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 16:08 [PATCH 0/3] Add NAU8812 support Marco Felsch
2019-11-15 16:08 ` [PATCH 1/3] dt-bindings: ASoC: add nau8812 documentation Marco Felsch
2019-12-03 19:27   ` Rob Herring
2019-11-15 16:08 ` [PATCH 2/3] ASoC: nau8810: add support for nau8812 Marco Felsch
2019-11-15 16:08 ` [PATCH 3/3] ASoC: nau8810: add aux input control, available on NAU8812 Marco Felsch
2019-11-15 16:12   ` Mark Brown
2019-11-15 16:20     ` Marco Felsch
2019-11-15 17:14       ` Mark Brown
2019-11-16  1:43   ` AS50 KCHsu0 [this message]
2019-11-18  6:46     ` Marco Felsch

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=55560429-3504-d2f3-2ce5-c8644fbeb333@nuvoton.com \
    --to=kchsu0@nuvoton.com \
    --cc=CTLIN0@nuvoton.com \
    --cc=WTLI@nuvoton.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=m.felsch@pengutronix.de \
    --cc=robh+dt@kernel.org \
    --cc=thomas.fehrenbacher@siedle.de \
    /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).