From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>,
Philipp Zabel <philipp.zabel@gmail.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH RFC 3/3] uda1380: make driver more powersave-friendly
Date: Sun, 27 Jun 2010 11:10:54 +0100 [thread overview]
Message-ID: <20100627101053.GA26394@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <201006270007.34271.anarsoul@gmail.com>
On Sun, Jun 27, 2010 at 12:07:26AM +0300, Vasily Khoruzhick wrote:
> В сообщении от 26 июня 2010 23:45:12 автор Mark Brown написал:
> > This seems odd, I'd expect the cache to be being marked as clean
> > immediately after sync?
> Nope, it is not. Only i2c and clock related regs of uda1380 can be modified
> when there's no i2s clock, i.e. mixer regs should be updated right after i2s
> clock was enabled, so we marking mixer-related regs cache as dirty, to make
> sure they'll be updated when possible.
This is very much non-obvious from your code - it really needs comments
explaining why the cache sync function didn't actually manage to sync
the cache. I'd also really expect that the dirtying of the cache would
be done when the operation that invalidates it happens, not later on
when restoring the cache. Otherwise there's a window where the cache is
flagged as valid but is not actually so which doesn't seem robust.
> > > uda1380_write(codec, UDA1380_PM, R02_PON_BIAS | pm);
> > Like I said previously you really should look at using DAPM here, this
> > should make the code simpler and will let you
> Hmm, uda134x driver does pretty same things as in my patch... And it seems
> part of your sentence is lost :(
Old drivers for fairly obscure chips aren't always a good guide to best
practices for things.
> > > - ret = uda1380_reset(codec);
> > > - if (ret < 0) {
> > > - dev_err(codec->dev, "Failed to issue reset\n");
> > > - goto err_reset;
> > > - }
> > The reason for the reset at startup is that we don't know what state the
> > device is in when Linux gets control.
> It's softreset and it's performed by writing some value to some reg. i2c xfers
> is not possible when codec is not enabled (it is not at this point)
It needs to happen at some point.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2010-06-27 10:10 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-26 15:14 [PATCH RFC 0/3] asoc: uda1380 cleanup Vasily Khoruzhick
2010-06-26 15:14 ` [PATCH RFC 1/3] ASoC: uda1380: use callbacks instead of gpiolib Vasily Khoruzhick
2010-06-26 16:40 ` Mark Brown
2010-06-26 16:53 ` Vasily Khoruzhick
2010-06-26 20:09 ` Mark Brown
2010-06-26 20:53 ` Vasily Khoruzhick
2010-06-26 20:57 ` Mark Brown
2010-06-26 21:12 ` Vasily Khoruzhick
2010-06-27 10:21 ` Mark Brown
2010-06-28 12:00 ` Vasily Khoruzhick
2010-06-28 13:41 ` Mark Brown
2010-06-28 13:49 ` Vasily Khoruzhick
2010-06-28 13:50 ` Mark Brown
2010-06-28 14:05 ` Vasily Khoruzhick
2010-06-28 14:15 ` Mark Brown
2010-06-28 14:25 ` Vasily Khoruzhick
[not found] ` <AANLkTilfEIEBaHO8FupS9wU3FR3VGc_yUVNP8KPJ30jW@mail.gmail.com>
2010-06-28 14:32 ` Mark Brown
2010-06-26 15:14 ` [PATCH RFC 2/3] magician: pass .set_power callback to uda1380 pdata Vasily Khoruzhick
2010-06-26 15:14 ` [PATCH RFC 3/3] uda1380: make driver more powersave-friendly Vasily Khoruzhick
2010-06-26 20:45 ` Mark Brown
2010-06-26 21:07 ` Vasily Khoruzhick
2010-06-27 10:10 ` Mark Brown [this message]
2010-06-27 10:43 ` Vasily Khoruzhick
2010-06-27 20:55 ` Mark Brown
2010-06-27 21:15 ` Vasily Khoruzhick
2010-06-27 21:40 ` Mark Brown
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=20100627101053.GA26394@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=anarsoul@gmail.com \
--cc=lrg@slimlogic.co.uk \
--cc=philipp.zabel@gmail.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 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.