All of lore.kernel.org
 help / color / mirror / Atom feed
From: Santiago Zarate <santiago@zarate.net.ve>
To: Alsa-devel@alsa-project.org
Subject: Override default behavior when headphones are connected upon user request on wm8962
Date: Mon, 1 Jun 2015 22:21:24 +0800	[thread overview]
Message-ID: <CAD_eom_M30VZs+seV6RWB4C_ZVXCQ6yyT-+P800cG_PRPiJPug@mail.gmail.com> (raw)

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

                 reply	other threads:[~2015-06-01 14:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAD_eom_M30VZs+seV6RWB4C_ZVXCQ6yyT-+P800cG_PRPiJPug@mail.gmail.com \
    --to=santiago@zarate.net.ve \
    --cc=Alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.