假使當我們選擇藍牙喇叭作為系統預設時︰
pi@raspberrypi:~ ps ax | grep jack 1952 ? SLsl 0:01 jackd -R -p 32 -d alsa -d hw:0 -n 3 -p 2048 -o2 -r 44100 2114 pts/0 S+ 0:00 grep --color=auto jack
故知其未用乎??如是
Configuration & Usage
The main component of the BlueALSA is a program called bluealsa
. It should be run as a root during system startup (root privileges are not required per se, the only requirement is a write access to /var/run/bluealsa
). This program acts as a proxy between Bluez and ALSA.
In order to stream audio to the e.g. Bluetooth headset, firstly one has to connect the device. The most straightforward method is to use Bluez CLI utility called bluetoothctl
. When the device is connected one can use the bluealsa
virtual PCM device as follows:
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
playback
dmixed
ac108
default
sysdefault:CARD=ALSA
bcm2835 ALSA, bcm2835 ALSA
Default Audio Device
dmix:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample mixing device
dmix:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct sample snooping device
hw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
bcm2835 ALSA, bcm2835 ALSA
Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
bcm2835 ALSA, bcm2835 IEC958/HDMI
Hardware device with all software conversions
pi@raspberrypi:~ arecord [-D default] foo.wav -vv
ALSA lib bluealsa-pcm.c:660:(_snd_pcm_bluealsa_open) Couldn't get BlueALSA transport: 沒有此一裝置
arecord: main:788: audio open error: 沒有此一裝置
pi@raspberrypi:~ $