Hi!
I am trying to read I2S audio data via SAI2 without using an external codec at the i.MX 8MQuad.
In my case the imx8 should be the I2S slave (e.g. reading sound data from a bluetooth module)
I am using a yocto/zeus distribution (kernel 4.14).
So far every google hit (e.g. iMX8MM SAI I2S with dummy codec - NXP Community) is telling me i have to use the "simple-audio-card" to accomplish this task.
I even used the bt-sco parameter as mentioned in the entry above.
But at the moment, I am failing to get my sound device registered/shown at the system.
Here is my device tree so far:
pinctrl_sai2: sai2grp {
fsl,pins = <
/* J17 */
MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0xd6 /* Pin 22 */
MX8MQ_IOMUXC_SAI2_RXFS_SAI2_RX_SYNC 0xd6 /* Pin 24 */
MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6 /* Pin 26 */
MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6 /* Pin 28 */
MX8MQ_IOMUXC_SAI2_RXC_SAI2_RX_BCLK 0xd6 /* Pin 30 */
MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK 0xd6 /* Pin 32 */
MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0 0xd6 /* Pin 34 */
>;
};
codec_test: simple-audio-card,codec_test {
compatible = "linux,bt-sco";
#sound-dai-cells = <0>;
status = "okay";
};
sound-xxx {
compatible = "simple-audio-card";
simple-audio-card,name = "xxx";
simple-audio-card,format = "i2s";
simple-audio-card,cpu {
sound-dai = <&sai2>;
};
simple-audio-card,codec {
sound-dai = <&codec_test>;
system-clock-frequency = <12000000>;
};
};
&sai2 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clk IMX8MQ_CLK_SAI2>;
assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>;
assigned-clock-rates = <0>, <12288000>;
status = "okay";
};
I also added the module CONFIG_SND_SOC_BT_SCO=y to my kernel config.
I am totally aware the my code will/might not lead to valid audio data at the moment.
But right now my main problem is that the device is not registered.
There is no error message during kernel booting concering this sound device.
But no other message either.
What am I missing?
Thx for the help
Chris
Hi!
Its confirmed, the kernel option was not set. Because of that the device did not show.
But now i have the Problem that there are no channel declarations at the alsa mixer.
Any suggestions?
Regards
Christof
Hi!
I had a detailed look at my activated kernel configs and it seems like the CONFIG_SND_SOC_BT_SCO is not set.
The only dependencies i can see are: CONFIG_SND, CONFIG_SND_SOC which are activated.
Is there something else I am missing?
Regards
Christof
Hi!
Just did a little digging in my device tree on the target.
And it seams that the parsing stuff goes all well.
I can see everything which is inside the device tree.
But it seams the yocto does not connect the whole simple sound card card to a real sound driver.
Is there anything i have to activate?
Regards
Christof
FYI. an example about simple-audio-card in device tree.
Hi!
There was an error when patching the Kernel option for BT-SCO.
After this option was set the device was shown.
FYI: when using the bt-sco driver you have to patch the driver if you want to have another sample rate than HFP (Clock freq: 512khz, samplerate:8khz)
now it works
regards
christof