Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: at91sam9g20ek: Automatically disconnect non-connected pins
Date: Mon, 13 Apr 2015 11:07:40 +0200	[thread overview]
Message-ID: <552B875C.4070403@atmel.com> (raw)
In-Reply-To: <1428743923-26675-1-git-send-email-lars@metafoo.de>

Le 11/04/2015 11:18, Lars-Peter Clausen a écrit :
> According to the schematics the both LHPOUT and RHPOUT are connected to the
> external connector. RHPOUT is missing from the DAPM routes, but otherwise
> they seem to be complete.
> 
> This patch adds the missing route and then sets the fully_routed flag for
> the card. This allows to remove all the manual calls to
> snd_soc_dapm_nc_pin().
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

It seems good:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
>  sound/soc/atmel/sam9g20_wm8731.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c
> index 8de8361..d7469cd 100644
> --- a/sound/soc/atmel/sam9g20_wm8731.c
> +++ b/sound/soc/atmel/sam9g20_wm8731.c
> @@ -95,8 +95,9 @@ static const struct snd_soc_dapm_widget at91sam9g20ek_dapm_widgets[] = {
>  
>  static const struct snd_soc_dapm_route intercon[] = {
>  
> -	/* speaker connected to LHPOUT */
> +	/* speaker connected to LHPOUT/RHPOUT */
>  	{"Ext Spk", NULL, "LHPOUT"},
> +	{"Ext Spk", NULL, "RHPOUT"},
>  
>  	/* mic is connected to Mic Jack, with WM8731 Mic Bias */
>  	{"MICIN", NULL, "Mic Bias"},
> @@ -108,9 +109,7 @@ static const struct snd_soc_dapm_route intercon[] = {
>   */
>  static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd)
>  {
> -	struct snd_soc_codec *codec = rtd->codec;
>  	struct snd_soc_dai *codec_dai = rtd->codec_dai;
> -	struct snd_soc_dapm_context *dapm = &codec->dapm;
>  	int ret;
>  
>  	printk(KERN_DEBUG
> @@ -124,10 +123,6 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd)
>  		return ret;
>  	}
>  
> -	/* not connected */
> -	snd_soc_dapm_nc_pin(dapm, "RLINEIN");
> -	snd_soc_dapm_nc_pin(dapm, "LLINEIN");
> -
>  #ifndef ENABLE_MIC_INPUT
>  	snd_soc_dapm_nc_pin(&rtd->card->dapm, "Int Mic");
>  #endif
> @@ -158,6 +153,7 @@ static struct snd_soc_card snd_soc_at91sam9g20ek = {
>  	.num_dapm_widgets = ARRAY_SIZE(at91sam9g20ek_dapm_widgets),
>  	.dapm_routes = intercon,
>  	.num_dapm_routes = ARRAY_SIZE(intercon),
> +	.fully_routed = true,
>  };
>  
>  static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
> 


-- 
Nicolas Ferre

  parent reply	other threads:[~2015-04-13  9:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11  9:18 [PATCH] ASoC: at91sam9g20ek: Automatically disconnect non-connected pins Lars-Peter Clausen
2015-04-13  8:53 ` Nicolas Ferre
2015-04-13  9:02   ` Lars-Peter Clausen
2015-04-13  9:07     ` Nicolas Ferre
2015-04-13  9:07 ` Nicolas Ferre [this message]
2015-04-18 12:20 ` Mark Brown

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=552B875C.4070403@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.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