Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: alsa-devel@alsa-project.org
Subject: Re: The best practice to tie platform DAPM widget and codec pin
Date: Fri, 12 Sep 2014 16:57:42 +0200	[thread overview]
Message-ID: <541309E6.9020809@topic.nl> (raw)
In-Reply-To: <CAOMFOmX5FCsxXpoboDLKpnZrBQ52v3jRZQHbJAk2st0gXYrVKg@mail.gmail.com>

On 09/12/2014 06:04 AM, Anatol Pomozov wrote:
> Hi
>
> I bringing up a board that has Realtek 5677 codec. The codec has 6
> gpios and two of them are used by the board. pin3 is used to enable
> headphones amplifier. pin2 is used to gate DMIC clock for 3 of 4 DMICs
> - it allows to leave only one DMIC working in low-power mode.
>
> Now I need to configure the codec that when "Headphones" audio path is
> enabled then pin3 should go high. The same true for DMIC/pin2. I was
> looking for existing similar solutions but cannot find one.
>
> I need something similar to SND_SOC_DAPM_REGULATOR_SUPPLY that allows
> to turn on/off part of the system. But instead of manipulating a
> voltage regulator I just need to set/unset codec's gpio. What would be
> the best way to achieve it?

You can "convert" gpios to supply regulators using a "fixed" regulator 
driver (instantiated in the devicetree, or platform code on older kernels).

>
> The problem here is that codec does not know which of the outputs
> (LOUT1, LOUT2, LOUT3) corresponds to headphones. It is configured as
> audio path in *.dts file.
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>


-- 
Mike Looijmans

  reply	other threads:[~2014-09-12 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12  4:04 The best practice to tie platform DAPM widget and codec pin Anatol Pomozov
2014-09-12 14:57 ` Mike Looijmans [this message]
2014-09-13  8:12   ` Anatol Pomozov

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=541309E6.9020809@topic.nl \
    --to=mike.looijmans@topic.nl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox