Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v2 2/4] android/AVDTP: Make stream channel priority 5
Date: Mon, 27 Jan 2014 22:16:58 -0800	[thread overview]
Message-ID: <1390889820-24709-2-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1390889820-24709-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes channel priority 5 so it has higher priority than regular
traffic but less than signalling channel.
---
 android/avdtp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/android/avdtp.c b/android/avdtp.c
index 4cfffc8..23fe519 100644
--- a/android/avdtp.c
+++ b/android/avdtp.c
@@ -2833,10 +2833,19 @@ gboolean avdtp_stream_set_transport(struct avdtp_stream *stream, int fd,
 						size_t imtu, size_t omtu)
 {
 	GIOChannel *io;
+	int priority;
 
 	if (stream != stream->session->pending_open)
 		return FALSE;
 
+	priority = 5;
+	if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &priority,
+						sizeof(priority)) < 0) {
+		error("setsockopt(SO_PRIORITY): %s (%d)", strerror(errno),
+									errno);
+		return FALSE;
+	}
+
 	io = g_io_channel_unix_new(fd);
 
 	handle_transport_connect(stream->session, io, imtu, omtu);
-- 
1.8.4.2


  reply	other threads:[~2014-01-28  6:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28  6:16 [PATCH BlueZ v2 1/4] android/AVDTP: Make signalling channel priority 6 Luiz Augusto von Dentz
2014-01-28  6:16 ` Luiz Augusto von Dentz [this message]
2014-01-28  6:16 ` [PATCH BlueZ v2 3/4] android/hal-audio: Fix not handling EINTR errors Luiz Augusto von Dentz
2014-01-28  6:17 ` [PATCH BlueZ v2 4/4] android/hal-audio: Set stream fd to blocking Luiz Augusto von Dentz
2014-01-28 12:05 ` [PATCH BlueZ v2 1/4] android/AVDTP: Make signalling channel priority 6 Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390889820-24709-2-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox