Homepage Wiki Forum Buy

Audio

From GNUBLIN

severity (level) requirement Gnublin family
Gnublin logo advanced.png Kernel compile, Toolchain All

Contents


Preparing the Kernel

First you should look at Kernel compile + Module installation. You must enable all of the following entries in the kernel configuration to use audio on Gnublin. (If it was possible i used the "Module" option not the "built-in" option)

Device Drivers -> Sound card support
Device Drivers -> Sound card support -> Advanced Linux Sound Architecture
Device Drivers -> Sound card support -> Advanced Linux Sound Architecture -> Sequencer support
Device Drivers -> Sound card support -> Advanced Linux Sound Architecture -> Sequencer dummy client [optional?]
Device Drivers -> Sound card support -> Advanced Linux Sound Architecture -> USB sound devices
Device Drivers -> Sound card support -> Advanced Linux Sound Architecture -> USB sound devices -> USB Audio/MIDI driver</nowiki>

After the configuration the modules and the kernel have to be compiled and copied to the SD-card.

Install ALSA

After that the following Debian-packages should be downloaded and installed to use ALSA:

  • alsa-utils_1.0.23-3_armel.deb
  • libasound2_1.0.23-2.1_armel.deb
  • linux-sound-base_1.0.23+dfsg-2_all.deb

Creating Device Files

If u dont have udev on the Gnublin-board you have to create the device-nodes, with which the ALSA kernel-module is communicating, manually.

root@gnublin:~# mkdir /dev/snd
root@gnublin:~# mknod /dev/snd/controlC0 c 116 0
root@gnublin:~# mknod /dev/snd/pcmC0D0p c 116 16

Sound-experiments

Now we can begin with some experiments. Therefor you should plugin the soundcard and attach headphones to the soundcard.

usb 1-1: new full speed USB device using lpc-ehci and address 2
usb 1-1: New USB device found, idVendor=0d8c, idProduct=000e
usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-1: Product: Generic USB Audio Device


Is the soundcard recognized by USB?

root@gnublin:~#lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0d8c:000e C-Media Electronics, Inc. Audio Adapter (Planet UP-100, Genius G-Talk)


Loading the driver:

root@gnublin:~# modprobe snd-usb-audio
usbcore: registered new interface driver snd-usb-audio


Is the driver loaded correctly?

root@gnublin:~# lsmod
Module Size Used by
snd_usb_audio 56402 0
snd_pcm 55561 1 snd_usb_audio
snd_timer 15798 1 snd_pcm
snd_page_alloc 3328 1 snd_pcm
snd_hwdep 4881 1 snd_usb_audio
snd_usb_lib 14247 1 snd_usb_audio
snd_rawmidi 14982 1 snd_usb_lib
snd_seq_device 4679 1 snd_rawmidi
snd 36116 7 snd_usb_audio,snd_pcm,snd_timer,snd_hwdep,snd_usb_lib,snd_rawmidi,snd_seq_device
soundcore 4515 1 snd
r8712u 271323 0


Does the kernel detects the hardware correctly?

root@gnublin:~# cat /proc/asound/cards 
0 [default ]: USB-Audio - Generic USB Audio Device
Generic USB Audio Device at usb-lpc-ehci.0-1, full speed


Is it possible for ALSA to use the device?

root@gnublin:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: default [Generic USB Audio Device ], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

If there is an error message after the command, like no "soundcards detected" or something like that, the device files are not created properly.


Using the Mixer, play sound:

root@gnublin:~# alsamixer
root@gnublin:~# aplay /usr/share/sounds/alsa/Noise.wav

Sources/Links

In other languages