From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Takashi Iwai <tiwai@suse.de>,
Peter Ujfalusi <peter.ujfalusi@nokia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jesse Marroquin <Jesse.Marroquin@maxim-ic.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: Add max98088 CODEC driver
Date: Wed, 29 Sep 2010 17:58:51 -0700 [thread overview]
Message-ID: <20100930005850.GB4517@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <B2150E1E4418E1438554A300EA5040E40D46F2D9E9@ITSVLEX06.it.maxim-ic.internal>
On Wed, Sep 29, 2010 at 05:52:08PM -0700, Peter Hsiang wrote:
> On Wed, Sep 29, 2010, Mark Brown wrote:
> > You're looking for the non-DAPM equivalent of SND_SOC_DAPM_VALUE_MUX().
> This is a simple table lookup of a register value from the index
> number given by SOC_ENUM, the same way it's been done in other drivers.
Yes, exactly.
> I found a "case snd_soc_dapm_value_mux:" in dapm_set_path_status()
> Is this what you are referring to?
> How is the code there relevant to this?
No, I'm referring to the fact that it provides an enum that allows
arbatrary values to be set for each enum value rather than just allowing
indexes as the standard SOC_ENUM does. This is essentially what you've
implemented, it would factor out the code so that others can use it too
(and IIRC save you some code since IIRC you had more than one of these
in the driver).
> > > > > + /* powering down headphone gracefully */
> > > > > + status = snd_soc_read(codec, M98088_REG_4D_PWR_EN_OUT);
> > > > > + if ((status & M98088_HPEN) == M98088_HPEN) {
> > > > > + max98088_hw_write(codec, M98088_REG_4D_PWR_EN_OUT,
> > > > > + (status & ~M98088_HPEN));
> > > > > + }
> > > > > + schedule_timeout(msecs_to_jiffies(20));
> > > > This looks rather like it should just be a post event implementing a
> > > > timeout?
> > > This needs to work as a pre event.
> > Again, why is this?
> When powering down the headphone, the way that DAPM works is it
> likes to power off one item at a time, for example, the left channel,
> then right channel. The headphone hardware likes to see the
Have you tested with current Linux versions? For quite a few kernel
releases now register writes are batched so that all the controls of a
given type in a single register will be set together.
> headphone bits L and R be powered down together, for optimum result.
> This works best with the pre method. Powering up one channel at a
> time later is fine, when DAPM resumes.
With current Linux versions you should see the left and right channels
powered down together (if they are both being powered down, of course).
next prev parent reply other threads:[~2010-09-30 0:58 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 2:34 [PATCH] ASoC: Add max98088 CODEC driver Peter Hsiang
2010-09-29 3:37 ` Mark Brown
2010-09-29 21:42 ` Peter Hsiang
2010-09-29 22:18 ` Mark Brown
2010-09-30 0:52 ` Peter Hsiang
2010-09-30 0:58 ` Mark Brown [this message]
2010-09-30 1:20 ` Peter Hsiang
2010-09-30 17:23 ` user space control app driver interface for sound soc Peter Hsiang
2010-09-30 20:31 ` Mark Brown
2010-09-30 21:55 ` Peter Hsiang
2010-09-30 22:09 ` Mark Brown
2010-09-30 23:10 ` Peter Hsiang
2010-09-30 23:34 ` Mark Brown
2010-10-01 1:56 ` Peter Hsiang
2010-10-01 2:37 ` Mark Brown
2010-10-01 6:56 ` Clemens Ladisch
2010-10-01 7:12 ` Mark Brown
2010-10-01 13:42 ` Takashi Iwai
2010-10-01 17:35 ` Mark Brown
2010-10-01 21:57 ` Peter Hsiang
2010-10-03 9:09 ` Takashi Iwai
2010-10-13 1:20 ` [PATCH] ASoC: Add max98088 CODEC driver Peter Hsiang
2010-10-13 1:47 ` Joe Perches
2010-10-13 8:24 ` Mark Brown
2010-10-13 12:10 ` [PATCH] sound/soc: rename vol to volatile_register as appropriate Joe Perches
2010-10-13 12:33 ` Mark Brown
2010-10-13 12:55 ` Joe Perches
2010-10-13 15:11 ` Mark Brown
2010-10-13 15:27 ` Joe Perches
2010-10-13 15:29 ` Mark Brown
2010-10-13 15:35 ` Joe Perches
2010-10-13 19:10 ` [RFC PATCH] sound/soc/codecs/wm8962.c: Use register index, save 100kb text Joe Perches
2010-10-13 19:40 ` Mark Brown
2010-10-13 20:06 ` Joe Perches
2010-10-13 20:29 ` Mark Brown
2010-10-13 15:19 ` [PATCH] sound/soc/codecs/wm8994.c: Remove unused vol Joe Perches
2010-10-15 10:08 ` Liam Girdwood
2010-10-15 10:39 ` Mark Brown
2010-10-13 10:32 ` [PATCH] ASoC: Add max98088 CODEC driver Mark Brown
2010-10-14 3:18 ` Peter Hsiang
2010-10-14 3:30 ` Peter Hsiang
2010-10-15 10:04 ` Liam Girdwood
2010-10-15 10:55 ` Mark Brown
2010-10-15 17:23 ` Peter Hsiang
-- strict thread matches above, loose matches on Subject: below --
2010-09-23 2:58 Peter Hsiang
2010-09-23 12:04 ` Mark Brown
2010-09-23 17:56 ` Peter Hsiang
2010-09-23 18:38 ` Mark Brown
[not found] <B2150E1E4418E1438554A300EA5040E40D469C123B@ITSVLEX06.it.maxim-ic.internal>
2010-09-01 11:14 ` Mark Brown
2010-09-02 23:30 ` Peter Hsiang
2010-09-03 10:17 ` Mark Brown
2010-09-22 2:49 ` Peter Hsiang
2010-09-22 10:38 ` Mark Brown
2010-08-31 21:08 Peter Hsiang
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=20100930005850.GB4517@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=Jesse.Marroquin@maxim-ic.com \
--cc=Peter.Hsiang@maxim-ic.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=peter.ujfalusi@nokia.com \
--cc=tiwai@suse.de \
/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).