From f142c0a5b0286bd8975bb67e57e0f06138e05b17 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 28 Jan 2024 15:33:27 +0200 Subject: [PATCH] bluez5: ensure transport->codec is set also for HSP --- spa/plugins/bluez5/backend-native.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index daf97963f..66fcf53e0 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -223,6 +223,7 @@ static struct spa_bt_transport *_transport_create(struct rfcomm *rfcomm) t->backend = &backend->this; t->n_channels = 1; t->channels[0] = SPA_AUDIO_CHANNEL_MONO; + t->codec = HFP_AUDIO_CODEC_CVSD; td = t->user_data; td->rfcomm = rfcomm; @@ -2299,6 +2300,7 @@ static DBusHandlerResult profile_new_connection(DBusConnection *conn, DBusMessag spa_log_warn(backend->log, "can't create transport: %m"); goto fail_need_memory; } + t->codec = HFP_AUDIO_CODEC_CVSD; rfcomm->transport = t; rfcomm->has_volume = rfcomm_volume_enabled(rfcomm);