Lines Matching defs:profile

128     pa_bluetooth_profile_t profile;
677 (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK ?
718 (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE ?
806 pa_assert(pa_bluetooth_profile_should_attenuate_volume(u->profile));
939 pa_assert(!pa_bluetooth_profile_should_attenuate_volume(u->profile));
961 if (pa_bluetooth_profile_is_a2dp(u->profile) && !u->transport->device->avrcp_absolute_volume)
976 if (pa_bluetooth_profile_should_attenuate_volume(u->profile)) {
993 pa_assert(u->profile != PA_BLUETOOTH_PROFILE_A2DP_SINK);
1018 data.name = pa_sprintf_malloc("bluez_source.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile));
1020 pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile));
1024 if (u->profile == PA_BLUETOOTH_PROFILE_HSP_HS
1025 || u->profile == PA_BLUETOOTH_PROFILE_HFP_HF)
1031 switch (u->profile) {
1176 pa_assert(!pa_bluetooth_profile_should_attenuate_volume(u->profile));
1198 if (pa_bluetooth_profile_is_a2dp(u->profile) && !u->transport->device->avrcp_absolute_volume)
1211 if (pa_bluetooth_profile_should_attenuate_volume(u->profile)) {
1217 pa_assert(u->profile != PA_BLUETOOTH_PROFILE_A2DP_SOURCE);
1240 if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK)
1257 data.name = pa_sprintf_malloc("bluez_sink.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile));
1259 pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile));
1263 if (u->profile == PA_BLUETOOTH_PROFILE_HSP_HS
1264 || u->profile == PA_BLUETOOTH_PROFILE_HFP_HF)
1270 switch (u->profile) {
1337 if (get_profile_direction(u->profile) & PA_DIRECTION_OUTPUT) {
1344 if (get_profile_direction(u->profile) & PA_DIRECTION_INPUT) {
1365 pa_assert(u->profile != PA_BLUETOOTH_PROFILE_OFF);
1367 /* check if profile has a transport */
1368 t = u->device->transports[u->profile];
1370 pa_log_warn("Profile %s has no transport", pa_bluetooth_profile_to_string(u->profile));
1376 if (u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE || u->profile == PA_BLUETOOTH_PROFILE_HFP_AG || u->profile == PA_BLUETOOTH_PROFILE_HSP_AG)
1393 pa_assert(u->profile != PA_BLUETOOTH_PROFILE_OFF);
1403 if (get_profile_direction (u->profile) & PA_DIRECTION_OUTPUT)
1407 if (get_profile_direction (u->profile) & PA_DIRECTION_INPUT)
1608 if (u->write_index > 0 && (get_profile_direction(u->profile) & PA_DIRECTION_OUTPUT)) {
1657 if ((get_profile_direction(u->profile) & PA_DIRECTION_OUTPUT) && u->write_memchunk.memblock == NULL) {
1736 if (u->profile == PA_BLUETOOTH_PROFILE_HFP_AG || u->profile == PA_BLUETOOTH_PROFILE_HSP_AG)
1752 if (u->profile == PA_BLUETOOTH_PROFILE_HFP_AG || u->profile == PA_BLUETOOTH_PROFILE_HSP_AG || u->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE)
1772 * Note that this works the other way around if the peer is in source profile:
2027 static pa_card_profile *create_card_profile(struct userdata *u, pa_bluetooth_profile_t profile, pa_hashmap *ports) {
2038 name = pa_bluetooth_profile_to_string(profile);
2040 switch (profile) {
2121 *p = profile;
2146 pa_log_warn("Refused to switch profile to %s: Not connected", new_profile->name);
2153 u->profile = *p;
2155 if (u->profile != PA_BLUETOOTH_PROFILE_OFF)
2239 pa_bluetooth_profile_t profile;
2241 if (uuid_to_profile(uuid, &profile) < 0)
2244 pa_log_debug("Trying to create profile %s (%s) for device %s (%s)",
2245 pa_bluetooth_profile_to_string(profile), uuid, d->alias, d->address);
2247 if (pa_hashmap_get(data.profiles, pa_bluetooth_profile_to_string(profile))) {
2248 pa_log_debug("%s already exists", pa_bluetooth_profile_to_string(profile));
2252 if (!pa_bluetooth_device_supports_profile(d, profile)) {
2253 pa_log_debug("%s is not supported by the device or adapter", pa_bluetooth_profile_to_string(profile));
2257 cp = create_card_profile(u, profile, data.ports);
2282 u->profile = *p;
2297 pa_assert_se(cp = pa_hashmap_get(u->card->profiles, pa_bluetooth_profile_to_string(t->profile)));
2302 * make profile unavailable.
2314 acquire = (t->state == PA_BLUETOOTH_TRANSPORT_STATE_PLAYING && u->profile == t->profile);
2315 release = (oldavail != PA_AVAILABLE_NO && t->state != PA_BLUETOOTH_TRANSPORT_STATE_PLAYING && u->profile == t->profile);
2437 if (pa_bluetooth_profile_should_attenuate_volume(t->profile))
2466 if (pa_bluetooth_profile_should_attenuate_volume(t->profile))
2478 static void switch_codec_cb_handler(bool success, pa_bluetooth_profile_t profile, void *userdata)
2485 u->profile = profile;
2488 pa_log_info("Failed to initialise profile after codec switching");
2498 pa_log_info("Codec successfully switched to %s with profile: %s",
2499 u->bt_codec->name, pa_bluetooth_profile_to_string(u->profile));
2520 if (pa_bluetooth_profile_is_a2dp(u->profile)) {
2521 is_a2dp_sink = u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK;
2544 /* find out active codec selection from device profile */
2569 pa_bluetooth_profile_t profile;
2598 if (u->profile == PA_BLUETOOTH_PROFILE_OFF) {
2599 pa_log_info("Bluetooth profile is off. Message cannot be handled.");
2604 if (u->profile != PA_BLUETOOTH_PROFILE_A2DP_SINK &&
2605 u->profile != PA_BLUETOOTH_PROFILE_A2DP_SOURCE) {
2633 is_a2dp_sink = u->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK;
2661 * The current profile needs to be saved before we stop the thread and
2662 * initiate the switch. u->profile will be changed in other places
2665 profile = u->profile;
2669 if (!pa_bluetooth_device_switch_codec(u->device, profile, capabilities_hashmap, endpoint_conf, switch_codec_cb_handler, userdata)
2710 pa_log_debug("Switching the profile to off due to IO thread failure.");
2719 * pending when the profile was switched. If the new transport has been acquired
2721 * already PLAYING. If transport_acquire() failed for the new profile, the transport
2823 if (u->profile != PA_BLUETOOTH_PROFILE_OFF)