Linux下蓝牙立体声配置(A2DP profile)

发布时间:2008-03-04 00:33:06来源:红联作者:Distance

本人系统配置:Linux debian 2.6.22.6 #7 Mon Sep 3 10:46:00 CST 2007 ppc GNU/Linux

bluetooth software: bluez-lib bluez-utils 均是3.22。bluez.org

bluetooth hardware: iBook G4 内置的CSR 蓝牙2.0芯片、Motorola S705蓝牙立体声耳机,也是CSR 蓝牙2.0芯片。

NOTE: 请在blue-utils ./configure的时候,加上--enable-audio

1)scan你的蓝牙耳机,得到bluetooth address, 并且能够跟主机上的bluetooth正确配对

2)edit $(HOME)/.asoundrc 内容 如下:

pcm.bluetooth{

type bluetooth

device 00:02:76:64:94:F9 //蓝牙耳机地址

}

3)edit /etc/bluetooth/audio.conf, check一下你配置是否正确

[General]

# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)

# Defaults to HCI

SCORouting=HCI

[Headset]

# Defaults to false

DisableHFP=true

[A2DP]

SourceCount=1

4 )运行 bluez-utils-6.22/audio 下的bluetoothd-service-audio,安装后一般在/usr/lib/bluetooth下

5 )运行mplayer来测试一下你的蓝牙立体声耳机,命令如下: mplayer -ao alsa:device=bluetooth audio/demo.mp3

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐