diff options
author | Jaroslav Kysela <perex@suse.cz> | 2005-01-03 13:25:59 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-01-03 13:25:59 +0100 |
commit | 482f86096f0f2a4e76f8b2a44a00a0de72772dfe (patch) | |
tree | 251582a32d517ca174faa7f6f67e79097e59fd21 /sound | |
parent | 77c9a7be6e411a3254f6b50467c987a7ab0166d2 (diff) | |
download | history-482f86096f0f2a4e76f8b2a44a00a0de72772dfe.tar.gz |
[ALSA] Fix the invalid DMA pointer value
PPC PMAC driver
Fixed the bug returning invalid DMA pointer values.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/ppc/pmac.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 7c1262743a1cc0..2498b75fb6e516 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c @@ -318,7 +318,8 @@ static snd_pcm_uframes_t snd_pmac_pcm_pointer(pmac_t *chip, pmac_stream_t *rec, stat = ld_le16(&cp->xfer_status); if (stat & (ACTIVE|DEAD)) { count = in_le16(&cp->res_count); - count = rec->period_size - count; + if (count) + count = rec->period_size - count; } #endif count += rec->cur_period * rec->period_size; |