mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-05 01:40:45 -05:00
alsa: add option to disable pro-audio profiles
Some devices might have nonfunctional 'Pro Audio' sound. This patch adds a new 'api.acp.disable-pro-audio' option to disable pro-audio profile entirely.
This commit is contained in:
parent
653e1578a1
commit
a8b9ce2050
2 changed files with 5 additions and 1 deletions
|
|
@ -522,7 +522,8 @@ static void add_profiles(pa_card *impl)
|
||||||
ap->profile.flags = ACP_PROFILE_OFF;
|
ap->profile.flags = ACP_PROFILE_OFF;
|
||||||
pa_hashmap_put(impl->profiles, ap->name, ap);
|
pa_hashmap_put(impl->profiles, ap->name, ap);
|
||||||
|
|
||||||
add_pro_profile(impl, impl->card.index);
|
if (!impl->disable_pro_audio)
|
||||||
|
add_pro_profile(impl, impl->card.index);
|
||||||
|
|
||||||
PA_HASHMAP_FOREACH(ap, impl->profile_set->profiles, state) {
|
PA_HASHMAP_FOREACH(ap, impl->profile_set->profiles, state) {
|
||||||
pa_alsa_mapping *m;
|
pa_alsa_mapping *m;
|
||||||
|
|
@ -1860,6 +1861,8 @@ struct acp_card *acp_card_new(uint32_t index, const struct acp_dict *props)
|
||||||
impl->pro_channels = atoi(s);
|
impl->pro_channels = atoi(s);
|
||||||
if ((s = acp_dict_lookup(props, "api.alsa.split-enable")) != NULL)
|
if ((s = acp_dict_lookup(props, "api.alsa.split-enable")) != NULL)
|
||||||
impl->ucm.split_enable = spa_atob(s);
|
impl->ucm.split_enable = spa_atob(s);
|
||||||
|
if ((s = acp_dict_lookup(props, "api.acp.disable-pro-audio")) != NULL)
|
||||||
|
impl->disable_pro_audio = spa_atob(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SND_LIB_VERSION < 0x10207
|
#if SND_LIB_VERSION < 0x10207
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ struct pa_card {
|
||||||
bool auto_profile;
|
bool auto_profile;
|
||||||
bool auto_port;
|
bool auto_port;
|
||||||
bool ignore_dB;
|
bool ignore_dB;
|
||||||
|
bool disable_pro_audio;
|
||||||
uint32_t rate;
|
uint32_t rate;
|
||||||
uint32_t pro_channels;
|
uint32_t pro_channels;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue