remarkable-linux/sound
Krzysztof Helt 40962d7c74 ALSA: fix incorrect rounding direction in snd_interval_ratnum()
The direction of rounding is incorrect in the snd_interval_ratnum()
It was detected with following parameters (sb8 driver playing
8kHz stereo file):
 - num is always 1000000
 - requested frequency rate is from 7999 to 7999 (single frequency)

The first loop calculates div_down(num, freq->min) which is 125.
Thus, a frequency range's minimum value is 1000000 / 125 = 8000 Hz.
The second loop calculates div_up(num, freq->max) which is 126
The frequency range's maximum value is 1000000 / 126 = 7936 Hz.
The range maximum is lower than the range minimum so the function
fails due to empty result range.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 12:02:55 +01:00
..
aoa ALSA: Don't assume i2c device probing always succeeds 2009-10-01 07:46:33 +02:00
arm ALSA: AACI: switch to per-pcm locking 2009-12-18 20:31:13 +01:00
atmel
core ALSA: fix incorrect rounding direction in snd_interval_ratnum() 2009-12-21 12:02:55 +01:00
drivers Merge branch 'topic/beep-rename' into topic/core-change 2009-12-01 15:58:10 +01:00
i2c Merge branch 'topic/hda' into for-linus 2009-12-04 16:22:45 +01:00
isa ALSA: Use kzalloc for allocating only one thing 2009-12-19 09:40:26 +01:00
mips sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer 2009-12-18 12:53:17 +01:00
oss sound/oss/pss: Fix test of unsigned in pss_reset_dsp() and pss_download_boot() 2009-12-17 12:19:12 +01:00
parisc ALSA: sound/parisc: Move dereference after NULL test 2009-10-30 12:01:38 +01:00
pci ALSA: Use kzalloc for allocating only one thing 2009-12-19 09:40:26 +01:00
pcmcia sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer 2009-12-18 12:53:17 +01:00
ppc Merge branch 'topic/beep-rename' into topic/core-change 2009-12-01 15:58:10 +01:00
sh Merge branch 'topic/beep-rename' into topic/core-change 2009-12-01 15:58:10 +01:00
soc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2009-12-15 09:11:05 -08:00
sparc
spi
synth tree-wide: fix typos "couter" -> "counter" 2009-12-04 15:39:51 +01:00
usb sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer 2009-12-18 12:53:17 +01:00
ac97_bus.c
Kconfig tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
last.c
Makefile
sound_core.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
sound_firmware.c