aplay and arecord can't set sw params
Does this output give any signs of where the error is?
~ # aplay /stk1000/gorillaz.wav
Playing WAVE '/stk1000/gorillaz.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1012: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 0silence_threshold: 0silence_size: 0
boundary: 1231028224
~ # arecord -f S16_BE /stk1000/rec.wav
Recording WAVE '/stk1000/rec.wav' : Signed 16 bit Big Endian, Rate 8000 Hz, Mono
arecord: set_params:1012: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 0silence_threshold: 0silence_size: 0
boundary: 1073741824
Signature · 13 lines
With kind regards, Med vennlig hilsen, Hans-Christian Egtvedt Applications Engineer - AVR Applications Lab Atmel Norway ------------------------------------------------------- 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
At Wed, 10 May 2006 16:18:24 +0200,
Quoted 14 lines · Hans-Christian Egtvedt
Does this output give any signs of where the error is?
~ # aplay /stk1000/gorillaz.wav
Playing WAVE '/stk1000/gorillaz.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1012: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 0
avail_min and xfer_align should be the period size. So, something wrong in alsa-lib or in aplay code.
Try to dump sw_params before snd_pcm_sw_params() by the patch below.
Takashi
aplay/aplay.c +3 -0
@@ -1008,6 +1008,9 @@ static void set_params(void) err =snd_pcm_sw_params_set_xfer_align (handle, swparams, xfer_align);assert (err >=0 ); + +fprintf (stderr,"sw_params to be set:\n" ); +snd_pcm_sw_params_dump (swparams, log);if (snd_pcm_sw_params (handle, swparams) <0 ) {error (_ ("unable to install sw params:" ));
Quoted 16 lines · Takashi Iwai
At Wed, 10 May 2006 16:18:24 +0200,
Quoted 13 lines · Hans-Christian Egtvedt
Does this output give any signs of where the error is?
~ # aplay /stk1000/gorillaz.wav
Playing WAVE '/stk1000/gorillaz.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1012: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 0
Quoted 2 lines
avail_minandxfer_alignshould be the period size. So, something wrong in alsa-lib or in aplay code.
Keep in mind my recent fix for the enum vs. int problem. I'm still working on the AVR32 plattform. The soundcard is the embedded AC97 controller inside the device (AP7000) and the external codec is a National Semiconductor LM4549A.
I'll try digging into the code (aplay/alsalib) and see why the xfer_align and avail_min is not set.
Quoted 1 line
Try to dump
sw_paramsbeforesnd_pcm_sw_params()by the patch below.
~ # aplay /stk1000/gorillaz.wav
Playing WAVE '/stk1000/gorillaz.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereosw_params to be set:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 0silence_threshold: 0silence_size: 0
boundary: 1234173952
aplay: set_params:1015: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 0silence_threshold: 0silence_size: 0
boundary: 1234173952
~ #
Signature · 13 lines
With kind regards, Med vennlig hilsen, Hans-Christian Egtvedt Applications Engineer - AVR Applications Lab Atmel Norway ------------------------------------------------------- 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 19 lines · Hans-Christian Egtvedt
Quoted 15 lines · Takashi Iwai
At Wed, 10 May 2006 16:18:24 +0200,
Quoted 13 lines · Hans-Christian Egtvedt
Does this output give any signs of where the error is?
~ # aplay /stk1000/gorillaz.wav
Playing WAVE '/stk1000/gorillaz.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: set_params:1012: unable to install sw params:start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 0xfer_align: 0Quoted 2 lines
avail_minandxfer_alignshould be the period size. So, something wrong in alsa-lib or in aplay code.
Quoted 7 lines
Keep in mind my recent fix for the enum vs. int problem. I'm still working on the AVR32 plattform. The soundcard is the embedded AC97 controller inside the device (AP7000) and the external codec is a National Semiconductor LM4549A.
I'll try digging into the code (aplay/alsalib) and see why the
xfer_alignandavail_minis not set.
I have found a workaround for the issue by compiling alsa-lib static. It seems like the references to the variables are not set when aplay is dynamicly linked with alsa-lib.
Actually not sure if it's either the GCC compiler which does something wrong, a bad parameter while configuring or something in the code that causes this.
<snip>
Signature · 13 lines
With kind regards, Med vennlig hilsen, Hans-Christian Egtvedt Applications Engineer - AVR Applications Lab Atmel Norway ------------------------------------------------------- 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