All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Patrick Lai <plai@codeaurora.org>
Cc: alsa-devel <alsa-devel@alsa-project.org>, lrg@ti.com
Subject: Re: Mixer control for signed gain value
Date: Tue, 28 Jun 2011 09:32:39 -0700	[thread overview]
Message-ID: <20110628163238.GD21232@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4E09FF8B.4090103@codeaurora.org>

On Tue, Jun 28, 2011 at 09:21:31AM -0700, Patrick Lai wrote:

> Yes, CODEC in question takes byte-long signed gain value and would like
> to reuse snd_soc_xxx_volsw_xx mixer callback functions in soc-core.c.
> The only functions I see handle signed value are
> snd_soc_info_volsw_s8, snd_soc_get_volsw_s8, snd_soc_get_volsw_s8
> Unless I am mistaken, these functions deal with two signed byte-long
> values which get concatenated into 16-bit value. Perhaps, original

No, they shouldn't do that - they should handle stereo pairs in a single
register.  Looks like they just need a little massaging to cope with
mono controls.

> So, my question is whether I should reuse volsw_s8 mixer control
> functions and have mixer application ignore integer.value[1] to suit my
> purpose or redefine new set of mixer control functions i.e
> snd_soc_set_volsw_single_s8. Otherwise, is there existing alternative
> to handle set/put byte-long signed value?

Make the current controls handle mono.

      reply	other threads:[~2011-06-28 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  6:32 Mixer control for signed gain value Patrick Lai
2011-06-23 10:37 ` Mark Brown
2011-06-28 16:21   ` Patrick Lai
2011-06-28 16:32     ` Mark Brown [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=20110628163238.GD21232@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    --cc=plai@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.