AW_CM358 Sound-BT Parse Error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

AW_CM358 Sound-BT Parse Error

跳至解决方案
6,677 次查看
Wobaffet
Senior Contributor I

Hello, We are using AW_CM358 Wifi/BT module on our custom board with i.MX8MP.

Wifi and BT is operational and tested. But we can't configure the sound-card for the BT module. Here is our device tree snippets and log that we're having. Same error also exist for the codec we are trying to port from TI. Could you check what could be the issue?

Yocto Release: Mickledore.

root@imx8mp-lpddr4-evk:~# cat /sys/kernel/debug/devices_deferred 
sound-bt-sco	asoc-simple-card: parse error
sound-tlv320aic31xx	asoc-simple-card: parse error
30c20000.sai	
30c30000.sai	
root@imx8mp-lpddr4-evk:~# cat /sys/kernel/debug/clk/clk_summary | grep sai2
 sai2_mclk                            0        0        0    12288000          0     0  50000         Y
                sai2_mclk3_clk        0        0        0    49152000          0     0  50000         N
          sai2_mclk2_sel              0        0        0    24000000          0     0  50000         Y
             sai2_mclk2_clk           0        0        0    24000000          0     0  50000         N
                         sai2_ipg_clk       0        0        0   400000000          0     0  50000         N
                sai2                  0        0        0    11915637          0     0  50000         N
                   sai2_root          0        0        0    11915637          0     0  50000         N
                      sai2_mclk1_sel       0        0        0    11915637          0     0  50000         Y
                         sai2_mclk1_clk       0        0        0    11915637          0     0  50000         N
         bt_sco_codec: bt_sco_codec {
                #sound-dai-cells = <1>;
                compatible = "linux,bt-sco";
                };

        sound-bt-sco {
                compatible = "simple-audio-card";
                simple-audio-card,name = "bt-sco-audio";
                simple-audio-card,format = "dsp_a";
                simple-audio-card,bitclock-inversion;
                simple-audio-card,frame-master = <&btcpu>;
                simple-audio-card,bitclock-master = <&btcpu>;

                btcpu: simple-audio-card,cpu {
                        sound-dai = <&sai2>;
                        dai-tdm-slot-num = <2>;
                        dai-tdm-slot-width = <16>;
                };

                simple-audio-card,codec {
                        sound-dai = <&bt_sco_codec 1>;
                };
        };
&sai2 {
        #sound-dai-cells = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_sai2>;
        assigned-clocks = <&clk IMX8MP_CLK_SAI2>;
        assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
        assigned-clock-rates = <12000000>;
        status = "okay";
};
&uart1 { /* BT */
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart1>;
        assigned-clocks = <&clk IMX8MP_CLK_UART1>;
        assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
        fsl,uart-has-rtscts;
        status = "okay";
        bluetooth {
                compatible = "nxp,88w8987-bt";
        };
};

Thank you in advance!

Best Regards.

0 项奖励
回复
1 解答
6,206 次查看
Wobaffet
Senior Contributor I

Problem solved when we moved back to the 5.15 release.

在原帖中查看解决方案

0 项奖励
回复
13 回复数
6,207 次查看
Wobaffet
Senior Contributor I

Problem solved when we moved back to the 5.15 release.

0 项奖励
回复
6,569 次查看
Wobaffet
Senior Contributor I

Yes, the one on the link but as solder down module. We don't have an EVK unfortunately.

Wobaffet_0-1708410279761.png

Wobaffet_1-1708410349280.png

 

 

0 项奖励
回复
6,521 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

 

According to your logs. Your board is not loading the firmware on your Wi-Fi/Bluetooth module.

 

Please take a look on UM11483 application note.

 

Also, please check your SDIO/PCIe connection on your board.

 

Best regards.

0 项奖励
回复
6,518 次查看
Wobaffet
Senior Contributor I
Hello, We've been loading the firmware after boot-up manually. I've patched the simple-card driver to see some logs, after firmware load for bt/wifi, simple-card again tries to be loaded but eventually, we are seeing the same logs just as we see on the initial boot and at the end still deferred probes. Should we also make some additional probing for the bt-sound-card?
0 项奖励
回复
6,517 次查看
Wobaffet
Senior Contributor I
We've tested bluetooth and it is working for the file transfer but we couldn't manage to register as a sound-card.
0 项奖励
回复
6,391 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

The only way that I was able to replicate the issue on my side was disconnecting Wi-Fi/Bluetooth module from EVK board.

Could you please take look on schematic/layout side?

Also, which firmware are you loading?

Best regards.

0 项奖励
回复
6,348 次查看
Wobaffet
Senior Contributor I

Hello, we are using the firmware suggested by NXP, the driver is trying to be probed after fw load, and it is failing again. we've printed some logs and it seems that the issue is about parsing. As we've mentioned, sai drivers are not being probed for codec and BT. For the codec, we've tested out the proven configuration also. The issue seems to be the same with codec and sound for BT. Any suggestion on what could be the issue?

 

root@imx8mp-lpddr4-evk:~# modprobe moal fw_name=/lib/firmware/nxp/sdiouart8987_combo_v0.bin cfg80211_wext=0xf cal_data_cfg=none host_mlme=1 
[   58.833542] mlan: loading out-of-tree module taints kernel.
[   58.863182] wlan: Loading MWLAN driver
[   58.867307] wlan: Register to Bus Driver...
[   58.871704] vendor=0x02DF device=0x9149 class=0 function=1
[   58.877292] Attach moal handle ops, card interface type: 0x105
[   58.883165] rps set to 0 from module param
[   58.887284] No module param cfg file specified
[   58.891758] SDIO: max_segs=128 max_seg_size=65535
[   58.896487] rx_work=1 cpu_num=4
[   58.899644] Enable moal_recv_amsdu_packet
[   58.903693] Attach mlan adapter operations.card_type is 0x105.
[   58.909868] wlan: Enable TX SG mode
[   58.913390] wlan: Enable RX SG mode
[   58.920131] Request firmware: /lib/firmware/nxp/sdiouart8987_combo_v0.bin
[   58.927297] wlan_sdio mmc0:0001:1: Direct firmware load for /lib/firmware/nxp/sdiouart8987_combo_v0.bin failed with error -2
[   58.938585] wlan_sdio mmc0:0001:1: Falling back to sysfs fallback for: /lib/firmware/nxp/sdiouart8987_combo_v0.bin
[   59.217405] Wlan: FW download over, firmwarelen=617588 downloaded 617588
[   60.085882] WLAN FW is active
[   60.088886] on_time is 60084898000
[   60.149955] FW country code WW does not match with US
[   60.155230] fw_cap_info=0x181d7f03, dev_cap_mask=0xffffffff
[   60.160822] max_p2p_conn = 8, max_sta_conn = 8
[   60.183122] Register NXP 802.11 Adapter mlan0
[   60.189868] Register NXP 802.11 Adapter uap0
[   60.197242] Register NXP 802.11 Adapter wfd0
[   60.201865] wlan: version = SD8987----16.92.21.p99.2-MM6X16423.p6-GPL-(FP92) 
[   60.211064] sound/soc/generic/simple-card.c:__simple_for_each_link:445
[   60.211696] wlan: Register to Bus Driver Done
[   60.217689] sound/soc/generic/simple-card.c:__simple_for_each_link:445
[   60.222168] wlan: Driver loaded successfully
[   60.228641] sound/soc/generic/simple-card.c:simple_dai_link_of:321
[   60.239068] sound/soc/generic/simple-card.c:simple_dai_link_of:345
[   60.245272] sound/soc/generic/simple-card.c:__simple_for_each_link:445
[   60.251821] sound/soc/generic/simple-card.c:simple_for_each_link:477
[   60.258228] sound/soc/generic/simple-card.c:simple_parse_of:511
[   60.264198] sound/soc/generic/simple-card.c:asoc_simple_probe:694
[   60.270327] sound/soc/generic/simple-card.c:asoc_simple_probe:755
[   60.277286] sound/soc/generic/simple-card.c:__simple_for_each_link:445
[   60.283874] sound/soc/generic/simple-card.c:__simple_for_each_link:445
[   60.290489] sound/soc/generic/simple-card.c:simple_dai_link_of:321
[   60.296688] sound/soc/generic/simple-card.c:simple_dai_link_of:345
[   60.302893] sound/soc/generic/simple-card.c:__simple_for_each_link:445
[   60.309526] sound/soc/generic/simple-card.c:simple_for_each_link:477
[   60.316008] sound/soc/generic/simple-card.c:simple_parse_of:511
[   60.321976] sound/soc/generic/simple-card.c:asoc_simple_probe:694
[   60.328120] sound/soc/generic/simple-card.c:asoc_simple_probe:755

 

0 项奖励
回复
6,403 次查看
Wobaffet
Senior Contributor I
reminder.
0 项奖励
回复
6,578 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Got it.

Are you using this module?

Could you please try with our EVK?

Could you please share your schematic connection?

Best regards.

 

0 项奖励
回复
6,603 次查看
JorgeCas
NXP TechSupport
NXP TechSupport

Hello, I apologize for the delayed response.

Could you please try with:

assigned-clock-rates = <12288000>;

Best regards.

0 项奖励
回复
6,585 次查看
Wobaffet
Senior Contributor I

Hello,

Unfortunately suggested change did not work. We also get the same problem for the other sai when registering our audio codec. Our boot log and dts is attached. Could you please check?

Thank you in advance!

0 项奖励
回复
6,576 次查看
Wobaffet
Senior Contributor I

Here are the configs we've enabled for this purpose

CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
CONFIG_SND_DEBUG_VERBOSE=y
CONFIG_SND_CTL_DEBUG=y
CONFIG_SND_SOC_FSL_UTILS=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_FSL_ASOC_CARD=y
CONFIG_SND_SOC_IMX_AUDMIX=y
CONFIG_SND_SOC_FSL_AUDMIX=y
CONFIG_SND_SOC_FSL_SAI=y
CONFIG_SND_SOC_FSL_ESAI=m
CONFIG_SND_SOC_FSL_EAsrc=y
CONFIG_SND_SOC_FSL_UTILS=y

 

0 项奖励
回复
6,635 次查看
Wobaffet
Senior Contributor I

Reminder.

0 项奖励
回复