Browse Source

ALSA: sound/core/pcm_timer.c: use lib/gcd.c

Make sound/core/pcm_timer.c use lib/gcd.c

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
imx_3.10.17_1.0.0_ga
Florian Fainelli 11 years ago
committed by Takashi Iwai
parent
commit
a9605391cf
2 changed files with 2 additions and 16 deletions
  1. +1
    -0
      sound/core/Kconfig
  2. +1
    -16
      sound/core/pcm_timer.c

+ 1
- 0
sound/core/Kconfig View File

@ -5,6 +5,7 @@ config SND_TIMER
config SND_PCM
tristate
select SND_TIMER
select GCD
config SND_HWDEP
tristate


+ 1
- 16
sound/core/pcm_timer.c View File

@ -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;


Loading…
Cancel
Save