[alsa-devel] [PATCH 1/2] ALSA: ASoC: add STA32X codec driver
Lars-Peter Clausen
lars at metafoo.de
Thu Jun 16 13:11:19 CEST 2011
On 06/16/2011 01:03 PM, Daniel Mack wrote:
> On Thu, Jun 16, 2011 at 12:13 PM, Mark Brown
> <broonie at opensource.wolfsonmicro.com> wrote:
>> On Thu, Jun 16, 2011 at 11:51:20AM +0200, Daniel Mack wrote:
>>
>>> # amixer cget numid=39
>>> numid=39,iface=MIXER,name='Limiter1 Attack Threshold (DRC Mode)'
>>> ; type=INTEGER,access=rw---R--,values=1,min=0,max=16,step=0
>>> : values=9
>>> | dBrange-
>>> 0x00000000,0x00000007,0x00000001,0x00000008,0xfffff3e4,0x000000c8,0x00000008,0x0000000d,0x00000001,0x00000008,0xfffff9c0,0x00000064,0x0000000e,0x00000010,0x00000001,0x00000008,0xfffffc18,0x0000012c,
>>
>>> Is there a way to get more descriptive information about possible
>>> values for such controls?
>>
>> This looks rather like a buggy userspace - are you sure you're using a
>> current version?
>
> # amixer --version
> amixer version 1.0.24.2
>
> This is indeed strange, and I can't see how I use the API in any
> illegal way. Any other way to debug this?
>
There seems to be a bug in amixer, please try:
diff --git a/amixer/amixer.c b/amixer/amixer.c
index a177288..c7b93b7 100644
--- a/amixer/amixer.c
+++ b/amixer/amixer.c
@@ -517,7 +517,7 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
#ifdef SND_CTL_TLVT_DB_RANGE
case SND_CTL_TLVT_DB_RANGE:
printf("dBrange-\n");
- if ((size / (6 * sizeof(unsigned int))) != 0) {
+ if ((size % (6 * sizeof(unsigned int))) != 0) {
while (size > 0) {
printf("0x%08x,", tlv[idx++]);
size -= sizeof(unsigned int);
@@ -529,7 +529,7 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
print_spaces(spaces + 2);
printf("rangemin=%i,", tlv[0]);
printf(",rangemax=%i\n", tlv[1]);
- decode_tlv(spaces + 4, tlv + 2, 6 * sizeof(unsigned int));
+ decode_tlv(spaces + 4, tlv + 2, 4 * sizeof(unsigned int));
idx += 6 * sizeof(unsigned int);
}
break;
More information about the Alsa-devel
mailing list