个人工具

“UbuntuHelp:BluetoothAudio/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
安装低品质"sco" 音频驱动程序
 
(未显示同一用户的12个中间版本)
第3行: 第3行:
 
{{Languages|UbuntuHelp:BluetoothAudio}}
 
{{Languages|UbuntuHelp:BluetoothAudio}}
 
= 蓝牙音频概况 =
 
= 蓝牙音频概况 =
 
+
使用蓝牙时有两种不同的音频配置方案,使用哪一个取决于你将如何使用你的耳机以及你如何计划使用它。 "sco" 音频配置是一个低品质、低延时的连接方案。音质近似于无线电话。糟糕的音质在听音乐的时候显得尤为明显。"a2d" 音频配置是一个高品质的压缩连接,并且提供出色的音频品质。截止到2007年7月13日a2d音频驱动无法通过apt获取,而是需要手动编译安装。这是首选的蓝牙音频配置方案。
There are two different Audio profiles implemented in Bluetooth, which one to use depends on how you will use your headset and how you plan to use it. The "sco" audio profile is a low quality, low latency connection. The sound quality is comparable to a cell phone. The poor sound quality is very noticeable when listening to music. The "a2d" audio profile is a high quality compressed connection, and provides excellent audio quality. As of July 13, 2007 the a2d audio driver is not available via apt, and requires manual compiling for installation. This is the preferred audio configuration for Bluetooth.
+
=== 安装低品质"sco" 音频驱动 ===
 
+
注意:原作者已经停止维护此软件
=== 安装低质量"sco" 音频驱动程序 ===
+
===== 载入前提: =====
 
+
<pre><nowiki>
注意:原作者已经停止维护此软件
+
 
+
<br>
+
 
+
===== Loading Prerequisites: =====
+
 
+
 
sudo apt-get install bluez-btsco
 
sudo apt-get install bluez-btsco
 +
sudo modprobe snd-bt-sco
 +
</nowiki></pre>
 +
注意:如果你喜欢让这个模块在启动时被自动加载,运行'gksu gedit /etc/modules' 并加入一行:'snd-bt-sco'。
 +
==== 确定耳机的蓝牙地址 ====
 +
<ol><li>将设备设置为“配对”模式。这个过程会因耳机不同而所有差异,但通常需要按住电源键10-15秒。
 +
</li><li>打开一个终端运行'hcitool scan'</li></ol>
  
===== Loading the btsco module. =====
+
""注意:我使用的是我的地址'00:07:a4:b8:f9:77'来作为例子。""
 
+
""在余下步骤中,请替换成用从hcitool scan输出的您的地址。""
sudo modprobe snd-bt-sco Note: If you prefer this module be loaded automatically at boot, run 'gksu gedit /etc/modules' and add a line for 'snd-bt-sco'.
+
<ol><li>寻找类似这样的输出</li></ol>
 
+
===== Determine the BT Address of the headset. =====
+
 
+
# Put the device into "Pairing" mode. This procedure varies by headset, but usually involves holding down the power button for 10-15 seconds.
+
# Open a terminal and run 'hcitool scan'
+
 
+
""Note: I am using my address '00:07:a4:b8:f9:77' for this example."" ""Please substitute your address from the hcitool scan output for the remaining steps.""
+
 
+
# Look for output like this.
+
 
+
ellie@ellie-laptop:~$ hcitool scan Scanning ... 00:07:A4:B8:F0:77 Motorola HT820 ellie@ellie-laptop:~$
+
 
+
# Edit /etc/bluetooth/hcid.conf (gksu gedit /etc/bluetooth/hcid.conf ) and add a section like this
+
 
+
device 00:07:A4:B8:F9:77 { name "Motorola HT820" auth enable; encrypt enable; }
+
 
+
# Restart Bluetooth services (sudo /etc/init.d/bluetooth restart)
+
 
+
===== Starting the "sco" driver for the first time. =====
+
 
+
# Place the Headset into "pairing" mode as above.
+
# Open a terminal and run 'btsco -v 00:07:a4:b8:f9:77'
+
# This should cause the gnome bluetooth manager to ask you for a pin number to pair. This is usually 0000 or 1234
+
 
+
===== Testing the "sco" driver. =====
+
 
+
aplay -B 1000000 -D plughw:Headset /usr/share/sounds/login.wav You should hear the Ubuntu Login sound.
+
  
===== Configuring btsco to run automatically at each boot. =====
+
<pre><nowiki>
 +
ellie@ellie-laptop:~$ hcitool scan
 +
Scanning ...
 +
        00:07:A4:B8:F0:77      Motorola HT820
 +
ellie@ellie-laptop:~$
 +
</nowiki></pre>
 +
<ol><li>编辑  /etc/bluetooth/hcid.conf (gksu gedit  /etc/bluetooth/hcid.conf ) 并添加这样一段</li></ol>
  
# Open System -&gt; Preferences -&gt; Sessions and select "startup Programs"
+
<pre><nowiki>
# Click New.
+
device 00:07:A4:B8:F9:77 {
# Enter "BT Sco Headset audio" for the Name.
+
        name "Motorola HT820"
# Enter '/usr/bin/btsco -r -f 00:07:a4:b8:f9:77'
+
        auth enable;
# Click Ok and Apply
+
        encrypt enable;
 +
}
 +
</nowiki></pre>
 +
<ol><li>重启蓝牙服务</li></ol>
  
===== Setting the headset as your default alsa audio device. =====
+
<pre><nowiki>
 +
sudo /etc/init.d/bluetooth restart
 +
</nowiki></pre>
  
asoundconf set-default-card Headset This will create the appropriate entries in your .asoundrc file. This setting is per-user.
+
==== 首次启动"sco"驱动 ====
 +
<ol><li>像前面一样将耳机设置为“配对”模式
 +
</li><li>打开一个终端并运行'btsco -v 00:07:a4:b8:f9:77'
 +
</li><li>Gnome蓝牙管理器会向你询问配对的pin码。通常是0000或者1234</li></ol>
  
=== Installing High quality "a2d" audio drivers ===
+
==== 测试"sco"驱动 ====
 +
<pre><nowiki>
 +
aplay -B 1000000 -D plughw:Headset /usr/share/sounds/login.wav
 +
</nowiki></pre>
 +
你会听到Ubuntu登录音。
  
See [[http://bluetooth-alsa.sf.net/build.html new build docs]] for information on these drivers. There is a bluetooth-alsa package in the testing Debian apt repository, perhaps we can port it for gutsy?
+
=== 配置在每次启动时自动运行btsco ===
 +
<ol><li>打开 系统 -> 首选项 -> 启动应用程序
 +
</li><li>点击“添加”。
 +
</li><li>输入名称 "BT Sco Headset audio"。
 +
</li><li>输入命令 '/usr/bin/btsco -r -f 00:07:a4:b8:f9:77'
 +
</li><li>点击添加来应用设置</li></ol>
  
=== Troubleshooting ===
+
==== 设置耳机为你的默认alsa音频设备 ====
 +
<pre><nowiki>
 +
asoundconf set-default-card Headset
 +
</nowiki></pre>
 +
这会在你的.asoundrc 文件夹中创建适当的条目。此设置将应用于所有用户。
 +
==== 蓝牙Sco配置的GUI工具 ====
 +
一个配置你的蓝牙耳机的替代方法就是使用Gbtsco,一个简单的GUI就能实现我们前面所述的所有辛苦工作。
 +
http://www.stgraber.org/2007/05/20/gbtsco-already-release-02/
 +
请考虑此时btsco和snd-bt-sco是否被新的bluez发展所支持,但btsco将一直有效直至被一个新的解决方案所取代。更多信息在http://www.bluez.org/
  
The [[UbuntuHelp:BluetoothSkype|BluetoothSkype]]; page has additional information for configuring the new driver. See [[http://bluetooth-alsa.sf.net/contact.html Contact/troubleshooting]] for troubleshooting information.
+
=== 安装高品质的"a2d"音频驱动 ===
 +
bluetooth-alsa报从Ubuntu 7.10 (Gutsy)起开始有效。
 +
==== 使用"a2d"音频驱动 ====
 +
通过GUI使用蓝牙管理器以设计方式配对耳机,然而向新的耳机发送声音是不可能使用声音选项的(该选项位于 系统 -> 首选项 -> 声音)。声音选项对话在 Devices > Music and Movies > Sound Playback 下,你应该能够找到配对的蓝牙耳机。然而耳机并没有出现在选项列表中。要想直接输出声音道耳机就打开一个终端窗口并输入如下命令:
 +
<pre><nowiki>
 +
gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink "sbcenc ! a2dpsink device=XX:XX:XX:XX:XX:XX"
 +
</nowiki></pre>
 +
XX:XX:XX:XX:XX:XX就是耳机的物理地址。
 +
执行完该命令后你可以重新打开位于 Devices > Music and Movies > Sound Playback 下的声音选项窗口,这篇区域已经空白了(你的设备无法显示是因为在下拉菜单中耳机并不是一个有效选项)。
 +
想要重定向声音回到计算机的扬声器则选择 Devices > Music and Movies > Sound Playback下的自动检测。
 +
在每次做改变的时候你都需要重启Rhythmbox .
 +
此信息是从这里获取的http://wiki.bluez.org/wiki/HOWTO/AudioDevices.
  
 +
=== 故障排查 ===
 +
[[UbuntuHelp:BluetoothSkype|BluetoothSkype]]; 页面有配置新驱动的额外信息。
 +
故障排查信息见[http://bluetooth-alsa.sf.net/contact.html Contact/troubleshooting]。音频故障排查的额外信息在[[UbuntuHelp:BluetoothPulseaudioTroubleshooting|BluetoothPulseaudioTroubleshooting]]。
 +
如果你对音频不敢兴趣而是想要使用你的蓝牙鼠标,在 /etc/bluetooth/hcid.conf 中改变选项,设备部分:改变 “lm accept;” 为“lm master;”并改变 “lp rswitch,hold,sniff,park;” 为“lp hold,sniff,park;”。之后重启蓝牙 (/etc/init.d/bluetooth force-reload)。
 
----
 
----
 +
[[category:CategoryBluetooth]] [[category:CategoryAudio]]
  
[[Category:CategoryBluetooth]] [[Category:CategoryAudio]] [[Category:UbuntuHelp]]
+
[[category:UbuntuHelp]]

2010年4月17日 (六) 22:02的最新版本

蓝牙音频概况

使用蓝牙时有两种不同的音频配置方案,使用哪一个取决于你将如何使用你的耳机以及你如何计划使用它。 "sco" 音频配置是一个低品质、低延时的连接方案。音质近似于无线电话。糟糕的音质在听音乐的时候显得尤为明显。"a2d" 音频配置是一个高品质的压缩连接,并且提供出色的音频品质。截止到2007年7月13日a2d音频驱动无法通过apt获取,而是需要手动编译安装。这是首选的蓝牙音频配置方案。

安装低品质"sco" 音频驱动

注意:原作者已经停止维护此软件

载入前提:
sudo apt-get install bluez-btsco
sudo modprobe snd-bt-sco

注意:如果你喜欢让这个模块在启动时被自动加载,运行'gksu gedit /etc/modules' 并加入一行:'snd-bt-sco'。

确定耳机的蓝牙地址

  1. 将设备设置为“配对”模式。这个过程会因耳机不同而所有差异,但通常需要按住电源键10-15秒。
  2. 打开一个终端运行'hcitool scan'

""注意:我使用的是我的地址'00:07:a4:b8:f9:77'来作为例子。"" ""在余下步骤中,请替换成用从hcitool scan输出的您的地址。""

  1. 寻找类似这样的输出
 ellie@ellie-laptop:~$ hcitool scan
 Scanning ...
         00:07:A4:B8:F0:77       Motorola HT820
 ellie@ellie-laptop:~$
  1. 编辑 /etc/bluetooth/hcid.conf (gksu gedit /etc/bluetooth/hcid.conf ) 并添加这样一段
 device 00:07:A4:B8:F9:77 {
         name "Motorola HT820"
         auth enable;
         encrypt enable;
 }
  1. 重启蓝牙服务
sudo /etc/init.d/bluetooth restart

首次启动"sco"驱动

  1. 像前面一样将耳机设置为“配对”模式
  2. 打开一个终端并运行'btsco -v 00:07:a4:b8:f9:77'
  3. Gnome蓝牙管理器会向你询问配对的pin码。通常是0000或者1234

测试"sco"驱动

aplay -B 1000000 -D plughw:Headset /usr/share/sounds/login.wav

你会听到Ubuntu登录音。

配置在每次启动时自动运行btsco

  1. 打开 系统 -> 首选项 -> 启动应用程序
  2. 点击“添加”。
  3. 输入名称 "BT Sco Headset audio"。
  4. 输入命令 '/usr/bin/btsco -r -f 00:07:a4:b8:f9:77'
  5. 点击添加来应用设置

设置耳机为你的默认alsa音频设备

asoundconf set-default-card Headset

这会在你的.asoundrc 文件夹中创建适当的条目。此设置将应用于所有用户。

蓝牙Sco配置的GUI工具

一个配置你的蓝牙耳机的替代方法就是使用Gbtsco,一个简单的GUI就能实现我们前面所述的所有辛苦工作。 http://www.stgraber.org/2007/05/20/gbtsco-already-release-02/ 请考虑此时btsco和snd-bt-sco是否被新的bluez发展所支持,但btsco将一直有效直至被一个新的解决方案所取代。更多信息在http://www.bluez.org/

安装高品质的"a2d"音频驱动

bluetooth-alsa报从Ubuntu 7.10 (Gutsy)起开始有效。

使用"a2d"音频驱动

通过GUI使用蓝牙管理器以设计方式配对耳机,然而向新的耳机发送声音是不可能使用声音选项的(该选项位于 系统 -> 首选项 -> 声音)。声音选项对话在 Devices > Music and Movies > Sound Playback 下,你应该能够找到配对的蓝牙耳机。然而耳机并没有出现在选项列表中。要想直接输出声音道耳机就打开一个终端窗口并输入如下命令:

gconftool -t string -s /system/gstreamer/0.10/default/musicaudiosink "sbcenc ! a2dpsink device=XX:XX:XX:XX:XX:XX"

XX:XX:XX:XX:XX:XX就是耳机的物理地址。 执行完该命令后你可以重新打开位于 Devices > Music and Movies > Sound Playback 下的声音选项窗口,这篇区域已经空白了(你的设备无法显示是因为在下拉菜单中耳机并不是一个有效选项)。 想要重定向声音回到计算机的扬声器则选择 Devices > Music and Movies > Sound Playback下的自动检测。 在每次做改变的时候你都需要重启Rhythmbox . 此信息是从这里获取的http://wiki.bluez.org/wiki/HOWTO/AudioDevices.

故障排查

BluetoothSkype; 页面有配置新驱动的额外信息。 故障排查信息见Contact/troubleshooting。音频故障排查的额外信息在BluetoothPulseaudioTroubleshooting。 如果你对音频不敢兴趣而是想要使用你的蓝牙鼠标,在 /etc/bluetooth/hcid.conf 中改变选项,设备部分:改变 “lm accept;” 为“lm master;”并改变 “lp rswitch,hold,sniff,park;” 为“lp hold,sniff,park;”。之后重启蓝牙 (/etc/init.d/bluetooth force-reload)。