Commit c45b306f authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

D:2003/09/08 08:14:17
C:ALSA<-OSS emulation
A:Jaroslav Kysela <perex@suse.cz>
F:core/oss/pcm_oss.c:1.47->1.48 
L:Added handling for -EPIPE and -ESTRPIPE error codes in get_ptr and get_space
L:functions.
parent b3b72765
......@@ -1394,6 +1394,10 @@ static int snd_pcm_oss_get_ptr(snd_pcm_oss_file_t *pcm_oss_file, int stream, str
}
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
err = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DELAY, &delay);
if (err == -EPIPE || err == -ESTRPIPE) {
err = 0;
delay = 0;
}
} else {
err = snd_pcm_oss_capture_position_fixup(substream, &delay);
}
......@@ -1454,7 +1458,12 @@ static int snd_pcm_oss_get_space(snd_pcm_oss_file_t *pcm_oss_file, int stream, s
} else {
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
err = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DELAY, &avail);
avail = runtime->buffer_size - avail;
if (err == -EPIPE || err == -ESTRPIPE) {
avail = runtime->buffer_size;
err = 0;
} else {
avail = runtime->buffer_size - avail;
}
} else {
err = snd_pcm_oss_capture_position_fixup(substream, &avail);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment