All of lore.kernel.org
 help / color / mirror / Atom feed
* Override default behavior when headphones are connected upon user request on wm8962
@ 2015-06-01 14:21 Santiago Zarate
  0 siblings, 0 replies; only message in thread
From: Santiago Zarate @ 2015-06-01 14:21 UTC (permalink / raw)
  To: Alsa-devel

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.html
[1]
http://mailman.alsa-project.org/pipermail/alsa-devel/2010-December/035055.html
 [2]


Thanks in advance!
-- 

Santiago Zarate
  http://foursixnine.io

“Dreams permit each and every one of us to be quietly and safely insane
every night of our lives.” - William Dement
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-01 14:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 14:21 Override default behavior when headphones are connected upon user request on wm8962 Santiago Zarate

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.