From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: alsa-devel@alsa-project.org
Subject: Re: [PATCH] docs: sound: kernel-api: writing-an-alsa-driver.rst: polishing
Date: Thu, 6 Apr 2023 09:33:41 +0200 [thread overview]
Message-ID: <ZC511SOI1BH6xKpo@ugly> (raw)
In-Reply-To: <87pm8hv6sg.wl-tiwai@suse.de>
On Thu, Apr 06, 2023 at 08:55:27AM +0200, Takashi Iwai wrote:
>On Wed, 05 Apr 2023 22:12:20 +0200,
>Oswald Buddenhagen wrote:
>> @@ -2262,7 +2156,7 @@ Typical code would be like the following.
>> /* over the period boundary? */
>> if (chip->size >= runtime->period_size) {
>> /* reset the accumulator */
>> - chip->size %= runtime->period_size;
>> + chip->size -= runtime->period_size;
>> /* call updater */
>> spin_unlock(&chip->lock);
>> snd_pcm_period_elapsed(substream);
>
>Hmm, this kind of change shouldn't be sneaked in.
>That's more than the typo fixes etc,
>
true, the patch grew too big and i missed this hunk.
(i only kept it as one patch, because some pieces overlap and i didn't
want to add churn.)
>and even worse, it's a wrong replacement.
>
hmm, yeah, if the timer ints are configured to occur too rarely, this
wouldn't do the right thing.
but then, why would they be? that would basically defeat the point of
using many periods in the first place. should i instead change the text
to emphasize that the ints should occur at least once per period?
(i've actually pondered the timer option in the context of the emu10k1
driver as well, and concluded that there should be two timer ints per
period, so snd_pcm_period_elapsed() is reliably called in the first half
of the next period, which is critical when only two periods are
configured.)
next prev parent reply other threads:[~2023-04-06 7:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 20:12 [PATCH] docs: sound: kernel-api: writing-an-alsa-driver.rst: polishing Oswald Buddenhagen
2023-04-06 6:55 ` Takashi Iwai
2023-04-06 7:33 ` Oswald Buddenhagen [this message]
2023-04-06 7:56 ` Takashi Iwai
2023-04-06 8:13 ` Oswald Buddenhagen
2023-04-06 9:04 ` Takashi Iwai
2023-04-06 14:14 ` kernel test robot
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=ZC511SOI1BH6xKpo@ugly \
--to=oswald.buddenhagen@gmx.de \
--cc=alsa-devel@alsa-project.org \
/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 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.