Lines Matching refs:is_sink
334 static const char *get_mixer_device(pa_alsa_ucm_device *dev, bool is_sink) in get_mixer_device() argument
338 if (is_sink) { in get_mixer_device()
351 static const char *get_jack_mixer_device(pa_alsa_ucm_device *dev, bool is_sink) { in get_jack_mixer_device() argument
354 return get_mixer_device(dev, is_sink); in get_jack_mixer_device()
662 …onst char *name, pa_alsa_ucm_device *list, const char *role_name, const char *role, bool is_sink) { in add_media_role() argument
672 if (is_sink && sink) in add_media_role()
674 else if (!is_sink && source) in add_media_role()
681 static char *modifier_name_to_role(const char *mod_name, bool *is_sink) { in modifier_name_to_role() argument
684 *is_sink = false; in modifier_name_to_role()
687 *is_sink = true; in modifier_name_to_role()
709 bool is_sink = false; in ucm_set_media_roles() local
713 sub = modifier_name_to_role(mod_name, &is_sink); in ucm_set_media_roles()
717 modifier->action_direction = is_sink ? PA_DIRECTION_OUTPUT : PA_DIRECTION_INPUT; in ucm_set_media_roles()
720 role_name = is_sink ? PA_ALSA_PROP_UCM_PLAYBACK_ROLES : PA_ALSA_PROP_UCM_CAPTURE_ROLES; in ucm_set_media_roles()
725 add_media_role(modifier->supported_devices[i], list, role_name, sub, is_sink); in ucm_set_media_roles()
934 static void probe_volumes(pa_hashmap *hash, bool is_sink, snd_pcm_t *pcm_handle, pa_hashmap *mixers… in probe_volumes() argument
949 mdev2 = get_mixer_device(dev, is_sink); in probe_volumes()
988 bool is_sink, in ucm_add_port_combination() argument
1020 …name = pa_sprintf_malloc("%s%s", is_sink ? PA_UCM_PRE_TAG_OUTPUT : PA_UCM_PRE_TAG_INPUT, dev_name); in ucm_add_port_combination()
1024 priority = is_sink ? dev->playback_priority : dev->capture_priority; in ucm_add_port_combination()
1043 priority = is_sink ? dev->playback_priority : dev->capture_priority; in ucm_add_port_combination()
1078 …pa_device_port_new_data_set_direction(&port_data, is_sink ? PA_DIRECTION_OUTPUT : PA_DIRECTION_INP… in ucm_add_port_combination()
1097 …PA_HASHMAP_FOREACH_KV(profile, vol, is_sink ? dev->playback_volumes : dev->capture_volumes, state)… in ucm_add_port_combination()
1099 … is_sink ? PA_ALSA_DIRECTION_OUTPUT : PA_ALSA_DIRECTION_INPUT); in ucm_add_port_combination()
1114 if (is_sink) in ucm_add_port_combination()
1128 direction = is_sink ? "output" : "input"; in ucm_add_port_combination()
1142 static int ucm_port_contains(const char *port_name, const char *dev_name, bool is_sink) { in ucm_port_contains() argument
1151 port_name += is_sink ? strlen(PA_UCM_PRE_TAG_OUTPUT) : strlen(PA_UCM_PRE_TAG_INPUT); in ucm_port_contains()
1221 bool is_sink, in ucm_add_ports_combination() argument
1240 ucm_add_port_combination(hash, context, is_sink, pdevices, dev_num + 1, ports, cp, core); in ucm_add_ports_combination()
1242 … ucm_add_ports_combination(hash, context, is_sink, pdevices, dev_num + 1, idx, ports, cp, core); in ucm_add_ports_combination()
1246 ucm_add_ports_combination(hash, context, is_sink, pdevices, dev_num, idx, ports, cp, core); in ucm_add_ports_combination()
1281 bool is_sink, in pa_alsa_ucm_add_ports_combination() argument
1292 … ucm_add_ports_combination(p, context, is_sink, pdevices, 0, PA_IDXSET_INVALID, ports, cp, core); in pa_alsa_ucm_add_ports_combination()
1304 bool is_sink, in pa_alsa_ucm_add_ports() argument
1311 …const char *role_name = is_sink ? PA_ALSA_PROP_UCM_PLAYBACK_ROLES : PA_ALSA_PROP_UCM_CAPTURE_ROLES; in pa_alsa_ucm_add_ports()
1320 pa_alsa_ucm_add_ports_combination(*p, context, is_sink, card->ports, NULL, card->core); in pa_alsa_ucm_add_ports()
1323 probe_volumes(*p, is_sink, pcm_handle, context->ucm->mixers, ignore_dB); in pa_alsa_ucm_add_ports()
1393 int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *port, bool is_sink) { in pa_alsa_ucm_set_port() argument
1413 if (ucm_port_contains(port->name, dev_name, is_sink)) in pa_alsa_ucm_set_port()
1469 bool is_sink = m->direction == PA_ALSA_DIRECTION_OUTPUT; in alsa_mapping_add_ucm_device() local
1485 if (is_sink) in alsa_mapping_add_ucm_device()
1490 mdev = get_mixer_device(device, is_sink); in alsa_mapping_add_ucm_device()
1549 bool is_sink) { in ucm_create_mapping_direction() argument
1555 …mapping_name = pa_sprintf_malloc("Mapping %s: %s: %s", verb_name, device_str, is_sink ? "sink" : "… in ucm_create_mapping_direction()
1566 priority = is_sink ? device->playback_priority : device->capture_priority; in ucm_create_mapping_direction()
1567 rate = is_sink ? device->playback_rate : device->capture_rate; in ucm_create_mapping_direction()
1568 channels = is_sink ? device->playback_channels : device->capture_channels; in ucm_create_mapping_direction()
1573 m->ucm_context.direction = is_sink ? PA_DIRECTION_OUTPUT : PA_DIRECTION_INPUT; in ucm_create_mapping_direction()
1577 m->direction = is_sink ? PA_ALSA_DIRECTION_OUTPUT : PA_ALSA_DIRECTION_INPUT; in ucm_create_mapping_direction()
1606 bool is_sink) { in ucm_create_mapping_for_modifier() argument
1611 …mapping_name = pa_sprintf_malloc("Mapping %s: %s: %s", verb_name, device_str, is_sink ? "sink" : "… in ucm_create_mapping_for_modifier()
1626 m->ucm_context.direction = is_sink ? PA_DIRECTION_OUTPUT : PA_DIRECTION_INPUT; in ucm_create_mapping_for_modifier()
1630 m->direction = is_sink ? PA_ALSA_DIRECTION_OUTPUT : PA_ALSA_DIRECTION_INPUT; in ucm_create_mapping_for_modifier()
2365 bool is_sink, in pa_alsa_ucm_add_ports() argument
2374 bool is_sink, in pa_alsa_ucm_add_ports_combination() argument
2380 int pa_alsa_ucm_set_port(pa_alsa_ucm_mapping_context *context, pa_device_port *port, bool is_sink) { in pa_alsa_ucm_set_port() argument