summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <cguthrie@mandriva.org>2011-03-20 11:44:53 +0000
committerColin Guthrie <cguthrie@mandriva.org>2011-03-20 12:49:49 +0000
commitb676f89d8579c7ec1629892342a330f1e4c35657 (patch)
tree7e37747a29bbf12c48b47cd183869871e27137a5
parent1674e1ca535910af9ba46d897e7d496f42162337 (diff)
bluetooth: Run 'make update-sbc'
Note that changes to ipc.h from 8f3ef04b had to be manually reapplied.
-rw-r--r--src/modules/bluetooth/ipc.c8
-rw-r--r--src/modules/bluetooth/ipc.h13
-rw-r--r--src/modules/bluetooth/rtp.h2
-rw-r--r--src/modules/bluetooth/sbc/sbc.c26
-rw-r--r--src/modules/bluetooth/sbc/sbc.h4
-rw-r--r--src/modules/bluetooth/sbc/sbc_math.h3
-rw-r--r--src/modules/bluetooth/sbc/sbc_primitives.c3
-rw-r--r--src/modules/bluetooth/sbc/sbc_primitives.h3
-rw-r--r--src/modules/bluetooth/sbc/sbc_primitives_mmx.c3
-rw-r--r--src/modules/bluetooth/sbc/sbc_primitives_mmx.h3
-rw-r--r--src/modules/bluetooth/sbc/sbc_primitives_neon.c3
-rw-r--r--src/modules/bluetooth/sbc/sbc_primitives_neon.h3
-rw-r--r--src/modules/bluetooth/sbc/sbc_tables.h3
13 files changed, 52 insertions, 25 deletions
diff --git a/src/modules/bluetooth/ipc.c b/src/modules/bluetooth/ipc.c
index dcecad8a..1bdad784 100644
--- a/src/modules/bluetooth/ipc.c
+++ b/src/modules/bluetooth/ipc.c
@@ -2,7 +2,7 @@
*
* BlueZ - Bluetooth protocol stack for Linux
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -106,8 +106,10 @@ int bt_audio_service_get_data_fd(int sk)
for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;
cmsg = CMSG_NXTHDR(&msgh, cmsg)) {
if (cmsg->cmsg_level == SOL_SOCKET
- && cmsg->cmsg_type == SCM_RIGHTS)
- return (*(int *) CMSG_DATA(cmsg));
+ && cmsg->cmsg_type == SCM_RIGHTS) {
+ memcpy(&ret, CMSG_DATA(cmsg), sizeof(int));
+ return ret;
+ }
}
errno = EINVAL;
diff --git a/src/modules/bluetooth/ipc.h b/src/modules/bluetooth/ipc.h
index 9537886b..4547168b 100644
--- a/src/modules/bluetooth/ipc.h
+++ b/src/modules/bluetooth/ipc.h
@@ -2,7 +2,7 @@
*
* BlueZ - Bluetooth protocol stack for Linux
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -101,6 +101,7 @@ typedef struct {
#define BT_STOP_STREAM 5
#define BT_CLOSE 6
#define BT_CONTROL 7
+#define BT_DELAY_REPORT 8
#define BT_CAPABILITIES_TRANSPORT_A2DP 0
#define BT_CAPABILITIES_TRANSPORT_SCO 1
@@ -352,6 +353,16 @@ struct bt_control_ind {
uint8_t key; /* Control Key */
} __attribute__ ((packed));
+struct bt_delay_report_req {
+ bt_audio_msg_header_t h;
+ uint16_t delay;
+} __attribute__ ((packed));
+
+struct bt_delay_report_ind {
+ bt_audio_msg_header_t h;
+ uint16_t delay;
+} __attribute__ ((packed));
+
/* Function declaration */
/* Opens a connection to the audio service: return a socket descriptor */
diff --git a/src/modules/bluetooth/rtp.h b/src/modules/bluetooth/rtp.h
index 14573628..45fddcf1 100644
--- a/src/modules/bluetooth/rtp.h
+++ b/src/modules/bluetooth/rtp.h
@@ -2,7 +2,7 @@
*
* BlueZ - Bluetooth protocol stack for Linux
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
*
*
* This library is free software; you can redistribute it and/or
diff --git a/src/modules/bluetooth/sbc/sbc.c b/src/modules/bluetooth/sbc/sbc.c
index 98b236bd..77fcc5d1 100644
--- a/src/modules/bluetooth/sbc/sbc.c
+++ b/src/modules/bluetooth/sbc/sbc.c
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2008 Brad Midgley <bmidgley@xmission.com>
*
@@ -373,7 +374,7 @@ static void sbc_calculate_bits(const struct sbc_frame *frame, int (*bits)[8])
* -4 Bitpool value out of bounds
*/
static int sbc_unpack_frame(const uint8_t *data, struct sbc_frame *frame,
- size_t len)
+ size_t len)
{
unsigned int consumed;
/* Will copy the parts of the header that are relevant to crc
@@ -535,7 +536,7 @@ static int sbc_unpack_frame(const uint8_t *data, struct sbc_frame *frame,
}
static void sbc_decoder_init(struct sbc_decoder_state *state,
- const struct sbc_frame *frame)
+ const struct sbc_frame *frame)
{
int i, ch;
@@ -646,7 +647,7 @@ static inline void sbc_synthesize_eight(struct sbc_decoder_state *state,
}
static int sbc_synthesize_audio(struct sbc_decoder_state *state,
- struct sbc_frame *frame)
+ struct sbc_frame *frame)
{
int ch, blk;
@@ -671,7 +672,7 @@ static int sbc_synthesize_audio(struct sbc_decoder_state *state,
}
static int sbc_analyze_audio(struct sbc_encoder_state *state,
- struct sbc_frame *frame)
+ struct sbc_frame *frame)
{
int ch, blk;
int16_t *x;
@@ -755,9 +756,10 @@ static int sbc_analyze_audio(struct sbc_encoder_state *state,
* -99 not implemented
*/
-static SBC_ALWAYS_INLINE ssize_t sbc_pack_frame_internal(
- uint8_t *data, struct sbc_frame *frame, size_t len,
- int frame_subbands, int frame_channels, int joint)
+static SBC_ALWAYS_INLINE ssize_t sbc_pack_frame_internal(uint8_t *data,
+ struct sbc_frame *frame, size_t len,
+ int frame_subbands, int frame_channels,
+ int joint)
{
/* Bitstream writer starts from the fourth byte */
uint8_t *data_ptr = data + 4;
@@ -892,7 +894,7 @@ static ssize_t sbc_pack_frame(uint8_t *data, struct sbc_frame *frame, size_t len
}
static void sbc_encoder_init(struct sbc_encoder_state *state,
- const struct sbc_frame *frame)
+ const struct sbc_frame *frame)
{
memset(&state->X, 0, sizeof(state->X));
state->position = (SBC_X_BUFFER_SIZE - frame->subbands * 9) & ~7;
@@ -976,8 +978,10 @@ ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,
priv->frame.codesize = sbc_get_codesize(sbc);
priv->frame.length = framelen;
- } else if (priv->frame.bitpool != sbc->bitpool)
+ } else if (priv->frame.bitpool != sbc->bitpool) {
+ priv->frame.length = framelen;
sbc->bitpool = priv->frame.bitpool;
+ }
if (!output)
return framelen;
@@ -1117,7 +1121,7 @@ void sbc_finish(sbc_t *sbc)
size_t sbc_get_frame_length(sbc_t *sbc)
{
- size_t ret;
+ int ret;
uint8_t subbands, channels, blocks, joint, bitpool;
struct sbc_priv *priv;
diff --git a/src/modules/bluetooth/sbc/sbc.h b/src/modules/bluetooth/sbc/sbc.h
index c9c56d38..2f830ad5 100644
--- a/src/modules/bluetooth/sbc/sbc.h
+++ b/src/modules/bluetooth/sbc/sbc.h
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*
@@ -85,6 +86,7 @@ int sbc_reinit(sbc_t *sbc, unsigned long flags);
ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len);
+/* Decodes ONE input block into ONE output block */
ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,
void *output, size_t output_len, size_t *written);
diff --git a/src/modules/bluetooth/sbc/sbc_math.h b/src/modules/bluetooth/sbc/sbc_math.h
index b87bc81c..9f126c62 100644
--- a/src/modules/bluetooth/sbc/sbc_math.h
+++ b/src/modules/bluetooth/sbc/sbc_math.h
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2008 Brad Midgley <bmidgley@xmission.com>
*
diff --git a/src/modules/bluetooth/sbc/sbc_primitives.c b/src/modules/bluetooth/sbc/sbc_primitives.c
index 3a76a7a0..ad780d08 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives.c
+++ b/src/modules/bluetooth/sbc/sbc_primitives.c
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*
diff --git a/src/modules/bluetooth/sbc/sbc_primitives.h b/src/modules/bluetooth/sbc/sbc_primitives.h
index b4b9df2f..3fec8d5b 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives.h
+++ b/src/modules/bluetooth/sbc/sbc_primitives.h
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_mmx.c b/src/modules/bluetooth/sbc/sbc_primitives_mmx.c
index ab89d074..7f2fbc37 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_mmx.c
+++ b/src/modules/bluetooth/sbc/sbc_primitives_mmx.c
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_mmx.h b/src/modules/bluetooth/sbc/sbc_primitives_mmx.h
index c1e44a5d..e0e728bc 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_mmx.h
+++ b/src/modules/bluetooth/sbc/sbc_primitives_mmx.h
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_neon.c b/src/modules/bluetooth/sbc/sbc_primitives_neon.c
index c233d3c6..0572158d 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_neon.c
+++ b/src/modules/bluetooth/sbc/sbc_primitives_neon.c
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*
diff --git a/src/modules/bluetooth/sbc/sbc_primitives_neon.h b/src/modules/bluetooth/sbc/sbc_primitives_neon.h
index 30766ed8..ea3da06a 100644
--- a/src/modules/bluetooth/sbc/sbc_primitives_neon.h
+++ b/src/modules/bluetooth/sbc/sbc_primitives_neon.h
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*
diff --git a/src/modules/bluetooth/sbc/sbc_tables.h b/src/modules/bluetooth/sbc/sbc_tables.h
index 0057c73f..28c0d54b 100644
--- a/src/modules/bluetooth/sbc/sbc_tables.h
+++ b/src/modules/bluetooth/sbc/sbc_tables.h
@@ -2,7 +2,8 @@
*
* Bluetooth low-complexity, subband codec (SBC) library
*
- * Copyright (C) 2004-2009 Marcel Holtmann <marcel@holtmann.org>
+ * Copyright (C) 2008-2010 Nokia Corporation
+ * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
* Copyright (C) 2004-2005 Henryk Ploetz <henryk@ploetzli.ch>
* Copyright (C) 2005-2006 Brad Midgley <bmidgley@xmission.com>
*