public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Daniel Mack <zonque@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	alsa-devel@alsa-project.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH 1/2] ALSA: ASoC: add STA32X codec driver
Date: Thu, 16 Jun 2011 13:11:19 +0200	[thread overview]
Message-ID: <4DF9E4D7.9090309@metafoo.de> (raw)
In-Reply-To: <BANLkTim0DDg2FBzHDESFbgrHyrz-STq=Yg@mail.gmail.com>

On 06/16/2011 01:03 PM, Daniel Mack wrote:
> On Thu, Jun 16, 2011 at 12:13 PM, Mark Brown
> <broonie@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;

  reply	other threads:[~2011-06-16 11:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 19:27 ASoC: Patches for an STA32X and WM8782 Daniel Mack
2011-06-14 19:27 ` [PATCH 1/2] ALSA: ASoC: add STA32X codec driver Daniel Mack
2011-06-15 15:05   ` Mark Brown
2011-06-15 20:53     ` Johannes Stezenbach
2011-06-16  8:39       ` Lars-Peter Clausen
2011-06-16  9:12         ` Johannes Stezenbach
2011-06-16  9:51         ` Daniel Mack
2011-06-16 10:13           ` Mark Brown
2011-06-16 11:03             ` Daniel Mack
2011-06-16 11:11               ` Lars-Peter Clausen [this message]
2011-06-16 11:26                 ` Daniel Mack
2011-06-16 11:38                   ` Lars-Peter Clausen
2011-06-16 11:47                     ` Daniel Mack
2011-06-16 11:51                       ` Lars-Peter Clausen
2011-06-16 11:54                         ` Daniel Mack
2011-06-16  8:19     ` Daniel Mack
2011-06-16  8:49       ` Liam Girdwood
2011-06-16  8:53         ` Daniel Mack
2011-06-16 12:07           ` [PATCH] " Daniel Mack
2011-06-17  8:30             ` Daniel Mack
2011-06-17  9:45             ` Mark Brown
2011-06-17  9:54               ` Daniel Mack
2011-06-22 12:54                 ` Mark Brown
2011-06-22 12:59                   ` [PATCH 1/2] " Daniel Mack
2011-06-22 12:59                     ` [PATCH 2/2] ALSA: ASoC: add WM8782 ADC Codec Driver Daniel Mack
2011-06-22 13:26                     ` [PATCH 1/2] ALSA: ASoC: add STA32X codec driver Mark Brown
2011-06-22 13:34                       ` Daniel Mack
2011-06-22 13:59                         ` Mark Brown
2011-06-22 14:09                         ` Paul Menzel
2011-06-20  6:07               ` [PATCH] " Daniel Mack
2011-06-22 11:06                 ` Daniel Mack
2011-06-22 11:12                   ` Mark Brown
2011-06-22 12:10                     ` Liam Girdwood
2011-06-14 19:27 ` [PATCH 2/2] ALSA: ASoC: add WM8782 ADC Codec Driver Daniel Mack
2011-06-15 15:17   ` Mark Brown
2011-06-16  8:20     ` Daniel Mack
2011-06-22 12:12       ` Liam Girdwood
2011-06-15 10:00 ` ASoC: Patches for an STA32X and WM8782 Johannes Stezenbach

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=4DF9E4D7.9090309@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=zonque@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