mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
Fix check of nonblock option
Fix the check of nonblock option for all hw layer. Instead of passing in asound.conf, check the option in snd_pcm_hw_open() so that the nonblock option is referred in the case of "type hw ..." style definition, too.
This commit is contained in:
parent
0757f70b1b
commit
67868a886f
2 changed files with 8 additions and 5 deletions
|
|
@ -1291,11 +1291,18 @@ int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name,
|
|||
long card = -1, device = 0, subdevice = -1;
|
||||
const char *str;
|
||||
int err, mmap_emulation = 0, sync_ptr_ioctl = 0;
|
||||
snd_config_t *n;
|
||||
int nonblock = 1; /* non-block per default */
|
||||
|
||||
/* look for defaults.pcm.nonblock definition */
|
||||
if (snd_config_search(root, "defaults.pcm.nonblock", &n) >= 0) {
|
||||
err = snd_config_get_bool(n);
|
||||
if (err >= 0)
|
||||
nonblock = err;
|
||||
}
|
||||
snd_config_for_each(i, next, conf) {
|
||||
snd_config_t *n = snd_config_iterator_entry(i);
|
||||
const char *id;
|
||||
n = snd_config_iterator_entry(i);
|
||||
if (snd_config_get_id(n, &id) < 0)
|
||||
continue;
|
||||
if (snd_pcm_conf_generic_id(id))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue