Re: [PATCH] docs: sound: kernel-api: writing-an-alsa-driver.rst: polishing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.)



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux