mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
fixed the handling of EINTR in read/write.
EINTR can be returned during ACPI suspend/resume.
This commit is contained in:
parent
64a39728a2
commit
494f3e66e4
3 changed files with 22 additions and 6 deletions
|
|
@ -612,7 +612,7 @@ static snd_pcm_sframes_t snd_pcm_hw_writei(snd_pcm_t *pcm, const void *buffer, s
|
|||
fprintf(stderr, "hw_writei: frames = %li, result = %i, result = %li\n", size, result, xferi.result);
|
||||
#endif
|
||||
if (result < 0)
|
||||
return err;
|
||||
return snd_pcm_check_error(pcm, err);
|
||||
return xferi.result;
|
||||
}
|
||||
|
||||
|
|
@ -630,7 +630,7 @@ static snd_pcm_sframes_t snd_pcm_hw_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_
|
|||
fprintf(stderr, "hw_writen: frames = %li, result = %i, result = %li\n", size, result, xfern.result);
|
||||
#endif
|
||||
if (result < 0)
|
||||
return err;
|
||||
return snd_pcm_check_error(pcm, err);
|
||||
return xfern.result;
|
||||
}
|
||||
|
||||
|
|
@ -648,7 +648,7 @@ static snd_pcm_sframes_t snd_pcm_hw_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_
|
|||
fprintf(stderr, "hw_readi: frames = %li, result = %i, result = %li\n", size, result, xferi.result);
|
||||
#endif
|
||||
if (result < 0)
|
||||
return err;
|
||||
return snd_pcm_check_error(pcm, err);
|
||||
UPDATE_SHADOW_PTR(hw);
|
||||
return xferi.result;
|
||||
}
|
||||
|
|
@ -667,7 +667,7 @@ static snd_pcm_sframes_t snd_pcm_hw_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_u
|
|||
fprintf(stderr, "hw_readn: frames = %li, result = %i, result = %li\n", size, result, xfern.result);
|
||||
#endif
|
||||
if (result < 0)
|
||||
return err;
|
||||
return snd_pcm_check_error(pcm, err);
|
||||
UPDATE_SHADOW_PTR(hw);
|
||||
return xfern.result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue