Return-Path: Message-ID: <4E64AD1D.6000609@invoxia.com> Date: Mon, 05 Sep 2011 13:06:05 +0200 From: Arnaud Mouiche MIME-Version: 1.0 To: linux-bluetooth@vger.kernel.org Subject: eSCO latency configuration Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi, I was surprised to not see a possibility to configure the latency used for (e)SCO connection during creation or accept phase. the kernel code shows simply this (in any git repo I check) net/bluetooth/hci_conn.c: hci_setup_sync() 164 void hci_setup_sync(struct hci_conn *conn, __u16 handle) 165 { 166 struct hci_dev *hdev = conn->hdev; 167 struct hci_cp_setup_sync_conn cp; 168 169 BT_DBG("%p", conn); 170 171 conn->state = BT_CONNECT; 172 conn->out = 1; 173 174 conn->attempt++; 175 176 cp.handle = cpu_to_le16(handle); 177 cp.pkt_type = cpu_to_le16(conn->pkt_type); 178 179 cp.tx_bandwidth = cpu_to_le32(0x00001f40); 180 cp.rx_bandwidth = cpu_to_le32(0x00001f40); 181 cp.max_latency = cpu_to_le16(0xffff); <<<<<< static configuration 182 cp.voice_setting = cpu_to_le16(hdev->voice_setting); 183 cp.retrans_effort = 0xff; 184 185 hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp); 186 } 187 What could be a way to add the feature without breaking any API 1) use the MTU of the socket or hdev ? 2) add hdev entry for sco latency (which can be configured with hciconfig like voice settings) 3) something else ... or 4) no one cares about latency... PS: the same way, the retransmit effort is not configurable today. regards, arnaud