public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* SBC big endian issues?
@ 2009-01-05  8:15 Siarhei Siamashka
  2009-01-05 15:36 ` Brad Midgley
  0 siblings, 1 reply; 19+ messages in thread
From: Siarhei Siamashka @ 2009-01-05  8:15 UTC (permalink / raw)
  To: linux-bluetooth

Hello all,

SBC encoder contains the following fragment:

> #if __BYTE_ORDER == __LITTLE_ENDIAN
> 			if (sbc->endian == SBC_BE)
> #elif __BYTE_ORDER == __BIG_ENDIAN
> 			if (sbc->endian == SBC_LE)
> #else
> #error "Unknown byte order"
> #endif
> 				s = (ptr[0] & 0xff) << 8 | (ptr[1] & 0xff);
> 			else
> 				s = (ptr[0] & 0xff) | (ptr[1] & 0xff) << 8;

This does not look right. Because as far as I can see, it will work
differently on big and little endian systems (though I did not test it
on real hardware). Is anybody using SBC on big endian systems?
Does it actually work as expected?

Best regards,
Siarhei Siamashka

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-01-22  5:05 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-05  8:15 SBC big endian issues? Siarhei Siamashka
2009-01-05 15:36 ` Brad Midgley
2009-01-05 15:55   ` Siarhei Siamashka
2009-01-05 16:25     ` Brad Midgley
2009-01-05 16:29       ` Brad Midgley
2009-01-05 18:19       ` Siarhei Siamashka
2009-01-05 19:26         ` Brad Midgley
2009-01-07 12:40           ` Siarhei Siamashka
2009-01-07 13:43             ` Marcel Holtmann
2009-01-16 17:23               ` Siarhei Siamashka
2009-01-16 22:02                 ` Luiz Augusto von Dentz
2009-01-17 18:10                   ` Siarhei Siamashka
2009-01-19 11:26                     ` Siarhei Siamashka
2009-01-19 12:05                       ` Marcel Holtmann
2009-01-20  6:22                         ` [Patch] SAP client plugin framework Liu, Raymond
2009-01-22  5:05                           ` Liu, Raymond
2009-01-19 15:02                       ` SBC big endian issues? Brad Midgley
2009-01-20 10:20                         ` Siarhei Siamashka
2009-01-20 11:13             ` Siarhei Siamashka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox