I'm facing another *£%@ problem. When period size is a multiple or
submultiple of PAGE_SIZE, it works fine, but when it isn't, sound
clicks, pops, repeapeapeats, skps :(( And since the period never crosses
physically the page boundary because I split it when it happens, I can't
imagine what's wrong. Perhaps some of you had the same problem.

.period callback does this:

bufsize=substream->runtime->periods*substream->runtime->period_size;
//addr==number of bytes transferred.
pos=bytes_to_frames(substream->runtime, addr);
return(pos%bufsize);

Here is a log of sg list construction:

AddX=period n
pa=page addr
phy=snd_sgbuf_get_addr(sgbuf, offs)
sz=sub-period size

aplay -B139319 -F69660 (OK)
pcm_hw_params (bufsize=24576 periods=2 persize=12288)
pcm_hw_params table size=131072 pages=32
pcm_hw_params Add0 (off=0 pa=f3ff000 phy=f3ff000 sz=4096)
pcm_hw_params Add0 (off=4096 pa=f3fe000 phy=f3fe000 sz=4096)
pcm_hw_params Add0 (off=8192 pa=f3fd000 phy=f3fd000 sz=4096)irq
pcm_hw_params Add1 (off=12288 pa=f3fc000 phy=f3fc000 sz=4096)
pcm_hw_params Add1 (off=16384 pa=f417000 phy=f417000 sz=4096)
pcm_hw_params Add1 (off=20480 pa=f416000 phy=f416000 sz=4096)irq
pcm_hw_params End (off=24576 rest=0)

aplay -B139319 -F34830 (noise-party)
pcm_hw_params (bufsize=24576 periods=4 persize=6144)
pcm_hw_params table size=131072 pages=32
pcm_hw_params Add0 (off=0 pa=f3ff000 phy=f3ff000 sz=4096)
pcm_hw_params Add0 (off=4096 pa=f3fe000 phy=f3fe000 sz=2048)irq
pcm_hw_params Add1 (off=6144 pa=f3fe000 phy=f3fe800 sz=2048)
pcm_hw_params Add1 (off=8192 pa=f3fd000 phy=f3fd000 sz=4096)irq
pcm_hw_params Add2 (off=12288 pa=f3fc000 phy=f3fc000 sz=4096)
pcm_hw_params Add2 (off=16384 pa=f417000 phy=f417000 sz=2048)irq
pcm_hw_params Add3 (off=18432 pa=f417000 phy=f417800 sz=2048)
pcm_hw_params Add3 (off=20480 pa=f416000 phy=f416000 sz=4096)irq
pcm_hw_params End (off=24576 rest=0)


Bye.




-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink?
You could win a Tablet PC. Get a free Tablet PC hat just for playing.
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to