Bug 124943 - kmix locks alsa modems snd-intel8x0m
Summary: kmix locks alsa modems snd-intel8x0m
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: general (show other bugs)
Version: 2.6
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-05 00:43 UTC by Leon Bottou
Modified: 2007-11-06 23:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leon Bottou 2006-04-05 00:44:14 UTC
Version:           2.6 (using KDE KDE 3.5.2)
Installed from:    Ubuntu Packages
OS:                Linux

Kmix prevents my laptop to suspend and resume properly.

Explanation: 
My laptop uses an AC97 modem via the ALSA "snd-intel8x0m" linux module.
By default kmix controls all ALSA devices including the modem.
Alas the suspend code needs to stop the modem daemon and remove 
the modem module. That does not work because the module is in use.
Kmix keeps /dev/snd/controlC1 open.

Workaround:
Inserting 'killall kmix' in the suspend script.

Question1:
Do we really need to see modems outputs in kmix?
In principle, this allows us to to change 
the volume of the modem feedback.
Alas it rarely works.

Question2:
Even if kmix needs to control the modem outputs,
is it necessary to keep the device files open all the time.
It might be possible to close them after a few seconds
of inactivity.
Comment 1 Christian Esken 2006-04-06 01:31:37 UTC
Answers:
1) I don't know whether "we" need to see modems outputs. There might be people using it.
2) Yes, it is neccesary. Otherwise volume updates will not be possible.

A working way would be to release the devices on a suspend. Cannot do this now, but probably in the future (DBUS might be able to provide this information somewhen).
Comment 2 Leon Bottou 2006-04-06 02:16:37 UTC
The correct fix, in the long term, would be to fix all kernel 
modules and make them behave properly on suspend and resume.
That would eliminate the need to remove them in the first place.

A possible short term solution would be to add kmixrc line
  IgnoreMixer=<regexp>
that matches the names of mixers that should be ignored by kmix.
The default value could even be
  IgnoreMixer=".*Modem.*"
Comment 3 Christian Esken 2006-08-07 22:44:23 UTC
Leon, your "IgnoreMixer" idea sounds pretty interesting to investigate. I have no time to implement this in KDE3, but it sounds like a pretty idea for KDE4.
Comment 4 Christian Esken 2007-11-06 23:08:58 UTC
This is implemented now in KDE4. Default expression for ignored soundcards is "Modem". Configuration is by config file (not via GUI) only at this moment.
Comment 5 Christian Esken 2007-11-06 23:17:20 UTC
SVN commit 733632 by esken:

Configuration file option for ignoring unwanted sound cards (e.g. Modem
beeper). Default Regexp is "Modem".
CCBUGS: 124943


 M  +5 -2      kmix.cpp  
 M  +21 -0     mixertoolbox.cpp  
 M  +4 -0      mixertoolbox.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=733632