From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [RFC] bluetooth: Fix using 8 kbs for tx/rx bandwidth in SCO/eSCO connections
Date: Wed, 5 Jun 2013 09:33:50 +0700 [thread overview]
Message-ID: <1370399630-2368-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The expected sample rate is 8 khz but each sample is at least 8 bits so
the minimal bandwidth should be at least 64 kbps.
The suggested fix is to use don't care value (0xfffffffff) which should
let the controller do the estimation and is aligned with max latency
which normally is set to don't care too.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
This is currently based on [PATCH v7 0/8] sco: SCO socket option for
voice_setting therefore it probably doesn't apply on bluetooth-next
net/bluetooth/hci_conn.c | 4 ++--
net/bluetooth/hci_event.c | 4 ++--
net/bluetooth/sco.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index f4aa8b2..609a72d 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -206,8 +206,8 @@ void hci_setup_sync(struct hci_conn *conn, __u16 handle)
cp.handle = cpu_to_le16(handle);
- cp.tx_bandwidth = __constant_cpu_to_le32(0x00001f40);
- cp.rx_bandwidth = __constant_cpu_to_le32(0x00001f40);
+ cp.tx_bandwidth = __constant_cpu_to_le32(0xffffffff);
+ cp.rx_bandwidth = __constant_cpu_to_le32(0xffffffff);
switch (hci_sco_airmode(conn->setting)) {
case SCO_AIRMODE_TRANSP:
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 6659af8..f206dd8 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1753,8 +1753,8 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
bacpy(&cp.bdaddr, &ev->bdaddr);
cp.pkt_type = cpu_to_le16(conn->pkt_type);
- cp.tx_bandwidth = __constant_cpu_to_le32(0x00001f40);
- cp.rx_bandwidth = __constant_cpu_to_le32(0x00001f40);
+ cp.tx_bandwidth = __constant_cpu_to_le32(0xffffffff);
+ cp.rx_bandwidth = __constant_cpu_to_le32(0xffffffff);
cp.max_latency = __constant_cpu_to_le16(0xffff);
cp.content_format = cpu_to_le16(hdev->voice_setting);
cp.retrans_effort = 0xff;
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 3b353ee..f880a91 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -674,8 +674,8 @@ static void sco_conn_defer_accept(struct hci_conn *conn, int setting)
bacpy(&cp.bdaddr, &conn->dst);
cp.pkt_type = cpu_to_le16(conn->pkt_type);
- cp.tx_bandwidth = __constant_cpu_to_le32(0x00001f40);
- cp.rx_bandwidth = __constant_cpu_to_le32(0x00001f40);
+ cp.tx_bandwidth = __constant_cpu_to_le32(0xffffffff);
+ cp.rx_bandwidth = __constant_cpu_to_le32(0xffffffff);
switch (hci_sco_airmode(setting)) {
case SCO_AIRMODE_TRANSP:
--
1.8.1.4
reply other threads:[~2013-06-05 2:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1370399630-2368-1-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;
as well as URLs for NNTP newsgroup(s).