fixed the handling of EINTR in read/write.

EINTR can be returned during ACPI suspend/resume.
This commit is contained in:
Takashi Iwai 2004-04-15 12:22:26 +00:00
parent 64a39728a2
commit 494f3e66e4
3 changed files with 22 additions and 6 deletions

View file

@ -6066,7 +6066,7 @@ snd_pcm_sframes_t snd_pcm_read_areas(snd_pcm_t *pcm, const snd_pcm_channel_area_
xfer += frames;
}
_end:
return xfer > 0 ? (snd_pcm_sframes_t) xfer : err;
return xfer > 0 ? (snd_pcm_sframes_t) xfer : snd_pcm_check_error(pcm, err);
}
snd_pcm_sframes_t snd_pcm_write_areas(snd_pcm_t *pcm, const snd_pcm_channel_area_t *areas,
@ -6149,7 +6149,7 @@ snd_pcm_sframes_t snd_pcm_write_areas(snd_pcm_t *pcm, const snd_pcm_channel_area
}
}
_end:
return xfer > 0 ? (snd_pcm_sframes_t) xfer : err;
return xfer > 0 ? (snd_pcm_sframes_t) xfer : snd_pcm_check_error(pcm, err);
}
snd_pcm_uframes_t _snd_pcm_mmap_hw_ptr(snd_pcm_t *pcm)