imx8: bluetooth audio streaming not working on imx8mqevk

cancel
Showing results for 
Search instead for 
Did you mean: 

imx8: bluetooth audio streaming not working on imx8mqevk

693 Views
vsuneja63
Contributor III

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

host: ubuntu

target: imx8mqevk

0 Kudos
2 Replies

524 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Could you please try setting the Bluetooth interface as following:

To start the Bluetooth service. First, you need to edit the file:

/etc/pulse/default.pa

Uncomment the following line by removing the #:

#load-module module-bluetooth-discover

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

# bluetoothctl

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.

[bluetooth]# devices

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.

Best regards,

Diego.

0 Kudos

524 Views
vsuneja63
Contributor III

Hi Diego Adrian Cuevas,

Thanks for your reply!

I will apply your suggestions & revert you back asap.

0 Kudos