From b51e6135e87221b05acb1e8796d28bec1cf06dff Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Wed, 18 Feb 2009 15:20:08 +0200 Subject: bluetooth: update SBC from upstream --- src/modules/bluetooth/sbc.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/modules/bluetooth/sbc.c') diff --git a/src/modules/bluetooth/sbc.c b/src/modules/bluetooth/sbc.c index 29258d05..a33ed571 100644 --- a/src/modules/bluetooth/sbc.c +++ b/src/modules/bluetooth/sbc.c @@ -985,7 +985,7 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output, char *ptr; int i, ch, framelen, samples; - if (!sbc && !input) + if (!sbc || !input) return -EIO; priv = sbc->priv; @@ -1053,7 +1053,7 @@ int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output, const uint8_t *pcm, int16_t X[2][SBC_X_BUFFER_SIZE], int nsamples, int nchannels); - if (!sbc && !input) + if (!sbc || !input) return -EIO; priv = sbc->priv; @@ -1221,6 +1221,20 @@ uint16_t sbc_get_codesize(sbc_t *sbc) return subbands * blocks * channels * 2; } +const char *sbc_get_implementation_info(sbc_t *sbc) +{ + struct sbc_priv *priv; + + if (!sbc) + return NULL; + + priv = sbc->priv; + if (!priv) + return NULL; + + return priv->enc_state.implementation_info; +} + int sbc_reinit(sbc_t *sbc, unsigned long flags) { struct sbc_priv *priv; -- cgit