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
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
What kind of emailer are you? Find out today - get a free analysis of your email personality. Take the quiz at the Yahoo! Mail Championship.
------------------------------------------------------------------------- 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
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel