Problem with setting software parameters.
Back a few versions ago (0.9.6) I had a successful program that worked quite well (or at least it didn't have an error like this!). Now I am updating to FC3 and 1.0.8 and with the same source (I swear!!) I'm getting errors when I attempt to set the software parameters. I attempt the call and get the
error: ALSA lib pcm.c:824:(snd_pcm_sw_params) snd_pcm_sw_params:params->avail_min problem for start_threshold
[my error message...]
Unable to set sw params for playback: Invalid argument
[output from "snd_pcm_sw_params_dump (swparams, alsa_log)"]start_mode: DATAxrun_mode: STOPtstamp_mode: NONEperiod_step: 1sleep_min: 0avail_min: 4410xfer_align: 4410silence_threshold: 0silence_size: 0
boundary: 1073741824
[My printouts follow..]Period_size: 4410Buffer_size: 16384Avail_min: 4410Start_threshold: 16384
Setting of swparams failed: Invalid argument
Upon looking at the source in pcm.c around line 824 there are some calculations for flagging the error, but I don't see the problem. In fact the specific error line is NOT line 824 in pcm.c. I then did another install of alsa_libs, and the error persists.
Have I done something really silly? Dis something change behind my back? What should the "correct" parameters be?
Thanks for the help.
Signature · 14 lines
Tom Watson [email protected] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix
Quoted 7 lines · Tom Watson
Back a few versions ago (0.9.6) I had a successful program that worked quite well (or at least it didn't have an error like this!). Now I am updating to FC3 and 1.0.8 and with the same source (I swear!!) I'm getting errors when I attempt to set the software parameters.
snd_pcm_sw_params:params->avail_minproblem forstart_threshold
Quoted 7 lines
Period_size: 4410Buffer_size: 16384Avail_min: 4410Start_threshold: 16384Upon looking at the source in
pcm.caround line 824 there are some calculations for flagging the error, but I don't see the problem.
You've tried to set the start_threshold, but this value doesn't actually cause the PCM to be started. When you've written three periods (13230 = 3*4410 frames), the PCM is not yet started because the start_threshold hasn't been reached, but you cannot write more data because the number of available frames (3154 = 16384-13230) is less than avail_min.
It is recommended to round start_threshold to an integer multiple of avail_min (and xfer_align), which is in most cases (like here) the same as the period size.
Quoted 1 line
Dis something change behind my back?
I guess the new driver has a different buffer size, but this didn't change behind your back because you installed the new driver yourself. ;-)
HTH
Clemens
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix