Skip to content

Commit

Permalink
[ALSA] rme9652 - Fix the hw_pointer check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jul 20, 2007
1 parent ba8c3c3 commit 304e3bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/rme9652/rme9652.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 304e3bb

Please sign in to comment.