Bug 202578

Summary: audio/libmatemixer: mate_mixer_applet doesn't save the "track to control"
Product: Ports & Packages Reporter: Abilio Marques <abiliojr>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Some People CC: abiliojr, agm2port, kwm, pi, w.schwarzenfeld
Priority: ---    
Version: Latest   
Hardware: i386   
OS: Any   
Attachments:
Description Flags
filtered lshal dump
none
patch for selecting default audio device in libmatemixer-1.12.1
none
the same patch for libmatemixer 1.18 none

Description Abilio Marques 2015-08-22 21:36:20 UTC
Created attachment 160225 [details]
filtered lshal dump

Using mate 1.8.1 installed from packages. Unable to set the volume straight from the slider of the Mixer Applet, until I right click the icon, go to preferences, and select PCM as the track to control. If I restart the mate_mixer_applet (either via kill or regular shutdown) the setting goes back to Volume.

FreeBSD 10.2, happens since at least mate 1.6.x (or even as back as gnome2).

Attached you'll find a partial dump of lshal.
Comment 1 Abilio Marques 2015-08-31 01:38:23 UTC
On mate 1.10.1 the mixer apple loses the ability to select the track control (I have no right click > preferences). I'm stuck in Volume instead of PCM.
Comment 2 Attila 2016-12-20 14:44:57 UTC
Created attachment 178143 [details]
patch for selecting default audio device in libmatemixer-1.12.1

See also my comment about the problem originally found:
https://forums.freebsd.org/threads/58957/

There are more problems to fix:
SOUND_MIXER_INFO defines hides the code under SOUND_MIXER_INFO define
where g_strchomp() is necessary for matching "default" in the text
switch off SOUND_MIXER_INFO only for FreeBSD

In my environment:
$ cat /dev/sndstat 
Installed devices:
pcm0: <Intel Broadwell (HDMI/DP 8ch)> (play)
pcm1: <Intel Broadwell (HDMI/DP 8ch)> (play)
pcm2: <Intel Broadwell (HDMI/DP 8ch)> (play)
pcm3: <Realtek (0x0293) (Analog 2.0+HP/2.0)> (play/rec) default
pcm4: <Realtek (0x0293) (Analog)> (play/rec)
No devices installed from userspace.

The pcm0-pcm2 should be skipped, pcm3 is the real audio device. 
After the port patch the instelled libmatemixer backend works fine. 

Attila
Comment 3 Attila 2016-12-21 13:24:41 UTC
(In reply to Attila from comment #2)
...my fault, the FreeBSD relevant code is under #ifdef OSS_PATH_SNDSTAT
Comment 4 w.schwarzenfeld freebsd_triage 2018-01-17 10:42:37 UTC
We have version 1.18.0. Is this still relevant?
Comment 5 Attila 2018-02-10 23:52:28 UTC
Created attachment 190499 [details]
the same patch for libmatemixer 1.18
Comment 6 w.schwarzenfeld freebsd_triage 2019-02-11 02:43:47 UTC
In the meantime we  have 1.20.1, seems nobody wants to commit this.
Comment 7 Kurt Jaeger freebsd_committer 2019-02-11 06:38:10 UTC
Committed, thanks!
Comment 8 commit-hook freebsd_committer 2019-02-11 06:38:28 UTC
A commit references this bug:

Author: pi
Date: Mon Feb 11 06:37:55 UTC 2019
New revision: 492669
URL: https://svnweb.freebsd.org/changeset/ports/492669

Log:
  audio/libmatemixer: help mate_mixer_applet to save the "track to control"

  - Using mate 1.8.1 installed from packages.
    Unable to set the volume straight from the slider of the Mixer Applet,
    until I right click the icon, go to preferences, and select PCM as the
    track to control. If I restart the mate_mixer_applet
    (either via kill or regular shutdown) the setting goes back to Volume.
  - After the port patch the instelled libmatemixer backend works fine.
  - see also:
    https://forums.freebsd.org/threads/fixing-default-audio-device-in-mate.58957/

  PR:		202578
  Submitted by:	Attila <agm2port@gmail.com>
  Reported by:	Abilio Marques <abiliojr@gmail.com>
  Reviewed by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>

Changes:
  head/audio/libmatemixer/files/
  head/audio/libmatemixer/files/patch-backends_oss_oss-backend.c