projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ffbc01
)
[ALSA] cmipci: fix lookup of double rates
author
Clemens Ladisch
<clemens@ladisch.de>
Mon, 17 Sep 2007 07:40:24 +0000
(09:40 +0200)
committer
Jaroslav Kysela
<perex@perex.cz>
Tue, 16 Oct 2007 14:50:34 +0000
(16:50 +0200)
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 <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/cmipci.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/pci/cmipci.c
b/sound/pci/cmipci.c
index b4f74ae9c0b655ccd5a76a4e66ff39d46c59d20c..7cf4fc193419789f81b9a88f09e08da8b1fa98e3 100644
(file)
--- 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;