New hook for card profile changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm writing a new module that needs to run some code before the profiles
of a certain alsa card are activated. For this I need a new hook in the
core: PA_CORE_HOOK_CARD_PROFILE_ABOUT_TO_ACTIVATE or something like
that. Will such hook be accepted in upstream even if the module is not
merged in upstream? If yes, I'll post a patch for it soon. Ideas for a
better name for the hook are most welcome.

I believe that the new module will also be suitable for inclusion in
upstream, but I'm not the one who will decide that. The module is
specific to the WL1273 chip from Texas Instruments. The chip implements
both bluetooth and fm radio functionality. Changing the audio routing
between BT, FM rx and FM tx within the chip is a bit tricky. The in-chip
audio routing is controlled with special HCI commands. Currently the
kernel doesn't provide any nice interface for that - the commands need
to be sent from userspace. It may be that the kernel will provide a
sysfs interface for replacing the direct HCI commands, but that remains
to be seen. Even nicer alternative would be if the audio routing could
be controlled through the alsa mixer interface, but that seems unlikely
to happen.

Unless the alsa mixer solution materializes, our plan is that BlueZ will
provide a special D-Bus interface for controlling the chip state, and
Pulseaudio will call that interface whenever the WL1273 alsa card
changes its profile. The card will have four profiles: "off",
"bluetooth", "fmrx" and "fmrx", so those map nicely to the routing
options in the chip. Those BlueZ calls will be made by this new module.

So that's the background - at this point I'm mainly just asking about
the new hook. (Of course, comments regarding other stuff are welcome
too.)

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux