Lines Matching defs:profile

48 PA_MODULE_DESCRIPTION("Automatically restore profile of cards");
75 char *profile;
79 char *profile;
83 bool profile_is_sticky; /* since version 5; must be restored together with profile name */
111 pa_xfree(p_info->profile);
130 p_info->profile = pa_xstrdup(port->preferred_profile);
142 pa_xfree(e->profile);
159 entry->profile = pa_xstrdup(card->active_profile->name);
181 if (!pa_streq(a->profile, b->profile) ||
218 pa_tagstruct_puts(t, e->profile);
224 pa_tagstruct_puts(t, p_info->profile);
250 char profile[PA_NAME_MAX];
270 if (!memchr(le->profile, 0, sizeof(le->profile))) {
276 e->profile = pa_xstrdup(le->profile);
285 const char* profile;
306 pa_tagstruct_gets(t, &profile) < 0) {
311 if (!profile)
312 profile = "";
314 e->profile = pa_xstrdup(profile);
339 p_info->profile = pa_xstrdup(profile_name);
402 pa_log_info("Storing profile and port latency offsets for card %s.", card->name);
416 entry->profile = pa_xstrdup(old->profile);
445 if (!pa_safe_streq(p_info->profile, p->preferred_profile)) {
446 pa_xfree(p_info->profile);
447 p_info->profile = pa_xstrdup(p->preferred_profile);
448 pa_log_info("Storing profile %s for port %s on card %s.", p_info->profile, p->name, card->name);
464 pa_xfree(entry->profile);
466 entry->profile = pa_xstrdup(card->active_profile->name);
467 pa_log_info("Storing card profile for card %s.", card->name);
485 static pa_hook_result_t card_profile_added_callback(pa_core *c, pa_card_profile *profile, struct userdata *u) {
488 pa_assert(profile);
490 if (profile->available == PA_AVAILABLE_NO)
493 if (!(entry = entry_read(u, profile->card->name)))
496 if (pa_safe_streq(entry->profile, profile->name)) {
497 if (pa_card_set_profile(profile->card, profile, true) >= 0)
498 pa_log_info("Restored profile '%s' for card %s.", profile->name, profile->card->name);
556 if (!p->preferred_profile && p_info->profile)
557 pa_device_port_set_preferred_profile(p, p_info->profile);
591 e->profile,
595 if (e->profile[0]) {
596 pa_card_profile *profile;
598 profile = pa_hashmap_get(card->profiles, e->profile);
599 if (profile) {
600 if (profile->available != PA_AVAILABLE_NO || card->profile_is_sticky) {
601 pa_log_info("Restoring profile '%s' for card %s.", profile->name, card->name);
602 pa_card_set_profile(card, profile, true);
604 pa_log_debug("Not restoring profile %s for card %s, because the profile is currently unavailable.",
605 profile->name, card->name);
607 pa_log_debug("Tried to restore profile %s for card %s, but the card doesn't have such profile.",
608 e->profile, card->name);