mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Fix restoration of PCM open mode
The original PCM open mode was lost by the change of default non-blocking open. The patch fix the restoration of the original open mode.
This commit is contained in:
parent
eecfed7569
commit
38a3aa096c
1 changed files with 3 additions and 1 deletions
|
|
@ -1429,9 +1429,11 @@ int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
|
|||
mmap_emulation, sync_ptr_ioctl);
|
||||
if (err < 0)
|
||||
return err;
|
||||
if (nonblock && ! (mode & SND_PCM_NONBLOCK))
|
||||
if (nonblock && ! (mode & SND_PCM_NONBLOCK)) {
|
||||
/* revert to blocking mode for read/write access */
|
||||
snd_pcm_hw_nonblock(*pcmp, 0);
|
||||
(*pcmp)->mode = mode;
|
||||
}
|
||||
|
||||
hw = (*pcmp)->private_data;
|
||||
if (format != SND_PCM_FORMAT_UNKNOWN)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue