From: Colin Guthrie <gmane@colin.guthr.ie>
To: alsa-devel@alsa-project.org
Subject: Re: Help! Need to switch between normal speaker and BT headset dynamically
Date: Tue, 06 Apr 2010 09:19:16 +0100 [thread overview]
Message-ID: <hpeqq4$skf$1@dough.gmane.org> (raw)
In-Reply-To: <s2kc731536d1004052206t279dd76au1804bd0d8339cec8@mail.gmail.com>
'Twas brillig, and Pradeep Kumar Jilagam at 06/04/10 06:06 did gyre and
gimble:
> Hi Daniel,
>
> Thanks for your response.
>
> I am trying to get this working on a small embedded system with limited
> memory and processing capabilities. I have also explored in the direction of
> pulseaudio but I am not sure whether it is small enough to fit into a small
> system.
Most of the linux-based embedded and mobile phone manufacturers are
using PA these days (certainly Palm, Nokia and Intel), so I don't see a
major headache here. There are specific optimisations for ARM in the PA
codebase too.
Aslo, I I came to know that the default output device will again
> have to be manually changed in the GUI menu fo pulseaudio to start streaming
> on the BT headset after updating asoundrc with its MAC address.
Using the ALSA bluetooth support is likely not going to work too well.
PA has direct bluetooth support these days. All the upstream (bluez)
effort regarding audio on linux is via PA. PA will automatically
discover BT devices and once they are paired, they will appear
automatically as sinks/sources in PA.
You can use various command line tools to change the device of a running
stream. You can also write a program and use the libpulse capabilities
to programatically move the streams.
> I am trying to find out whether the streaming can automatically start
> routing to the BT headset as soon as it is detected without any need for
> user's intervention.
In theory yes, but in practice this is actually quite hard with the
current PA routing logic. I personally have some issues with it and want
to change things to make this use case easier.
Currently if all audio streams are tagged as "media.role=phone" then
they *will* be routed to a bluetooth device automatically if one is
present. So that's probably the cleanest approach.
HTHs
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
next prev parent reply other threads:[~2010-04-06 8:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-04 15:50 Help! Need to switch between normal speaker and BT headset dynamically Pradeep Kumar Jilagam
2010-04-04 19:36 ` Daniel Chen
2010-04-06 5:06 ` Pradeep Kumar Jilagam
2010-04-06 8:19 ` Colin Guthrie [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-04-06 11:37 ANISH KUMAR
2010-04-06 14:30 ` Colin Guthrie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='hpeqq4$skf$1@dough.gmane.org' \
--to=gmane@colin.guthr.ie \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).