mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
core: Add a new hook PA_CORE_HOOK_CARD_PROFILE_CHANGED
This will allow modules to know when a card profile has changed and take appropriate action. This might prove useful when developing UCM so that the appropriate verb can be set.
This commit is contained in:
parent
9379d4015c
commit
3153b60a62
2 changed files with 3 additions and 0 deletions
|
|
@ -241,6 +241,8 @@ int pa_card_set_profile(pa_card *c, const char *name, pa_bool_t save) {
|
||||||
c->active_profile = profile;
|
c->active_profile = profile;
|
||||||
c->save_profile = save;
|
c->save_profile = save;
|
||||||
|
|
||||||
|
pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ typedef enum pa_core_hook {
|
||||||
PA_CORE_HOOK_CARD_NEW,
|
PA_CORE_HOOK_CARD_NEW,
|
||||||
PA_CORE_HOOK_CARD_PUT,
|
PA_CORE_HOOK_CARD_PUT,
|
||||||
PA_CORE_HOOK_CARD_UNLINK,
|
PA_CORE_HOOK_CARD_UNLINK,
|
||||||
|
PA_CORE_HOOK_CARD_PROFILE_CHANGED,
|
||||||
PA_CORE_HOOK_MAX
|
PA_CORE_HOOK_MAX
|
||||||
} pa_core_hook_t;
|
} pa_core_hook_t;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue