Topic: PulseAudio?

I'm interested in setting up my router as a PulseAudio server.  Has anyone done it, or know if its likely to not work?

thanks

Re: PulseAudio?

UP

NSLU2 guys seems to did it: http://ipkgfind.nslu2-linux.org/details.php?package=pulseaudio-server&official=&format=

Any news ?

Re: PulseAudio?

if there is a package for all the dependencies then you should be good to go?

http://www.pulseaudio.org/wiki/DownloadPulseAudio#Requirements

Re: PulseAudio?

maybe a bit offtopic but about dependencies, currently I'm working on a LIRC package. the package itself works but I need to find a solution for the kernel drivers...

Re: PulseAudio?

actually, someone did it some time ago:

Polypaudio + Whiterussian
http://sokrates.mimuw.edu.pl/~sebek/openwrt/
http://sokrates.mimuw.edu.pl/~sebek/openwrt/sources/

So I guess, all we need is a good soul to build the packages smile
Anyone ?

Re: PulseAudio?

I'm very interested in this, too. Just installed my first OpenWRT box, and would love to use it as an audio sink.

I don't (yet) have the skills to build packages; maybe someone has done so since this last forum post.

Thanks.

7 (edited by francoisal 2009-05-01 09:26:04)

Re: PulseAudio?

My 2 cents to the openwrt community expecting pulseaudio support :
   - http://stashbox.org/502826/pulseaudio-openwrt-0.9.15.zip

The latest sources of pulseaudio requires libtool-2.x. You will have to upgrade to this version in order to compile this package.
Unless someone made it officially in svn trunk, you will have to made it by hand, since it breaks many other old packages.
On my side, I had to upgrade like this :
  - libtool : http://stashbox.org/502836/libtool-openwrt-2.2.6.zip
  - libiconv 1.13 : http://stashbox.org/502834/libiconv-full-openwrt-1.13.zip
  - gdbm 1.8.3 : http://stashbox.org/503763/gdbm-openwrt-1.8.3.zip

Good luck...

8 (edited by loswillios 2010-10-19 13:03:25)

Re: PulseAudio?

I have updated the patches:

libiconv-1.13.1-r20082.diff
gdbm-libtool-2.2.6b-compat-r20082.diff
libtool-2.2.6b-r20082.diff
pulseaudio-0.9.21-r20082.diff

please report back

Re: PulseAudio?

Hi loswillios,

thanks for your patches. Great work! The compilation and installation was no problem ;-) but I cannot start pulseaudio... I get a segmentation fault

My hardware is: Asus 500gP v2 and I am using the latest backfire svn checkout. I configured the buildsystem to use kernel 2.6. Do you have any hints whats going wrong?

Kind regards

spoky

strace output:

root@OpenWrt:~# strace pulseaudio
execve("/usr/bin/pulseaudio", ["pulseaudio"], [/* 8 vars */]) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaad000
stat("/etc/ld.so.cache", 0x7ffe9a20)    = -1 ENOENT (No such file or directory)
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libpulsecore-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpulsecore-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpulsecore-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulsecore-0.9.21.so", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=494951, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\0\243\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 561152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabe000
old_mmap(0x2aabe000, 490588, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2aabe000
old_mmap(0x2ab45000, 7527, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x77000) = 0x2ab45000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libpulse.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpulse.so.0", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/lib/libpulse.so.0", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulse.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=277007, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\220j\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 344064, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab47000
old_mmap(0x2ab47000, 274172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab47000
old_mmap(0x2ab9a000, 2575, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x43000) = 0x2ab9a000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libpulsecommon-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpulsecommon-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpulsecommon-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulsecommon-0.9.21.so", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=313795, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0@\203\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 380928, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ab9b000
old_mmap(0x2ab9b000, 308836, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ab9b000
old_mmap(0x2abf7000, 2499, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4c000) = 0x2abf7000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libltdl.so.7", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libltdl.so.7", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/lib/libltdl.so.7", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libltdl.so.7", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=33459, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0 \25\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 102400, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2abf8000
old_mmap(0x2abf8000, 32996, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2abf8000
old_mmap(0x2ac10000, 691, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8000) = 0x2ac10000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libsamplerate.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libsamplerate.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libsamplerate.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libsamplerate.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=1504255, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\200\10\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 1572864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac11000
old_mmap(0x2ac11000, 1503908, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2ac11000
old_mmap(0x2ad90000, 1023, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715841780, 0x64740000) = 0x2ad90000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libspeexdsp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libspeexdsp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libspeexdsp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libspeexdsp.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=170608, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\320\25\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 167936, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ad91000
old_mmap(0x2ad91000, 99012, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 715839008, 0x2aaad608) = 0x2ad91000
old_mmap(0x2adb9000, 2740, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715841780, 0x64740000) = 0x2adb9000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libsndfile.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libsndfile.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/lib/libsndfile.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib/libsndfile.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=436111, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\360\35\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 520192, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2adba000
old_mmap(0x2adba000, 430892, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 715839316, 0x2aaad73c) = 0x2adba000
old_mmap(0x2ae33000, 6031, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715841780, 0x64740000) = 0x2ae33000
old_mmap(0x2ae35000, 15680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 2147389384, 0x2aaaa678) = 0x2ae35000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libdbus-1.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libdbus-1.so.3", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/lib/libdbus-1.so.3", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib/libdbus-1.so.3", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=248659, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0000?\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 315392, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 715935760, 0) = 0x2ae39000
old_mmap(0x2ae39000, 243300, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x69000) = 0x2ae39000
old_mmap(0x2ae84000, 6995, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715839624, 0x2aaad870) = 0x2ae84000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libgdbm.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgdbm.so.3", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/lib/libgdbm.so.3", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libgdbm.so.3", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=17867, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\300\f\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 86016, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 715935760, 0) = 0x2ae86000
old_mmap(0x2ae86000, 17524, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 715839932, 0x2aaad9a4) = 0x2ae86000
old_mmap(0x2ae9a000, 1483, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715841812, 0x64740000) = 0x2ae9a000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/librt.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/librt.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=3218, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 715935760, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0p\5\0\0004\0\0\0"..., 4096) = 3218
old_mmap(NULL, 69632, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 2147389456, 0x2aaab170) = 0x2ae9b000
old_mmap(0x2ae9b000, 3172, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 2147389440, 0x2aaab170) = 0x2ae9b000
old_mmap(0x2aeab000, 3218, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715935760, 0) = 0x2aeab000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libdl.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libdl.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=8310, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0`\10\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 77824, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 3, 0) = 0x2aeac000
old_mmap(0x2aeac000, 6496, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 715840540, 0x2aaadc04) = 0x2aeac000
old_mmap(0x2aebd000, 4214, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715841812, 0x64740000) = 0x2aebd000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libm.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=101571, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0000\25\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 167936, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 3, 0) = 0x2aebf000
old_mmap(0x2aebf000, 101084, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 715840836, 0x2aaadd2c) = 0x2aebf000
old_mmap(0x2aee7000, 3267, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715841844, 0x64740000) = 0x2aee7000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=64811, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\340\33\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 131072, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 3, 0) = 0x2aee8000
old_mmap(0x2aee8000, 62732, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 715841132, 0x2aaade54) = 0x2aee8000
old_mmap(0x2af07000, 3371, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715841812, 0x64740000) = 0x2af07000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x2aaaf000
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY)  = 3
fstat(3, {st_mode=0, st_size=71531, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\3004\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 147456, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 3, 0) = 0x2af08000
old_mmap(0x2af08000, 50040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 715845632, 0x2aaadf7c) = 0x2af08000
old_mmap(0x2af24000, 22379, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xc000) = 0x2af24000
old_mmap(0x2af2a000, 6768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 2147389280, 0x2aaaa678) = 0x2af2a000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/home/fheese/Source/openwrt/backfire/staging_dir/target-mipsel_uClibc-0.9.30.1/usr/lib/libc.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=405459, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaae000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\300\252\0\0004\0\0\0"..., 4096) = 4096
old_mmap(NULL, 491520, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0) = 0x2af2c000
old_mmap(0x2af2c000, 399840, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x2af2c000
old_mmap(0x2af9d000, 8147, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 715845932, 0x2aaaf114) = 0x2af9d000
old_mmap(0x2af9f000, 19456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 715841876, 0x64740000) = 0x2af9f000
close(3)                                = 0
munmap(0x2aaae000, 4096)                = 0
open("/lib/libltdl.so.7", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/lib/libltdl.so.7", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libltdl.so.7", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=1, ...})   = 0
close(3)                                = 0
open("/lib/libsamplerate.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libsamplerate.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libsamplerate.so.0", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libspeexdsp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libspeexdsp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libspeexdsp.so.1", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=715935760, ...}) = 0
close(3)                                = 0
open("/lib/libpulse.so.0", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/lib/libpulse.so.0", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulse.so.0", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libpulsecommon-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpulsecommon-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulsecommon-0.9.21.so", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libsndfile.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/lib/libsndfile.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib/libsndfile.so.1", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libdbus-1.so.3", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/lib/libdbus-1.so.3", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib/libdbus-1.so.3", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=0, ...}) = 0
close(3)                                = 0
open("/lib/libgdbm.so.3", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/lib/libgdbm.so.3", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libgdbm.so.3", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=715935760, ...}) = 0
close(3)                                = 0
open("/lib/librt.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=0, st_size=3218, ...}) = 0
close(3)                                = 0
open("/lib/libdl.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libm.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libpthread.so.0", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=05252750424, st_size=0, ...}) = 0
close(3)                                = 0
open("/lib/libpulsecommon-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpulsecommon-0.9.21.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpulsecommon-0.9.21.so", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=313795, ...}) = 0
close(3)                                = 0
open("/lib/libsndfile.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/lib/libsndfile.so.1", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/usr/lib/libsndfile.so.1", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libdbus-1.so.3", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/lib/libdbus-1.so.3", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/lib/libdbus-1.so.3", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libgdbm.so.3", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/lib/libgdbm.so.3", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("/usr/lib/libgdbm.so.3", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/librt.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libdl.so.0", O_RDONLY)       = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libm.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=64811, ...}) = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=71531, ...}) = 0
close(3)                                = 0
open("", O_RDONLY)                      = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("", O_RDONLY)                      = -1 ENOENT (No such file or directory)
open("\340\227\376\177\\\264\252*", O_RDONLY) = -1 ENOENT (No such file or directory)
open("\340\227\376\177\\\264\252*", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=1, ...})   = 0
close(3)                                = 0
open("\270\217\376\177\340\232\376\177/usr/lib", O_RDONLY) = -1 ENOENT (No such file or directory)
open("\320\227\376\177\340\232\376\177\270\217\376\177\340\232\376\177/usr/lib", O_RDONLY) = -1 ENOENT (No such file or directory)
open("\320\227\376\177\340\232\376\177\270\217\376\177\340\232\376\177/usr/lib", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=248659, ...}) = 0
close(3)                                = 0
open("\250\217\376\177\340\232\376\177/usr/lib/libdbus-1.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("\240\217\376\177\340\232\376\177/lib/libgdbm.so./libdbus-1.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
open("\240\217\376\177\340\232\376\177/lib/libgdbm.so./libdbus-1.so.3", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=17867, ...}) = 0
close(3)                                = 0
open("\230\217\376\177\340\232\376\177/usr/lib/libgdbm.so.3", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("\260\227\376\177\340\232\376\177\220\217\376\177\340\232\376\177/lib/librt.so.0", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("\1", O_RDONLY)                    = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libgcc_s.so\1", O_RDONLY)    = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=71531, ...}) = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libm.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("\1", O_RDONLY)                    = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=64811, ...}) = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=405459, ...}) = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("\220\226\376\177\\\264\252*:", O_RDONLY) = -1 ENOENT (No such file or directory)
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("\200\226\376\177\\\264\252*h\216\376\177\340\232\376\177p\216\376\177/lib/lib/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libc.so.0", O_RDONLY)        = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("X\216\376\177\340\232\376\177`\216\376\177/lib/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open("\1", O_RDONLY)                    = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
open(":", O_RDONLY)                     = 3
fstat(3, {st_mode=0, st_size=0, ...})   = 0
close(3)                                = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=20706, ...}) = 0
mprotect(0x2ae84000, 4096, PROT_READ)   = 0
mprotect(0x2aebd000, 4096, PROT_READ)   = 0
mprotect(0x2af24000, 4096, PROT_READ)   = 0
mprotect(0x2af9d000, 4096, PROT_READ)   = 0
mprotect(0x2aabc000, 4096, PROT_READ)   = 0
ioctl(0, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCNXCL, {B38400 opost isig icanon echo ...}) = 0
getpid()                                = 1481
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2040*1024, rlim_max=RLIM_INFINITY}) = 0
rt_sigaction(SIGRT_0, {SIG_DFL, [RT_73 RT_77 RT_81 RT_82 RT_85 RT_90 RT_92 RT_93], SA_STACK|SA_INTERRUPT|SA_SIGINFO|SA_NOCLDWAIT|0x2f03d60}, NULL, 16) = 0
rt_sigaction(SIGRT_1, {SIG_DFL, [RT_73 RT_77 RT_81 RT_82 RT_85 RT_90 RT_92 RT_93], SA_STACK|SA_INTERRUPT|SA_SIGINFO|SA_NOCLDWAIT|0x2f03c70}, NULL, 16) = 0
rt_sigaction(SIGRT_2, {SIG_DFL, [RT_73 RT_77 RT_81 RT_82 RT_85 RT_90 RT_92 RT_93], SA_STACK|SA_INTERRUPT|SA_SIGINFO|SA_NOCLDWAIT|0x2f02e54}, NULL, 16) = 0
rt_sigprocmask(SIG_BLOCK, [RT_0], NULL, 16) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1], NULL, 16) = 0
brk(0)                                  = 0x411000
brk(0x412000)                           = 0x412000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

Re: PulseAudio?

yes, pulseaudio is not compiling correctly. When you look at the opkg you'll notice lots of missing files. That's why pulseaudio doesn't start.

I tried to solve it for a while but gave up eventually. I think it was something libtool2 related

Re: PulseAudio?

Has anyone had any luck with this?  I successfully compiled pulseaudio 0.9.21 w/o the patches that loswillios linked (but are no longer available), but as spoky noted, pulseaudio segfaults immediately when I run it.

Re: PulseAudio?

I filed a ticket where patches etc can be attached: https://dev.openwrt.org/ticket/7983

Hope it'll work someday smile

Re: PulseAudio?

After staring at a lot of strace output and recompiling pulseaudio many times, I managed to actually run (and not segfault!) pulseaudio-0.9.21 using loswillios' patches on my Buffalo WZR-HP-G300NH router which has a ton of flash memory (32MB).  The big step to get to the console was using uClibc 0.9.30+nptl on backfire (10.03).  I also loaded alsa-(lib and utils) and successfully tested .wav output to my USB audio device, so I know alsa works.  Below is the console output before I had to kill it because I cannot play the same .wav file via the pulseaudio console.

root@OpenWrt:~# strace -v -o /tmp/asdf pulseaudio 
N: [daemon/main.c:629 main()] Running in system mode, forcibly disabling SHM mode!
D: [pulsecore/core-rtclock.c:109 pa_rtclock_hrtimer_enable()] Timer slack is set to 50 us.
D: [pulsecore/core-util.c:675 set_nice()] setpriority() worked.
I: [pulsecore/core-util.c:716 pa_raise_priority()] Successfully gained nice level -11.
I: [daemon/main.c:197 change_user()] Found user 'root' (UID 0) and group 'root' (GID 0).
W: [daemon/main.c:205 change_user()] Home directory of user 'root' is not '/var/run/pulse', ignoring.
I: [daemon/main.c:271 change_user()] Successfully dropped root privileges.
I: [daemon/main.c:771 main()] This is PulseAudio 0.9.21
D: [daemon/main.c:772 main()] Compilation host: mips-openwrt-linux-gnu
D: [daemon/main.c:773 main()] Compilation CFLAGS: -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float  -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: [daemon/main.c:776 main()] Running on host: Linux mips 2.6.32.16 #1 Sat Sep 25 15:47:05 EDT 2010
D: [daemon/main.c:779 main()] Found 1 CPUs.
I: [daemon/main.c:781 main()] Page size is 4096 bytes
D: [daemon/main.c:786 main()] Compiled with Valgrind support: no
D: [daemon/main.c:789 main()] Running in valgrind mode: no
D: [daemon/main.c:791 main()] Running in VM: no
D: [daemon/main.c:794 main()] Optimized build: yes
D: [daemon/main.c:804 main()] All asserts enabled.
I: [daemon/main.c:811 main()] Machine ID is OpenWrt.
I: [daemon/main.c:821 main()] Using runtime directory /var/run/pulse.
I: [daemon/main.c:826 main()] Using state directory /var/lib/pulse.
I: [daemon/main.c:829 main()] Using modules directory /usr/lib/pulse-0.9.21/modules.
I: [daemon/main.c:831 main()] Running in system mode: yes
W: [daemon/main.c:836 main()] OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that.
W: [daemon/main.c:836 main()] If you do it nonetheless then it's your own fault if things don't work as expected.
W: [daemon/main.c:836 main()] Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea.
I: [daemon/main.c:861 main()] Fresh high-resolution timers available! Bon appetit!
D: [pulsecore/memblock.c:741 pa_mempool_new()] Using private memory pool with 16 slots of size 64.0 KiB each, total size is 1.0 MiB, maximum usable slot size is 65496
D: [modules/alsa/alsa-util.c:647 pa_alsa_open_by_device_string()] Trying default with SND_PCM_NO_AUTO_FORMAT ...
D: [modules/alsa/alsa-util.c:658 pa_alsa_open_by_device_string()] Managed to open default
W: [modules/alsa/alsa-util.c:1306 pa_alsa_strerror()] Unable to convert error string to locale, filtering.
D: [modules/alsa/alsa-util.c:105 set_format()] snd_pcm_hw_params_set_format(Signed 16 bit Big Endian) failed: Invalid argument
D: [modules/alsa/alsa-util.c:296 pa_alsa_set_hw_params()] Maximum hw buffer size is 341 ms
D: [modules/alsa/alsa-util.c:310 pa_alsa_set_hw_params()] Set buffer size first (to 1920 samples), period size second (to 240 samples).
I: [modules/alsa/alsa-util.c:363 pa_alsa_set_hw_params()] Device default doesn't support sample format s16be, changed to s16le.
I: [modules/alsa/alsa-sink.c:1780 pa_alsa_sink_new()] Successfully opened device default.
I: [modules/alsa/alsa-sink.c:1801 pa_alsa_sink_new()] Successfully enabled mmap() mode.
I: [pulsecore/sink.c:325 pa_sink_new()] Created sink 0 "alsa_output" with sample spec s16le 2ch 48000Hz and channel map front-left,front-right
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.resolution_bits = "16"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.api = "alsa"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.class = "sound"
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.class = "generic"
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.subclass = "generic-mix"
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.name = "dmix:0"
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.id = "dmix:0"
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.subdevice = "0"
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.subdevice_name = "dmix:0"
I: [pulsecore/sink.c:325 pa_sink_new()]     alsa.device = "0"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.string = "default"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.buffering.buffer_size = "8192"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.buffering.fragment_size = "4096"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.access_mode = "mmap"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.description = "dmix:0"
I: [pulsecore/sink.c:325 pa_sink_new()]     device.icon_name = "audio-card"
I: [pulsecore/source.c:291 pa_source_new()] Created source 0 "alsa_output.monitor" with sample spec s16le 2ch 48000Hz and channel map front-left,front-right
I: [pulsecore/source.c:291 pa_source_new()]     device.description = "Monitor of dmix:0"
I: [pulsecore/source.c:291 pa_source_new()]     device.class = "monitor"
I: [pulsecore/source.c:291 pa_source_new()]     device.icon_name = "audio-input-microphone"
I: [modules/alsa/alsa-sink.c:1871 pa_alsa_sink_new()] Using 2.0 fragments of size 4096 bytes (21.33ms), buffer size is 8192 bytes (42.67ms)
D: [modules/alsa/alsa-sink.c:916 update_sw_params()] hwbuf_unused=0
D: [modules/alsa/alsa-sink.c:928 update_sw_params()] setting avail_min=1
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()] snd_pcm_dump():
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()] Plug PCM: Direct Stream Mixing PCM
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()] Its setup is:
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   stream       : PLAYBACK
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   access       : MMAP_INTERLEAVED
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   format       : S16_LE
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   subformat    : STD
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   channels     : 2
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   rate         : 48000
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   exact rate   : 48000 (48000/1)
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   msbits       : 16
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   buffer_size  : 2048
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_size  : 1024
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_time  : 21333
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   tstamp_mode  : ENABLE
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_step  : 1
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   avail_min    : 1024
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_event : 1
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   start_threshold  : -1
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   stop_threshold   : 1073741824
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   silence_threshold: 0
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   silence_size : 0
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   boundary     : 1073741824
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()] Hardware PCM card 0 'USB Headphone Set' device 0 subdevice 0
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()] Its setup is:
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   stream       : PLAYBACK
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   access       : MMAP_INTERLEAVED
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   format       : S16_LE
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   subformat    : STD
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   channels     : 2
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   rate         : 48000
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   exact rate   : 48000 (48000/1)
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   msbits       : 16
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   buffer_size  : 16384
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_size  : 1024
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_time  : 21333
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   tstamp_mode  : ENABLE
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_step  : 1
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   avail_min    : 1024
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   period_event : 0
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   start_threshold  : 1
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   stop_threshold   : 1073741824
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   silence_threshold: 0
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   silence_size : 1073741824
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   boundary     : 1073741824
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   appl_ptr     : 0
D: [modules/alsa/alsa-util.c:771 pa_alsa_dump()]   hw_ptr       : 0
D: [modules/alsa/alsa-sink.c:1343 thread_func()] Thread starting up
I: [pulsecore/core-util.c:652 pa_make_realtime()] Successfully enabled SCHED_RR scheduling for thread, with priority 4, which is lower than the requested 5.
I: [modules/alsa/alsa-sink.c:1380 thread_func()] Starting playback.
I: [pulsecore/module.c:120 pa_module_load()] Loaded "module-alsa-sink" (index: #0; argument: "sink_name="alsa_output" tsched=0").
D: [modules/module-cli.c:114 module_cli_LTX_pa__init()] Managed to open /dev/tty.
I: [pulsecore/client.c:80 pa_client_new()] Created 0 "Unknown client"
I: [pulsecore/module.c:120 pa_module_load()] Loaded "module-cli" (index: #1; argument: "").
I: [daemon/main.c:968 main()] Daemon startup complete.
Welcome to PulseAudio! Use "help" for usage information.
>>> play-file /root/test.wav alsa_output
D: [pulsecore/sound-file-stream.c:274 pa_play_file()] POSIX_FADV_SEQUENTIAL succeeded.
I: [modules/alsa/alsa-sink.c:436 check_left_to_play()] Underrun!
^C^C
^Z[1]+  Stopped                    strace -v -o /tmp/asdf pulseaudio

Repeating the same steps a second time causes pulseaudio to become a zombie process.  Here is the strace output.

It seemingly always gets stuck in posix_fadvise() per the strace snippet below.

play-file /root/test.wav alsa_ou"..., 1024) = 37
open("/root/test.wav", O_RDONLY|O_NOCTTY|O_LARGEFILE) = 7
fadvise64_64(7, 0, 0, POSIX_FADV_NORMAL) = 0
ioctl(2, TIOCNXCL, {c_iflags=0x2d00, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x4b1b, c_line=0, c_cc="\x03\x1c\x7f\x15\x01\x00\xff\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x04\xff\x00\x00\x00\x00\x00"}) = 0
write(2, "D", 1)                        = 1
write(2, ": ", 2)                       = 2
write(2, "[pulsecore/sound-file-stream.c:2"..., 51) = 51
write(2, "POSIX_FADV_SEQUENTIAL succeeded.", 32) = 32
write(2, "\n", 1)                       = 1
fadvise64_64(7, 0, 0, POSIX_FADV_NORMAL

The relevant pulseaudio-0.9.21 seems to be in pulseaudio-0.9.21/src/pulsecore/sound-file-stream.c.

#ifdef HAVE_POSIX_FADVISE
    if (posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL) < 0) {
        pa_log_warn("POSIX_FADV_SEQUENTIAL failed: %s", pa_cstrerror(errno));
        goto fail;
    } else
        pa_log_debug("POSIX_FADV_SEQUENTIAL succeeded.");

    if (posix_fadvise(fd, 0, 0, POSIX_FADV_WILLNEED) < 0) {
        pa_log_warn("POSIX_FADV_WILLNEED failed: %s", pa_cstrerror(errno));
        goto fail;
    } else
        pa_log_debug("POSIX_FADV_WILLNEED succeeded.");
#endif

To dumb it down more, I even used the load-module module-always-sink which adds a dummy audio device to pulseaudio, but play-file causes pulseaudio to hang w/ the same strace output, so I suspect it's not an issue w/ the audio.  I suspect it's an issue w/ either pulseaudio itself or uClibc.  Any idea why it might get stuck at this point?  Should I try 10.03.1rc3?

Re: PulseAudio?

Ok, maybe there's more problems that my build of pulseaudio-0.9.21 has produced.  Here's the output from my dmesg.

CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 800694e4, ra == 8012fb10
Oops[#1]:
Cpu 0
$ 0   : 00000000 00000001 82e1be30 00000000
$ 4   : 834bb320 00000000 802b17b0 81055020
$ 8   : 810550a0 00000041 00000000 ffffffff
$12   : 838aad80 00000001 00000800 00470000
$16   : 834bb320 834bb320 838aad50 834bb3e4
$20   : 834bb324 00100100 00000004 ffffffff
$24   : 00474aa0 2aaeec30                  
$28   : 82e1a000 82e1be20 82e1be90 8012fb10
Hi    : 00000028
Lo    : 8597a600
epc   : 800694e4 0x800694e4
    Not tainted
ra    : 8012fb10 0x8012fb10
Status: 1000fc03    KERNEL EXL IE 
Cause : 0080000c
BadVA : 00000000
PrId  : 00019374 (MIPS 24Kc)
Modules linked in: snd_usb_audio snd_usb_lib uhci_hcd ohci_hcd nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ehci_hcd ipt_REJECT xt_TCPMSS ipt_LOG xt_comment xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd_page_alloc snd soundcore ath9k ath9k_common ath9k_hw ath mac80211 usbcore nls_base crc_ccitt cfg80211 compat_firmware_class compat arc4 aes_generic deflate ecb cbc leds_gpio button_hotplug gpio_buttons input_polldev input_core
Process pulseaudio (pid: 734, threadinfo=82e1a000, task=838aad50, tls=2aab7440)
Stack : 00000000 00200200 00100100 00000004 834bb324 800ad528 00000005 82e1be88
        00447eb8 81055020 834bb320 00000005 834bb3e4 00200200 00100100 8012fb10
        00000004 834bb3e4 834bb3e8 00000200 00000004 81055020 00000001 800b55e0
        82dc9c00 00000001 00000005 00000000 81055098 81055018 000016c1 00000200
        00000000 00000200 00000200 834bb3e4 82e59d00 00000003 7f9441e8 800b5700
        ...
Call Trace:[<800ad528>] 0x800ad528
[<8012fb10>] 0x8012fb10
[<800b55e0>] 0x800b55e0
[<800b5700>] 0x800b5700
[<800b08e0>] 0x800b08e0
[<80062600>] 0x80062600


Code: ac820008  afb40010  00808021 <ac620000> afa30014  afb20018  2402ffff  c2030000  00402021 
Disabling lock debugging due to kernel taint

Re: PulseAudio?

I installed a fresh build from trunk and repeated all the same steps when I had built 10.03.  It seems to hang at the same point, but a dmesg reveals some more kernel info, after I had enabled symbol table.

Unhandled kernel unaligned access[#1]:
Cpu 0
$ 0   : 00000000 00000001 82ecde30 0000b672
$ 4   : 8349c9b0 00000000 802c6010 810523a0
$ 8   : 81052440 00000041 00000000 00000008
$12   : 7ff76a08 00000000 00000000 00000003
$16   : 8349c9b0 8349c9b0 82f68000 8349ca74
$20   : 8349c9b4 00100100 00000004 ffffffff
$24   : 00000008 2aee6510                  
$28   : 82ecc000 82ecde20 82ecde90 80131f18
Hi    : 0000017e
Lo    : 48452c80
epc   : 8006942c __mutex_lock_slowpath+0x3c/0xe4
    Not tainted
ra    : 80131f18 jffs2_readpage+0x28/0x5c
Status: 1000fc03    KERNEL EXL IE 
Cause : 00800014
BadVA : 0000b672
PrId  : 00019374 (MIPS 24Kc)
Modules linked in: usb_storage usblp snd_usb_audio snd_usb_lib uhci_hcd ohci_hcd nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack ehci_hcd sd_mod ipt_REJECT xt_TCPMSS ipt_LOG xt_comment xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables xt_tcpudp x_tables snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_rawmidi snd_seq_device snd_hwdep snd_page_alloc snd soundcore ath9k ath9k_common ath9k_hw ath mac80211 usbcore scsi_mod nls_base crc_ccitt cfg80211 compat_firmware_class compat arc4 aes_generic deflate ecb cbc leds_gpio button_hotplug gpio_buttons input_polldev input_core
Process pulseaudio (pid: 775, threadinfo=82ecc000, task=82f68000, tls=2aab72d0)
Stack : 00000000 00200200 00100100 00000004 8349c9b4 800af888 00000004 00000020
        83ae6800 810523a0 8349c9b0 00000005 8349ca74 00200200 00100100 80131f18
        00000004 8349ca74 8349ca78 00000200 00000004 810523a0 00000001 800b7940
        83ae6800 00000001 00000002 00000000 81052438 810523d8 00001667 00000200
        00000000 00000200 00000200 8349ca74 82efdd00 00000003 7ff76a18 800b7a60
        ...
Call Trace:
[<8006942c>] __mutex_lock_slowpath+0x3c/0xe4
[<80131f18>] jffs2_readpage+0x28/0x5c
[<800b7940>] __do_page_cache_readahead+0x1d8/0x244
[<800b7a60>] force_page_cache_readahead+0x80/0xe4
[<800b2c40>] sys_fadvise64_64+0x1b0/0x278
[<80062544>] stack_done+0x20/0x3c


Code: ac820008  afb40010  00808021 <ac620000> afa30014  afb20018  2402ffff  c2030000  00402021 
Disabling lock debugging due to kernel taint

Re: PulseAudio?

I should also add that my previous post was after building Backfire trunk + uClibc=0.9.32+nptl.

Re: PulseAudio?

Using loswillios' patches (linked earlier in the thread), I successfully compiled and ran pulseaudio-0.9.21 for my Buffalo WZR-HP-G300NH router.  Some caveats:

- Of loswillios' patches for libtool2, I used the one with the most recent timestamp, patch-libtool2.diff, and ignored the others.
- After applying loswillios' patches, I disabled large file support (--disable-largefile) in feeds/packages/sound/pulseaudio/Makefile.  It seems like all of pulseaudio's package dependencies are not compiled w/ large file support which seems excessive for the confines of an OpenWRT router.  :-)
- Also in feeds/packages/sound/pulseaudio/Makefile, I added ac_cv_func_posix_fadvise=no to the CONFIGURE_ARGS.  (Thanks Ford_Prefect of the pulseaudio folks!).  This caused the kernel crash/taint I noted in my earlier post to this thread.

In the end, your pulseaudio's Makefile CONFIGURE_ARGS variable should look something like

 35 CONFIGURE_ARGS += \
 36     --with-system-user=root \
 37     --with-system-group=root \
 38     --with-realtime-group=root \
 39     --with-access-group=root \
 40     --without-x \
 41     --disable-largefile \
 42     --disable-hal \
 43     --disable-gconf \
 44     --disable-tcpwrap \
 45     --disable-nls \
 46     --disable-solaris \
 47     --disable-glib2 \
 48     --disable-jack \
 49     --disable-asyncns \
 50     --disable-polkit \
 51     --disable-lirc \
 52     --disable-bluez \
 53     --without-caps \
 54     ac_cv_func_posix_fadvise=no

By default, pulseaudio will look for daemon.conf at /root/.pulse/daemon.conf and system.pa at /etc/pulse/system.pa.

My daemon.conf looks like

daemonize = yes
; fail = yes
allow-module-loading = no
allow-exit = no
; use-pid-file = yes
system-instance = yes
; enable-shm = no
shm-size-bytes = 33554432 # setting this 0 will use the system-default, usually 64 MiB
; shm-size-bytes = 16777216 # setting this 0 will use the system-default, usually 64 MiB
; shm-size-bytes = 1048576 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

high-priority = yes
nice-level = -11

realtime-scheduling = yes
; realtime-priority = 5

exit-idle-time = -1
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = 

log-target = auto
log-level = info
log-meta = yes
; log-time = no
; log-backtrace = 0

; resample-method = speex-fixed-3
resample-method = trivial
; enable-remixing = yes
; enable-lfe-remixing = no

; flat-volumes = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 1000000

default-sample-format = s16le
default-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right

default-fragments = 8
default-fragment-size-msec = 10

Though, both your daemon.conf and system.pa might vary.

Re: PulseAudio?

I updated https://dev.openwrt.org/ticket/7983 with some new patches

Re: PulseAudio?

Nice job! Is it working flawlessly now?
I am planning to try it on my Netgear WNDR3700 after finishing my exams.

Re: PulseAudio?

I have added a wikipage here: http://wiki.openwrt.org/doc/howto/pulseaudio

it's working great for me

Re: PulseAudio?

Hi,
i followed your wiki entry and used trunk on a TL-WR1043ND

root@OpenWrt:~# /etc/init.d/pulseaudio start
E: main.c: Daemon startup failed.
root@OpenWrt:~#

mpd is running and looking ok. With alsamixer everything seems to be good too, but i don't know how to test.
any ideas?

Thanks for help

Re: PulseAudio?

can you try with

/usr/bin/pulseaudio –system –disallow-exit –disallow-module-loading –disable-shm –exit-idle-time=-1 -vvv

and post the error message. If it fails with an mmap error (cannot allocate memory), it would be nice if you could try this patch (http://willies.info/tmp/001-no_default_64mb_alloc.patch - put it in package/feeds/packages/pulseaudio/patches/) and see if that fixes your issue

Re: PulseAudio?

Ok my mistake, obviously pulseaudio was already running. Now i can connect to the server and the soundcard is blinking but i can't hear anything.
My mpd output

root@OpenWrt:~# /etc/init.d/mpd restart
amixer: Unable to find simple control 'PCM',0

output: No "audio_output" defined in config file
output: Attempt to detect audio output device
output: Attempting to detect a alsa audio device
output: Successfully detected a alsa audio device
root@OpenWrt:~#

Is this ok? I don't have any PCM item in alsamixer.
If i try to configre /etc/mpd.conf like

audio_output {
  type "alsa"
  name "My ALSA Device"
  device "hw:0,0"
  mixer_type "hardware"
  mixer_device "default"
  mixer_control "Speaker"
}

I only get the amixer: Unable... line. Don't know any further...

Re: PulseAudio?

please read the mpd documentation about configuring mpd with pulseaudio. You need to set audio_output to pulse

25 (edited by gertvdijk 2011-06-13 01:50:42)

Re: PulseAudio?

Today I've successfully built and installed OpenWRT trunk r27157 with pulseaudio for my TP-Link TL-WR1043ND device. A USB headset device is attached to it and I am connected to it over LAN - a dedicated connection. No other software is running on the OpenWRT box, nor is any other machine able to communicate with it. The USB headset is working perfectly on Ubuntu Natty (11.04) using Pulseaudio.

By the way, great work to have Pulseaudio now in OpenWRT!

However, when playing sound I get random stutters, clicks and other noises. When just after a reboot it's like about every ten seconds, but the longer the box is running the worse the sound quality gets. Running pulseaudio in the foreground gives me this:
On every stutter:

D: protocol-native.c: Underrun on 'Logitech USB Headset for gert@gert-laptop', 0 bytes in queue.
D: protocol-native.c: Requesting rewind due to end of underrun.
D: alsa-sink.c: Requested to rewind 20300 bytes.
D: alsa-sink.c: Limited to 3004 bytes.
D: alsa-sink.c: before: 751
D: alsa-sink.c: after: 751
D: alsa-sink.c: Rewound 3004 bytes.
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 3004 bytes on render memblockq.
D: source.c: Processing rewind...

Sometimes it's just a glitch, not a real stutter and then I see this:

D: alsa-sink.c: Wakeup from ALSA!

but occurrences of these does not always represent audible glitches.

And a lot of these, not related to the moments the stutter happens:

D: memblock.c: Memory block too large for pool: 7056 > 4096
D: memblock.c: Memory block too large for pool: 7056 > 4096
D: memblock.c: Memory block too large for pool: 5644 > 4096
D: memblock.c: Memory block too large for pool: 7056 > 4096
D: memblock.c: Memory block too large for pool: 5644 > 4096
D: memblock.c: Memory block too large for pool: 7056 > 4096
D: memblock.c: Memory block too large for pool: 5644 > 4096
D: memblock.c: Memory block too large for pool: 5648 > 4096
D: memblock.c: Memory block too large for pool: 5644 > 4096

My /etc/pulse/daemon.conf:

daemonize = yes
allow-module-loading = no
allow-exit = no
system-instance = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
resample-method = trivial
default-sample-format = s16le
#also tried 44100 as my source is 44.1k
default-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
root@OpenWrt:~# free
             total         used         free       shared      buffers
Mem:         29632        20060         9572            0         1168
-/+ buffers:              18892        10740
Swap:            0            0            0

The load of the box is very low and CPU usage is < 20% while streaming the audio.
How can I tweak this to eliminate these annoying stutters?

update:
I've posted my complete Pulseaudio log on Pastebin

update2:
Also playing some audio file with aplay /tmp/test.wav results in big rubbish! It is way worse than using Pulseaudio, but I think the origin of this problem lies in Alsa, not Pulseaudio.
Using the same headset on Ubuntu works fine, with the same Alsa versions (1.0.23) and command/file...