Bluetooth Audio
Version 2 (mihanson, 03/03/2011 12:33 pm)
1 | 1 | h1. Bluetooth Audio |
|
---|---|---|---|
2 | 1 | ||
3 | 1 | You will need two things: |
|
4 | 1 | # Bluetooth dongle (i.e. USB type) or integrated Bluetooth on your system |
|
5 | 1 | # Bluetooth audio device (Speakers, headphones, etc.) |
|
6 | 1 | ||
7 | 1 | Plug in your Bluetooth dongle |
|
8 | 1 | Install _bluez_ |
|
9 | 1 | <pre>$ pacman -Sy bluez</pre> |
|
10 | 1 | Ensure your dongle is showing _UP_ |
|
11 | 1 | <pre>$ hciconfig -a |
|
12 | 1 | ||
13 | 1 | hci0: Type: BR/EDR Bus: USB |
|
14 | 1 | BD Address: 00:0A:94:02:9C:8C ACL MTU: 310:10 SCO MTU: 64:8 |
|
15 | 1 | UP RUNNING PSCAN |
|
16 | 1 | RX bytes:1074400 acl:20 sco:0 events:153362 errors:0 |
|
17 | 1 | TX bytes:88752435 acl:319268 sco:0 commands:25 errors:0 |
|
18 | 1 | Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80 |
|
19 | 1 | Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 |
|
20 | 1 | Link policy: RSWITCH HOLD SNIFF PARK |
|
21 | 1 | Link mode: SLAVE ACCEPT |
|
22 | 1 | Name: 'zotac-0' |
|
23 | 1 | Class: 0x480104 |
|
24 | 1 | Service Classes: Capturing, Telephony |
|
25 | 1 | Device Class: Computer, Desktop workstation |
|
26 | 1 | HCI Version: 1.1 (0x1) Revision: 0xc5c |
|
27 | 1 | LMP Version: 1.1 (0x1) Subversion: 0xc5c |
|
28 | 1 | Manufacturer: Cambridge Silicon Radio (10)</pre> |
|
29 | 2 | mihanson | If not _UP_ |
30 | 2 | mihanson | <pre>$ hciconfig hci0 up</pre> |
31 | 1 | Place your Bluetooth audio device in pairing mode, then scan for it and make a note of the MAC address. |
|
32 | 1 | <pre>$ hcitool scan</pre> |
|
33 | 1 | Use bluez-simple-agent to pair your audio device to your dongle. |
|
34 | 1 | <pre>$ bluez-simple-agent hci0 <MAC Address></pre> |
|
35 | 1 | Enter your audio device's PIN number when prompted. |
|
36 | 1 | If you do not have an /etc/asound.conf, create one with the following information. If you already have that file, append the following to the end. Substitute the correct MAC Address. |
|
37 | 1 | <pre>#/etc/asound.conf |
|
38 | 1 | ||
39 | 1 | pcm.btheadset { |
|
40 | 1 | type plug |
|
41 | 1 | slave { |
|
42 | 1 | pcm { |
|
43 | 1 | type bluetooth |
|
44 | 1 | device <MAC Address> |
|
45 | 1 | profile "auto" |
|
46 | 1 | } |
|
47 | 1 | } |
|
48 | 1 | ||
49 | 1 | hint { |
|
50 | 1 | show on |
|
51 | 1 | description "Bluetooth headset audio output device" |
|
52 | 1 | } |
|
53 | 1 | } |
|
54 | 1 | ||
55 | 1 | ctl.btheadset { |
|
56 | 1 | type bluetooth |
|
57 | 1 | }</pre> |
|
58 | 1 | Check that your audio device is seen by ALSA |
|
59 | 1 | <pre>$ aplay -L |
|
60 | 1 | ...<snip>... |
|
61 | 1 | btheadset |
|
62 | 1 | Bluetooth headset audio output device</pre> |
|
63 | 1 | Main Menu -> Service Menu -> MythTV Configuration -> Setup -> General -> 4th Page |
|
64 | 1 | <pre>Audio output device: ALSA:btheadset</pre> |
|
65 | 1 | _Note: you may have to manually type the above setting into the Audio output device field_ |
|
66 | 1 | Test out your new Bluetooth headset! |
|
67 | 1 | ||
68 | 1 | h3. Troubleshooting (Work in progress) |
|
69 | 1 | * No audio: Try rebooting your machine. |
|
70 | 1 | * Adjust the class in /etc/bluetooth/main.conf |