I hate to bring this up again but sound still doesn't work for me. Sorry, I didn't get to try the last solution when it came out. so its possible that sound just got broken again in the meantime. All symptoms are pretty much exactly as Bsa B33 described (except I ran everything as root).
This is from a lastest sat-rpi gen
build (I'll post more about the linked iso in a different thread). I used aplay
to play badswap.wav
, one of the default files that came with the Raspberry Pi (in python_games
). It plays find in Raspbian but hangs in Slitaz. I tried alsa-lib
and alsa-utils
version 25 as well with the same result (actually slightly worse because in 27.2, I can press Ctrl+c twice to exit whereas I have to resort to kill -9
in version 25). I've built both with debugging symbols and here's the traceback from when it hangs.
root@slitaz:/home/tux# gdb aplay -vv wav/badswap.wav
gdb: unrecognized option '-vv'
Use `gdb --help' for a complete list of options.
root@slitaz:/home/tux# gdb aplay
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-slitaz-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from aplay...done.
(gdb) r -vv wav/badswap.wav
Starting program: /usr/bin/aplay -vv wav/badswap.wav
Cannot access memory at address 0x0
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Playing WAVE 'wav/badswap.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 11025
period_size : 5512
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 5512
period_event : 0
start_threshold : 11025
stop_threshold : 11025
silence_threshold: 0
silence_size : 0
boundary : 1445068800
Slave: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0
1 <- 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 12000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 12000
stop_threshold : 12000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
Slave: Direct Stream Mixing PCM
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 12000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 12000
stop_threshold : 12000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
Hardware PCM card 0 'bcm2835 ALSA' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 6000
period_time : 125000
tstamp_mode : ENABLE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 1
stop_threshold : 1073741824
silence_threshold: 0
silence_size : 1073741824
boundary : 1073741824
appl_ptr : 0
hw_ptr : 0
############################################## + | 95%^C
Program received signal SIGINT, Interrupt.
0xb6cb784c in poll () from /lib/libc.so.6
(gdb) bt
#0 0xb6cb784c in poll () from /lib/libc.so.6
#1 0xb6e4a600 in snd1_pcm_wait_nocheck (pcm=0x104a438, timeout=-1)
at pcm.c:2396
#2 0xb6e4f7e4 in snd1_pcm_write_areas (pcm=0x104a438, areas=0xbec2b960,
offset=1, size=<optimized out>, func=0xb6e5a444 <snd_pcm_mmap_write_areas>)
at pcm.c:6749
#3 0xb6e5a7c4 in snd_pcm_mmap_writei (pcm=0x104a438, buffer=<optimized out>,
size=5512) at pcm_mmap.c:186
#4 0xb6e49474 in _snd_pcm_writei (size=<optimized out>,
buffer=<optimized out>, pcm=<optimized out>) at pcm_local.h:521
#5 snd_pcm_writei (pcm=<optimized out>, buffer=<optimized out>,
size=<optimized out>) at pcm.c:1255
#6 0x0000d248 in pcm_write (data=0x10686c8 "01", count=5512) at aplay.c:1699
#7 0x0000d5ac in playback_go (fd=5, loaded=<optimized out>, count=36864,
rtype=2, name=0xbec2be4e "wav/badswap.wav") at aplay.c:2445
#8 0x0000eaf4 in playback (
name=0x2 <error: Cannot access memory at address 0x2>) at aplay.c:2506
#9 0x00010c60 in main (argc=3, argv=0xbec2bd24) at aplay.c:747
</code>
And here's the version with alsa-lib
and alsa-utils
version 27.2
<code>
root@slitaz:/home/tux# gdb aplay
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-slitaz-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from aplay...done.
(gdb) r -vv wav/badswap.wav
Starting program: /usr/bin/aplay -vv wav/badswap.wav
Cannot access memory at address 0x0
warning: Unable to find libthread_db matching inferior's thread library, thread
debugging will not be available.
Playing WAVE 'wav/badswap.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 11025
period_size : 5512
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 5512
period_event : 0
start_threshold : 11025
stop_threshold : 11025
silence_threshold: 0
silence_size : 0
boundary : 1445068800
Slave: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0
1 <- 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 12000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 12000
stop_threshold : 12000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
Slave: Direct Stream Mixing PCM
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 12000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 12000
stop_threshold : 12000
silence_threshold: 0
silence_size : 0
boundary : 1572864000
Hardware PCM card 0 'bcm2835 ALSA' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 16384
period_size : 6000
period_time : 125000
tstamp_mode : ENABLE
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 1
stop_threshold : 1073741824
silence_threshold: 0
silence_size : 1073741824
boundary : 1073741824
appl_ptr : 0
hw_ptr : 0
############################################## + | 95%^C
Program received signal SIGINT, Interrupt.
0xb6cb884c in poll () from /lib/libc.so.6
(gdb) bt
#0 0xb6cb884c in poll () from /lib/libc.so.6
#1 0xb6e60ec0 in snd1_pcm_wait_nocheck (pcm=0x1ae1440, timeout=-1)
at pcm.c:2418
#2 0xb6e68c30 in snd1_pcm_write_areas (pcm=0x1ae1440, areas=0xbecdd950,
offset=1, size=5511, func=0xb6e7bfd0 <snd_pcm_mmap_write_areas>)
at pcm.c:6808
#3 0xb6e7c40c in snd_pcm_mmap_writei (pcm=0x1ae1440, buffer=0x1aff6d0,
size=5512) at pcm_mmap.c:186
#4 0xb6e5c3e0 in _snd_pcm_writei (pcm=0x1ae17a0, buffer=0x1aff6d0, size=5512)
at pcm_local.h:525
#5 0xb6e5e0f8 in snd_pcm_writei (pcm=0x1ae17a0, buffer=0x1aff6d0, size=5512)
at pcm.c:1260
#6 0x00012ac4 in pcm_write (data=0x1aff6d0 "01", count=5512) at aplay.c:1928
#7 0x00015bb8 in playback_go (fd=5, loaded=0, count=36864, rtype=2,
name=0xbecdde4e "wav/badswap.wav") at aplay.c:2677
#8 0x00016008 in playback (name=0xbecdde4e "wav/badswap.wav") at aplay.c:2738
#9 0x0000cde8 in main (argc=3, argv=0xbecddd24) at aplay.c:787
</code>
That ^C
is me pressing Ctrl+c as otherwise, it will be stuck there forever.
On a side note, in the web admin interface, if mpg123 isn't installed "Play sound" just fails silently.