From b44fdf5ebb87904f891a015f497a8489474d0fc3 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 20 Jun 2021 19:28:27 +0300 Subject: [PATCH] bluez5: backend-native: don't send +BCS if no codec negotiation Fix issue with sending +BCS for CVSD even though codec negotation is not available for the RFCOMM. --- spa/plugins/bluez5/backend-native.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index eca88e419..9ef0b3ada 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -1374,6 +1374,9 @@ static int backend_native_ensure_codec(void *data, struct spa_bt_device *device, if (rfcomm == NULL) return -ENOTSUP; + if (!rfcomm->codec_negotiation_supported) + return -ENOTSUP; + if (rfcomm->codec == codec) { spa_bt_device_emit_codec_switched(device, 0); return 0;