From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: WM8770: Initial driver
Date: Fri, 5 Nov 2010 13:21:01 -0400 [thread overview]
Message-ID: <20101105172101.GB25977@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1288971105-11297-1-git-send-email-dp@opensource.wolfsonmicro.com>
On Fri, Nov 05, 2010 at 03:31:45PM +0000, Dimitris Papastamos wrote:
> + SND_SOC_DAPM_MIXER_E("VOUT1 Mixer", SND_SOC_NOPM, 0, 0,
> + vout1_mix_controls, ARRAY_SIZE(vout1_mix_controls),
> + vout12mixer_event, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD),
> + SND_SOC_DAPM_MIXER_E("VOUT2 Mixer", SND_SOC_NOPM, 0, 0,
> + vout2_mix_controls, ARRAY_SIZE(vout2_mix_controls),
> + vout12mixer_event, SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD),
Both of these use this event:
> +static int vout12mixer_event(struct snd_soc_dapm_widget *w,
> + struct snd_kcontrol *kcontrol, int event)
> +{
> + struct snd_soc_codec *codec;
> +
> + codec = w->codec;
> +
> + switch (event) {
> + case SND_SOC_DAPM_PRE_PMU:
> + snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0);
> + break;
> + case SND_SOC_DAPM_PRE_PMD:
> + snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0x180);
> + break;
> + }
If one widget is powered down while the other is kept active then this
will power down both which probably isn't what was wanted. This can be
handled by attaching the event to a _SUPPLY widget which feeds into both
mixers, or by explicit reference counting in the event.
next prev parent reply other threads:[~2010-11-05 17:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 15:31 [PATCH] ASoC: WM8770: Initial driver Dimitris Papastamos
2010-11-05 17:21 ` Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-11-05 15:28 Dimitris Papastamos
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=20101105172101.GB25977@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=dp@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=patches@opensource.wolfsonmicro.com \
/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;
as well as URLs for NNTP newsgroup(s).