All of lore.kernel.org
 help / color / mirror / Atom feed
* amixer bug
@ 2007-03-08 19:58 Julian Cable
  0 siblings, 0 replies; 2+ messages in thread
From: Julian Cable @ 2007-03-08 19:58 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 1581 bytes --]

Hi,
  I defined a new SNDRV_CTL_ELEM_IFACE_MIXER in the hdsp driver and tried to use it from amixer and got some strange behaviour. I set the control up as follows:

static int snd_hdsp_info_dds_offset(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{
    uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
    uinfo->count = 1;
    uinfo->value.integer.min = -100;
    uinfo->value.integer.max = 100;
    return 0;
}


amixer correctly indicates that the default 0 value is equivalent to 50%. If I set the value using the % syntax all is well:

0% -> -100
25% -> -50
50% -> 0
100% -> 100

But if I use the absolute notation then it rejects negative numbers.

If I use the incremental notation something even stranger happens. If the current value is positive, all is well. If the current value is +5 and I decrement by 10 then it correctly sets to -5, but if the current value is -5 and I decrement by 10 it sets the value to +100 (ie the maximum).

So there are two problems:

1) negative numbers are not allowed on the command line
2) decrementing doesn't work when the current value is negative.

I tried to raise this as a bug but I've forgotten my password and bugzilla refuses to send a reminder to my registered account (this one).
cheers

Julian




	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

[-- Attachment #1.2: Type: text/html, Size: 1965 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: amixer bug
       [not found] <mailman.174113.1173383910.20110.alsa-devel@lists.sourceforge.net>
@ 2007-03-08 21:24 ` Eliot Blennerhassett
  0 siblings, 0 replies; 2+ messages in thread
From: Eliot Blennerhassett @ 2007-03-08 21:24 UTC (permalink / raw)
  To: alsa-devel; +Cc: julian_cable

> From: Julian Cable <julian_cable@yahoo.com> Subject: [Alsa-devel]
> amixer bug

> amixer correctly indicates that the default 0 value is equivalent to
> 50%. If I set the value using the % syntax all is well:
> 
> 0% -> -100 25% -> -50 50% -> 0 100% -> 100
> 
> But if I use the absolute notation then it rejects negative numbers.
> 
> If I use the incremental notation something even stranger happens. If
> the current value is positive, all is well. If the current value is
> +5 and I decrement by 10 then it correctly sets to -5, but if the
> current value is -5 and I decrement by 10 it sets the value to +100
> (ie the maximum).
> 
> So there are two problems:
> 
> 1) negative numbers are not allowed on the command line

Try adding -- between the options and the parameters

aplay cset numid=1 -- -5

> 2) decrementing doesn't work when the current value is negative.

Perusing amixer source, the increment syntax only works for controls
identified as volumes.  Other integer controls don't support it.

> 
> I tried to raise this as a bug but I've forgotten my password and
> bugzilla refuses to send a reminder to my registered account (this
> one). cheers
> 
> Julian
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-08 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.174113.1173383910.20110.alsa-devel@lists.sourceforge.net>
2007-03-08 21:24 ` amixer bug Eliot Blennerhassett
2007-03-08 19:58 Julian Cable

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.