英伟达连接蓝牙音箱 并播放音乐

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值