aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/sb_audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/sb_audio.c')
-rw-r--r--sound/oss/sb_audio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/oss/sb_audio.c b/sound/oss/sb_audio.c
index 733b014ec7d1..b2b3c014221a 100644
--- a/sound/oss/sb_audio.c
+++ b/sound/oss/sb_audio.c
@@ -575,13 +575,15 @@ static int jazz16_audio_set_speed(int dev, int speed)
575 if (speed > 0) 575 if (speed > 0)
576 { 576 {
577 int tmp; 577 int tmp;
578 int s = speed * devc->channels; 578 int s;
579 579
580 if (speed < 5000) 580 if (speed < 5000)
581 speed = 5000; 581 speed = 5000;
582 if (speed > 44100) 582 if (speed > 44100)
583 speed = 44100; 583 speed = 44100;
584 584
585 s = speed * devc->channels;
586
585 devc->tconst = (256 - ((1000000 + s / 2) / s)) & 0xff; 587 devc->tconst = (256 - ((1000000 + s / 2) / s)) & 0xff;
586 588
587 tmp = 256 - devc->tconst; 589 tmp = 256 - devc->tconst;