On Thu, 29 Nov 2001, Paul Davis wrote:

> the problem with the trident driver is definitely the spurious
> irqs. the driver doesn't print all such spurious interrupts, which is
> why they don't show up in my logs. when i changed my trace code, its
> became clear that they definitely occur quite often.
>
> the problem with dropping "spurious" irqs is that they are
> assymmetric. here's a sample trace:
>
> 61600185043063: trident interrupt chn = 0x40000000
> 61600185055106: trident interrupt chn = 0x80000000
> 61600185062055: wakeup stream playback with 66 (since capture wake: 644915)
> 61600185069856: playback poll 2601: avail = 66
> 61600185073585: capture poll 2679: avail = 2
> 61600185131556: capture poll 2680: avail = 2
> 61600185720609: trident interrupt chn = 0x80000000
> 61600185728104: wakeup stream playback with 130 (since capture wake: 1310964)
> 61600185736834: trident interrupt chn = 0x40000000
> 61600186358693: trident interrupt chn = 0x80000000
> 61600186365864: wakeup stream playback with 193 (since capture wake: 1948724)
> 61600186374515: trident interrupt chn = 0x40000000
>
> the irqs with chn = 0x80000000 are for the playback channel. the ones
> with chn = 0x40000000 are for the capture channel. the spurious
> interrupt was actually for the one at 61600185720609 (playback), but
> instead, the driver decides that the *next* IRQ (for capture) was
> spurious (it was only 1.59 samples later!), and does nothing with
> it. that was the wrong decision, alas :)
>
> i can fix this, and i will. patch coming shortly.

It looks like that the capture direction receives an interrupt before the
capture pointer has reached the period size boundary. You can increase the
insterrupt delay, something like this:

Index: trident.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/lowlevel/pci/trident.c,v
retrieving revision 1.156
diff -u -r1.156 trident.c
--- trident.c   2001/11/19 17:20:18     1.156
+++ trident.c   2001/11/29 20:19:58
@@ -981,7 +981,7 @@

        // Set voice parameters
        voice->CSO = 0;
-       voice->ESO = (runtime->period_size * 2) - 1;    /* in samples */
+       voice->ESO = (runtime->period_size * 2) + 2 - 1;        /* in samples, +2 
+means correction */
        voice->CTRL = snd_trident_control_mode(substream);
        voice->FMC = 3;
        voice->RVol = 0x7f;

Note: The voice is only helper for interrupts, it doesn't do the sample
transfers, so it's safe to change the transfer count (the current
position is always being reset to zero in the trident interrupt handler).

Let me know, if it helps.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
SuSE Linux    http://www.suse.com
ALSA Project  http://www.alsa-project.org


_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to