I have saparetly tested media player on imx8mqevk, its working fine. Device successfully connecting to imx8mqevk via Bluetooth. Status of song played by device is visible on our custom UI but no audio at all. I monitored kernel logs while connecting device to target:
[ 310.448318] imx-sdma 30bd0000.sdma: Timeout waiting for CH0 ready
[ 310.454467] fsl-spdif-dai 30810000.spdif: ASoC: 30810000.spdif hw params failed: -110
[ 310.564506] imx-sdma 30bd0000.sdma: Timeout waiting for CH0 ready
[ 310.570652] fsl-sai 308b0000.sai: ASoC: 308b0000.sai hw params failed: -110
[ 311.080334] imx-sdma 30bd0000.sdma: Timeout waiting for CH0 ready
[ 311.086488] fsl-sai 308b0000.sai: ASoC: 308b0000.sai hw params failed: -110
Could you please try setting the Bluetooth interface as following:
To start the Bluetooth service. First, you need to edit the file:
Uncomment the following line by removing the #:
Then edit the file:
/usr/bin/start-pulseaudio-x11 add the following line: if [ x”$SESSION_MANAGER” != x ] ; then /usr/bin/pactl load-module module-x11-xsmp “display=$DISPLAY session_manager=$SESSION_MANAGER” > /dev/null fi + /usr/bin/pactl load-module module-bluetooth-discover
After modifying those files, write the below commands in the serial terminal of the i.MX8MQ-EVK board to bring up the Bluetooth connection.
# hciattach /dev/ttymxc2 qca 3000000 flow -b -t 120 # This is for the i.MX8MQ. For another i.MX device the ttymxc2 device may be different.
Just wait until the Bluetooth is set up and write.
# hciconfig hci0 up
Then bring up manually the Bluetooth-discover module:
pactl load-module module-bluetooth-discover
After that, the Bluetooth service is ready to be used.
Then, to connect a Bluetooth device, follow the below steps:
First, enter the bluetoothctl menu
Then, make sure that the Bluetooth is powered on.
[bluetooth]# power on
Start the scanning to search for your Bluetooth device:
[bluetooth]# scan on
You need to search for the MAC address of your Bluetooth device.
After you found the desired device that you want to connect. Turn off the scanner.
[bluetooth]# scan off
If you want to review the devices that you have already connected. Write the following.
Finally, connect to the Bluetooth device:
[bluetooth]# connect <The Bluetooth MAC address that you want to connect>
Some devices will need to be set as trusty.
[bluetooth]# trust <The Bluetooth MAC address that you want to connect>
After that, you will be connected to your Bluetooth device.
Finally, to reproduce a song follow use the following GStreamer pipeline.
# gst-launch-1.0 location=test.mp3 ! id3demux ! queue ! mpegaudioparse ! beepdec ! pulsesink
Whit that you should be able to stream audio over your Bluetooth device.