LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-25-2009, 03:10 AM   #1
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 217

Rep: Reputation: 30
Thumbs down Bluetooth headset, Alsa - no soundcard in /proc/asound/cards (but headset works)


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
Code:
aplay test.wav
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.
 
Old 04-29-2009, 09:07 AM   #2
gsanchez
LQ Newbie
 
Registered: Apr 2009
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 0
Same problem here!

This is my .asoundrc file
pcm.!default {
type plug
slave.pcm "bluetooth"
}
pcm.bluetooth {
type bluetooth
device 00:12:C8:91:36:89
}

When I start the system (Ubuntu 9.04, by the way) it sounds through the bluetooth headset, but when I list /proc/asound/pcm I cant see it.

When I run this command:
aplay -v -D bluetooth something.wav
sometimes it works and sometimes it displays the following error:

aplay: pcm_write:1442: error de escritura: Error de entrada/salida
(writing error:I/O error)

Im starting to think that is a bluetooth problem and it doesnt have to do with ALSA. How can I confirm this?

Best regards!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth headset, many doubts simopal6 Linux - Hardware 1 02-24-2009 08:10 AM
Bluetooth Headset wdowning Linux - Hardware 1 02-23-2009 11:30 AM
Bluetooth headset and Skype squaregoldfish Linux - Hardware 2 02-10-2008 03:50 PM
Bluetooth headset - only worked once! rwhitworth Suse/Novell 0 02-28-2006 05:10 AM
Bluetooth headset patthew Linux - Hardware 1 06-14-2005 07:17 AM


All times are GMT -5. The time now is 11:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration