Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

[Android] ROC-RK3588S-PC Bluetooth SCO no sound when device is used as a HFP headset/louds

25

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
25

【Android】 ROC-RK3588S-PC Bluetooth SCO no sound when device is used as a HFP headset/louds

Posted at 8/8/2023 01:33:37      View:725 | Replies:0        Print      Only Author   [Copy Link] 1#
Problem description and steps to reproduce:
Last edited by moiommo In 8/8/2023 14:11 Editor

Hello,

I want to use my ROC-RK3588S-PC device as a handsfree headset that is connected to a mobile phone. I managed to get a dialer app work, so it can receive and send callls using Android services. The only issue left that I cannot resolve is a missing sound via SCO. I beleive that there is no sound as Bluetoth SCO is not registered as a sound card which makes impossible to route audio. Wireless chip RTL8821CU has pins for SCO that exposes PCM signals and can be used as an audio device.



I tried to build a custom image to sovle that issue with Device Tree patched.

I modified 'kernel-5.10/arch/arm64/boot/dts/rockchip/roc-rk3588s-pc.dtsi'

  1. / {
  2. ...
  3. /*Bluetooth SCO sound card */

  4.   bt-sound {
  5.      compatible = "simple-audio-card";
  6.      simple-audio-card,format = "dsp_a";
  7.      simple-audio-card,bitclock-inversion = <1>;
  8.      simple-audio-card,mclk-fs = <256>;
  9.      simple-audio-card,name = "rockchip,bt";
  10.      simple-audio-card,cpu {
  11.      // sound-dai = <&i2s2_2ch>;
  12.      sound-dai = <&i2s3_2ch>;
  13.     };

  14.     simple-audio-card,codec {
  15.       sound-dai = <&bt_sco>;
  16.    };
  17.   };

  18.    bt_sco: bt-sco {
  19.     compatible = "delta,dfbmcs320";
  20.     #sound-dai-cells = <0>;
  21.     status = "okay";
  22.   };
  23. }
Copy the code
Then I tried to use i2s2_2ch and i2s3_2ch pin adress foond in 'kernel-5.10/arch/arm64/boot/dts/rockchip/rk3588s.dtsi', unfortunatly both variants didn't work as pins are  already taken by other devices.


  1. &i2s2_2ch{
  2.   pinctrl-0 = <&i2s2m1_lrck
  3.   &i2s2m1_sclk
  4.   &i2s2m1_sdi
  5.   &i2s2m1_sdo>;
  6.   status = "okay";
  7. };
Copy the code

dmesg output for &i2s2_2ch:
  1. [    5.348697] [    T1] usbcore: registered new interface driver snd-usb-audio
  2. [    5.351654] [    T1] rockchip-pinctrl pinctrl: pin gpio3-13 already requested by fe1c0000.ethernet; cannot claim for fe490000.i2s
  3. [    5.351665] [    T1] rockchip-pinctrl pinctrl: pin-109 (fe490000.i2s) status -22
  4. [    5.351672] [    T1] rockchip-pinctrl pinctrl: could not request pin 109 (gpio3-13) from group i2s2m1-sclk  on device rockchip-pinctrl
  5. [    5.351678] [    T1] rockchip-i2s fe490000.i2s: Error applying setting, reverse things back
  6. [    5.351691] [    T1] rockchip-i2s: probe of fe490000.i2s failed with error -22
Copy the code

&i2s3_2ch{
  pinctrl-0 = <&i2s3_lrck
  &i2s3_sclk
  &i2s3_sdi
  &i2s3_sdo>;
  status = "okay";
};

dmesg output for &i2s3_2ch:
[    5.349054] [    T1] usbcore: registered new interface driver snd-usb-audio
[    5.351490] [    T1] rockchip-pinctrl pinctrl: pin gpio3-2 already requested by fe1c0000.ethernet; cannot claim for fe4a0000.i2s
[    5.351498] [    T1] rockchip-pinctrl pinctrl: pin-98 (fe4a0000.i2s) status -22
[    5.351503] [    T1] rockchip-pinctrl pinctrl: could not request pin 98 (gpio3-2) from group i2s3-lrck  on device rockchip-pinctrl
[    5.351508] [    T1] rockchip-i2s fe4a0000.i2s: Error applying setting, reverse things back
[    5.351519] [    T1] rockchip-i2s: probe of fe4a0000.i2s failed with error -22

Could someone privide right configuration for Blutooth SCO PCM output pins of RTL8821CU for  ROC-RK3588S-PC device or suggest anothe way to sove issue with missing sound.


Best regards



dmesg.zip

24.25 KB, Down times: 0

Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list