Bug 84209 - kmix doesn't show newly plugged devices (i.e. usb microphone)
Summary: kmix doesn't show newly plugged devices (i.e. usb microphone)
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
: 115878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-06-29 12:45 UTC by Tomasz Chmielewski
Modified: 2007-11-06 22:20 UTC (History)
2 users (show)

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 Tomasz Chmielewski 2004-06-29 12:45:51 UTC
Version:            (using KDE KDE 3.2.3)
Installed from:    Mandrake RPMs
OS:                Linux

I have a Philips USB webcam, which has a built-in USB microphone.

As kmix is started with KDE, and I plug this webcam+usb microphone later, I can only access settings for my sound card.

I have to quit kmix and start it again to be able to increase/decrease volume both in the soundcard and in this usb microphone ("current mixer" in KMix, which is not present if there is only one audio device (perfectly OK), or a second audio device is added after kmix has started (bug in my opinion)).

So it would be nice if kmix was able to check for such changes and add a new device if necessary.

This bug is similar to http://bugs.kde.org/show_bug.cgi?id=14850 which was closed, but shouldn't be.

This bug can't be simply resolved with a description in bug 14850, because I usually plug this usb webcam+microphone occasionally, as I have also USB printer, USB flash disk, and only 2 USB ports.

Morover, laptops often come with only one USB port, making sure that this bug is seen even more often in such cases.
Comment 1 Christian Esken 2004-08-23 19:40:13 UTC
I agree with you. Unfortunately this is not to be implemented soon. Because it is very difficult (e.g. how often should I look for new devices, and what might be their names?)
Comment 2 Tomasz Chmielewski 2004-09-01 20:14:34 UTC
Well, I suppose it's not that hard - I'm not a coder so I'm just guessing - but you could just add a new "Settings -> Configure KMix" option, something like below:

1) a checkbox "Scan periodically for new devices"

2) below another field which could be manipulated when "Scan for new devices" checkbox is enabled - this field would be time, which you could decrease and increase (default - 30 secs - I guess checking for audio devices is not that CPU-consuming? it should run with lowest priority possible anyway),

3) there should be a "help-cloud", which would appear when mouse is over above described points (1 and 2) and it should tell the user something like "Check this box if you plug in other audio devices (e.g. USB-microphone) after KMix is started".

What do you think?
Comment 3 Tomasz Chmielewski 2004-09-01 20:19:04 UTC
> Because it is very difficult (e.g. how often should I look for new devices,
> and what might be their names?)

I don't understand the second part of your question: "what might be their names?"

For me the name of the soundcard is "VIA 82C686A/B rev20" and it's shown by KMix.
When I plug in USB-microphone and run KMix after that, I can choose between this "VIA..." and "USB-something...".

So this part of difficulties is not relevant I suppose?
Comment 4 Paul Hoepfner-Homme 2005-03-12 21:09:36 UTC
Yes, I also don't understand why this would be so difficult to implement. KMix automatically detects my ALSA devices every time it runs. I don't see how the device "names" have anything to do with this. Modifying KMix so that it instead runs the card detection algorithm periodically instead of just once at the beginning doesn't sound so complicated to me... but then I'm obviously not familiar with KMix's code. :)

(FYI, the mixer program for Windows immediately recognizes devices that have been added/removed on the fly while the mixer is running. I haven't played around with it enough to notice whether it uses polling or some kind of hooks to be notified by device changes. However it works, I don't see any harm in using polling for KMix.)

I also have a laptop and have KMix running all the time. So it would be great for me if KMix automatically recognized my Griffin iMic USB sound card without my needing to restart the program.
Comment 5 Bart Cerneels 2005-12-03 11:30:51 UTC
Could hal+dbus offer a adequate sollution? The media:/ kio-slave is using dbus for volume detection, maybe they can extend the media-manager service to become a general device detection/notification daemon within kde. That way you wont have to poll for devices,  just register for DCOP-calls with the device-manager. This should be a goal for kde4 I think.
Comment 6 Christian Esken 2005-12-21 00:08:59 UTC
@Bart: I have no idea what you mean with the media:/ -kio-slave. That one is handling file systems.
There is no hal+dbus solution I am aware off. 
Comment 7 Christian Esken 2005-12-21 00:10:14 UTC
*** Bug 115878 has been marked as a duplicate of this bug. ***
Comment 8 Bart Cerneels 2005-12-21 08:28:42 UTC
@Christian: Since KDE 3.4 there's the KDED media-manager service which I guess is only being used by the media:/ kio-slave. Maybe a similar service can be created for KDE4 that notifies the addition of ALL device-classes known to HAL, not just storage-media. And then KMix can use that instead of probing, this is not a quick fix obviously.

Comment 9 Léa GRIS 2006-04-27 18:30:41 UTC
Simmilr problems with some more side effects here with an USB headset:
Plantronics Headset
Manufacturer: Plantronics
Interface Number: 0
		Name: snd-usb-audio
		Alternate Number: 0
		Class: 01(audio) 

Using Alsa without any software mixer (no arts, no ESD...)

First and same problem:
- Kmix doesn't show the Plantronics mixer if it is plugged after kmix started.

Second problem:
- If the headset is unplugged after kmix has the mixer in charge, then kmix takes 100% CPU trying to talk to a non existant mixer device.
Comment 10 S. Burmeister 2006-04-28 10:14:28 UTC
I can conform the latter! Yet you should open another bug for that issue.
Comment 11 madman 2006-09-05 19:32:15 UTC
What about making hotplug call kmix rescanHardware() dcop function upon detecting a new PCM device? Should be easy to implement (just needs rescan function in kmix and a small modification to hotplug/udev/hal/whatever scripts...)

Just my $0.01, but should work until we get KDE4 with full DBUS support
Comment 12 Christian Esken 2006-09-05 20:34:45 UTC
This would need a tremendous change in the KMix infrastructure. I estimate this to be 10-15 days of work. In short: It will NOT be done for KDE3.x.
Comment 13 Christian Esken 2007-06-16 22:56:16 UTC
Update: KMix can now fully rebuild its GUI on run-time, so we get very close on supporting hot-plugging.
Comment 14 Christian Esken 2007-11-06 22:20:03 UTC
Hot-Plugging is now fully working in the KDE4 version. This feature will ship with  KDE4.0, and will be available starting with the next KDE4 preview release.
This closes the wish with the most votes for KMix. Please enjoy it. :-)