diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-25 08:15:31 -0500 |
commit | 52e04ea89da57274f0313d2bd73ba02f686cfdeb (patch) | |
tree | 6ce5d086bcaea4cb534b3fcf6ba736eb48d582a4 /sound/core | |
parent | 41116e926cb92292fa4fcbe888ae8133fa0038e6 (diff) | |
parent | 8b90ca08821fee79e181bfcbc3bbd41ef5637136 (diff) |
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 c15682a2f9db..475455c76610 100644 --- a/sound/core/Kconfig +++ b/sound/core/Kconfig | |||
@@ -5,6 +5,7 @@ config SND_TIMER | |||
5 | config SND_PCM | 5 | config SND_PCM |
6 | tristate | 6 | tristate |
7 | select SND_TIMER | 7 | select SND_TIMER |
8 | select GCD | ||
8 | 9 | ||
9 | config SND_HWDEP | 10 | config SND_HWDEP |
10 | tristate | 11 | tristate |
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 29ab46a12e11..25b0641e6b8c 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) | |||
1918 | 1918 | ||
1919 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, | 1919 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, |
1920 | hw->rate_min, hw->rate_max); | 1920 | hw->rate_min, hw->rate_max); |
1921 | if (err < 0) | 1921 | if (err < 0) |
1922 | return err; | 1922 | return err; |
1923 | 1923 | ||
1924 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, | 1924 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, |
1925 | hw->period_bytes_min, hw->period_bytes_max); | 1925 | hw->period_bytes_min, hw->period_bytes_max); |
1926 | if (err < 0) | 1926 | if (err < 0) |
1927 | return err; | 1927 | return err; |
1928 | 1928 | ||
1929 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIODS, | 1929 | err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIODS, |
1930 | hw->periods_min, hw->periods_max); | 1930 | hw->periods_min, hw->periods_max); |
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c index ca8068b63d6c..b01d9481d632 100644 --- a/sound/core/pcm_timer.c +++ b/sound/core/pcm_timer.c | |||
@@ -20,6 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/time.h> | 22 | #include <linux/time.h> |
23 | #include <linux/gcd.h> | ||
23 | #include <sound/core.h> | 24 | #include <sound/core.h> |
24 | #include <sound/pcm.h> | 25 | #include <sound/pcm.h> |
25 | #include <sound/timer.h> | 26 | #include <sound/timer.h> |
@@ -28,22 +29,6 @@ | |||
28 | * Timer functions | 29 | * Timer functions |
29 | */ | 30 | */ |
30 | 31 | ||
31 | /* Greatest common divisor */ | ||
32 | static unsigned long gcd(unsigned long a, unsigned long b) | ||
33 | { | ||
34 | unsigned long r; | ||
35 | if (a < b) { | ||
36 | r = a; | ||
37 | a = b; | ||
38 | b = r; | ||
39 | } | ||
40 | while ((r = a % b) != 0) { | ||
41 | a = b; | ||
42 | b = r; | ||
43 | } | ||
44 | return b; | ||
45 | } | ||
46 | |||
47 | void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) | 32 | void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) |
48 | { | 33 | { |
49 | unsigned long rate, mult, fsize, l, post; | 34 | unsigned long rate, mult, fsize, l, post; |