[alsa-devel] Help! Need to switch between normal speaker and BT headset dynamically

Pradeep Kumar Jilagam pradeep.jilagam at gmail.com
Sun Apr 4 17:50:23 CEST 2010


Hi,

I am trying to switch the ALSA audio output between default speaker and
BT(BlueTooth) headset.

For this, I have used the bluez stack for the BT headset scanning and
detection. After this, I have updated the .asoundrc file with the
corresponding details(like MAC address of the detected BT headset and the
device type as "pcm.bluetooth"). And finally, I used the aplay utility to
play the file.

This approach works fine but this needs restart of the playback session to
start routing on the BT headset. I am trying for a
solution(application/plugin) that can dynamically set the BT headset as the
default audio output device and start streaming to it automatically as soon
as the BT headset is detected in the middle of audio playback.

Is this possible to do and if yes, is there an ALSA application/plugin
already available for this?

Thanks,
Pradeep


More information about the Alsa-devel mailing list