* aplay and arecord can't set sw params
@ 2006-05-10 14:18 Hans-Christian Egtvedt
2006-05-10 15:24 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-10 14:18 UTC (permalink / raw)
To: alsa-devel
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: DATA
xrun_mode: STOP
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 0
xfer_align: 0
silence_threshold: 0
silence_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: DATA
xrun_mode: STOP
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 0
xfer_align: 0
silence_threshold: 0
silence_size: 0
boundary: 1073741824
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: aplay and arecord can't set sw params
2006-05-10 14:18 aplay and arecord can't set sw params Hans-Christian Egtvedt
@ 2006-05-10 15:24 ` Takashi Iwai
2006-05-11 6:38 ` Hans-Christian Egtvedt
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2006-05-10 15:24 UTC (permalink / raw)
To: Hans-Christian Egtvedt; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
At Wed, 10 May 2006 16:18:24 +0200,
Hans-Christian Egtvedt wrote:
>
> 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: DATA
> xrun_mode: STOP
> tstamp_mode: NONE
> period_step: 1
> sleep_min: 0
> avail_min: 0
> xfer_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
[-- Attachment #2: Type: text/plain, Size: 466 bytes --]
diff -r 7d9f5d349aaa aplay/aplay.c
--- a/aplay/aplay.c Tue May 02 15:43:07 2006 +0200
+++ b/aplay/aplay.c Wed May 10 17:24:12 2006 +0200
@@ -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:"));
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: aplay and arecord can't set sw params
2006-05-10 15:24 ` Takashi Iwai
@ 2006-05-11 6:38 ` Hans-Christian Egtvedt
2006-05-12 11:15 ` Hans-Christian Egtvedt
0 siblings, 1 reply; 4+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-11 6:38 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Takashi Iwai wrote:
> At Wed, 10 May 2006 16:18:24 +0200,
> Hans-Christian Egtvedt wrote:
>> 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: DATA
>> xrun_mode: STOP
>> tstamp_mode: NONE
>> period_step: 1
>> sleep_min: 0
>> avail_min: 0
>> xfer_align: 0
>
> avail_min and xfer_align should 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.
> Try to dump sw_params before snd_pcm_sw_params() by the patch below.
~ # aplay /stk1000/gorillaz.wav
Playing WAVE '/stk1000/gorillaz.wav' : Signed 16 bit Little Endian, Rate
48000 Hz, Stereo
sw_params to be set:
start_mode: DATA
xrun_mode: STOP
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 0
xfer_align: 0
silence_threshold: 0
silence_size: 0
boundary: 1234173952
aplay: set_params:1015: unable to install sw params:
start_mode: DATA
xrun_mode: STOP
tstamp_mode: NONE
period_step: 1
sleep_min: 0
avail_min: 0
xfer_align: 0
silence_threshold: 0
silence_size: 0
boundary: 1234173952
~ #
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: aplay and arecord can't set sw params
2006-05-11 6:38 ` Hans-Christian Egtvedt
@ 2006-05-12 11:15 ` Hans-Christian Egtvedt
0 siblings, 0 replies; 4+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-12 11:15 UTC (permalink / raw)
To: alsa-devel
Hans-Christian Egtvedt wrote:
> Takashi Iwai wrote:
>> At Wed, 10 May 2006 16:18:24 +0200,
>> Hans-Christian Egtvedt wrote:
>>> 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: DATA
>>> xrun_mode: STOP
>>> tstamp_mode: NONE
>>> period_step: 1
>>> sleep_min: 0
>>> avail_min: 0
>>> xfer_align: 0
>> avail_min and xfer_align should 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.
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>
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-12 11:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10 14:18 aplay and arecord can't set sw params Hans-Christian Egtvedt
2006-05-10 15:24 ` Takashi Iwai
2006-05-11 6:38 ` Hans-Christian Egtvedt
2006-05-12 11:15 ` Hans-Christian Egtvedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.