public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Sergej Sawazki <ce3a@gmx.de>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
	lgirdwood@gmail.com, lars@metafoo.de,
	patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH v2] ASoC: wm8741: Add differential mono	mode support
Date: Mon, 11 May 2015 12:50:34 +0100	[thread overview]
Message-ID: <20150511115034.GD3480@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <55507260.1020307@gmx.de>

On Mon, May 11, 2015 at 11:12:00AM +0200, Sergej Sawazki wrote:
> On 11.05.2015 at 10:12, Charles Keepax wrote:
> > On Tue, May 05, 2015 at 10:46:31PM +0200, Sergej Sawazki wrote:
> >> +static int wm8741_add_controls(struct snd_soc_codec *codec)
> >> +{
> >> +	struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
> >> +
> >> +	switch (wm8741->pdata.diff_mode) {
> >> +	case WM8741_DIFF_MODE_STEREO:
> >> +	case WM8741_DIFF_MODE_STEREO_REVERSED:
> >> +		snd_soc_add_codec_controls(codec, wm8741_snd_controls,
> >> +				ARRAY_SIZE(wm8741_snd_controls));
> >> +		break;
> >> +	case WM8741_DIFF_MODE_MONO_LEFT:
> >> +	case WM8741_DIFF_MODE_MONO_RIGHT:
> >> +		/* The machine driver is responsible for mixer controls
> >> +		 * if the codec is configured in differential mono mode.
> >> +		 */
> > Would it not be better to add controls but with a channel neutral
> > name and then the machine driver can use the name_prefix stuff to
> > stick left and right onto them? Seems a bit odd for the machine
> > driver to have to know exact register details of the CODEC and
> > manually add the volume controls?
> >
> > Thanks,
> > Charles
> 
> Charles, could you point me to an "name_prefix" example please?
> 
> Thanks,
> Sergej
> 

The wm9081's handling in sound/soc/samsung/bells.c would be a
reasonable example.

Thanks,
Charles

      reply	other threads:[~2015-05-11 11:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 20:46 [PATCH v2] ASoC: wm8741: Add differential mono mode support Sergej Sawazki
2015-05-10 10:23 ` Sergej Sawazki
2015-05-11 17:21   ` Mark Brown
2015-05-11 20:27     ` Sergej Sawazki
2015-05-11  8:12 ` Charles Keepax
2015-05-11  9:12   ` Sergej Sawazki
2015-05-11 11:50     ` Charles Keepax [this message]

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=20150511115034.GD3480@opensource.wolfsonmicro.com \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ce3a@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.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