Bug: aplay/alsa-lib problem on mips (openwrt, uclibc)
Dear alsa developers,
I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel 2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just generates an error:
root@(none):/# /usr/local/bin/aplay -f cd -t raw </dev/urandom Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo aplay: set_params:1012: unable to install sw params: start_mode: EXPLICIT xrun_mode: NONE tstamp_mode: NONE period_step: 1 sleep_min: 0 avail_min: 0 xfer_align: 718523216 silence_threshold: 0 silence_size: 0 boundary: 1073741824
speaker-test is generating a very simular error:
root@(none):/# /usr/local/bin/speaker-test -r 44100
speaker-test 1.0.11
Playback device is default
Stream parameters are 44100Hz, S16_LE, 1 channels Using 16 octaves of pink noise
Rate set to 44100Hz (requested 44100Hz) Buffer size range from 90 to 262144
Period size range from 45 to 131072
Using max buffer size 262144
Periods = 4
was set period_size = 0
was set buffer_size = 262144
Unable to set sw params for playback: Invalid argument Setting of swparams failed: Invalid argument
Can you tell me how I could further debug this?
Regards
Sven
P.S.: The Soundcard is working fine on my desktop PC
Signature · 10 lines
"Thinking of using NT for your critical apps?
Isn't there enough suffering in the world?"
(Advertisement of Sun Microsystems in Wall Street Journal)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642Hi Sven,
I'd try to adjust some settings there..
--buffer-size (by default it tried to allocate the max possible one, maybe this is too much for that small embedded box)
just have a look at man aplay maybe it helps a bit
Markus
Quoted 67 lines · Sven Geggus
Dear alsa developers,
I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel 2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just generates an error:
root@(none):/# /usr/local/bin/aplay -f cd -t raw </dev/urandom Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo aplay: set_params:1012: unable to install sw params: start_mode: EXPLICIT xrun_mode: NONE tstamp_mode: NONE period_step: 1 sleep_min: 0 avail_min: 0 xfer_align: 718523216 silence_threshold: 0 silence_size: 0 boundary: 1073741824speaker-test is generating a very simular error:
root@(none):/# /usr/local/bin/speaker-test -r 44100speaker-test 1.0.11
Playback device is default
Stream parameters are 44100Hz,S16_LE, 1 channels Using 16 octaves of pink noise
Rate set to 44100Hz (requested 44100Hz) Buffer size range from 90 to 262144
Period size range from 45 to 131072
Using max buffer size 262144
Periods = 4
was setperiod_size= 0
was setbuffer_size= 262144
Unable to set sw params for playback: Invalid argument Setting of swparams failed: Invalid argumentCan you tell me how I could further debug this?
Regards
Sven
P.S.: The Soundcard is working fine on my desktop PC--
"Thinking of using NT for your critical apps?
Isn't there enough suffering in the
world?"
(Advertisement of Sun Microsystems in Wall Street
Journal)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Signature · 7 lines
Markus Rechberger ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 9 lines · Sven Geggus
I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel 2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just generates an error:
# /usr/local/bin/aplay -f cd -t raw </dev/urandom Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo aplay: set_params:1012: unable to install sw params: ... xfer_align: 718523216
This value is impossible.
I would guess that the kernel and alsa-lib have not been compiled with the same compiler or compiler options, i.e., some structure layouts are different.
Please check that sizeof(struct snd_pcm_sw_params) is the same in the kernel and in userspace, and/or print out the values in *params in the snd_pcm_sw_params() function in alsa-kernel/core/pcm_native.c.
HTH
Clemens
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 3 lines · Clemens Ladisch
I would guess that the kernel and alsa-lib have not been compiled with the same compiler or compiler options, i.e., some structure layouts are different.
I have been using the same compiler, as I don't have more than one cross development toolkit installed.
compiler options are different, however.
Openwrt is using the following for compiling alsa-driver:
-Os -G 0 -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 --Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -mlong-calls -Wall --Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 --fno-strict-aliasing -fno-common -pipe
I added the "-mlong-calls" Option myself, to get the alsa modules to insmod correctly and to work (at least in oss compatible mode).
For compiling alsa-lib I just use what configure suggests which basically leads to no special compiler Options at all.
Which options of the above do you suspect that I would need for alsa lib to be able to talk to the alsa driver in a correct way?
Sven
Signature · 10 lines
"In the land of the brave and the free, we defend our freedom with the GNU GPL" (Richard M. Stallman on www.gnu.org) /me is giggls@ircnet, http://sven.gegg.us/ on the Web ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 6 lines · Sven Geggus
Dear alsa developers,
I almost succeeded in running alsa (1.0.11/snd-usb-audio) on openwrt (Kernel 2.4.32, uClibc-0.9.28). While OSS emulation is working aplay just generates an error:
Quoted 11 lines
root@(none):/# /usr/local/bin/aplay -f cd -t raw </dev/urandom Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo aplay: set_params:1012: unable to install sw params: start_mode: EXPLICIT xrun_mode: NONE tstamp_mode: NONE period_step: 1 sleep_min: 0 avail_min: 0 xfer_align: 718523216
This value looks bogus. Try compile alsa-lib with --with-debug=yes and try 'LIBASOUND_DEBUG=1 aplay ...other arguments...'. Perhaps, it shows more...
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Quoted 3 lines · Jaroslav Kysela
This value looks bogus. Try compile alsa-lib with --with-debug=yes and try 'LIBASOUND_DEBUG=1 aplay ...other arguments...'. Perhaps, it shows more...
It does show a little bit more:
root@FreeWRT:/usr/lib# /usr/local/bin/aplay -f cd -t raw </dev/urandom Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo ALSA lib pcm.c:878:(snd_pcm_sw_params) params->avail_min is 0 aplay: set_params:1012: unable to install sw params: start_mode: EXPLICIT xrun_mode: NONE tstamp_mode: NONE period_step: 1 sleep_min: 0 avail_min: 0 xfer_align: 718523216 silence_threshold: 0 silence_size: 0 boundary: 1073741824
Sven
Signature · 10 lines
Kernel panic: I have no root and I want to scream (Linux Kernel Error Message) /me is giggls@ircnet, http://sven.gegg.us/ on the Web ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642