Try to catch certain driver errors

... by verifying return values of snd_pcm_avail_update() and
snd_pcm_begin_mmap() for their sanenness.
This commit is contained in:
Lennart Poettering 2008-10-21 20:00:36 +02:00
parent b041aac9b1
commit 0796f5a2d6
4 changed files with 69 additions and 6 deletions

View file

@ -92,4 +92,7 @@ int pa_alsa_recover_from_poll(snd_pcm_t *pcm, int revents);
pa_rtpoll_item* pa_alsa_build_pollfd(snd_pcm_t *pcm, pa_rtpoll *rtpoll);
snd_pcm_sframes_t pa_alsa_safe_avail_update(snd_pcm_t *pcm, size_t hwbuf_size, const pa_sample_spec *ss);
int pa_alsa_safe_mmap_begin(snd_pcm_t *pcm, const snd_pcm_channel_area_t **areas, snd_pcm_uframes_t *offset, snd_pcm_uframes_t *frames, size_t hwbuf_size, const pa_sample_spec *ss);
#endif