Re: Regression: amixer's relative adjustments broke

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

 



At Sat, 22 Nov 2014 14:38:13 -0500,
Martin Cracauer wrote:
> 
> Takashi Iwai wrote on Sat, Nov 22, 2014 at 07:00:53PM +0100: 
> > At Sat, 22 Nov 2014 12:53:53 -0500,
> > Martin Cracauer wrote:
> > > 
> > > 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.
> > 
> > Are you sure that this behavior is seen with both 1.0.22 and 1.0.28?
> > Please double-check with the right format "3dB+".
> 
> It is 1.0.25 and 1.0.28.  I don't know about 1.0.22.
> 
> % amixer -D hw:0 set Master 100%
> Simple mixer control 'Master',0
>   Capabilities: pvolume pvolume-joined pswitch pswitch-joined
>   Playback channels: Mono
>   Limits: Playback 0 - 31
>   Mono: Playback 31 [100%] [on]
> % amixer -D hw:0 set Master 3dB-
> Simple mixer control 'Master',0
>   Capabilities: pvolume pvolume-joined pswitch pswitch-joined
>   Playback channels: Mono
>   Limits: Playback 0 - 31
>   Mono: Playback 3 [10%] [on]
> % amixer -D hw:0 set Master 3dB-
> Simple mixer control 'Master',0
>   Capabilities: pvolume pvolume-joined pswitch pswitch-joined
>   Playback channels: Mono
>   Limits: Playback 0 - 31
>   Mono: Playback 3 [10%] [on]
> 
> 
> I am not convinced that we are looking at a problem with alsa-utils as
> such here.
> 
> I found another machine, alsa utils 1.0.28, and there the above
> sequence works as advertised.  There might be something going on in
> the libraries or even the drivers that makes the dB thing fail now.
> 
> I am sure it did work on the machine now running 1.0.25 before it
> upgraded to it.  It's in my CVS-controlled script that did work, on
> that machine.

Check whether amixer shows any dB value for any elements *at all*.
For example, on my system, it shows like:

% amixer get Master
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 127
  Mono: Playback 89 [70%] [-28.50dB] [off]
	
while yours doesn't show it.

Which driver and which kernel version it is?  If other mixer elements
have dB information but only Master misses it, it's a driver bug, but
such a bug should have been fixed quite ago (at least 3.10 or later).
In that case, try later kernels.

If amixer doesn't show any dB information, it's more likely a problem
in amixer or alsa-lib: yours must be a quite old one.


Takashi

------------------------------------------------------------------------------
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