Bluetooth: Audio: Update audio location definitions

The meaning of bit0 in the audio location bitmap will change to
mono audio, so we update the audio location macro and releated
test cases.

Refer to BT SIG ES-22266.

Signed-off-by: Bi Jian <bi_jian@qq.com>
This commit is contained in:
Bi Jian 2023-09-29 11:11:34 +08:00 committed by Anas Nashif
commit 06fa287d45
7 changed files with 36 additions and 57 deletions

View file

@ -405,7 +405,7 @@ static ssize_t snk_loc_write(struct bt_conn *conn,
}
location = (enum bt_audio_location)sys_get_le32(data);
if (location > BT_AUDIO_LOCATION_MASK || location == 0) {
if (location > BT_AUDIO_LOCATION_MASK) {
LOG_DBG("Invalid location value: 0x%08X", location);
return BT_GATT_ERR(BT_ATT_ERR_WRITE_REQ_REJECTED);
}
@ -510,7 +510,7 @@ static ssize_t src_loc_write(struct bt_conn *conn,
}
location = (enum bt_audio_location)sys_get_le32(data);
if (location > BT_AUDIO_LOCATION_MASK || location == 0) {
if (location > BT_AUDIO_LOCATION_MASK) {
LOG_DBG("Invalid location value: 0x%08X", location);
return BT_GATT_ERR(BT_ATT_ERR_WRITE_REQ_REJECTED);
}