After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342228 - [alsa] Recognize "Front" as a Master channel
[alsa] Recognize "Front" as a Master channel
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.11
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
: 345755 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-05-18 09:19 UTC by Daniel Holbach
Modified: 2007-01-26 00:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
possible patch (3.22 KB, patch)
2006-09-11 10:52 UTC, Tim-Philipp Müller
committed Details | Review

Description Daniel Holbach 2006-05-18 09:19:25 UTC
Forwarded from: https://launchpad.net/distros/ubuntu/+source/gnome-media/+bug/45345

As seen in https://launchpad.net/bugs/45167, on newer AC'97 codec cards, the Master channel is no longer called Master, but rather "Front". This confuses the GNOME mixer applet into believing that there is no master channel, and it incorrectly begins mixing the PCM channel. This cannot mute, nor turn down sound completely, and thus is the wrong behavior.

It looks like the ALSA drivers will continue using the 'Front' nomenclature... that's not going to change. So, the mixer applets must change instead. The GNOME mixer should recognize Front to be synonymous with Master
Comment 1 Ronald Bultje 2006-05-29 15:27:07 UTC
That would be a GStreamer bug...
Comment 2 Tim-Philipp Müller 2006-06-23 18:33:05 UTC
*** Bug 345755 has been marked as a duplicate of this bug. ***
Comment 3 Spencer McGuire 2006-06-23 22:55:24 UTC
shouldnt this be in gstreamer core, not plugins? or is that just me being stupid... that was the whole reason for duplicating it
Comment 4 Tim-Philipp Müller 2006-06-23 23:36:52 UTC
> shouldnt this be in gstreamer core, not plugins? or is that just me being
> stupid... that was the whole reason for duplicating it

Ah, probably -base then where alsa lives (but doesn't really matter that much).

Comment 5 Tim-Philipp Müller 2006-09-04 17:12:02 UTC
What's the output of

 $ amixer --device=default

for that card?

GstAlsaMixer will just mark the first alsa mixer control that has 'pvolume' capability as the MASTER track, it doesn't look at the names at all AFAIK.


Comment 6 Daniel Holbach 2006-09-07 16:30:27 UTC
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%]
  Front Right: Playback 255 [100%]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 5 [16%] [on]
  Front Right: Playback 5 [16%] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [on]
  Front Right: Playback 0 [0%] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [off]
  Front Right: Playback 0 [0%] [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 31 [100%] [on]
  Front Right: Capture 31 [100%] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 0 [0%] [on]
  Front Right: Capture 0 [0%] [on]
Simple mixer control 'Input Source',0
  Capabilities: enum
  Items: 'Mic' 'Line'
  Item0: 'Mic'
Simple mixer control 'Input Source',1
  Capabilities: enum
  Items: 'Mic' 'Line'
  Item0: 'Mic'
Comment 7 Daniel Holbach 2006-09-11 09:46:44 UTC
Output of another user:
Here is my output:
cbudden@cbudden-laptop:~$ amixer --device=default
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 255 [100%]
  Front Right: Playback 255 [100%]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 3 [10%] [on]
  Front Right: Playback 3 [10%] [on]
Simple mixer control 'Line',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [on]
  Front Right: Playback 31 [100%] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [off]
  Front Right: Playback 31 [100%] [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 0 [0%] [on]
  Front Right: Capture 0 [0%] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 31
  Front Left: Capture 9 [29%] [on]
  Front Right: Capture 9 [29%] [on]
Simple mixer control 'Input Source',0
  Capabilities: enum
  Items: 'Mic' 'Line'
  Item0: 'Mic'
Simple mixer control 'Input Source',1
  Capabilities: enum
  Items: 'Mic' 'Line'
  Item0: 'Mic'




And a question back:

On a related note, I've set via the mixer preferences to track and control Front instead of PCM. Now, the tray applet correctly changes Front instead of PCM. However, the laptop's volume hotkeys still change PCM. This behavior is very inconsistent and looks to me like a bug. Doesn't it make sense for the laptop buttons to behave consistently with the mixer applet?
Comment 8 Ronald Bultje 2006-09-11 10:39:03 UTC
See http://bugzilla.gnome.org/show_bug.cgi?id=173035 for discussion on that issue.
Comment 9 Tim-Philipp Müller 2006-09-11 10:52:32 UTC
Created attachment 72541 [details] [review]
possible patch

Possible patch. Picks the MASTER track like this, in this order:

 - first track with pvolume labelled 'Master'
 - first track with pvolume labelled 'Front'
 - first track with pvolume and pswitch
 - first track with pvolume

Ronald, any thoughts on this? Does this make sense to you? If not, do you have a better idea?
Comment 10 Ronald Bultje 2006-09-11 11:17:30 UTC
Good, I guess.

I've learned to just do exactly, up to the smallest detail, what the upstream people do. Reason for this is that you can directly forward a bug upstream, since a bug like this in g-v-c means a bug in alsamixer and thus a bug in alsa. So I would just not make it too complex and use whatever logic they use. Your approach seems fine, but then again, I don't really know what alsamixer does.
Comment 11 Tim-Philipp Müller 2006-09-17 20:18:18 UTC
Thanks. I think I checked a while ago and alsamixer just doesn't handle this, in the sense that it just shows the user a list of 92831 mixer tracks with a blinking 'now go fiddle' at the top, IIRC it doesn't try to determine a 'master' track.


  2006-09-17  Tim-Philipp Müller  <tim at centricular dot net>

        * ext/alsa/gstalsamixer.c: (gst_alsa_mixer_find_master_mixer),
        (gst_alsa_mixer_ensure_track_list):
          Try harder to guess which mixer track is the master mixer
          track (instead of just taking the first one that has a pvolume).
          Fixes #342228.

(not setting target milestone since there is no 0.10.11 milestone yet)
Comment 12 Chris Wilson 2007-01-26 00:21:13 UTC
*** Bug 354324 has been marked as a duplicate of this bug. ***