OpenWrt Forum Archive

Topic: alsa-lib attempts

The content of this topic has been archived on 19 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Henryk Plötz attempted an alsa-lib install in https://dev.openwrt.org/ticket/486 a while back, I'm trying to regenerate this project and get alsa working in OpenWrt.  This would allow multi channel sound cards and more conventional sound applications to all work on openwrt.

I've got two packages that both compile fine for me, but still dont give me working alsa;
http://www.voodoowarez.com/wrt/alsa-lib.tar.gz
http://www.voodoowarez.com/wrt/mpd.tar.gz

The notable difference between this and henryk's is that I simply manually drop into the uclib buildroot and add wordexp, since the alsa functionality that uses wordexp is actually kind of critical for a large number of apps.  Its also alsa-lib 1.0.11rc4, which matches/matched the most recent alsa on openwrt.  When i last worked on this, all the dev work was still in trunk, so this is still kamikazee work, not buildroot-ng.

These attempts dont really cover that much ground, but I kind of deadlocked myself and didnt know where to go.  Getting real sound support on openwrt is a very important goal to me, and I'd be delighted to help fruther this however possible.

Hello.

Have you made any progress on this?

I am also trying to make a working alsa lib to use with a midi interface I have, hopefully to make  a working wireless midi node with my router.

when I try to launch my midi app, I get this error message :

root@OpenWrt:/multimidicast# multimidicast
multimidicast v1.1 (c) 2005 by Dirk Jagdmann <doj@cubic.org>
multimidicast: can't resolve symbol 'wordexp'

Is this normal? Do you have the same problems on your end?
I just compiled your lib and installed the .ipkg file on my router. When you say you "droppped manually into the uclib buildroot and add wordexp", are any other files from the system affected?

Also, inside your patch file is mention of the 1.0.9 lib sources. Why is that?

Thanks!

Another n00b trying to bring up alsa here. Actually everything looks good up until I try aplay.

I'm on kamikaze 5435 (that's after the reconvergence of buildroot-ng into trunk). kernel 2.6.17. I symlinked packages/alsa-lib and packages/alsa-utils into trunk/package. The make menuconfig gave a warning

.config.in:758:warning: 'select' used by config symbol 'PACKAGE_alsa-lib' refer
to undefined symbol 'PACKAGE_alsa'

There is no package/alsa; may be just an erroneous config file trying to make a dependency on kmod-alsa ??

Anyhow, all built fine, flashed to WGT634U, detected my USB2.0 C-media audio dongle on boot, auto-created device files

root@OpenWrt:~# ls /dev/sound
audio  dsp    mixer
root@OpenWrt:~# ls /dev/snd
controlC0  pcmC0D0c   pcmC0D0p   timer
root@OpenWrt:~# ls /proc/asound
card0    default  hwdep    oss      timers
cards    devices  modules  pcm      version
root@OpenWrt:~# cat /proc/asound/pcm
00-00: USB Audio : USB Audio : playback 1 : capture 1
root@OpenWrt:~# cat /proc/asound/cards
0 [default        ]: USB-Audio - C-Media USB Headphone Set
                      C-Media USB Headphone Set   at usb-0000:01:02.2-1.2, full speed
root@OpenWrt:~# cat /proc/asound/devices
  0: [ 0]   : control
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
33:        : timer
root@OpenWrt:~#

I can send a file to /dev/sound/dsp and it plays. Woot!
But alsaplay can't open the 'default' PCM.

root@OpenWrt:~# cat started.wav > /dev/sound/dsp
root@OpenWrt:~# aplay -c 1 -t wav started.wav
ALSA lib pcm.c:2143:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:550: audio open error: No such file or directory
root@OpenWrt:~#

Do I need to set up an alsa.conf file somewhere? Default is supposed to be card 0, device 0, and that's what my usb dongle is.

TIA

Can you play mp3's with madplay ?

(can be found in the backports repository).

The discussion might have continued from here.