All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: Fix CVSD SCO setup failure
@ 2022-06-09 11:09 Zijun Hu
  2022-06-09 11:57 ` [v2] " bluez.test.bot
  2022-06-24 15:12 ` [PATCH v2] " quic_zijuhu
  0 siblings, 2 replies; 4+ messages in thread
From: Zijun Hu @ 2022-06-09 11:09 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni
  Cc: linux-kernel, linux-bluetooth, linux-arm-msm, Zijun Hu

It will set up SCO after all CVSD eSCO attempts failure, but
still fails to set up SCO finally due to wrong D1/D0 @retrans_effort
within @esco_param_cvsd, so change it from 0x1 to 0xff to avoid
Invalid HCI Command Parameters error.

< HCI Command: Setup Synchrono.. (0x01|0x0028) plen 17  #3427
        Handle: 3
        Transmit bandwidth: 8000
        Receive bandwidth: 8000
        Max latency: 65535
        Setting: 0x0060
          Input Coding: Linear
          Input Data Format: 2's complement
          Input Sample Size: 16-bit
          # of bits padding at MSB: 0
          Air Coding Format: CVSD
        Retransmission effort: Optimize for power consumption (0x01)
        Packet type: 0x03c4
          HV3 may be used
          2-EV3 may not be used
          3-EV3 may not be used
          2-EV5 may not be used
          3-EV5 may not be used
> HCI Event: Command Status (0x0f) plen 4               #3428
      Setup Synchronous Connection (0x01|0x0028) ncmd 1
        Status: Success (0x00)
> HCI Event: Synchronous Connect Comp.. (0x2c) plen 17  #3429
        Status: Invalid HCI Command Parameters (0x12)
        Handle: 0
        Address: 14:3F:A6:47:56:15 (OUI 14-3F-A6)
        Link type: SCO (0x00)
        Transmission interval: 0x00
        Retransmission window: 0x00
        RX packet length: 0
        TX packet length: 0
        Air mode: u-law log (0x00)

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
---
 net/bluetooth/hci_conn.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 7829433d54c1..2627d5ac15d6 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -45,8 +45,8 @@ static const struct sco_param esco_param_cvsd[] = {
 	{ EDR_ESCO_MASK & ~ESCO_2EV3, 0x000a,	0x01 }, /* S3 */
 	{ EDR_ESCO_MASK & ~ESCO_2EV3, 0x0007,	0x01 }, /* S2 */
 	{ EDR_ESCO_MASK | ESCO_EV3,   0x0007,	0x01 }, /* S1 */
-	{ EDR_ESCO_MASK | ESCO_HV3,   0xffff,	0x01 }, /* D1 */
-	{ EDR_ESCO_MASK | ESCO_HV1,   0xffff,	0x01 }, /* D0 */
+	{ EDR_ESCO_MASK | ESCO_HV3,   0xffff,	0xff }, /* D1 */
+	{ EDR_ESCO_MASK | ESCO_HV1,   0xffff,	0xff }, /* D0 */
 };
 
 static const struct sco_param sco_param_cvsd[] = {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [v2] Bluetooth: Fix CVSD SCO setup failure
  2022-06-09 11:09 [PATCH v2] Bluetooth: Fix CVSD SCO setup failure Zijun Hu
@ 2022-06-09 11:57 ` bluez.test.bot
  2022-06-24 15:12 ` [PATCH v2] " quic_zijuhu
  1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2022-06-09 11:57 UTC (permalink / raw)
  To: linux-bluetooth, quic_zijuhu

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=648809

---Test result---

Test Summary:
CheckPatch                    PASS      1.79 seconds
GitLint                       PASS      0.98 seconds
SubjectPrefix                 PASS      0.86 seconds
BuildKernel                   PASS      31.08 seconds
BuildKernel32                 PASS      27.29 seconds
Incremental Build with patchesPASS      37.60 seconds
TestRunner: Setup             PASS      459.51 seconds
TestRunner: l2cap-tester      PASS      16.90 seconds
TestRunner: bnep-tester       PASS      5.82 seconds
TestRunner: mgmt-tester       PASS      97.39 seconds
TestRunner: rfcomm-tester     PASS      9.27 seconds
TestRunner: sco-tester        PASS      9.08 seconds
TestRunner: smp-tester        PASS      9.04 seconds
TestRunner: userchan-tester   PASS      6.01 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] Bluetooth: Fix CVSD SCO setup failure
  2022-06-09 11:09 [PATCH v2] Bluetooth: Fix CVSD SCO setup failure Zijun Hu
  2022-06-09 11:57 ` [v2] " bluez.test.bot
@ 2022-06-24 15:12 ` quic_zijuhu
  2022-07-11  2:03   ` quic_zijuhu
  1 sibling, 1 reply; 4+ messages in thread
From: quic_zijuhu @ 2022-06-24 15:12 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni
  Cc: linux-kernel, linux-bluetooth, linux-arm-msm

On 6/9/2022 7:09 PM, Zijun Hu wrote:
> It will set up SCO after all CVSD eSCO attempts failure, but
> still fails to set up SCO finally due to wrong D1/D0 @retrans_effort
> within @esco_param_cvsd, so change it from 0x1 to 0xff to avoid
> Invalid HCI Command Parameters error.
> 
> < HCI Command: Setup Synchrono.. (0x01|0x0028) plen 17  #3427
>         Handle: 3
>         Transmit bandwidth: 8000
>         Receive bandwidth: 8000
>         Max latency: 65535
>         Setting: 0x0060
>           Input Coding: Linear
>           Input Data Format: 2's complement
>           Input Sample Size: 16-bit
>           # of bits padding at MSB: 0
>           Air Coding Format: CVSD
>         Retransmission effort: Optimize for power consumption (0x01)
>         Packet type: 0x03c4
>           HV3 may be used
>           2-EV3 may not be used
>           3-EV3 may not be used
>           2-EV5 may not be used
>           3-EV5 may not be used
>> HCI Event: Command Status (0x0f) plen 4               #3428
>       Setup Synchronous Connection (0x01|0x0028) ncmd 1
>         Status: Success (0x00)
>> HCI Event: Synchronous Connect Comp.. (0x2c) plen 17  #3429
>         Status: Invalid HCI Command Parameters (0x12)
>         Handle: 0
>         Address: 14:3F:A6:47:56:15 (OUI 14-3F-A6)
>         Link type: SCO (0x00)
>         Transmission interval: 0x00
>         Retransmission window: 0x00
>         RX packet length: 0
>         TX packet length: 0
>         Air mode: u-law log (0x00)
> 
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
> ---
>  net/bluetooth/hci_conn.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
> index 7829433d54c1..2627d5ac15d6 100644
> --- a/net/bluetooth/hci_conn.c
> +++ b/net/bluetooth/hci_conn.c
> @@ -45,8 +45,8 @@ static const struct sco_param esco_param_cvsd[] = {
>  	{ EDR_ESCO_MASK & ~ESCO_2EV3, 0x000a,	0x01 }, /* S3 */
>  	{ EDR_ESCO_MASK & ~ESCO_2EV3, 0x0007,	0x01 }, /* S2 */
>  	{ EDR_ESCO_MASK | ESCO_EV3,   0x0007,	0x01 }, /* S1 */
> -	{ EDR_ESCO_MASK | ESCO_HV3,   0xffff,	0x01 }, /* D1 */
> -	{ EDR_ESCO_MASK | ESCO_HV1,   0xffff,	0x01 }, /* D0 */
> +	{ EDR_ESCO_MASK | ESCO_HV3,   0xffff,	0xff }, /* D1 */
> +	{ EDR_ESCO_MASK | ESCO_HV1,   0xffff,	0xff }, /* D0 */
>  };
>  
>  static const struct sco_param sco_param_cvsd[] = {
could you code review for this change?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] Bluetooth: Fix CVSD SCO setup failure
  2022-06-24 15:12 ` [PATCH v2] " quic_zijuhu
@ 2022-07-11  2:03   ` quic_zijuhu
  0 siblings, 0 replies; 4+ messages in thread
From: quic_zijuhu @ 2022-07-11  2:03 UTC (permalink / raw)
  To: marcel, johan.hedberg, luiz.dentz, davem, edumazet, kuba, pabeni
  Cc: linux-kernel, linux-bluetooth, linux-arm-msm

On 6/24/2022 11:12 PM, quic_zijuhu wrote:
> On 6/9/2022 7:09 PM, Zijun Hu wrote:
>> It will set up SCO after all CVSD eSCO attempts failure, but
>> still fails to set up SCO finally due to wrong D1/D0 @retrans_effort
>> within @esco_param_cvsd, so change it from 0x1 to 0xff to avoid
>> Invalid HCI Command Parameters error.
>>
>> < HCI Command: Setup Synchrono.. (0x01|0x0028) plen 17  #3427
>>         Handle: 3
>>         Transmit bandwidth: 8000
>>         Receive bandwidth: 8000
>>         Max latency: 65535
>>         Setting: 0x0060
>>           Input Coding: Linear
>>           Input Data Format: 2's complement
>>           Input Sample Size: 16-bit
>>           # of bits padding at MSB: 0
>>           Air Coding Format: CVSD
>>         Retransmission effort: Optimize for power consumption (0x01)
>>         Packet type: 0x03c4
>>           HV3 may be used
>>           2-EV3 may not be used
>>           3-EV3 may not be used
>>           2-EV5 may not be used
>>           3-EV5 may not be used
>>> HCI Event: Command Status (0x0f) plen 4               #3428
>>       Setup Synchronous Connection (0x01|0x0028) ncmd 1
>>         Status: Success (0x00)
>>> HCI Event: Synchronous Connect Comp.. (0x2c) plen 17  #3429
>>         Status: Invalid HCI Command Parameters (0x12)
>>         Handle: 0
>>         Address: 14:3F:A6:47:56:15 (OUI 14-3F-A6)
>>         Link type: SCO (0x00)
>>         Transmission interval: 0x00
>>         Retransmission window: 0x00
>>         RX packet length: 0
>>         TX packet length: 0
>>         Air mode: u-law log (0x00)
>>
>> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
>> ---
>>  net/bluetooth/hci_conn.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
>> index 7829433d54c1..2627d5ac15d6 100644
>> --- a/net/bluetooth/hci_conn.c
>> +++ b/net/bluetooth/hci_conn.c
>> @@ -45,8 +45,8 @@ static const struct sco_param esco_param_cvsd[] = {
>>  	{ EDR_ESCO_MASK & ~ESCO_2EV3, 0x000a,	0x01 }, /* S3 */
>>  	{ EDR_ESCO_MASK & ~ESCO_2EV3, 0x0007,	0x01 }, /* S2 */
>>  	{ EDR_ESCO_MASK | ESCO_EV3,   0x0007,	0x01 }, /* S1 */
>> -	{ EDR_ESCO_MASK | ESCO_HV3,   0xffff,	0x01 }, /* D1 */
>> -	{ EDR_ESCO_MASK | ESCO_HV1,   0xffff,	0x01 }, /* D0 */
>> +	{ EDR_ESCO_MASK | ESCO_HV3,   0xffff,	0xff }, /* D1 */
>> +	{ EDR_ESCO_MASK | ESCO_HV1,   0xffff,	0xff }, /* D0 */
>>  };
>>  
>>  static const struct sco_param sco_param_cvsd[] = {
> could you code review for this change?
i have tested this change and it can fix this issue.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-07-11  2:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 11:09 [PATCH v2] Bluetooth: Fix CVSD SCO setup failure Zijun Hu
2022-06-09 11:57 ` [v2] " bluez.test.bot
2022-06-24 15:12 ` [PATCH v2] " quic_zijuhu
2022-07-11  2:03   ` quic_zijuhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.