From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Daniel Mack <daniel@caiaq.de>
Cc: alsa-devel@alsa-project.org, Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH] ALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_device
Date: Wed, 5 Aug 2009 19:37:00 +0100 [thread overview]
Message-ID: <20090805183700.GA6727@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1249497036-9073-1-git-send-email-daniel@caiaq.de>
On Wed, Aug 05, 2009 at 08:30:36PM +0200, Daniel Mack wrote:
> Power management for the cs4270 codec is currently implemented as part
> of the i2c_driver struct. The disadvantage of doing it this way is that
> the callbacks registered in the snd_soc_card struct are called _before_
> the codec's callbacks.
> That doesn't work, because the snd_soc_card callbacks will most likely
> switch down the codec's power domains or pull the reset GPIOs, and
> hence make the i2c communication bail out.
> Fix this by binding the suspend and resume code to the
> snd_soc_codec_device driver model.
You should leave the suspend and resume functions for I2C but have them
call the snd_soc_suspend_device() and snd_soc_resume_device() callbacks
in the core (which do nothing but will in future ensure that the entire
card goes down when one of the components goes down to make sure we are
always able to communicate with all the card components). The actual
suspend and resume actions should be moved as you have done.
next prev parent reply other threads:[~2009-08-05 18:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 18:30 [PATCH] ALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_device Daniel Mack
2009-08-05 18:37 ` Mark Brown [this message]
2009-08-05 18:50 ` Daniel Mack
2009-08-05 21:04 ` Mark Brown
2009-08-05 21:11 ` Timur Tabi
2009-08-05 21:15 ` 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=20090805183700.GA6727@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=daniel@caiaq.de \
--cc=timur@freescale.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.