Hello!
I trying to make my bluetooth headset work... I'm working on the output part first - microphone will come later.
I've found some python code in Bluez Trac which seems to work, I can hear audio from the headset.
I've also added these lines to my .asoundrc file:
Code:
pcm.bluetooth {
type bluetooth
}
If I run, for example,
Code:
mplayer -ao alsa:device=bluetooth file.mp3
audio comes from the headset. If I omit the -ao part, audio comes from the computer (obviously).
Also, if I run
Code:
mplayer -ao alsa:device=bluetoothasdf file.mp3
I get an error.
Then, I think I can say that "bluetooth" is recognized as an alsa device (or card, I don't know if it's the same thing).
My problem is that I want to be able to set dynamically (i.e. when I need it) the headset as default alsa device. I've tested the ALSA_CARD environment variable, and it seems to work. What I need is the of the headset name as alsa sees it.
I thought that exporting ALSA_CARD=bluetooth would work, but it doesn't.
If I run
I get
Code:
ALSA lib confmisc.c:768:(parse_card) cannot find card 'bluetooth'
ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:3510:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:3982:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2145:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:546: audio open error: No such device
which is strange to me, since with mplayer "-ao alsa:device=bluetooth" works.
If I cat /proc/asound/cards (when the headset is being used, to make sure), I get
Code:
0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
Intel 82801DB-ICH4 with STAC9750,51 at irq 4
which is my motherboard's soundcard.
(By the way, if I set ALSA_CARD to "I82801DBICH4", sound works again).
So, why doesn't /proc/asound/cards list the headset too?
If it did, I could use its name to set ALSA_CARD accordingly.
P.S. I opened a thread (
http://www.linuxquestions.org/questi...doubts-706830/) about my bluetooth headset some days ago, but nobody replied. Moreover, the thread's title is not so clear (I'm sorry), so I think moderators can delete it.