Lines Matching refs:port
60 "restore_port=<Save/restore port?> "
106 char *port;
165 static struct perportentry* perportentry_read(struct userdata *u, const char *basekeyname, const char *port);
166 static bool perportentry_write(struct userdata *u, const char *basekeyname, const char *port, const struct perportentry *e);
179 pa_xfree(e->port);
195 pa_tagstruct_puts(t, e->port);
213 const char* port;
234 pa_tagstruct_gets(t, &port) < 0) {
242 e->port = pa_xstrdup(port);
268 /* Now convert the legacy entry into per-port entries */
273 /* Write a "null" port entry. The read code will automatically try this
274 * if it cannot find a specific port-named entry. */
281 /* Write a "null" port entry. The read code will automatically try this
282 * if it cannot find a specific port-named entry. */
310 r->port = pa_xstrdup(e->port);
320 (a->port_valid && !pa_streq(a->port, b->port)))
345 static bool perportentry_write(struct userdata *u, const char *basekeyname, const char *port, const struct perportentry *e) {
358 name = pa_sprintf_malloc("%s:%s", basekeyname, (port ? port : "null"));
389 static struct perportentry* perportentry_read(struct userdata *u, const char *basekeyname, const char *port) {
399 name = pa_sprintf_malloc("%s:%s", basekeyname, (port ? port : "null"));
462 /* Try again with a null port. This is used when dealing with migration from older versions */
463 if (port) {
528 char port[PA_NAME_MAX];
551 if (!memchr(le->port, 0, sizeof(le->port))) {
573 (*entry)->port = pa_xstrdup(le->port);
591 const char *port = NULL;
613 port = sink->active_port->name;
621 pa_xfree(e->port);
622 e->port = pa_xstrdup(port ? port : "");
626 if ((oldppe = perportentry_read(u, name, port)))
652 port = source->active_port->name;
660 pa_xfree(e->port);
661 e->port = pa_xstrdup(port ? port : "");
665 if ((oldppe = perportentry_read(u, name, port)))
695 pa_log_info("Storing port for device %s.", name);
715 pa_log_info("Storing volume/mute for device+port %s:%s.", name, (port ? port : "null"));
717 written = perportentry_write(u, name, port, ppe) || written;
742 pa_log_info("Restoring port '%s' for sink %s.", pa_strnull(e->port), name);
743 pa_sink_new_data_set_port(new_data, e->port);
746 pa_log_debug("Not restoring port for sink %s, because already set.", name);
884 pa_log_info("Restoring port '%s' for source %s.", pa_strnull(e->port), name);
885 pa_source_new_data_set_port(new_data, e->port);
888 pa_log_debug("Not restoring port for source %s, because already set.", name);
1227 pa_log_warn("Neither restoring volume, nor restoring muted, nor restoring port enabled!");