summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-11-05 17:02:16 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2007-11-05 17:02:16 +0000
commit1f1e900f488c2925b8949911b30f363a1fb4dee0 (patch)
tree2e01b9aa0626ff626628fe6eb1353d53d0482899 /audio/unix.c
parent316166212f59f4bc7bad778ff46e8b6986c52874 (diff)
Fix packet lenght to be the output MTU.
Diffstat (limited to 'audio/unix.c')
-rw-r--r--audio/unix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/audio/unix.c b/audio/unix.c
index eb849ddc..71eb570a 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -305,7 +305,7 @@ static void a2dp_setup_complete(struct avdtp *session, struct a2dp_sep *sep,
struct ipc_codec_sbc *sbc = (void *) cfg->data;
struct a2dp_data *a2dp = &client->d.a2dp;
int fd;
- uint16_t mtu;
+ uint16_t imtu, omtu;
GSList *caps;
client->req_id = 0;
@@ -321,13 +321,11 @@ static void a2dp_setup_complete(struct avdtp *session, struct a2dp_sep *sep,
a2dp->sep = sep;
a2dp->stream = stream;
- if (!avdtp_stream_get_transport(stream, &fd, &mtu, &caps)) {
+ if (!avdtp_stream_get_transport(stream, &fd, &imtu, &omtu, &caps)) {
error("Unable to get stream transport");
goto failed;
}
- cfg->pkt_len = mtu;
-
for (codec_cap = NULL; caps; caps = g_slist_next(caps)) {
cap = caps->data;
if (cap->category == AVDTP_MEDIA_CODEC) {
@@ -342,6 +340,8 @@ static void a2dp_setup_complete(struct avdtp *session, struct a2dp_sep *sep,
goto failed;
}
+ /* FIXME: Use imtu when fd_opt is CFG_FD_OPT_READ */
+ cfg->pkt_len = omtu;
cfg->fd_opt = CFG_FD_OPT_WRITE;
sbc_cap = (void *) codec_cap;