Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Giuliano Pochini <pochini@shiny.it>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: period crossing page boundary
Date: 19 Mar 2003 12:24:30 +0000	[thread overview]
Message-ID: <1048076671.1382.47.camel@Jay> (raw)


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

             reply	other threads:[~2003-03-19 12:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-19 12:24 Giuliano Pochini [this message]
2003-03-19 17:06 ` period crossing page boundary 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1048076671.1382.47.camel@Jay \
    --to=pochini@shiny.it \
    --cc=alsa-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox