android_kernel_xiaomi_sm8350/sound/core
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
..
oss ALSA: rename "PC Speaker" controls to "Speaker" 2009-11-05 09:00:21 +01:00
seq Merge branch 'topic/midi' into for-linus 2009-09-10 15:32:56 +02:00
control_compat.c
control.c Merge branch 'topic/misc' into for-linus 2009-12-04 16:22:37 +01:00
device.c
hrtimer.c ALSA: hrtimer - Fix lock-up 2009-12-11 12:53:27 +01:00
hwdep_compat.c
hwdep.c
info_oss.c
info.c Merge branch 'topic/dummy' into for-linus 2009-09-10 15:32:51 +02:00
init.c ALSA: Remove struct snd_monitor_file from public sound/core.h 2009-09-07 15:50:18 +02:00
isadma.c ALSA: snd_dma_pointer workaround for chipsets with buggy DMA 2009-10-11 18:03:13 +02:00
jack.c
Kconfig
Makefile
memalloc.c
memory.c
misc.c ALSA: Add debug module option 2009-08-27 17:42:08 +02:00
pcm_compat.c
pcm_lib.c ALSA: fix incorrect rounding direction in snd_interval_ratnum() 2009-12-21 12:02:55 +01:00
pcm_memory.c
pcm_misc.c
pcm_native.c ALSA: pcm - fix page conversion on non-coherent PPC arch 2009-11-27 10:15:23 +01:00
pcm_timer.c
pcm.c sound: pcm: record a substream's owner process 2009-11-10 16:32:20 +01:00
rawmidi_compat.c
rawmidi.c vfs: Implement proper O_SYNC semantics 2009-12-10 15:02:50 +01:00
rtctimer.c
sgbuf.c
sound_oss.c
sound.c
timer_compat.c
timer.c
vmaster.c