[SOLVED] Need help to configure multiple soundcards (built-in card and webcam).
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Need help to configure multiple soundcards (built-in card and webcam).
Hi all,
I'm trying to add a webcam and it get's registered nicely. The problem is that after a reboot it registers as card 0, my internal card gets registered as card 1, and I lose all sound.
arecord -l with webcam plugged in to a running system
Code:
card 0: default [PnP Audio Device ], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Camera [USB Video Camera], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
arecord -l with webcam after reboot
Code:
card 0: Camera [USB Video Camera], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: default [PnP Audio Device ], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Notice that the cards have switched index. Registered as this I have no sound. None. So, in order to solve this I reckon I'll have to force my internal card to register as card 0.
lsusb with the card attached
Code:
Bus 002 Device 002: ID 0d8c:0201 C-Media Electronics, Inc. CM6501
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 0471:0333 Philips SPC 620NC PC Camera
Bus 001 Device 003: ID 059b:0277 Iomega Corp.
Bus 001 Device 002: ID 059b:005d Iomega Corp. Mass Storage Device
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
C-Media is the built-in soundcard and Philips is the webcam. (I have no idea why the built-in is registered as an usb-device but it is and external sources confirm that this is correct.
According to the alsa project wiki the correct way to give two devices using the same module (such as two usb-devices) a specific index is to add something along the following in the main alsa configuration file.
As I use Debian Squeeze 64-bit with the odd package from sid and multimedia repository enabled I found that the correct file to add this in is /etc/modprobe.conf. I therefore added this:
This corresponds to my hardwares' VID and PID. When I reboot I and do arecord -l I get:
Code:
arecord: device_list:223: no soundcards found...
As an alternative I tried to add this snippet to /etc/modprobe.d/sound instead but at boot I get the message that "vid 0d8c" is an invalid parameter. Well, it's not. It adds upp with the output from lsusb and the external source linked to above. Do I need to add that arecord -l tells me I have no soundcard?
Does anyone have any idea what's going on here and how I might solve this? Is there another way to force two usb-devices to register as a specific card? Should I add this option in another file?
Any and all help is very much appreciated.
best regards
/CZ
Please, undo whatever you've done and try the instructions exactly as exposed in the site I told you then report back.
Skuzye
I think you're missing the point here. Both cards *use* snd-usb-audio. It is their *proper* driver. The link you posted presupposes that you have multiple cards that use *different* modules. Had that been the case your solution would have been the way to solve this but as the output of arecord clearly shows that is *not* the case here. Trying to force my built-in or the webcam to use a module that is not its proper driver is obviously not the correct way to solve this, as this module simply will not work with the hardware.
options snd-usb-audio index=1,2 vid=0x0ccd,0x0d8c pid=0x0028,0x000c <-- the documentation example
options snd-usb-audio index=0,1 vid=0d8c,0471 pid=0201,0333 <-- your file
You forgot the 0x prefix for hexadecimal numbers.
Aha! Yes I did. I had noticed that the format looked a bit differently but I wasn't aware that part of it was a prefix (nor is this mentioned in, for example, the alsa wiki). Now that you've pointed it out it does seem so obvious.
Many thanks for this, it works perfectly now. The built-in registers as card 0, the camera as card 1 and sound is back on! Solved my problem and I learned something to boot!
Is their a step by step instructions for people that have never changed command line instructions. I dont have(see) SU editing pad.
Thanks!
There's really no steps to it, you just enter the relevant information in a text file. Two lines, that's it. If you post the output of the commands mentioned in the first post together with some system information (distro, kernel) somebody might be able to help you out, i.e. tell you what lines in which file.
Thanks!
I use Debian, always updating as it asks. My webcam is a Logitech 9000 pro. Works fine when I plug it in (except for skype not having activate video chat), when I reboot thiers no sound.
This is what I get, and i need to know how to change the information.
Greatly appreciated, thanks!
Thanks!
I use Debian, always updating as it asks. My webcam is a Logitech 9000 pro. Works fine when I plug it in (except for skype not having activate video chat), when I reboot thiers no sound.
This is what I get, and i need to know how to change the information.
Greatly appreciated, thanks!
Ok, I meant for you to post the output of arecord with and without the webcam connected. Anyway, you are using different modules so the solution posted in post #2 in this thread will probably do it for you. So, try adding the following line in the file /etc/modprobe.d/sound with your favorite editor (If the file don't exist just create it. Also, you'll have to be root to edit this file)
Code:
options snd_mpu401 index=1
Now, I'm assuming that snd_mpu401 is your webcam and this line of code should, I think, force it to always register as device 1, leaving your built-in as device 0 (which is what it register as if it is the only connected device during boot).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.