From 7d410c5cad82ce089b0e8eab4d2f77b37891ca30 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Mon, 2 Jan 2023 15:25:59 +0100 Subject: [PATCH] Bluetooth: Audio: Fix issue with creating unidirectional CIS As the unicast client, we would always create bidirectional CIS to ensure that the PHY parameter is correctly set. We can, however, just set the (required) PHY value and leave the SDU and RTN values as 0, to avoid creating bidirectional CIS. Signed-off-by: Emil Gydesen --- subsys/bluetooth/audio/stream.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/subsys/bluetooth/audio/stream.c b/subsys/bluetooth/audio/stream.c index 92aba6d3fab..2669ba41953 100644 --- a/subsys/bluetooth/audio/stream.c +++ b/subsys/bluetooth/audio/stream.c @@ -851,15 +851,11 @@ static void unicast_client_codec_qos_to_iso_qos(struct bt_audio_iso *iso, bt_audio_codec_qos_to_iso_qos(io_qos, qos); - /* If the opposing ASE of the CIS is not yet configured, we - * assume that it will use the same QoS value. - * - * This allows us to actually create the CIG and only start the - * CIS in one direction, and then later connect the CIS (assuming that - * the QoS values are equal) - */ if (other_io_qos != NULL) { - bt_audio_codec_qos_to_iso_qos(other_io_qos, qos); + /* If the opposing ASE of the CIS is not yet configured, we + * still need to set the PHY value when creating the CIG. + */ + other_io_qos->phy = io_qos->phy; } }