summaryrefslogtreecommitdiffstats
path: root/audio/a2dp.h
diff options
context:
space:
mode:
Diffstat (limited to 'audio/a2dp.h')
-rw-r--r--audio/a2dp.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/audio/a2dp.h b/audio/a2dp.h
index 6a966302..e0d1c2f6 100644
--- a/audio/a2dp.h
+++ b/audio/a2dp.h
@@ -47,6 +47,8 @@
#define A2DP_ALLOCATION_SNR (1 << 1)
#define A2DP_ALLOCATION_LOUDNESS 1
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
struct sbc_codec_cap {
struct avdtp_media_codec_capability cap;
uint8_t channel_mode:4;
@@ -58,6 +60,23 @@ struct sbc_codec_cap {
uint8_t max_bitpool;
} __attribute__ ((packed));
+#elif __BYTE_ORDER == __BIG_ENDIAN
+
+struct sbc_codec_cap {
+ struct avdtp_media_codec_capability cap;
+ uint8_t frequency:4;
+ uint8_t channel_mode:4;
+ uint8_t block_length:4;
+ uint8_t subbands:2;
+ uint8_t allocation_method:2;
+ uint8_t min_bitpool;
+ uint8_t max_bitpool;
+} __attribute__ ((packed));
+
+#else
+#error "Unknown byte order"
+#endif
+
struct a2dp_sep;
typedef void (*a2dp_stream_cb_t) (struct avdtp *session, struct a2dp_sep *sep,