shared/bap: Fixing Company ID and Vendor ID endianess
authorAbhay Maheta <abhay.maheshbhai.maheta@intel.com>
Fri, 13 Jan 2023 05:06:05 +0000 (10:36 +0530)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 10:11:34 +0000 (15:41 +0530)
This fixes Company ID and Vendor Codec ID which are supposed to be
little endian.

src/shared/bap.c

index 8869798..db7def7 100644 (file)
@@ -344,8 +344,8 @@ static void pac_foreach(void *data, void *user_data)
 
        p = util_iov_push(iov, sizeof(*p));
        p->codec.id = pac->codec.id;
-       p->codec.cid = pac->codec.cid;
-       p->codec.vid = pac->codec.vid;
+       p->codec.cid = cpu_to_le16(pac->codec.cid);
+       p->codec.vid = cpu_to_le16(pac->codec.vid);
 
        if (pac->data) {
                p->cc_len = pac->data->iov_len;