From: Clemens Ladisch <clemens@ladisch.de>
To: Stuart Longland <redhatter@gentoo.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: Defining "signed integer" mixer controls?
Date: Thu, 03 Jun 2010 10:25:16 +0200 [thread overview]
Message-ID: <4C0766EC.3090708@ladisch.de> (raw)
In-Reply-To: <hu6v9i$v43$1@dough.gmane.org>
Stuart Longland wrote:
> /* ADC PGA gain volumes. From 0 to 59.5 dB in 0.5 dB steps */
> static DECLARE_TLV_DB_MINMAX(adc_tlv, 0, 0);
The comment is wrong, this control goes from 0 to 0 dB.
> SOC_DOUBLE_R_TLV("PCM Playback Volume",
> AIC3204_LDACVOL, AIC3204_RDACVOL,
> 0, 127, 0, dac_tlv),
>
> However; it treats the bitfield as unsigned, which is wrong in this
> case. The bitfield is a signed integer in two's complement format. How
> do I convince ALSA that these integers have a sign bit?
ALSA's controls use signed values, it's the SOC_ macros that assume
bitfields. You should be able to define a control with your own
callbacks like in a non-ASoC driver.
Regards,
Clemens
next prev parent reply other threads:[~2010-06-03 8:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 1:07 ASoC: Defining "signed integer" mixer controls? Stuart Longland
2010-06-03 7:09 ` James Courtier-Dutton
2010-06-03 11:21 ` Mark Brown
2010-06-03 12:09 ` James Courtier-Dutton
2010-06-03 8:25 ` Clemens Ladisch [this message]
2010-06-03 10:33 ` Stuart Longland
2010-06-03 15:52 ` James Courtier-Dutton
2010-06-03 11:20 ` Mark Brown
2010-06-04 9:27 ` Stuart Longland
2010-06-04 11:28 ` 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=4C0766EC.3090708@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=redhatter@gentoo.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.