Bug 223460

Summary: All 'Capture' checkboxes are read-only without an explanation in kmix dialog box (OSS, snd_es137x)
Product: [Applications] kmix Reporter: Yuri <yuri>
Component: KMix Panel DockingAssignee: Christian Esken <esken>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 3.5   
Target Milestone: ---   
Platform: FreeBSD Ports   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot

Description Yuri 2010-01-19 21:02:34 UTC
Version:           3.5 (using KDE 4.3.4)
OS:                FreeBSD
Installed from:    FreeBSD Ports

All those check boxes are read-only. And I have to use aumix every time to change them.
Tooltips (on mouse-over) should explain why they are read-only.
Audio driver used: snd_es137x.ko
Comment 1 Christian Esken 2010-05-19 15:07:47 UTC
For further inspection I need some extra information.

Please create a screenshot.

Please post the ouput of "amixer" (or "amixer -c 1" or any other number that corresponds to the affected soundcard).

Please also post the permissions of your sound card devices, using 
 getfacl /dev/snd/controlC0  (or controlC1 or any other number that corresponds to the affected soundcard).
Comment 2 Yuri 2010-05-23 19:43:05 UTC
Here are the permissions on all dsp devices:
$ getfacl /dev/dsp*
# file: /dev/dsp0.0
# owner: root
# group: wheel
user::rw-
group::rw-
other::rw-

# file: /dev/dsp0.1
# owner: root
# group: wheel
user::rw-
group::rw-
other::rw-

# file: /dev/dsp0.2
# owner: root
# group: wheel
user::rw-
group::rw-
other::rw-

# file: /dev/dsp0.3
# owner: root
# group: wheel
user::rw-
group::rw-
other::rw-

# file: /dev/dsp0.4
# owner: root
# group: wheel
user::rw-
group::rw-
other::rw-

# file: /dev/dsp0.5
# owner: root
# group: wheel
user::rw-
group::rw-
other::rw-
Comment 3 Yuri 2010-05-23 19:51:54 UTC
Created attachment 43824 [details]
screenshot

screenshot of kde4 mixer in FreeBSD after boot, Capture checkbox on pcm channel is off and is read-only, even though it was 'on' before the graceful kde4 shutdown.
Comment 4 Yuri 2010-05-23 19:52:23 UTC
Here is the mixer settings after system boots up:
$ mixer
Mixer vol      is currently set to  46:46
Mixer pcm      is currently set to  58:58
Mixer line     is currently set to  75:75
Mixer mic      is currently set to  67:67
Mixer cd       is currently set to  86:86
Mixer ogain    is currently set to 100:100
Mixer line1    is currently set to  75:75
Mixer line2    is currently set to  66:66
Mixer line3    is currently set to 100:100
Recording source: mic

I can only bring 'pcm' into 'Recording source' with 'aumix', not with kde mixer.
kde mixer should set up 'pcm' by itself without the need for me to use 'aumix'.
Comment 5 Christian Esken 2010-05-24 14:01:50 UTC
The requested amixer output is very important. Could you please post it?

Repeating: Please post the ouput of "amixer" (or "amixer -c 1" or any other number that
corresponds to the affected soundcard).
Comment 6 Yuri 2010-05-24 18:01:59 UTC
Sorry, I didn't mention this explicitly in my orevious ports.
amixer is ALSA mixer, and there is no ALSA (yet) on FreeBSD.
FreeBSD is OSS only at the moment.

Please let me know what you would like me to run.
Comment 7 Yuri 2010-07-18 23:35:15 UTC
Confirmed for current in FreBSD kdemultimedia-4.4.5.
Comment 8 Christian Esken 2011-07-20 21:46:30 UTC
Looks like I can reproduce the issue.
Comment 9 Christian Esken 2011-07-20 22:23:04 UTC
Looks like Mixer_OSS::setRecsrcHW() is never called. This is either quite bizarre or a very very very old bug. If it is the latter it might be fixed by writing capture switch together with the volume levels.
Comment 10 Yuri 2011-07-21 02:02:13 UTC
Yes, this is a very long standing bug.
Comment 11 Christian Esken 2011-08-16 22:36:47 UTC
Fixing this was a nightmare. I needed to clean up very old and very obsolete code, and rewrite a lot of things. After that record switches worked, but volume levels were broken (again, only for OSS). The latter failure was without good reason. I ended up rewriting Mixer_OSS::readVolumeFromHW() in the style of the ALSA driver. Magically that worked. To make long things short. It seems to work now again, and KMix backend interfaces have been cleaned up a bit (which is a really good thing).
Comment 12 Yuri 2011-08-16 22:39:47 UTC
Thank you for fixing this long standing problem!

FreeBSD uses OSS and PulseAudio, no ALSA due to the 'L' letter in it.
But KDE on FreeBSD still only works through OSS and has this nasty bug that I have to work around once in a few days.
Comment 13 Christian Esken 2011-08-16 22:40:57 UTC
SVN commit 1247745 by esken:

CCBUGS: 223460
Fix 'Capture' checkboxes in OSS (including backend cleanup)

 M  +4 -3      apps/kmix.cpp  
 M  +1 -0      apps/kmixd.cpp  
 M  +1 -2      backends/mixer_alsa.h  
 M  +61 -72    backends/mixer_alsa9.cpp  
 M  +0 -4      backends/mixer_backend.h  
 M  +0 -17     backends/mixer_hpux.cpp  
 M  +0 -3      backends/mixer_hpux.h  
 M  +19 -9     backends/mixer_mpris2.cpp  
 M  +21 -1     backends/mixer_mpris2.h  
 M  +50 -27    backends/mixer_oss.cpp  
 M  +5 -2      backends/mixer_oss.h  
 M  +0 -4      backends/mixer_oss4.cpp  
 M  +0 -1      backends/mixer_oss4.h  
 M  +0 -10     backends/mixer_pulse.cpp  
 M  +0 -2      backends/mixer_pulse.h  
 M  +16 -21    backends/mixer_sun.cpp  
 M  +0 -2      backends/mixer_sun.h  
 M  +0 -14     core/mixer.cpp  
 M  +0 -1      core/mixer.h  
 M  +1 -1      core/version.h  
 M  +6 -3      dbus/dbuscontrolwrapper.cpp  
 M  +1 -1      gui/kmixdockwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1247745
Comment 14 Christian Esken 2011-08-16 22:41:53 UTC
Will be released with KDE4.8
Comment 15 Christian Esken 2011-12-13 22:33:42 UTC
*** Bug 284945 has been marked as a duplicate of this bug. ***