Using a USB sound card



  • I know I'm not the only one poking at getting USB audio working on the Omega, so I thought I'd type up some notes on what got it working for me. Most of the work here is via @Thomas-Mueller who compiled the kernel module packages needed to get this working (and documented here). Thanks @Thomas-Mueller!

    In the future once the various kernel modules are all compiled and in the Onion repositories, this should be a lot easier. In the meantime, there's a few extra steps. But to future-proof this a bit I'll break it up into a few sections.

    Try this first

    opkg update
    opkg install kmod-usb-audio kmod-sound-core kmod-input-core
    

    If this works, you're all set and can just plug in a USB sound device and things should Just Work!

    That didn't work; now what?

    If the above gives you an error that looks something like

     * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-audio:
     * 	kernel (= 3.18.20-1-7bed08fa9c06eb8089e82c200340ec66) *
    

    then the correct packages aren't yet in the Onion repository. So you'll have to get them yourself and install them manually. (Don't worry, it's not that hard.)

    First, download the packages that @Thomas-Mueller built:

    wget --no-check-certificate https://www.dropbox.com/sh/g12gf4ko9512pec/AADx8AFbwcDAi07gagcVeFpca/kmod-input-core_3.18.23-1_ar71xx.ipk
    
    wget --no-check-certificate https://www.dropbox.com/sh/g12gf4ko9512pec/AABxNmtGs445noyL7etsxopda/kmod-sound-core_3.18.23-1_ar71xx.ipk
    
    wget --no-check-certificate https://www.dropbox.com/sh/g12gf4ko9512pec/AADS3nYf8oJQCtKmU4eVIF54a/kmod-usb-audio_3.18.23-1_ar71xx.ipk
    

    Once they are downloaded, install them:

    opkg --force-depends install *ipk
    

    Now you should be able to plug in a USB sound device and start playing audio. You can verify that everything is working by looking for the device nodes to get created once you plug one in:

    ls /dev/audio
    

    If that returns "/dev/audio" then your sound device was detected!

    There's also lots of great info created in /proc if you install the 'alsa-lib' package:

    opkg install alsa-lib
    

    Once that is installed you can look in "/proc/asound" to see information about the sound device. For example, this is my sound device, a $3 USB sound card from Amazon:

    # cat /proc/asound/cards
     0 [Device         ]: USB-Audio - USB Audio Device
                      C-Media Electronics Inc. USB Audio Device at usb-ehci-platform-1.1, full speed


  • Hi fader,

    thanks for that great howto. :+1:

    I hope it will help some people who are also interested in getting usb audio devices to work with the omega.



  • good job :+1:



  • Flawless install. Can you decipher what this means:

    root@Omega-170B:~# cat /proc/asound/cards
    0 [U0x46d0x8dd ]: USB-Audio - USB Device 0x46d:0x8dd
    USB Device 0x46d:0x8dd at usb-ehci-platform-1.4, full speed



  • @Rudy-Trujillo those bits from /proc/asound show that you have a recognized USB sound device, but that the device isn't providing much more than a raw ID string back. Instead of providing a human-readable set of information, it's giving its ID number ("U0x46d0x8dd") and nothing else. (The "usb-ehci-platform-1.4, full speed" part is just saying what USB chipset and USB revision are being used, neither of which are really important for this purpose.)

    That said, you should still have access to some nice ALSA (the Advanced Linux Sound Architecture) utilities. I'm traveling and don't have an Omega with me to give the exact commands, but take a look here: http://www.tldp.org/HOWTO/Alsa-sound-6.html This should give you at least a starting point to dig into what ALSA provides :)



  • Thank you Fader on my way to do some reading you suggested. Have a safe trip.



  • Well just finished reading 6.0 thru 6.1 from the link shown above and ran in to a "what moment?".
    After displaying the /proc/modules contents it was clear mine would not match the examples shown and was left with how do I know this is correct only because this was the first step in the check for correct install. Figured I was ok due to more then couple of snd devices in the file shown below.

    root@Omega-170B:/etc# cat /proc/modules |grep snd
    snd_usb_audio 94438 0 - Live 0x81820000
    snd_usbmidi_lib 15377 1 snd_usb_audio, Live 0x83354000
    snd_compress 6303 0 - Live 0x82be8000
    snd_pcm_oss 33873 0 - Live 0x81810000
    snd_mixer_oss 12585 1 snd_pcm_oss, Live 0x83328000
    snd_pcm 60199 2 snd_usb_audio,snd_pcm_oss, Live 0x81800000
    snd_timer 14590 1 snd_pcm, Live 0x83324000
    snd_rawmidi 15171 1 snd_usbmidi_lib, Live 0x82bfc000
    snd_seq_device 4381 1 snd_rawmidi, Live 0x82b28000
    snd_hwdep 4542 1 snd_usb_audio, Live 0x82b26000
    snd 39205 10 snd_usb_audio,snd_usbmidi_lib,snd_compress,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_rawmidi,snd_seq_device,snd_hwdep, Live 0x82bf0000
    soundcore 3756 1 snd, Live 0x82b36000
    input_core 24510 4 snd,uvcvideo,hid,evdev, Live 0x83108000
    usbcore 117364 25 snd_usb_audio,snd_usbmidi_lib,pl2303,ftdi_sio,cp210x,ch341,uvcvideo,usbserial,usblp,usbhid,ums_usbat,ums_sddr55,ums_sddr09,ums_karma,ums_jumpshot,ums_isd200,ums_freecom,ums_datafab,ums_cypress,ums_alauda,cdc_acm,ledtrig_usbdev,usb_storage,ehci_platform,ehci_hcd, Live 0x83b20000
    Figured from the above listing the modprobe snd_usb_audio was my card and ran that cmd, and got:
    root@Omega-170B:~# modprobe snd-usb-audio
    snd-usb-audio is already loaded
    In the example they got back Device or resource busy.
    Moving on, this was encouraging:
    root@Omega-170B:/proc/asound# cat cards
    0 [U0x46d0x8dd ]: USB-Audio - USB Device 0x46d:0x8dd
    USB Device 0x46d:0x8dd at usb-ehci-platform-1.4, full speed
    Unfortunately this step did not match:
    If cat /proc/asound/card1/pcm0 shows something like <--example step not mine

       ES1370 DAC2/ADC
      Playback isn't active.
      Record isn't active.
    

    I did not have a file close to this name only directories.
    Lastly was trying to figure our how to load the `amixer'' from the alsa-utils package?

    • list item

  • administrators

    Just to chime in, kmod-usb-audio and kmod-sound-core are included by default in the Omega firmware as of b260.

    (I'm working on getting a firmware change-log page up today so you guys can see the changes in each build)


Log in to reply
 

Looks like your connection to Onion Community was lost, please wait while we try to reconnect.