ALSA is giving me a terrible headache,
but i found a config which works quite well!
at first i thought: wait, maybe switching files isn't necessary at all. ALSA tries hard to figure out what kind of setup you are trying to use and to provide some sort of fallback if something fails. unfortunately bluetooth doesn't play well with that design.
what do we want to achieve with our pandora setup:
* enable bt audio output and make it easily available (as in setting it as pcm.!default - so everything that's pushing audio through ALSA will use our bt device).
* let the user switch between hardware output and bluetooth output
* with as little required configuration work as possible
unfortunately i can't make ALSA recognize the bt headset as a "real" device. thus my initial plan to use alsamixer to switch from hw to the bt device failed
but i managed to get a softvol control in and route the bt traffic to it, so its possible to control the bt volume in alsamixer now.
so yeah, i guess in our case it's best and prolly most convenient to provide config files for bt audio and hw audio and just switch em depending on what the user wants to use.
the good news is:
ALSA is quite smart, in it's default setting it parses several spots for available config files. you may have read about:
Code:
/etc/asound.conf
AND
~/.asoundrc
both of them are equal in terms of validity for ALSA.
this means that we can config our setup entirely on user level (which makes switching files through scripts a lot easier).
so i do suggest to use ~/.asoundrc only. it works great for me.
i will refine what i did so far, test it a little more, write a tutorial on how to set things up properly and write a tool to switch config files on demand.
i do hope you still got a little patience, cuz im actually really busy
UPDATE:
switching output on the fly works as expected. the script is almost done.
UPDATE #2:
the script is done and works (well, its really simple...). it can, should you want to do that, easily be added to the menubar toggles (as mentioned earlier).
i gotta go to work now. will upload the files and basic explanation tomorrow. extensive tutorial later.
ABOUT GMU:
it still ignores the bt device, which is weird, because a simple mplayer call without any further options (ergo using pcm.!default) gives crystal bluetooth audio.