Bluetooth Audio

Version 1 (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 1
Place your Bluetooth audio device in pairing mode, then scan for it and make a note of the MAC address.
30 1
<pre>$ hcitool scan</pre>
31 1
Use bluez-simple-agent to pair your audio device to your dongle.
32 1
<pre>$ bluez-simple-agent hci0 <MAC Address></pre>
33 1
Enter your audio device's PIN number when prompted.
34 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.
35 1
<pre>#/etc/asound.conf
36 1
37 1
 pcm.btheadset {
38 1
    type plug
39 1
    slave {
40 1
        pcm {
41 1
            type bluetooth
42 1
            device <MAC Address> 
43 1
            profile "auto"
44 1
        }   
45 1
    }   
46 1
47 1
    hint {
48 1
        show on
49 1
        description "Bluetooth headset audio output device"
50 1
    }   
51 1
 }
52 1
53 1
 ctl.btheadset {
54 1
   type bluetooth
55 1
 }</pre>
56 1
Check that your audio device is seen by ALSA
57 1
<pre>$ aplay -L
58 1
...<snip>...
59 1
btheadset
60 1
    Bluetooth headset audio output device</pre>
61 1
Main Menu -> Service Menu -> MythTV Configuration -> Setup -> General -> 4th Page
62 1
<pre>Audio output device: ALSA:btheadset</pre>
63 1
_Note: you may have to manually type the above setting into the Audio output device field_
64 1
Test out your new Bluetooth headset!
65 1
66 1
h3. Troubleshooting (Work in progress)
67 1
* No audio: Try rebooting your machine.
68 1
* Adjust the class in /etc/bluetooth/main.conf