alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Eric Miao <eric.y.miao@gmail.com>,
	Philipp Zabel <philipp.zabel@gmail.com>
Subject: Re: [PATCH] ALSA: ASoC: fix PXA SSP port resume
Date: Fri, 29 Jan 2010 12:08:36 +0100	[thread overview]
Message-ID: <20100129110836.GV28972@buzzloop.caiaq.de> (raw)
In-Reply-To: <20100129101307.GA3201@rakim.wolfsonmicro.main>

On Fri, Jan 29, 2010 at 10:13:08AM +0000, Mark Brown wrote:
> On Thu, Jan 28, 2010 at 06:34:18PM +0800, Daniel Mack wrote:
> > Invalidate the cached hardware format on resume for PXA SSP ports.
> > Otherwise hw_params() will bail out early at the next stream start,
> > leaving the registers in a bogus state.
> 
> Would it not be better to write the cached state back to the hardware?
> Putting an invalid value in the cache seems like asking for trouble.

Hmm. I considered that, but the reason why the system failed to resume
in my case was that the ssp port was not active at this time. Otherwise,
the suspend/resume code would have already done the right thing.

And as the next client will indirectly call hw_params() again, the code
there will do the right thing with the invalidated cache.

Restoring the register values from priv->dai_fmt would imply adding code
to do everything what the other bit-fiddling functions do in a reverse
manner. Which is something I'd like to avoid :)

Another idea is to unconditionally save and restore the register set,
and deal with possible side-effects. Not sure what's really better.

Daniel

  reply	other threads:[~2010-01-29 11:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 10:34 [PATCH] ALSA: ASoC: fix PXA SSP port resume Daniel Mack
2010-01-29 10:13 ` Mark Brown
2010-01-29 11:08   ` Daniel Mack [this message]
2010-01-29 14:00     ` Mark Brown
2010-02-02  3:32       ` Daniel Mack
2010-02-02 10:51         ` Liam Girdwood
2010-02-02 10:45           ` Daniel Mack
2010-02-02 11:41             ` 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=20100129110836.GV28972@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=eric.y.miao@gmail.com \
    --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 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).