[alsa-devel] Override default behavior when headphones are connected upon user request on wm8962
Hello,
Currently i'm trying to override the default behavior when headphones are plugged, We actually need to play audio under certain situations, and one of the use cases is when the headphones are connected, but a sound needs to be played over the speakers, so someone else is aware of what's happening.
We're thinking about using a GPIO that it's available from our application or a simple module parameter, but the problem i'm facing right now is:
1: Where to specify that particular path or the behavior i need, i've been looking at [2], and adding a SOC_DAPM_PIN_SWITCH[1] but doesn't matter what the state is, if the headphones are on, i can't turn on the speakers to play sounds at the same time.
i'm able to do it, by disabling the hp detection pin, and controlling the audio over udev events. so i'm pretty sure that it would be possible to do this, with the hp detection pin. which takes us to #2:
2: How can i trigger an event based on the change of a module parameter or a gpio port (Thinking both would be the same)...
i've tried to alter hp_event http://lxr.free-electrons.com/ident?v=3.16;i=hp_event without any success... even returning 0 on any event and still nothing, which drives me to belive that i'm doing something completely wrong AND the codec/driver is among the last ones to get notified of the presence of the hp
The idea is:
if override port or parameter is set to true, trigger the audio override and play sound on Speaker and HP at the same time.
right now i'm working with imx-wm8962 driver and the matching codec,
http://mailman.alsa-project.org/pipermail/alsa-devel/2011-February/036370.ht... [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2010-December/035055.ht... [2]
Thanks in advance!
participants (1)
-
Santiago Zarate