* [PATCH] Bluetooth: Check for SCO type before setting retr. effort
@ 2010-09-17 11:46 Emeltchenko Andrei
2010-09-17 12:04 ` Ville Tervo
2010-10-13 12:04 ` Gustavo F. Padovan
0 siblings, 2 replies; 3+ messages in thread
From: Emeltchenko Andrei @ 2010-09-17 11:46 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Check eSCO / SCO type before setting retransmission effort flag
in Setup SCO command. We found that 0x01 is better for power
consupmtion but we cannot use it always since controller tries
to setup eSCO even for old devices.
Might be controller-specific.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
---
net/bluetooth/hci_conn.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 0b1e460..145993f 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -150,7 +150,13 @@ void hci_setup_sync(struct hci_conn *conn, __u16 handle)
cp.rx_bandwidth = cpu_to_le32(0x00001f40);
cp.max_latency = cpu_to_le16(0xffff);
cp.voice_setting = cpu_to_le16(hdev->voice_setting);
- cp.retrans_effort = 0xff;
+
+ /* If remote device supports eSCO use optimization for power
+ retransmission effort, otherwise use standard flag do-not-care */
+ if (conn->link->features[3] & LMP_ESCO)
+ cp.retrans_effort = 0x01;
+ else
+ cp.retrans_effort = 0xff;
hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp);
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Check for SCO type before setting retr. effort
2010-09-17 11:46 [PATCH] Bluetooth: Check for SCO type before setting retr. effort Emeltchenko Andrei
@ 2010-09-17 12:04 ` Ville Tervo
2010-10-13 12:04 ` Gustavo F. Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Ville Tervo @ 2010-09-17 12:04 UTC (permalink / raw)
To: ext Emeltchenko Andrei; +Cc: linux-bluetooth@vger.kernel.org
On Fri, Sep 17, 2010 at 01:46:58PM +0200, ext Emeltchenko Andrei wrote:
> From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
>
> Check eSCO / SCO type before setting retransmission effort flag
> in Setup SCO command. We found that 0x01 is better for power
> consupmtion but we cannot use it always since controller tries
> to setup eSCO even for old devices.
>
> Might be controller-specific.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Revieved-by: Ville Tervo <ville.tervo@nokia.com>
> ---
> net/bluetooth/hci_conn.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index 0b1e460..145993f 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -150,7 +150,13 @@ void hci_setup_sync(struct hci_conn *conn, __u16 handle)
> cp.rx_bandwidth = cpu_to_le32(0x00001f40);
> cp.max_latency = cpu_to_le16(0xffff);
> cp.voice_setting = cpu_to_le16(hdev->voice_setting);
> - cp.retrans_effort = 0xff;
> +
> + /* If remote device supports eSCO use optimization for power
> + retransmission effort, otherwise use standard flag do-not-care */
> + if (conn->link->features[3] & LMP_ESCO)
> + cp.retrans_effort = 0x01;
> + else
> + cp.retrans_effort = 0xff;
>
> hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp);
> }
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Check for SCO type before setting retr. effort
2010-09-17 11:46 [PATCH] Bluetooth: Check for SCO type before setting retr. effort Emeltchenko Andrei
2010-09-17 12:04 ` Ville Tervo
@ 2010-10-13 12:04 ` Gustavo F. Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Gustavo F. Padovan @ 2010-10-13 12:04 UTC (permalink / raw)
To: Emeltchenko Andrei; +Cc: linux-bluetooth
Hi Andrei,
* Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com> [2010-09-17 14:46:58 +0300]:
> From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
>
> Check eSCO / SCO type before setting retransmission effort flag
> in Setup SCO command. We found that 0x01 is better for power
> consupmtion but we cannot use it always since controller tries
> to setup eSCO even for old devices.
>
> Might be controller-specific.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> ---
> net/bluetooth/hci_conn.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index 0b1e460..145993f 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -150,7 +150,13 @@ void hci_setup_sync(struct hci_conn *conn, __u16 handle)
> cp.rx_bandwidth = cpu_to_le32(0x00001f40);
> cp.max_latency = cpu_to_le16(0xffff);
> cp.voice_setting = cpu_to_le16(hdev->voice_setting);
> - cp.retrans_effort = 0xff;
> +
> + /* If remote device supports eSCO use optimization for power
> + retransmission effort, otherwise use standard flag do-not-care */
> + if (conn->link->features[3] & LMP_ESCO)
This should be lmp_esco_capable()
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-13 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17 11:46 [PATCH] Bluetooth: Check for SCO type before setting retr. effort Emeltchenko Andrei
2010-09-17 12:04 ` Ville Tervo
2010-10-13 12:04 ` Gustavo F. Padovan
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).