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 <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2023-01-02 15:25:59 +01:00 committed by Carles Cufí
commit 7d410c5cad

View file

@ -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;
}
}