You are not logged in.
Pages: 1
I can't seem to get audio output working on the RPi (no sound at all out of the headphones) although sound did work (albeit not well) back in Raspbian. I've installed [c]alsaplayer[/c] and [c]alsa-utils[/c] from the current mirror. [c]alsamixer[/c] doesn't seem to report anything unusual (although I'm not sure where to look).
Playing a [c].wav[/c] file just freezes until interrupted.
[c]root@slitaz:/home/tux# aplay helloworld.wav[/c]
[c]Playing WAVE 'helloworld.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono[/c]
[c]Aborted by signal Interrupt...[/c]
[c]aplay: pcm_write:1939: write error: Interrupted system call[/c]
I don't know what the write error is. The module does seem to be loaded.
[c]root@slitaz:/home/tux# lsmod[/c]
[c]Module Size Used by Not tainted[/c]
[c]evdev 9107 0[/c]
[c]ipv6 292403 10[/c]
[c]snd_bcm2835 15383 0[/c]
[c]snd_soc_wm8804 7535 0[/c]
[c]snd_soc_bcm2708_i2s 5366 0[/c]
[c]regmap_mmio 2451 1 snd_soc_bcm2708_i2s[/c]
[c]snd_soc_core 119356 2 snd_soc_wm8804,snd_soc_bcm2708_i2s[/c]
[c]snd_compress 7901 1 snd_soc_core[/c]
[c]regmap_i2c 1637 2 snd_soc_wm8804,snd_soc_core[/c]
[c]regmap_spi 1928 2 snd_soc_wm8804,snd_soc_core[/c]
[c]snd_pcm 79857 2 snd_bcm2835,snd_soc_core[/c]
[c]snd_page_alloc 5084 1 snd_pcm[/c]
[c]snd_timer 19500 1 snd_pcm[/c]
[c]snd 59716 5 snd_bcm2835,snd_soc_core,snd_compress,snd_pcm,snd_timer[/c]
[c]leds_gpio 2066 0[/c]
[c]led_class 3598 1 leds_gpio[/c]
[c]i2c_bcm2708 3807 0[/c]
[c]spi_bcm2708 4644 0[/c]
In alsaplayer, pressing play just adds an extra [c]CBSetcurrent: 1[/c] line with no audio output.
Offline
The sound does not work on my Raspberry.
If I run alsaplayer as root, no open error but the sound is not played.
If I run alsaplayer in user mode, there are open errors:
...........
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
snd_pcm_open: Permission denied (default)
Failed to initialize plugin!
Failed to register plugin: /usr/lib/alsaplayer/output/libalsa_out.so
Failed to load output plugin "alsa". Trying defaults.
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
snd_pcm_open: Permission denied (default)
Failed to initialize plugin!
/usr/lib/alsaplayer/output/libalsa_out.so failed to load
error opening /dev/dsp
Failed to initialize plugin!
/usr/lib/alsaplayer/output/liboss_out.so failed to load
NOTE: THIS IS THE NULL PLUGIN. YOU WILL NOT HEAR SOUND!!
..........
and alsaplayer out on a null device.
I tried with PiBang distribution, it works (with vlc).
Offline
Hi,
This sound bug started from when I upgraded alsa-utils to 1.0.27.1 before it was working with 1.0.26. Raspbian use 1.0.25 so I may downgrade alsa-utils after I checked that new alsa-utils 1.0.27.2 dont fix the bug.
Best regards and sorry for the bug,
- Christophe
Offline
Thank you for this answer
I updated alsa-utils but the problem is still present.
As root:
amixer:
Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback 0 [96%] [0.00dB] [on]
amixer-v:
amixer version 1.0.27.2
amixer contents:
numid=3,iface=MIXER,name='PCM Playback Route'
; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
: values=1
numid=2,iface=MIXER,name='PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=1,iface=MIXER,name='PCM Playback Volume'
; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
: values=0
| dBscale-min=-102.39dB,step=0.01dB,mute=1
As a user:
amixer contents:
amixer: Control default open error: Permission denied
alsaplayer does not work.
Offline
@Bsa B33: I guess the user is not in the audio group: addgroup user_name audio
I added a function to adduser in slitaz-config tool to be sure new users are added to needed groups.
On the Raspberry Pi Audio side, I code a plugin for the CGI/web admin interface to let users test and configure the sound remotly or locally:
[attachment=29377,1412]
Offline
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 [c]sat-rpi gen[/c] build (I'll post more about the linked iso in a different thread). I used [c]aplay[/c] to play [c]badswap.wav[/c], one of the default files that came with the Raspberry Pi (in [c]python_games[/c]). It plays find in Raspbian but hangs in Slitaz. I tried [c]alsa-lib[/c] and [c]alsa-utils[/c] 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 [c]kill -9[/c] in version 25). I've built both with debugging symbols and here's the traceback from when it hangs.
[c]
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 [/c][c]alsa-lib[/c] and [c]alsa-utils[/c] 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]^C[/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.
Offline
Here are the ALSA packages with debugging symbols (probably unecessary since people have already got sound working, just not me).
https://github.com/pirandr/slitaz-arm/tree/master/debugging
And a latest base build for anyone who doesn't want to bother
https://github.com/pirandr/slitaz-arm/blob/master/slitaz-rpi-base-20140823.tar.bz2
Offline
Pages: 1
[ Generated in 0.019 seconds, 7 queries executed - Memory usage: 1.58 MiB (Peak: 1.77 MiB) ]