alsa: add option to use device channel map instead of default

See #461
This commit is contained in:
Wim Taymans 2021-02-25 21:16:16 +01:00
parent 8386ddff78
commit f7d756460e
3 changed files with 5 additions and 0 deletions

View file

@ -801,6 +801,8 @@ impl_init(const struct spa_handle_factory *factory,
this->disable_mmap = (strcmp(s, "true") == 0 || atoi(s) == 1);
} else if (!strcmp(info->items[i].key, "api.alsa.disable-batch")) {
this->disable_batch = (strcmp(s, "true") == 0 || atoi(s) == 1);
} else if (!strcmp(info->items[i].key, "api.alsa.use-chmap")) {
this->props.use_chmap = (strcmp(s, "true") == 0 || atoi(s) == 1);
}
}
return 0;

View file

@ -822,6 +822,8 @@ impl_init(const struct spa_handle_factory *factory,
this->disable_mmap = (strcmp(s, "true") == 0 || atoi(s) == 1);
} else if (!strcmp(info->items[i].key, "api.alsa.disable-batch")) {
this->disable_batch = (strcmp(s, "true") == 0 || atoi(s) == 1);
} else if (!strcmp(info->items[i].key, "api.alsa.use-chmap")) {
this->props.use_chmap = (strcmp(s, "true") == 0 || atoi(s) == 1);
}
}
return 0;

View file

@ -99,6 +99,7 @@ rules = [
#api.alsa.headroom = 0
#api.alsa.disable-mmap = false
#api.alsa.disable-batch = false
#api.alsa.use-chmap = false
#session.suspend-timeout-seconds = 5 # 0 disables suspend
}
}