HI NXP
I had issue a question of this topic, but I can't replay it anymore, so I re-create it here.
I had create a sound card for PCM(SAI2) on IMX8. (SAI2 PCM connect to BT module).
We use android OS with tinyalsa on it.
And we can see the waveform on the scope, there is clk, sync and output data(TX) on SAI2 after issue cmd "tinyplay chirp.wav -D 3 -d 0" (bluetooth sound card is 3 on SAI2).
Then we set the BT module to PCM loopback mode.
After set the BT module to PCM loopback mode, we can see the input data on PCM RX.
But when we use tinycap(tinycap test.wav -D 3 -d 0 -c 1 -r 8000) to record the RX data, we just got the .wav header with dummy data(0).
Did I miss any setting on the audio driver or device tree? Below is the device tree of my bluetooth sound card on SAI2 PCM.
+ btsco_codec: btsco_codec@0 {
+ compatible= "linux,bt-sco";
+ status = "okay";
+ };
+ sound-btsco {
+
+ compatible = "fsl,imx-audio-btsco";
+ model = "btsco-codec";
+ audio-cpu = <&sai2>;
+ btsco-controller = <&btsco_codec>;
+
+ };
+&sai2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_sai2>;
+ assigned-clocks = <&clk IMX8MM_CLK_SAI2>;
+ assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
+ assigned-clock-rates = <24576000>;
+ status = "okay";
+};
+ pinctrl_sai2: sai2grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6
+ MX8MM_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6
+ MX8MM_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0xd6
+ MX8MM_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0 0xd6
+ >;
+ };
Thanks