[PATCH BlueZ] shared/bap: Fix parsing of vendor specific codecs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

While parsing vendor specific codecs cid and vid fields need to be
converted using le16_to_cpu.
---
 src/shared/bap.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 270f0fd645a2..55f61d91a3aa 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2953,6 +2953,11 @@ static void bap_parse_pacs(struct bt_bap *bap, uint8_t type,
 			return;
 		}
 
+		if (p->codec.id == 0xff) {
+			p->codec.cid = le16_to_cpu(p->codec.cid);
+			p->codec.vid = le16_to_cpu(p->codec.vid);
+		}
+
 		pac = NULL;
 
 		if (!bap_print_cc(iov.iov_base, p->cc_len, bap->debug_func,
-- 
2.40.1




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux