Re: [RFC] Bluetooth: SCO: Fix codec when using HCI_Enhanced_Setup_Synchronous_Connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

> This makes sure BT_CODEC_MSBC is used by default if socket user attempt
> to use BT_VOICE_TRANSPARENT.
> 
> Fixes: b2af264ad3af ("Bluetooth: Add support for HCI_Enhanced_Setup_Synchronous_Connection command")
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
> ---
> net/bluetooth/sco.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
> index 8eabf41b2993..b35c772efc7e 100644
> --- a/net/bluetooth/sco.c
> +++ b/net/bluetooth/sco.c
> @@ -879,15 +879,9 @@ static int sco_sock_setsockopt(struct socket *sock, int level, int optname,
> 		}
> 
> 		sco_pi(sk)->setting = voice.setting;
> -		hdev = hci_get_route(&sco_pi(sk)->dst, &sco_pi(sk)->src,
> -				     BDADDR_BREDR);
> -		if (!hdev) {
> -			err = -EBADFD;
> -			break;
> -		}
> -		if (enhanced_sco_capable(hdev) &&
> -		    voice.setting == BT_VOICE_TRANSPARENT)
> -			sco_pi(sk)->codec.id = BT_CODEC_TRANSPARENT;
> +		if (voice.setting == BT_VOICE_TRANSPARENT)
> +			sco_pi(sk)->codec.id = BT_CODEC_MSBC;
> +
> 		hci_dev_put(hdev);
> 		break;

why are you removing the rest and especially the eSCO check?

Regards

Marcel




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux