Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f28eca32b3064db29d4718156e692f4db75c7aa
Commit:     0f28eca32b3064db29d4718156e692f4db75c7aa
Parent:     8ffbc01e2cb2e203df910468f236c7b4e7b36f25
Author:     Clemens Ladisch <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 17 09:40:24 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 16:50:34 2007 +0200

    [ALSA] cmipci: fix lookup of double rates
    
    When using one of the double sampling rates, use half the sample rate to
    look up in the rates[] table, otherwise we stumble over the BUG().
    
    Signed-off-by: Clemens Ladisch <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/cmipci.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index b4f74ae..7cf4fc1 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -604,6 +604,9 @@ static unsigned int rates[] = { 5512, 11025, 22050, 44100, 
8000, 16000, 32000, 4
 static unsigned int snd_cmipci_rate_freq(unsigned int rate)
 {
        unsigned int i;
+
+       if (rate > 48000)
+               rate /= 2;
        for (i = 0; i < ARRAY_SIZE(rates); i++) {
                if (rates[i] == rate)
                        return i;
-
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