From: Takashi Iwai <tiwai@suse.de>
To: Giuliano Pochini <pochini@shiny.it>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: period crossing page boundary
Date: Wed, 19 Mar 2003 18:06:34 +0100 [thread overview]
Message-ID: <s5hel53s2ud.wl@alsa2.suse.de> (raw)
In-Reply-To: <1048076671.1382.47.camel@Jay>
At 19 Mar 2003 12:24:30 +0000,
Giuliano Pochini wrote:
>
>
> 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:
do you mean pointer callback?
>
> bufsize=substream->runtime->periods*substream->runtime->period_size;
you already have substream->runtime->buffer_size for this.
> //addr==number of bytes transferred.
> pos=bytes_to_frames(substream->runtime, addr);
> return(pos%bufsize);
i suppose addr is updated in the interrupt handler, right?
> 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)
the logs seem fine.
did you set up page callback, too?
were the irqs issued correctly with the 1.5 page periods?
i mean, at the proper timing?
maybe it would be easier to debug if you show the actual code and the
hardware spec...
Takashi
-------------------------------------------------------
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
next prev parent reply other threads:[~2003-03-19 17:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-19 12:24 period crossing page boundary Giuliano Pochini
2003-03-19 17:06 ` Takashi Iwai [this message]
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=s5hel53s2ud.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=pochini@shiny.it \
/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