How to get C-Media USB Sound adapter 0d8c:000c working as primary sound card in Debian Linux?

I have a cheap USB Sound Adapter bought from Amazon, plugged in this with my QNAP TS-110 NAS box. This NAS box is going to serve as Table top Media center also. You can refer this post for more info on this. I have installed Debian Squeeze (6.0) testing branch. The kernel is 2.6.32 on this arm architecture.

$ uname -a

Linux debian 2.6.32-5-kirkwood #1 Sat Sep 18 15:20:08 UTC 2010 armv5tel GNU/Linux

When I plugged in this device, it was detected by the kernel as shown below. dmesg output is as under.

[   30.406340] usb 1-1.2: new full speed USB device using orion-ehci and address 3

[   30.527515] usb 1-1.2: New USB device found, idVendor=0d8c, idProduct=000c

[   30.534438] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0

[   30.541883] usb 1-1.2: Product: C-Media USB Headphone Set

[   30.573852] usb 1-1.2: configuration #1 chosen from 1 choice

lsusb outputs the following.
$ lsusb
………
Bus 001 Device 003: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Here is the list of modules loaded automatically.

$ lsmod | grep snd

snd_usb_audio          59236  0

snd_pcm                56903  1 snd_usb_audio

snd_page_alloc          4891  1 snd_pcm

snd_usb_lib            14384  1 snd_usb_audio

snd_seq_midi            4274  0

snd_seq_midi_event      4610  1 snd_seq_midi

snd_rawmidi            15833  2 snd_usb_lib,snd_seq_midi

snd_hwdep               5140  1 snd_usb_audio

snd_seq                43935  2 snd_seq_midi,snd_seq_midi_event

snd_timer              15962  2 snd_pcm,snd_seq

snd_seq_device          4983  3 snd_seq_midi,snd_rawmidi,snd_seq

snd                    42948  7 snd_usb_audio,snd_pcm,snd_rawmidi,snd_hwdep,snd_seq,snd_timer,snd_seq_device

soundcore               4753  1 snd

usbcore               122115  6 snd_usb_audio,snd_usb_lib,udlfb,usbhid,ehci_hcd

I installed the following packages to get sound working. It is mostly all necessary ALSA packages.
# apt-get install alsa-tools alsa-oss alsa-utils
Good to see that everything went fine. But when I run alsamixer to set the volume, it fails with following error message.
$ alsamixer
cannot open mixer: No such file or directory
When I googled, I was adviced to try without USB hub. So I directly connected to Server without using external USB hub… but no improvement. I don’t have any other audio device (not even internal audio card).
Debian Squeeze does not come with alsaconf utility to detect and install the necessary modules. It is done automatically. In my case it loads all modules and also there is no error message while starting ALSA at startup.
Then I looked at /etc/modprobe.d/alsa-base.conf file. I noticed the following at end of file.
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
I just caught the culprit. Basically these external USB sound adapters are used as secondary audio device, the above setting prohibits USB sound adapter being set as default device. In my case, it is a primary audio device, so I set it’s index as 0 as shown below.
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=0
I just rebooted. It works fine with this setting. Now proceed setting volume using alsamixer to get it confirmed that it works. Here is my alsamixer screen.

This entry was posted in HOW-TOs and tagged , , , , , , , , , . Bookmark the permalink.

18 Responses to How to get C-Media USB Sound adapter 0d8c:000c working as primary sound card in Debian Linux?

  1. Pingback: My USB headphones not recognised in Ubuntu - Page 2

  2. This setup sort of helped thank you
    I had to change it 1 instead of 0 and make a script for start up.

    This is how i went about it.
    http://www.m3ta4.net/hd/debian/partsix/debianpartsix.html

  3. Aleksandr V. says:

    Thanks!!! It is really helps to me!

  4. Pingback: Motherboard M2N-E SLI și C-Media – Activare sunet în Linux | Programe PC

  5. José Trujillo Carmona says:

    Fantástico. Problema resuelto.
    Wonderful, fantastic, problem solved.

  6. Worked wonderfull, thanks!!!

  7. yo9fah says:

    Greets! Thank you! :)

  8. Pingback: Motherboard M2N-E SLI și C-Media – Activare sunet în Linux | Y O 9 F A H

  9. A Elouali says:

    thank you very much you are my herooooooooooooooo :D

  10. Marcus says:

    Great, saved me a lot of time :)

    Greets
    Marcus

  11. Samuel says:

    Dude,
    dont know hot to thank you

  12. Nice posting easy to read thank you

  13. Mic says:

    Thanks for the simple fix. Helped me out.

  14. Olsen says:

    Thanks for posting this! You saved me some time!

  15. Steffen says:

    You saved my day!

  16. fontam says:

    thanks for the tips, made my day :)

  17. ev-m says:

    Thank you so much for your help!!! All is working)))))
    Большая благодарность за вашу помощь!!! Всё работает)))

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>