diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-25 14:15:31 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-25 14:15:31 +0100 |
commit | 52e04ea89da57274f0313d2bd73ba02f686cfdeb (patch) | |
tree | 6ce5d086bcaea4cb534b3fcf6ba736eb48d582a4 /sound/core | |
parent | 41116e926cb92292fa4fcbe888ae8133fa0038e6 (diff) | |
parent | 8b90ca08821fee79e181bfcbc3bbd41ef5637136 (diff) | |
download | op-kernel-dev-52e04ea89da57274f0313d2bd73ba02f686cfdeb.zip op-kernel-dev-52e04ea89da57274f0313d2bd73ba02f686cfdeb.tar.gz |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/Kconfig | 1 | ||||
-rw-r--r-- | sound/core/pcm_native.c | 8 | ||||
-rw-r--r-- | sound/core/pcm_timer.c | 17 |
3 files changed, 6 insertions, 20 deletions
diff --git a/sound/core/Kconfig b/sound/core/Kconfig index c15682a..475455c 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig @@ -5,6 +5,7 @@ config SND_TIMER config SND_PCM tristate select SND_TIMER + select GCD config SND_HWDEP tristate diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 29ab46a1..25b0641 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1918,13 +1918,13 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream) err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, hw->rate_min, hw->rate_max); - if (err < 0) - return err; + if (err < 0) + return err; err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, hw->period_bytes_min, hw->period_bytes_max); - if (err < 0) - return err; + if (err < 0) + return err; err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIODS, hw->periods_min, hw->periods_max); diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index ca8068b..b01d948 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c @@ -20,6 +20,7 @@ */ #include <linux/time.h> +#include <linux/gcd.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/timer.h> @@ -28,22 +29,6 @@ * Timer functions */ -/* Greatest common divisor */ -static unsigned long gcd(unsigned long a, unsigned long b) -{ - unsigned long r; - if (a < b) { - r = a; - a = b; - b = r; - } - while ((r = a % b) != 0) { - a = b; - b = r; - } - return b; -} - void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) { unsigned long rate, mult, fsize, l, post; |