Lines Matching defs:profile

195 pa_bluetooth_profile_status_t profile_status_get(pa_bluetooth_discovery *y, pa_bluetooth_profile_t profile) {
196 return y->profiles_status[profile];
199 void profile_status_set(pa_bluetooth_discovery *y, pa_bluetooth_profile_t profile, pa_bluetooth_profile_status_t status) {
200 y->profiles_status[profile] = status;
211 t->profile = p;
257 bool pa_bluetooth_device_supports_profile(const pa_bluetooth_device *device, pa_bluetooth_profile_t profile) {
266 pa_log_debug("Device %s (%s) has no adapter to support profile %s",
267 device->alias, device->address, pa_bluetooth_profile_to_string(profile));
279 switch (profile) {
316 pa_log_debug("Checking if device %s (%s) supports profile %s: %s",
317 device->alias, device->address, pa_bluetooth_profile_to_string(profile), r ? "true" : "false");
322 static bool device_is_profile_connected(pa_bluetooth_device *device, pa_bluetooth_profile_t profile) {
323 if (device->transports[profile] && device->transports[profile]->state != PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED)
330 pa_bluetooth_profile_t profile;
333 for (profile = 0; profile < PA_BLUETOOTH_PROFILE_COUNT; profile++) {
334 if (!pa_bluetooth_device_supports_profile(device, profile))
337 if (!device_is_profile_connected(device, profile))
355 pa_bluetooth_profile_t profile;
363 for (profile = 0; profile < PA_BLUETOOTH_PROFILE_COUNT; profile++) {
364 if (device_is_profile_connected(device, profile))
367 if (!pa_bluetooth_device_supports_profile(device, profile))
375 pa_strbuf_puts(buf, pa_bluetooth_profile_to_string(profile));
395 pa_bluetooth_profile_t profile;
396 void (*cb)(bool, pa_bluetooth_profile_t profile, void *);
418 pa_log_error("Changing codec for device %s with profile %s failed. Device is not connected anymore",
419 data->device_path, pa_bluetooth_profile_to_string(data->profile));
420 data->cb(false, data->profile, data->userdata);
422 pa_log_info("Changing codec for device %s with profile %s succeeded",
423 data->device_path, pa_bluetooth_profile_to_string(data->profile));
424 data->cb(true, data->profile, data->userdata);
426 pa_log_error("Changing codec for device %s with profile %s failed. Error: %s",
427 data->device_path, pa_bluetooth_profile_to_string(data->profile),
440 bool pa_bluetooth_device_switch_codec(pa_bluetooth_device *device, pa_bluetooth_profile_t profile,
442 void (*codec_switch_cb)(bool, pa_bluetooth_profile_t profile, void *), void *userdata) {
463 is_a2dp_sink = profile == PA_BLUETOOTH_PROFILE_A2DP_SINK;
500 data->profile = profile;
533 * have only one profile marked as available in the initial state,
535 * profile properly. */
579 pa_assert(pa_bluetooth_profile_is_a2dp(t->profile));
586 if (t->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE && t->source_volume == volume)
588 else if (t->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK && t->sink_volume == volume)
591 if (t->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE)
593 else if (t->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK)
622 pa_assert(t->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK);
628 pa_assert(t->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE);
643 is_source = t->profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE;
650 } else if (t->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK) {
679 t->device->transports[t->profile] = t;
689 t->device->transports[t->profile] = NULL;
845 pa_assert(pa_bluetooth_profile_is_a2dp(t->profile));
863 if (t->profile == PA_BLUETOOTH_PROFILE_A2DP_SINK)
2368 const char *pa_bluetooth_profile_to_string(pa_bluetooth_profile_t profile) {
2369 switch(profile) {
2392 * `peer_profile` is the profile of the peer.
2416 bool pa_bluetooth_profile_is_a2dp(pa_bluetooth_profile_t profile) {
2417 return profile == PA_BLUETOOTH_PROFILE_A2DP_SINK || profile == PA_BLUETOOTH_PROFILE_A2DP_SOURCE;
2546 pa_log_error("Cannot configure transport %s because profile %s is already used", path, pa_bluetooth_profile_to_string(p));
2569 pa_log_debug("Transport %s available for profile %s", t->path, pa_bluetooth_profile_to_string(t->profile));
2637 pa_log_debug("Clearing transport %s profile %s", t->path, pa_bluetooth_profile_to_string(t->profile));