Re: Regression: amixer's relative adjustments broke

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Takashi Iwai wrote on Sat, Nov 22, 2014 at 06:49:11PM +0100: 
> At Sat, 22 Nov 2014 11:56:28 -0500,
> Martin Cracauer wrote:
> > 
> > Takashi Iwai wrote on Sat, Nov 22, 2014 at 05:32:52PM +0100: 
> > > At Fri, 21 Nov 2014 16:42:02 -0500,
> > > Martin Cracauer wrote:
> > > > 
> > > > I have one Debian system with 1.0.25 and a Ubuntu system with 1.0.27
> > > > showing the same regression.
> > > > 
> > > > Using
> > > > amixer -D hw:0 set Speaker [something]
> > > > 
> > > > I used to be able to say 3db+ which would approximately do just that.
> > > > 
> > > > As of recent updates the actual adjustment happening on 3db+ is kind
> > > > of random, way too small, sometimes even negative.  It also does not
> > > > correspond in any way to amixer's own idea of what the absolute dbs
> > > > are:
> > > > 
> > > > % amixer -D hw:0 set Speaker 14
> > > > Simple mixer control 'Speaker',0
> > > >   Capabilities: pvolume pvolume-joined pswitch pswitch-joined
> > > >   Playback channels: Mono
> > > >   Limits: Playback 0 - 31
> > > >   Mono: Playback 14 [45%] [-25.50dB] [on]
> > > > % amixer -D hw:0 set Speaker 3db+
> > > > Simple mixer control 'Speaker',0
> > > >   Capabilities: pvolume pvolume-joined pswitch pswitch-joined
> > > >   Playback channels: Mono
> > > >   Limits: Playback 0 - 31
> > > >   Mono: Playback 3 [10%] [-42.00dB] [on]
> > > > 
> > > > I see that on 2 machines and on different kinda of soundcards.
> > > > 
> > > > Things are so bad that "3db+" is actually lowering the volume now
> > > > depending on where you start.
> > > 
> > > Use "3dB+" instead.  It's case-sensitive.
> > 
> > No, it's more broken (and it used to work with db all lowercase).
> 
> Elaborate how "more broken".
> 
> > I think the "db" in either casing makes it stop parsing and hence drop
> > the +, too, setting it to 3 absolute no matter whether you have +, -
> > or db or dB.
> 
> No, read the source code:
> 
> static int set_volume_simple(snd_mixer_elem_t *elem,
> 			     snd_mixer_selem_channel_id_t chn,
> 			     char **ptr, int dir)
> ....
> 	if (*p == '%') {
> 		percent = 1;
> 		p++;
> 	} else if (p[0] == 'd' && p[1] == 'B') {
> 		vol_type = VOL_DB;
> 		p += 2;
> 		scale = 100;
> 	} else
> 		vol_type = VOL_RAW;
> 
> So it really needs to be "dB".

Checking my CVS history I think you are right, I used dB.

However, as of the updates that started this thread, it doesn't do
anything either way now, that's why I say it is more broken.  At this
time "dB" in any case variant terminates parsing and "3dB+" is
interpreted as "3" (absolute), the + and - are lost.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@xxxxxxxx>   http://www.cons.org/cracauer/

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux