Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=843b1378c2ab47ab1ed9cb471938e0f0ec839fcd
Commit:     843b1378c2ab47ab1ed9cb471938e0f0ec839fcd
Parent:     4aa504a89a140f482ddabb45460e0005bf3e522a
Author:     Heikki Lindholm <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 30 13:27:26 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Tue Dec 11 18:08:18 2007 -0200

    V4L/DVB (6690): saa7134: fix ignored interrupts
    
    The saa7134 video driver starts dropping frames when used together with the
    saa7134-alsa driver. Frames are dropped because when an audio event is 
waiting
    the driver simply ignores the interrupt and passes it on to the saa7134-alsa
    interrupt handler. The alsa interrupt handler in turn acknowledges all types
    of events thus clearing the pending video events as well. Fix by only 
masking
    out the audio event in the video interrupt handler and by only acknowledging
    the audio event in the alsa driver.
    
    Signed-off-by: Heikki Lindholm  <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/saa7134/saa7134-alsa.c |    3 ++-
 drivers/media/video/saa7134/saa7134-core.c |   21 +++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/drivers/media/video/saa7134/saa7134-alsa.c 
b/drivers/media/video/saa7134/saa7134-alsa.c
index ece177d..4878f30 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -222,7 +222,8 @@ static irqreturn_t saa7134_alsa_irq(int irq, void *dev_id)
 
                if (report & SAA7134_IRQ_REPORT_DONE_RA3) {
                        handled = 1;
-                       saa_writel(SAA7134_IRQ_REPORT,report);
+                       saa_writel(SAA7134_IRQ_REPORT,
+                                  SAA7134_IRQ_REPORT_DONE_RA3);
                        saa7134_irq_alsa_done(dev, status);
                } else {
                        goto out;
diff --git a/drivers/media/video/saa7134/saa7134-core.c 
b/drivers/media/video/saa7134/saa7134-core.c
index a499eea..4fd187a 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -569,21 +569,22 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id)
        for (loop = 0; loop < 10; loop++) {
                report = saa_readl(SAA7134_IRQ_REPORT);
                status = saa_readl(SAA7134_IRQ_STATUS);
-               if (0 == report) {
-                       if (irq_debug > 1)
-                               printk(KERN_DEBUG "%s/irq: no (more) work\n",
-                                      dev->name);
-                       goto out;
-               }
-
-               /* If dmasound support is active and we get a sound report, exit
-                  and let the saa7134-alsa/oss module deal with it */
 
+               /* If dmasound support is active and we get a sound report,
+                * mask out the report and let the saa7134-alsa module deal
+                * with it */
                if ((report & SAA7134_IRQ_REPORT_DONE_RA3) &&
                        (dev->dmasound.priv_data != NULL) )
                {
                        if (irq_debug > 1)
-                               printk(KERN_DEBUG "%s/irq: ignoring interrupt 
for DMA sound\n",
+                               printk(KERN_DEBUG "%s/irq: preserving DMA sound 
interrupt\n",
+                                      dev->name);
+                       report &= ~SAA7134_IRQ_REPORT_DONE_RA3;
+               }
+
+               if (0 == report) {
+                       if (irq_debug > 1)
+                               printk(KERN_DEBUG "%s/irq: no (more) work\n",
                                       dev->name);
                        goto out;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to