Hi,
My goal is to get working Bluetooth audio on the Verdin IMX8MM. I’m using the Verdin development board. The Hands-Free Profile works, and I can initiate and pick up calls from the Verdin module using ofono, but there is no audio. It seems that there is no sound device configured to use the I2S link to the BT module (AW-CM276NF).
I have been experimenting with a custom device tree overlay to use this I2S link for BT audio by creating an extra sound device, but have not been succesful. I have no prior experience with the device tree.
Using the Linux BSP 5.5:
TDX Wayland with XWayland 5.5.0-devel-20211125130402+build.0 (dunfell)
Verdin-iMX8MM_Reference-Minimal-Image
bluez-alsa 1.2.0
I was thinking of using an overlay like this, but as you can see I don’t know how to properly define the codec, routing and widgets. I noticed that pinctrl_wifi_i2s
already properly defines the pinmuxing:
/dts-v1/;
/plugin/;
#include <dt-bindings/clock/imx8mm-clock.h>
#include <dt-bindings/gpio/gpio.h>
/ {
compatible = "toradex,verdin-imx8mm";
};
/* VERDIN I2S_2 */
&sai6 {
#sound-dai-cells = <0>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL2_OUT>;
assigned-clock-rates = <2048000>;
assigned-clocks = <&clk IMX8MM_CLK_SAI6>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_wifi_i2s>;
status = "okay";
};
/ {
sound_card2: sound-card2 {
compatible = "simple-audio-card";
simple-audio-card,bitclock-master = <&dailink_master2>;
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&dailink_master2>;
simple-audio-card,name = "imx8mm-aw276nf";
simple-audio-card,routing =
"LAUX", "Line In",
"RAUX", "Line In";
simple-audio-card,widgets =
"Line Out", "Line Out",
"Line", "Line In";
dailink_master2: simple-audio-card,codec {
sound-dai = <&codec1>;
clocks = <&clk IMX8MM_CLK_SAI6_ROOT>;
};
simple-audio-card,cpu {
sound-dai = <&sai6>;
};
};
};
/ {
codec1: codec1 {
compatible = "linux,bt-sco";
#sound-dai-cells = <0>;
status = "okay";
};
};
So far I have not been able to get an extra BT audio device to show up with aplay -L
.
Is there a step-by-step guide to enabling BT audio?
Do both the mainline and proprietary NXP driver support BT audio?
How should we correctly add the AW-CM276NF PCM audio interface to the device tree?
Thanks for reading and kind regards,
Ernest