summaryrefslogtreecommitdiff
path: root/src/modules/bluetooth/bluez5-util.h
diff options
context:
space:
mode:
authorMarijn Suijten <marijns95@gmail.com>2020-06-07 17:07:20 +0200
committerMarijn Suijten <marijns95@gmail.com>2021-03-16 00:19:45 +0100
commitd84ca030800d0c2d61d57aeedc5be8c377378247 (patch)
treefea05d994fd7301cedba462691e2ca58174fcd78 /src/modules/bluetooth/bluez5-util.h
parentbfb3aeac1cd968954627e3f5a7b3d62a58e9a45e (diff)
downloadpulseaudio-d84ca030800d0c2d61d57aeedc5be8c377378247.tar.gz
bluetooth: Generalize speaker/microphone naming to sink/source
Sink and source naming is more generic when dealing with audio that is directional in the sense that it either goes to or comes from the other device, but not necessarily a microphone or speaker. A concrete example is the swapped meaning when the current device is in the HeadSet profile. The incoming audio can come from any source, not necessarily a microphone. Likewise, audio captured by the microphone of the headset is not necessarily played back by a speaker on the AG, it is merely acting as a sink for the data: further handling is irrelevant to the naming. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/521>
Diffstat (limited to 'src/modules/bluetooth/bluez5-util.h')
-rw-r--r--src/modules/bluetooth/bluez5-util.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h
index d717aa397..f56c4d2a5 100644
--- a/src/modules/bluetooth/bluez5-util.h
+++ b/src/modules/bluetooth/bluez5-util.h
@@ -59,11 +59,11 @@ typedef struct pa_bluetooth_discovery pa_bluetooth_discovery;
typedef struct pa_bluetooth_backend pa_bluetooth_backend;
typedef enum pa_bluetooth_hook {
- PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED, /* Call data: pa_bluetooth_device */
- PA_BLUETOOTH_HOOK_DEVICE_UNLINK, /* Call data: pa_bluetooth_device */
- PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED, /* Call data: pa_bluetooth_transport */
- PA_BLUETOOTH_HOOK_TRANSPORT_MICROPHONE_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
- PA_BLUETOOTH_HOOK_TRANSPORT_SPEAKER_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
+ PA_BLUETOOTH_HOOK_DEVICE_CONNECTION_CHANGED, /* Call data: pa_bluetooth_device */
+ PA_BLUETOOTH_HOOK_DEVICE_UNLINK, /* Call data: pa_bluetooth_device */
+ PA_BLUETOOTH_HOOK_TRANSPORT_STATE_CHANGED, /* Call data: pa_bluetooth_transport */
+ PA_BLUETOOTH_HOOK_TRANSPORT_SOURCE_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
+ PA_BLUETOOTH_HOOK_TRANSPORT_SINK_VOLUME_CHANGED, /* Call data: pa_bluetooth_transport */
PA_BLUETOOTH_HOOK_MAX
} pa_bluetooth_hook_t;
@@ -87,8 +87,7 @@ typedef enum pa_bluetooth_transport_state {
typedef int (*pa_bluetooth_transport_acquire_cb)(pa_bluetooth_transport *t, bool optional, size_t *imtu, size_t *omtu);
typedef void (*pa_bluetooth_transport_release_cb)(pa_bluetooth_transport *t);
typedef void (*pa_bluetooth_transport_destroy_cb)(pa_bluetooth_transport *t);
-typedef pa_volume_t (*pa_bluetooth_transport_set_speaker_volume_cb)(pa_bluetooth_transport *t, pa_volume_t volume);
-typedef pa_volume_t (*pa_bluetooth_transport_set_microphone_volume_cb)(pa_bluetooth_transport *t, pa_volume_t volume);
+typedef pa_volume_t (*pa_bluetooth_transport_set_volume_cb)(pa_bluetooth_transport *t, pa_volume_t volume);
struct pa_bluetooth_transport {
pa_bluetooth_device *device;
@@ -103,16 +102,16 @@ struct pa_bluetooth_transport {
const pa_a2dp_codec *a2dp_codec;
- pa_volume_t microphone_volume;
- pa_volume_t speaker_volume;
+ pa_volume_t source_volume;
+ pa_volume_t sink_volume;
pa_bluetooth_transport_state_t state;
pa_bluetooth_transport_acquire_cb acquire;
pa_bluetooth_transport_release_cb release;
pa_bluetooth_transport_destroy_cb destroy;
- pa_bluetooth_transport_set_speaker_volume_cb set_speaker_volume;
- pa_bluetooth_transport_set_microphone_volume_cb set_microphone_volume;
+ pa_bluetooth_transport_set_volume_cb set_sink_volume;
+ pa_bluetooth_transport_set_volume_cb set_source_volume;
void *userdata;
};