Summary: | kmix capture level control does not work | ||
---|---|---|---|
Product: | [Applications] kmix | Reporter: | Paul Worrall <p.r.worrall> |
Component: | general | Assignee: | Christian Esken <esken> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cimmino.marco, marcus, martin.zboril |
Priority: | NOR | ||
Version: | 2.6 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
fix capture volume slider behavior
amixer output CA0106 amixer cards output for CA0106 Output of command amixer for ALC650F Proposed fix for wrong behaviour of capture slider Output of amixer command for ALC655 Output of amixer command for STAC9750 ALSA output for Intel 82801H (ICH8 Family) HD Audio |
Description
Paul Worrall
2006-04-17 23:23:36 UTC
Please run Alsamixer and Kmix at the same time. Change volume levels in both applications and see whether a change in KMix changes something in Alsamixer and vice versa. If you change a Control, and don't see a change immediately, don't give up! Make sure to check EVERY control on the "other" mixer then. "Capture" volumes can be present sometimes in KMix's "Record" Tab, or "Play" Tab, or both, depending on your soundcard driver. Make also sure, you didn't hide any Mixer controls in KMix. I have done as you suggest: for each control in alsamixer, located the corresponding control in kmix and verified that adjustments in kmix affect alsamixer, and vice versa. I can confirm that capture is the only control which is 'disconnected' (i.e. I can alter it in either application but the changes are not reflected in the other). I have also discovered that each time I choose 'split channels' for the capture control in kmix I get one more channel (2 the first time, 3 the second time, 4 the third. I stopped when I got to 10). None of the controls are hidden in kmix. Quite interesting observation. It really looks like KMix is trying to control a wrong/non-existant device. The "split channels" issue is very weird, and I currently cannot see how this could happen at all. It looks to be very hard (read: impossible) to fix this problem without having the corresponding soundcard at hand. I'll surely take a look, but cannot promise anything. Confirmed for me after upgrade to alsa 1.0.11, with 1.0.10 I had not this problem. I have a sound blaster live 24 bit and ca0106 module. Christian: I think kmix look for changes in the volume right? so these changes are made in a file in /proc? If yes we can post this or these files. Christian: I think kmix look for changes in the volume right? so these changes are made in a file in /proc? If yes we can post this or these files. Created attachment 17935 [details]
fix capture volume slider behavior
I have seen the same problem on my AC97 sound cards using the snd-intel8x0 driver (Realtek ALC65x, Sigmatel, AD1980). This problem has been introduced by the patch for the Bug 110807 (https://bugs.kde.org/show_bug.cgi?id=110807). Attached is a patch that will fix it. Attachment #17935 [details] The fix might work for you, but it is not correct for the general usage. In fact, it might break a lot of other soundcards. We need something else, and I need your input here. Everybody interested in getting this fixed should please submit the output of the following two commands: cat /proc/asound/cards amixer Forgot one thing: Please tell which control (EXACT NAME) is problematic for you Then add the output of the following two commands: cat /proc/asound/cards amixer Created attachment 17956 [details]
amixer output
Right, I've been through all the controls again and have the following observations (BTW since the initial bug report I have switched from Gentoo to Kubuntu. No hardware change though) 1. Clicking a the red led in kmix selects an input as a capture source and causes alsamixer to show the legend 'CAPTUR' for that control. A subsequent click on the same red led turns it off in kmix but does not affect the CAPTUR legend in alsamixer. 2. In alsamixer I have two slider controls: 'IEC958 Playback AC97-SPSA' and 'IEC958 Playback AC97-SPSA Capture'. Adjusting the first also affects the second, but the second does not affect the first. In kmix I have two slider controls both entitled 'IEC958 Playback AC97-SPSA' - one on the Output tab and one on the Input tab and they both seem to be driven by the 'IEC958 Playback AC97-SPSA' control in alsamixer (i.e. the 'IEC958 Playback AC97-SPSA Capture' control is not replicated in kmix). I don't think I had either of these controls when Gentoo was installed (it may . 3. The control entitled 'Capture' (in both applications) is still 'disconnected' and still has the strange behaviour when selecting 'split' Here is the output of cat /proc/asound/cards: 0 [V8235 ]: VIA8233 - VIA 8235 VIA 8235 with AD1980 at 0xe000, irq 185 And I've added the output of amixer as an attachment. (see comment #11) Created attachment 17959 [details]
CA0106 amixer
This is the amixer output for CA0106 card with alsa 1.0.13rc3
Created attachment 17960 [details]
cards output for CA0106
This is the cat /proc/asound/cards output for CA0106 card with alsa 1.0.13rc3
Christian I have attached the two files for my CA0106 (aka Sound Blaster Live! 24 bit integrated) and my problematic controls are all in the capture area: 1) Line-in 2) Mic 3) Phone 4) Aux All of them don't work with alsa 1.0.13rc3 and kmix 2.6. It only works the switch that change the capture point. Created attachment 17980 [details]
Output of command amixer for ALC650F
Here are the outputs for my NVidia nForce2 onboard soundcard with alsa-1.0.12:
cat /proc/asound/cards
0 [nForce2 ]: NFORCE - NVidia nForce2
NVidia nForce2 with ALC650F at 0xdf087000, irq 193
1 [UART ]: MPU-401 UART - MPU-401 UART
MPU-401 UART at 0x330, irq 5
The output of amixer is attached.
The problematic control for the ALC650F is the capture volume: Simple mixer control 'Capture',0 Created attachment 18078 [details]
Proposed fix for wrong behaviour of capture slider
I can confirm the problem with the capture volume with:
0 [ICH6 ]: ICH4 - Intel ICH6
Intel ICH6 with STAC9750,51 at 0xdffffe00, irq 169
Having:
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch cswitch-joined
The problem here is that the capture device is marked as canCapture and
canRecord but the actual volume is set via volCapture.
(As it has cvolume and cswitch...)
I propose another patch that I think is generic and not will break other
things.
This should make sure that devices with snd_mixer_selem_has_capture_volume will
actually have this slider.
Created attachment 18079 [details]
Output of amixer command for ALC655
Here is the output of the onboard soundchip (Laptop MEDION 95400) with
alsa-1.0.13:
cat /proc/asound/cards
0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
Intel 82801DB-ICH4 with ALC655 at 0xe0000c00, irq 10
The problematic control for the ALC655 is the capture volume:
Simple mixer control 'Capture',0
Created attachment 18120 [details]
Output of amixer command for STAC9750
Here is the output of the onboard soundchip (Laptop Fujitsu Siemens S7010) with
alsa-1.0.13:
cat /proc/asound/cards
0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
Intel 82801DB-ICH4 with STAC9750,51 at 0xd0100c00, irq 11
The problematic control for the STAC9750 is the capture volume:
Simple mixer control 'Capture',0
guys this bug is very annoying and we provide a lot of info, now need to be fixed! Then vote for this bug, I putted 20 vote, do it you too!!! This problem is probably unfixable, because there is no ALSA mixer documentation. I recommend you switch to OSS instead. Currently you can enable OSS in KMix via the following hack. Quit KMix and add the follwing line in ~/.kde/share/config/kmixrc directly below the "Menubar=..." line. MultiDriver=true Start KMix, you will see your soundcard twice. select the new Mixer, and regulate the volume with the new Mixer. Its a bit complicated at the moment, but I always hoped ALSA would start providing documentation at some point of time. PS: You might want to inspect the ALSA mixer docmentation yourself: http://www.alsa-project.org/alsa-doc/alsa-lib/mixer.html > This problem is probably unfixable, because there is no ALSA mixer documentation. I recommend you switch to OSS instead. Currently you can enable OSS in KMix via the following hack. unfixable? So why kamix works perfectly with my card? I suggest all people have trouble with kmix to switch to kamix! http://kamix.sourceforge.net/ The problem *is* fixable. The particular "if" statement has flaws as it checks for (canCapture && !canRecord) although the combination "cvolume cswitch" can occur. Probably all of the mentioned soundcards have both flags set on the capture device. Either have a look at my proposed patch or handle the problem in another way. Jonas, I need to guess a lot as there is no documentation at all on the mixer API. :-( As explained in comment 9, I cannot apply your patch as is, as it likely breaks other soundcards. Doing it 100% right needs a lot of time (in terms of coding, verifying and testing). I don't have the time but I'll happily integrate patches if a I am confident that they don't break existing scenarios. It is possibly better to do that in personal mail though. PS: Actually there are several theoretical problems, like having "cswitch pswitch" and possibly on some combination on "combined" switches [whatever combined switches are is still a mystery the ALSA developers keep to themselves]. Thus I have reworked everything in the KDE4 branch already. Created an alsa bug for documentation. https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2606 *** Bug 134876 has been marked as a duplicate of this bug. *** Created attachment 20137 [details]
ALSA output for Intel 82801H (ICH8 Family) HD Audio
Me 2!
Everything works (alsamixer directly shows changes), only the two input levels
are disconnected. Turning on and off the two captures work, though.
KAMix from SuSE correctly influences the capture levels, but seems a weird
application otherwise....
Me too. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420214 for my asound.state, lspci, involved alsa-utils version etc. $ cat /proc/asound/cards 0 [ICH5 ]: ICH4 - Intel ICH5 Intel ICH5 with AD1981B at 0xe0000800, irq 209 Fixed for KDE4. SVN Revision 673714 I just put some days work in this issue. The real fix is really very, very complicated. Not only the mixer backend is involved - several GUI elements need to be touched, and the internal data structures must totally be reworked. I am sure that no 100 line patch will *really* fix all possible combinations. Thus the target milestone is KDE4. If anybody has access to KDE4 (hint: KDE 4.0-alpha1 is too old), I would be very grateful for receiving test results. I'll keep this bug report open for now. Update: All ALSA devices now work properly. As far as I see all kinds of combinations work now. Some "combined" or "common" can show up multiple times, but they are all operable. SVN commit 676707 by esken: Finalized optimal ALSA support. The last open issue (pswitch cswitch) is now resolved. BUGS: 123560 BUGS: 135729 BUGS: 126012 BUGS: 125772 M +30 -15 mdwslider.cpp --- trunk/KDE/kdemultimedia/kmix/mdwslider.cpp #676706:676707 @@ -234,22 +234,36 @@ - // --- SLIDERS --------------------------- - QBoxLayout *volLayout; - if ( _orientation == Qt::Vertical ) { - volLayout = new QHBoxLayout( ); - volLayout->setAlignment(Qt::AlignVCenter); - } - else { - volLayout = new QVBoxLayout( ); - volLayout->setAlignment(Qt::AlignHCenter); - } - sliLayout->addItem( volLayout ); + // --- SLIDERS --------------------------- + QBoxLayout *volLayout; + if ( _orientation == Qt::Vertical ) { + volLayout = new QHBoxLayout( ); + volLayout->setAlignment(Qt::AlignVCenter); + } + else { + volLayout = new QVBoxLayout( ); + volLayout->setAlignment(Qt::AlignHCenter); + } + sliLayout->addItem( volLayout ); - if ( m_mixdevice->playbackVolume().count() > 0 ) - addSliders( volLayout, 'p' ); - if ( m_mixdevice->captureVolume().count() > 0 ) + if ( m_mixdevice->playbackVolume().count() > 0 ) + addSliders( volLayout, 'p' ); + if ( m_mixdevice->captureVolume().count() > 0 ) addSliders( volLayout, 'c' ); + if ( m_mixdevice->playbackVolume().count() == 0 && m_mixdevice->captureVolume().count() == 0 ) + { // no siders => put a label with the name. + // But I won't add " (capture)" as on the sliders, because there is only one "column" + if ( _orientation == Qt::Vertical ) { + m_label = new VerticalText( this, m_mixdevice->readableName() ); + } + else { + m_label = new QLabel(this); + static_cast<QLabel*>(m_label)->setText(m_mixdevice->readableName()); + } + volLayout->addWidget( m_label ); + m_label->installEventFilter( this ); + m_label->setToolTip( m_mixdevice->readableName() ); // @todo: Whatsthis, explaining the device + } // --- RECORD SOURCE LED -------------------------- if ( showRecordLED ) @@ -277,7 +291,8 @@ reclayout->addWidget( m_recordLED ); connect(m_recordLED, SIGNAL(stateChanged(bool)), this, SLOT(setRecsrc(bool))); m_recordLED->installEventFilter( this ); - m_recordLED->setToolTip( i18n( "Record" ) ); + QString muteTip( i18n( "Capture/Uncapture %1", m_mixdevice->readableName() ) ); + m_recordLED->setToolTip( muteTip ); // @todo: Whatsthis, explaining the device } // has Record LED else { |