Black God

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.

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

  1. Popolon
    January 27, 2014 at 6:14 pm

    Strangly on ubuntu (13.10), there are two entries for this line, I didn’t see the second one at first try and didn’t understand why it didn’t worked. So I set it as this and it just worked fine. Thanks a lot !! :

    options snd-usb-audio index=0
    # Keep snd-usb-audio from beeing loaded as first soundcard
    options snd-usb-audio index=0

  2. January 26, 2014 at 3:29 am

    modprobe -r snd_usb_audio
    modprobe snd_usb_audio

    avoided reboot for me (running mpd on a homeserver and had plenty of other stuff running on it as well)

  3. April 17, 2012 at 3:00 am

    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.

  4. Aleksandr V.
    March 15, 2012 at 7:56 pm

    Thanks!!! It is really helps to me!

  5. José Trujillo Carmona
    December 18, 2011 at 11:43 pm

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

  6. December 9, 2011 at 1:59 pm

    Worked wonderfull, thanks!!!

  7. November 13, 2011 at 5:41 pm

    Greets! Thank you! :)

  8. A Elouali
    August 25, 2011 at 6:24 am

    thank you very much you are my herooooooooooooooo :D

  9. Marcus
    April 29, 2011 at 1:00 pm

    Great, saved me a lot of time :)


  10. Samuel
    March 26, 2011 at 9:51 pm

    dont know hot to thank you

  11. March 5, 2011 at 12:00 pm

    Nice posting easy to read thank you

  12. Mic
    February 22, 2011 at 11:26 am

    Thanks for the simple fix. Helped me out.

  13. Olsen
    February 5, 2011 at 7:18 am

    Thanks for posting this! You saved me some time!

  14. Steffen
    February 1, 2011 at 10:23 pm

    You saved my day!

  15. fontam
    January 24, 2011 at 2:03 pm

    thanks for the tips, made my day :)

  16. December 31, 2010 at 9:16 pm

    THX! :-)

  17. ev-m
    November 28, 2010 at 11:28 pm

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

Leave a Reply

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