mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: add modarg to allow disabling mSBC codec
Add module-bluetooth-discover argument enable_msbc, default is true (enabled) Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/507>
This commit is contained in:
parent
310e2877a0
commit
6a92940796
5 changed files with 25 additions and 6 deletions
|
|
@ -118,6 +118,7 @@ struct pa_bluetooth_discovery {
|
|||
pa_bluetooth_backend *ofono_backend, *native_backend;
|
||||
PA_LLIST_HEAD(pa_dbus_pending, pending);
|
||||
bool enable_native_hfp_hf;
|
||||
bool enable_msbc;
|
||||
};
|
||||
|
||||
static pa_dbus_pending* send_and_add_to_pending(pa_bluetooth_discovery *y, DBusMessage *m,
|
||||
|
|
@ -815,6 +816,14 @@ bool pa_bluetooth_discovery_get_enable_native_hfp_hf(pa_bluetooth_discovery *y)
|
|||
return y->enable_native_hfp_hf;
|
||||
}
|
||||
|
||||
bool pa_bluetooth_discovery_get_enable_msbc(pa_bluetooth_discovery *y)
|
||||
{
|
||||
pa_assert(y);
|
||||
pa_assert(PA_REFCNT_VALUE(y) > 0);
|
||||
|
||||
return y->enable_msbc;
|
||||
}
|
||||
|
||||
pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_address(pa_bluetooth_discovery *y, const char *remote, const char *local) {
|
||||
pa_bluetooth_device *d;
|
||||
void *state = NULL;
|
||||
|
|
@ -2268,7 +2277,7 @@ static void object_manager_done(pa_bluetooth_discovery *y) {
|
|||
A2DP_OBJECT_MANAGER_PATH);
|
||||
}
|
||||
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c, int headset_backend, bool enable_native_hfp_hf) {
|
||||
pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c, int headset_backend, bool enable_native_hfp_hf, bool enable_msbc) {
|
||||
pa_bluetooth_discovery *y;
|
||||
DBusError err;
|
||||
DBusConnection *conn;
|
||||
|
|
@ -2282,6 +2291,7 @@ pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *c, int headset_backe
|
|||
y->core = c;
|
||||
y->headset_backend = headset_backend;
|
||||
y->enable_native_hfp_hf = enable_native_hfp_hf;
|
||||
y->enable_msbc = enable_msbc;
|
||||
y->adapters = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL,
|
||||
(pa_free_cb_t) adapter_free);
|
||||
y->devices = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue