Lines Matching refs:profile

93     pa_log_debug("Setting card %s profile %s to availability status %s", c->card->name, c->name,
150 pa_card_profile *profile;
185 PA_HASHMAP_FOREACH(profile, c->profiles, state)
186 profile->card = c;
210 pa_card_profile *profile;
216 /* By default, pick the highest priority profile that is not unavailable,
217 * or if all profiles are unavailable, pick the profile with the highest
220 pa_log_debug("Looking for initial profile for card %s", card->name);
221 PA_HASHMAP_FOREACH(profile, card->profiles, state) {
222 pa_log_debug("%s availability %s", profile->name, pa_available_to_string(profile->available));
223 if (profile->available == PA_AVAILABLE_NO)
226 if (!best || profile->priority > best->priority)
227 best = profile;
231 PA_HASHMAP_FOREACH(profile, card->profiles, state) {
232 if (!best || profile->priority > best->priority)
233 best = profile;
297 void pa_card_add_profile(pa_card *c, pa_card_profile *profile) {
299 pa_assert(profile);
301 /* take ownership of the profile */
302 pa_assert_se(pa_hashmap_put(c->profiles, profile->name, profile) >= 0);
303 profile->card = c;
307 pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_ADDED], profile);
350 int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
354 pa_assert(profile);
355 pa_assert(profile->card == c);
362 if (c->active_profile == profile) {
370 /* If we're setting the initial profile, we shouldn't call set_profile(),
373 * properly set up that profile after pa_card_put() has returned. It would
374 * be probably good to change this so that also the initial profile can be
377 if (c->linked && (r = c->set_profile(c, profile)) < 0)
380 pa_log_debug("%s: active_profile: %s -> %s", c->name, c->active_profile->name, profile->name);
381 c->active_profile = profile;
486 if (pa_streq(message, "get-profile-sticky")) {
495 } else if (pa_streq(message, "set-profile-sticky")) {
498 pa_log_info("Card operation set-profile-sticky requires argument: \"true\" or \"false\"");