diff options
author | Mark Chen <mark-yw.chen@mediatek.com> | 2022-01-09 22:23:59 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2022-01-10 19:41:39 +0300 |
commit | 191c872308f6a175324bc33807852b10363066cb (patch) | |
tree | dfad7a6fcfe66cdbd1b77ae62d87d50e22ba6400 /drivers/bluetooth/btmtk.h | |
parent | ce64b3e949195768361b0e4111e0837e5e46930d (diff) | |
download | linux-191c872308f6a175324bc33807852b10363066cb.tar.xz |
Bluetooth: mt7921s: Enable SCO over I2S
The driver has to issue the specific command to enable Bluetooth SCO over
the I2S/PCM interface on mt7921s, that is supported since the firmware
with version 20211222191101 was added, and the patch would not cause any
harm even when the old firmware is applied.
The SCO profile with the patch was tested by setting up a VOIP application,
connected to HFP device, checked telephony function can work normally.
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Mark Chen <mark-yw.chen@mediatek.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btmtk.h')
-rw-r--r-- | drivers/bluetooth/btmtk.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/bluetooth/btmtk.h b/drivers/bluetooth/btmtk.h index 2be1d2680ad8..fc57ef09d132 100644 --- a/drivers/bluetooth/btmtk.h +++ b/drivers/bluetooth/btmtk.h @@ -7,8 +7,12 @@ #define HCI_WMT_MAX_EVENT_SIZE 64 +#define BTMTK_WMT_REG_WRITE 0x1 #define BTMTK_WMT_REG_READ 0x2 +#define MT7921_PINMUX_0 0x70005050 +#define MT7921_PINMUX_1 0x70005054 + enum { BTMTK_WMT_PATCH_DWNLD = 0x1, BTMTK_WMT_TEST = 0x2, @@ -76,6 +80,22 @@ struct btmtk_wakeon { __le16 wakeup_delay; } __packed; +struct btmtk_sco { + u8 clock_config; + u8 transmit_format_config; + u8 channel_format_config; + u8 channel_select_config; +} __packed; + +struct reg_write_cmd { + u8 type; + u8 rsv; + u8 num; + __le32 addr; + __le32 data; + __le32 mask; +} __packed; + struct btmtk_hci_wmt_params { u8 op; u8 flag; |