Bluetooth: SCO: Add support for 16 bits transparent voice setting
Subsystems (2)
PATCH 1/1 Bluetooth: SCO: Add support for 16 bits transparent voice setting
The BCM4349B1 supports 16 bits transparent data on its I2S port.
Signed-off-by Frédéric Danis <[email protected]>
--- include/net/bluetooth/bluetooth.h | 1 + net/bluetooth/sco.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
include/net/bluetooth/bluetooth.h +1 -0
@@ -123,6 +123,7 @@ struct bt_voice {#define BT_VOICE_TRANSPARENT 0x0003#define BT_VOICE_CVSD_16BIT 0x0060 +#define BT_VOICE_TRANSPARENT_16BIT 0x0063#define BT_SNDMTU 12#define BT_RCVMTU 13
net/bluetooth/sco.c +5 -2
@@ -319,7 +319,8 @@ static int sco_connect(struct sock *sk)else type =SCO_LINK ; -if (sco_pi (sk)->setting ==BT_VOICE_TRANSPARENT && +if ((sco_pi (sk)->setting ==BT_VOICE_TRANSPARENT || +sco_pi (sk)->setting ==BT_VOICE_TRANSPARENT_16BIT ) && (!lmp_transp_capable (hdev) || !lmp_esco_capable (hdev))) { err = -EOPNOTSUPP ; goto unlock;
@@ -922,6 +923,7 @@ static int sco_sock_setsockopt(struct socket *sock, int level, int optname,/* Explicitly check for these values */ if (voice.setting !=BT_VOICE_TRANSPARENT && + voice.setting !=BT_VOICE_TRANSPARENT_16BIT && voice.setting !=BT_VOICE_CVSD_16BIT ) { err = -EINVAL ;break ;
@@ -935,7 +937,8 @@ static int sco_sock_setsockopt(struct socket *sock, int level, int optname,break ; }if (enhanced_sync_conn_capable (hdev) && - voice.setting ==BT_VOICE_TRANSPARENT ) + (voice.setting ==BT_VOICE_TRANSPARENT || + voice.setting ==BT_VOICE_TRANSPARENT_16BIT ))sco_pi (sk)->codec.id =BT_CODEC_TRANSPARENT ;hci_dev_put (hdev);break ;
Signature · 1 line
2.34.1
Luiz Augusto von Dentz
maintainerHi Frédéric,
Quoted 2 lines · Frédéric Danis
The BCM4349B1 supports 16 bits transparent data on its I2S port.
Ok, but what difference does it make if transparent data or transparent 16 bits?
Quoted 54 lines
Signed-off-by Frédéric Danis <[email protected]>--- include/net/bluetooth/bluetooth.h | 1 + net/bluetooth/sco.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)include/net/bluetooth/bluetooth.h +1
-0@@ -123,6 +123,7 @@ struct bt_voice {#define BT_VOICE_TRANSPARENT 0x0003#define BT_VOICE_CVSD_16BIT 0x0060 +#define BT_VOICE_TRANSPARENT_16BIT 0x0063#define BT_SNDMTU 12#define BT_RCVMTU 13net/bluetooth/sco.c +5
-3@@ -319,7 +319,8 @@ static int sco_connect(struct sock *sk)else type =SCO_LINK ; -if (sco_pi (sk)->setting ==BT_VOICE_TRANSPARENT && +if ((sco_pi (sk)->setting ==BT_VOICE_TRANSPARENT || +sco_pi (sk)->setting ==BT_VOICE_TRANSPARENT_16BIT ) && (!lmp_transp_capable (hdev) || !lmp_esco_capable (hdev))) { err = -EOPNOTSUPP ; goto unlock;@@ -922,6 +923,7 @@ static int sco_sock_setsockopt(struct socket *sock, int level, int optname,/* Explicitly check for these values */ if (voice.setting !=BT_VOICE_TRANSPARENT && + voice.setting !=BT_VOICE_TRANSPARENT_16BIT && voice.setting !=BT_VOICE_CVSD_16BIT ) { err = -EINVAL ;break ;@@ -935,7 +937,8 @@ static int sco_sock_setsockopt(struct socket *sock, int level, int optname,break ; }if (enhanced_sync_conn_capable (hdev) && - voice.setting ==BT_VOICE_TRANSPARENT ) + (voice.setting ==BT_VOICE_TRANSPARENT || + voice.setting ==BT_VOICE_TRANSPARENT_16BIT ))sco_pi (sk)->codec.id =BT_CODEC_TRANSPARENT ;hci_dev_put (hdev);break ; --2.34.1
Signature · 1 line
Luiz Augusto von Dentz