diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-16 16:18:35 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-16 16:18:35 +0000 |
commit | 56a227224b72af03e4299db59805b361f89e2a5c (patch) | |
tree | 599909de2ab971b39bfe5b3b4ca44c75bcd40b15 /audio | |
parent | cdd9e2e17ad674e5fc1a5ed19643880ef61d28c7 (diff) |
Remove unused code
Diffstat (limited to 'audio')
-rw-r--r-- | audio/a2dp.c | 87 | ||||
-rw-r--r-- | audio/a2dp.h | 3 |
2 files changed, 0 insertions, 90 deletions
diff --git a/audio/a2dp.c b/audio/a2dp.c index 5302fb2d..ceb06164 100644 --- a/audio/a2dp.c +++ b/audio/a2dp.c @@ -713,93 +713,6 @@ gboolean a2dp_select_capabilities(struct avdtp_remote_sep *rsep, GSList **caps) return TRUE; } -gboolean a2dp_get_config(struct avdtp_stream *stream, - struct ipc_data_cfg **cfg, int *fd) -{ - struct avdtp_service_capability *cap; - struct avdtp_media_codec_capability *codec_cap = NULL; - struct sbc_codec_cap *sbc_cap; - struct ipc_data_cfg *rsp; - struct ipc_codec_sbc *sbc; - GSList *caps; - - rsp = g_malloc0(sizeof(struct ipc_data_cfg) + - sizeof(struct ipc_codec_sbc)); - *fd = -1; - sbc = (void *) rsp->data; - - if (!avdtp_stream_get_transport(stream, fd, &rsp->pkt_len, - &caps)) { - g_free(rsp); - return FALSE; - } - - for (; caps; caps = g_slist_next(caps)) { - cap = caps->data; - if (cap->category == AVDTP_MEDIA_CODEC) { - codec_cap = (void *) cap->data; - break; - } - } - - if (codec_cap == NULL) { - g_free(rsp); - return FALSE; - } - - rsp->fd_opt = CFG_FD_OPT_WRITE; - - *cfg = rsp; - - if (codec_cap->media_codec_type != A2DP_CODEC_SBC) - return TRUE; - - sbc_cap = (struct sbc_codec_cap *) codec_cap; - rsp->channels = sbc_cap->channel_mode == - A2DP_CHANNEL_MODE_MONO ? 1 : 2; - rsp->channel_mode = sbc_cap->channel_mode; - rsp->sample_size = 2; - - switch (sbc_cap->frequency) { - case A2DP_SAMPLING_FREQ_16000: - rsp->rate = 16000; - break; - case A2DP_SAMPLING_FREQ_32000: - rsp->rate = 32000; - break; - case A2DP_SAMPLING_FREQ_44100: - rsp->rate = 44100; - break; - case A2DP_SAMPLING_FREQ_48000: - rsp->rate = 48000; - break; - } - - rsp->codec = CFG_CODEC_SBC; - sbc->allocation = sbc_cap->allocation_method == A2DP_ALLOCATION_SNR ? - 0x01 : 0x00; - sbc->subbands = sbc_cap->subbands == A2DP_SUBBANDS_4 ? 4 : 8; - - switch (sbc_cap->block_length) { - case A2DP_BLOCK_LENGTH_4: - sbc->blocks = 4; - break; - case A2DP_BLOCK_LENGTH_8: - sbc->blocks = 8; - break; - case A2DP_BLOCK_LENGTH_12: - sbc->blocks = 12; - break; - case A2DP_BLOCK_LENGTH_16: - sbc->blocks = 16; - break; - } - - sbc->bitpool = sbc_cap->max_bitpool; - - return TRUE; -} - static void discovery_complete(struct avdtp *session, GSList *seps, int err, void *user_data) { diff --git a/audio/a2dp.h b/audio/a2dp.h index 3617afc4..c69b1e34 100644 --- a/audio/a2dp.h +++ b/audio/a2dp.h @@ -68,9 +68,6 @@ void a2dp_exit(void); gboolean a2dp_select_capabilities(struct avdtp_remote_sep *rsep, GSList **caps); -gboolean a2dp_get_config(struct avdtp_stream *stream, - struct ipc_data_cfg **cfg, int *fd); - int a2dp_source_request_stream(struct avdtp *session, struct device *dev, gboolean start, a2dp_stream_cb_t cb, void *user_data); |