[ALSA] rme9652 - Fix the hw_pointer check
authorTakashi Iwai <tiwai@suse.de>
Wed, 30 May 2007 10:46:21 +0000 (12:46 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 20 Jul 2007 09:11:22 +0000 (11:11 +0200)
The negative check in hw_pointer callback doesn't work because the
value is unsigned.  Cast to int in the comparison to fix this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/rme9652/rme9652.c

index bd7dbd267ed1b10e09c81023bce90ca9f57c2211..2de27405a0bdd587922d4a341cd94e9cf18c8a68 100644 (file)
@@ -406,7 +406,7 @@ static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652)
                } else if (!frag)
                        return 0;
                offset -= rme9652->max_jitter;
-               if (offset < 0)
+               if ((int)offset < 0)
                        offset += period_size * 2;
        } else {
                if (offset > period_size + rme9652->max_jitter) {