misc: samsung: scsc_bt: Always set transport unit size to 16
* Our firmware wants this to be 16 (PCM) instead of 0x00 (HCI) * Removes the need for patching userspace Change-Id: Ie88a682b5acc6ef73db5d35dbd336544ab0a1a2a
This commit is contained in:
parent
ac4a6294be
commit
39efa81db3
1 changed files with 10 additions and 2 deletions
|
@ -243,14 +243,15 @@ bool scsc_bt_shm_h4_avdtp_detect_write(uint32_t flags, uint16_t l2cap_cid, uint1
|
|||
return true;
|
||||
}
|
||||
|
||||
#define HCI_GRP_LINK_CONTROL_CMDS (0x01 << 10) /* 0x0400 */
|
||||
#define HCI_ENH_SETUP_ESCO_CONNECTION (0x003D | HCI_GRP_LINK_CONTROL_CMDS)
|
||||
|
||||
static ssize_t scsc_bt_shm_h4_hci_cmd_write(const unsigned char *data, size_t count)
|
||||
{
|
||||
/* Store the read/write pointer on the stack since both are placed in unbuffered/uncached memory */
|
||||
uint32_t tr_read = bt_service.bsmhcp_protocol->header.mailbox_hci_cmd_read;
|
||||
uint32_t tr_write = bt_service.bsmhcp_protocol->header.mailbox_hci_cmd_write;
|
||||
#ifdef CONFIG_SCSC_PRINTK
|
||||
uint16_t op_code = *(uint16_t *)data;
|
||||
#endif
|
||||
|
||||
/* Temp vars */
|
||||
struct BSMHCP_TD_CONTROL *td = &bt_service.bsmhcp_protocol->hci_cmd_transfer_ring[tr_write];
|
||||
|
@ -275,6 +276,13 @@ static ssize_t scsc_bt_shm_h4_hci_cmd_write(const unsigned char *data, size_t co
|
|||
memcpy(td->data, data, count);
|
||||
td->length = (u16)count;
|
||||
|
||||
if (op_code == HCI_ENH_SETUP_ESCO_CONNECTION) {
|
||||
// input_transport_unit_size
|
||||
td->data[55] = 16;
|
||||
// output_transport_unit_size
|
||||
td->data[56] = 16;
|
||||
}
|
||||
|
||||
/* Ensure the wake lock is acquired */
|
||||
if (!wake_lock_active(&bt_service.write_wake_lock)) {
|
||||
bt_service.write_wake_lock_count++;
|
||||
|
|
Loading…
Add table
Reference in a new issue