[alsa-devel] Getting the AICA device to work properly
I have built mpg123 for SH4 (using uclibc for a buildroot/busybox environment):
./configure --host=sh4-linux CC="/home/adrian/buildroot/build_sh4/staging_dir/bin/sh4-linux-uclibc-gcc" --with-cpu=generic_fpu --prefix=/tftpboot/192.168.61.55/usr LDFLAGS="-L/tftpboot/192.168.61.55/lib" --oldincludedir=/tftpboot/192.168.61.55/usr/include -with-audio=alsa --sysconfdir=/tftpboot/192.168.61.55/etc --enable-modules=no --enable-static --enable-debug
When I try to play sound I get this:
$ mpg123 -v ms.mp3 [getlopt.c:115] debug: getsingleopt: -v [getlopt.c:115] debug: getsingleopt: ms.mp3 [audio.c:501] debug: opening normal audio/file [libmpg123.c:190] debug: set flags to 0x40 High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.0.1; written and copyright by Michael Hipp and others free software (LGPL/GPL) without any warranty but with best wishes [frame.c:464] debug: frame_gapless_init: from 0 to 0 samples [libmpg123.c:99] debug: cpu opt setting Decoder: generic [frame.c:141] debug: frame 0x435650 buffer [frame.c:242] debug: frame 0x435650 buffer done [tabinit.c:85] debug: MMX decode tables [tabinit.c:107] debug: MMX decode tables done [audio.c:279] debug: audio_capabilities ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' ALSA lib pcm_plug.c:773:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for '(null)' [mpg123.c:813] debug: Going to play ms.mp3 [mpg123.c:483] debug: OK... going to finally open. [frame.c:464] debug: frame_gapless_init: from 0 to 0 samples [readers.c:620] error: Cannot file ms.mp3: No such file or directory [mpg123.c:495] error: Cannot open ms.mp3: File access error. (code 22) [playlist.c:116] debug: going to free() the playlist [playlist.c:120] debug: free()ing entry 0 [playlist.c:126] debug: free()d the playlist [audio.c:441] debug: exit output [audio.c:524] debug: closing output [audio.c:148] debug: closing output module
The main problem appears to be that ALSA lib has no knowledge of the installed (snd-aica) sound module - eg
$ aplay -L null Discard all samples (playback) or generate zero samples (capture)
How do I fix this? I don't think I had this problem before because my alsalib set up was somewhat banjaxed - things like aplay segfaulted - but the oss smulation layer worked well.
When I use the emulation layer now (rebuilding mpg123) I now get:
$ mpg123 ./ms.mp3 [getlopt.c:115] debug: getsingleopt: ./ms.mp3 [audio.c:501] debug: opening normal audio/file [oss.c:180] error: Can't open default sound device! [audio.c:505] error: failed to open audio device [mpg123.c:666] error: Failed to initialize output, goodbye.
On 31/12/2007, Adrian McMenamin lkmladrian@gmail.com wrote:
When I use the emulation layer now (rebuilding mpg123) I now get:
$ mpg123 ./ms.mp3 [getlopt.c:115] debug: getsingleopt: ./ms.mp3 [audio.c:501] debug: opening normal audio/file [oss.c:180] error: Can't open default sound device! [audio.c:505] error: failed to open audio device [mpg123.c:666] error: Failed to initialize output, goodbye.
OK, this was clearly stupid, as I hadn't loaded the emulation module!
But it still fails:
MPEG 1.0 layer III, VBR, 44100 Hz joint-stereo [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 1 at 0x12eb [parse.c:691] debug: Frame 1 fffb1064 100, next filepos=0x1353 [libmpg123.c:436] debug: read of frame 1 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 2 at 0x1353 [parse.c:691] debug: Frame 2 fffb1064 100, next filepos=0x13bb [libmpg123.c:436] debug: read of frame 2 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 3 at 0x13bb [parse.c:691] debug: Frame 3 fffb1064 100, next filepos=0x1423 [libmpg123.c:436] debug: read of frame 3 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 4 at 0x1423 [parse.c:691] debug: Frame 4 fffb1064 100, next filepos=0x148b [libmpg123.c:436] debug: read of frame 4 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 5 at 0x148b [parse.c:691] debug: Frame 5 fffb1064 100, next filepos=0x14f3 [libmpg123.c:436] debug: read of frame 5 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 6 at 0x14f3 [parse.c:691] debug: Frame 6 fffb1064 100, next filepos=0x155b [libmpg123.c:436] debug: read of frame 6 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 7 at 0x155b [parse.c:691] debug: Frame 7 fffb1064 100, next filepos=0x15c3 [libmpg123.c:436] debug: read of frame 7 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 8 at 0x15c3 [parse.c:691] debug: Frame 8 fffb1064 100, next filepos=0x162b [libmpg123.c:436] debug: read of frame 8 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 9 at 0x162b [parse.c:691] debug: Frame 9 fffb1064 100, next filepos=0x1693 [libmpg123.c:436] debug: read of frame 9 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:517] debug: play_frame [libmpg123.c:433] debug: read frame [parse.c:429] debug: trying to get frame 10 at 0x1693 [parse.c:691] debug: Frame 10 fffb1064 100, next filepos=0x16fb [libmpg123.c:436] debug: read of frame 10 returned 1 (to_decode=1) [libmpg123.c:533] debug: got next frame, 1 [libmpg123.c:517] debug: decoding [mpg123.c:533] error: Deep trouble! Cannot flush to my output anymore! [audio.c:441] debug: exit output [audio.c:524] debug: closing output [audio.c:148] debug: closing output module
participants (1)
-
Adrian McMenamin