Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d35a1b9e10481c9f1d3b87e778a0f1f6a0a2dd48
Commit:     d35a1b9e10481c9f1d3b87e778a0f1f6a0a2dd48
Parent:     a7ec3f5289681e9d63b65db5f56857f998812b4b
Author:     Georg Chini <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 2 21:28:17 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Jan 3 18:37:26 2007 -0800

    [SOUND] Sparc CS4231: Fix IRQ return value and initialization.
    
    SBUS: Change IRQ-handler return value from 0 to IRQ_HANDLED and
    fix some initialisation problems.
    
    Change period_bytes_min from 4096 to 256 to allow driver to work with
    low latency (VOIP) applications. Hope this does not break EBUS.
    
    Signed-off-by: Georg Chini <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 sound/sparc/cs4231.c |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index edeb3d3..78c412a 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -1268,7 +1268,7 @@ static struct snd_pcm_hardware snd_cs4231_playback =
        .channels_min           = 1,
        .channels_max           = 2,
        .buffer_bytes_max       = (32*1024),
-       .period_bytes_min       = 4096,
+       .period_bytes_min       = 256,
        .period_bytes_max       = (32*1024),
        .periods_min            = 1,
        .periods_max            = 1024,
@@ -1288,7 +1288,7 @@ static struct snd_pcm_hardware snd_cs4231_capture =
        .channels_min           = 1,
        .channels_max           = 2,
        .buffer_bytes_max       = (32*1024),
-       .period_bytes_min       = 4096,
+       .period_bytes_min       = 256,
        .period_bytes_max       = (32*1024),
        .periods_min            = 1,
        .periods_max            = 1024,
@@ -1796,7 +1796,7 @@ static irqreturn_t snd_cs4231_sbus_interrupt(int irq, 
void *dev_id)
        snd_cs4231_outm(chip, CS4231_IRQ_STATUS, ~CS4231_ALL_IRQS | ~status, 0);
        spin_unlock_irqrestore(&chip->lock, flags);
 
-       return 0;
+       return IRQ_HANDLED;
 }
 
 /*
@@ -1821,7 +1821,6 @@ static int sbus_dma_request(struct cs4231_dma_control 
*dma_cont, dma_addr_t bus_
        if (!(csr & test))
                goto out;
        err = -EBUSY;
-       csr = sbus_readl(base->regs + APCCSR);
        test = APC_XINT_CNVA;
        if ( base->dir == APC_PLAY )
                test = APC_XINT_PNVA;
@@ -1862,17 +1861,16 @@ static void sbus_dma_enable(struct cs4231_dma_control 
*dma_cont, int on)
 
        spin_lock_irqsave(&base->lock, flags);
        if (!on) {
-               if (base->dir == APC_PLAY) { 
-                       sbus_writel(0, base->regs + base->dir + APCNVA); 
-                       sbus_writel(1, base->regs + base->dir + APCC); 
-               }
-               else
-               {
-                       sbus_writel(0, base->regs + base->dir + APCNC); 
-                       sbus_writel(0, base->regs + base->dir + APCVA); 
-               } 
+               sbus_writel(0, base->regs + base->dir + APCNC);
+               sbus_writel(0, base->regs + base->dir + APCNVA);
+               sbus_writel(0, base->regs + base->dir + APCC);
+               sbus_writel(0, base->regs + base->dir + APCVA);
+
+               /* ACK any APC interrupts. */
+               csr = sbus_readl(base->regs + APCCSR);
+               sbus_writel(csr, base->regs + APCCSR);
        } 
-       udelay(600); 
+       udelay(1000);
        csr = sbus_readl(base->regs + APCCSR);
        shift = 0;
        if ( base->dir == APC_PLAY )
-
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