All of lore.kernel.org
 help / color / mirror / Atom feed
* period crossing page boundary
@ 2003-03-19 12:24 Giuliano Pochini
  2003-03-19 17:06 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Giuliano Pochini @ 2003-03-19 12:24 UTC (permalink / raw)
  To: alsa-devel


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-03-20 14:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-19 12:24 period crossing page boundary Giuliano Pochini
2003-03-19 17:06 ` Takashi Iwai
2003-03-19 21:06   ` Giuliano Pochini
2003-03-19 20:16     ` Jaroslav Kysela
2003-03-20  9:04       ` Giuliano Pochini
2003-03-20 10:37         ` Takashi Iwai
2003-03-20 14:13           ` Giuliano Pochini
2003-03-20 14:24             ` Jaroslav Kysela
2003-03-20 14:45               ` Takashi Iwai

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.