1. 按照官方文档 使能蓝牙 音频
To ensure the bluetooth software stack is conformant for the configuration, Bluetooth audio is disabled by default. If additional bluetooth audio profiles are enabled, product conformance may be impacted.
To enable Bluetooth audio
1.For A2DP, navigate to the following files:
/etc/pulse/default.pa.hdmi
/etc/pulse/default.pa.orig
2.Uncomment the following lines to load both modules and enable the A2DP Bluetooth profile.
#.ifexists module-bluetooth-policy.so
#load-module module-bluetooth-policy
#.endif
#.ifexists module-bluetooth-discover.so
#load-module module-bluetooth-discover
#.endif
3.Navigate to the following file:
/etc/systemd/system/bluetooth.target.wants/bluetooth.service
4.Remove A2DP from the noplugin parameter list.
This change allows the A2DP plugin to be loaded and enables the Bluetooth speaker work as expected.
For example, change the following line:
ExecStart=/usr/lib/bluetooth/bluetoothd -d --noplugin=audio,a2dp,avrcp
As follows:
ExecStart=/usr/lib/bluetooth/bluetoothd -C -d --noplugin=audio,avrcp
5.Reboot the Jetson target device.
6.Pair and use your Bluetooth audio devices.
依次安装下面的包
#sudo apt-get install blueman bluez* bluetooth
#sudo apt-get install dkms
#sudo apt-get install pulseaudio pulseaudio-module-bluetooth pavucontrol
#sudo apt-get install pulseaudio-module-bluetooth* ubuntu-desktop* unity-control-center*
#sudo apt-get install libbluetooth-dev
#sudo systemctl enable bluetooth
#sudo vi /etc/pulse/default.pa
# 将 load-module module-udev-detect 都改为 load-module module-udev-detect tsched=0
然后重启系统
运行 pulseaudio
#pulseaudio -k
#pulseaudio --start # 也可在/etc/rc.local中添加 开机运行
QT 程序 使用 QMediaPlayer 播放音乐时候 若出现Unknown module(s) in QT: multimedia 编译错误
sudo apt-get install qtmultimedia5-dev
sudo apt-get install libpulse-dev
若 执行QT程序 出现 no service found for - "org.qt-project.qt.mediaplayer"
sudo apt-get install libqt5multimedia5-plugins
测试播放
#sudo apt-get install sox libsox-fmt-all
#play 1.mp3