]> code.delx.au - pulseaudio/commitdiff
bluetooth: Run 'make update-sbc'
authorColin Guthrie <cguthrie@mandriva.org>
Sun, 20 Mar 2011 11:44:53 +0000 (11:44 +0000)
committerColin Guthrie <cguthrie@mandriva.org>
Sun, 20 Mar 2011 12:49:49 +0000 (12:49 +0000)
Note that changes to ipc.h from 8f3ef04b had to be manually reapplied.

13 files changed:
src/modules/bluetooth/ipc.c
src/modules/bluetooth/ipc.h
src/modules/bluetooth/rtp.h
src/modules/bluetooth/sbc/sbc.c
src/modules/bluetooth/sbc/sbc.h
src/modules/bluetooth/sbc/sbc_math.h
src/modules/bluetooth/sbc/sbc_primitives.c
src/modules/bluetooth/sbc/sbc_primitives.h
src/modules/bluetooth/sbc/sbc_primitives_mmx.c
src/modules/bluetooth/sbc/sbc_primitives_mmx.h
src/modules/bluetooth/sbc/sbc_primitives_neon.c
src/modules/bluetooth/sbc/sbc_primitives_neon.h
src/modules/bluetooth/sbc/sbc_tables.h

index dcecad8aee287967a1cbc9ee21d2ad183f9b80d9..1bdad784005b76dafc10482eebd30972492e65c2 100644 (file)
@@ -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;
index 9537886bee5709b031b68a055150ef0d64f82c5e..4547168bb0a49256d51dbfaee95a098740feeea0 100644 (file)
@@ -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 */
index 1457362841620277c3fe3414e1cb83038051e2f0..45fddcf150977a9d0c3edc5e916c29e6ea192d01 100644 (file)
@@ -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
index 98b236bdb7accd576612375268f2e1abf05c1089..77fcc5d11952aa099791c2286b2e47e88d8d91c3 100644 (file)
@@ -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;
 
index c9c56d386438accbd39cd5f65de203277684c36d..2f830ad5f435eec7e1f935a9e6f4695d595715b8 100644 (file)
@@ -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);
 
index b87bc81cb6b82a6281506b4390aa93b34a237c9d..9f126c625094b24c89a7526caa791b17ed98d726 100644 (file)
@@ -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>
  *
index 3a76a7a0f14959ed611fd6cd64b48e0ddd0097ab..ad780d0800de70a65f88064a35d43b1faef93fd3 100644 (file)
@@ -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>
  *
index b4b9df2fbdd6ea7193dfced1ed23d786c3368aa6..3fec8d5b5209c5abbace2e561d5b1e9dbf07c4c1 100644 (file)
@@ -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>
  *
index ab89d074bc59716818926d58e895b58415ae3c08..7f2fbc37616946cf8d3db5134f1c1f17b1461cb2 100644 (file)
@@ -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>
  *
index c1e44a5dbd8f30b1d0c4f76928eacc101ccbad10..e0e728bc260725452fcebf99935d0700ba9a2443 100644 (file)
@@ -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>
  *
index c233d3c667d1ff9804b5516d8684b313e50dbca3..0572158de9ab8b7ff5331bc400da933515725c01 100644 (file)
@@ -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>
  *
index 30766ed88bf7b93343b761ba285835bc1369f041..ea3da06a544f29cb8d3a9ffa5b09238268db0838 100644 (file)
@@ -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>
  *
index 0057c73f7be1efb2004d7f391558f8fe5ed98fc4..28c0d54bc10b5eb829d8c0591db5d75965507337 100644 (file)
@@ -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>
  *