public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Mike Frysinger <vapier.adi@gmail.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"device-drivers-devel@blackfin.uclinux.org" 
	<device-drivers-devel@blackfin.uclinux.org>
Subject: Re: [alsa-devel] [PATCH 1/3] ASoC: Add ADAV80x codec driver
Date: Fri, 24 Jun 2011 02:44:28 +0200	[thread overview]
Message-ID: <4E03DDEC.9060608@metafoo.de> (raw)
In-Reply-To: <4E0332C5.7010608@ti.com>

On 06/23/2011 02:34 PM, Liam Girdwood wrote:
> On 23/06/11 07:00, Lars-Peter Clausen wrote:
>> This patch adds support for the Analog Devices ADAV801 and ADAV803 audio codec.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>>
>> ---
>> Changes since v1:
>> * Sync register on resume
>> * Don't use arrays for the mux enums and controls
>> * Rework PLL handling. Use DAPM for powering the PLL and OSC down and use
>>   set_sysclk to select the system clock instead of doing this implicitly in
>>   set_pll.
>> ---
>>  MAINTAINERS                |    1 +
>>  sound/soc/codecs/Kconfig   |    4 +
>>  sound/soc/codecs/Makefile  |    2 +
>>  sound/soc/codecs/adav80x.c |  908 ++++++++++++++++++++++++++++++++++++++++++++
>>  sound/soc/codecs/adav80x.h |   31 ++
>>  5 files changed, 946 insertions(+), 0 deletions(-)
>>  create mode 100644 sound/soc/codecs/adav80x.c
>>  create mode 100644 sound/soc/codecs/adav80x.h
>>
> 
> snip
> 
>> +
>> +static int adav80x_probe(struct snd_soc_codec *codec)
>> +{
>> +       int ret;
>> +       struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
>> +
>> +       ret = snd_soc_codec_set_cache_io(codec, 7, 9, adav80x->control_type);
>> +       if (ret) {
>> +               dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
>> +               return ret;
>> +       }
>> +
>> +       /* Power down SYSCLK output, power down S/PDIF receiver */
>> +       snd_soc_write(codec, ADAV80X_PLL_OUTE, 0x27);
>> +       /* Disable DAC zero flag */
>> +       snd_soc_write(codec, ADAV80X_DAC_CTRL3, 0x6);
>> +
>> +       return adav80x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
>> +}
>> +
> 
> It's usually better disable things like sysclk output in your machine driver as others may depend on it for probing.

What is the proper API to do this? set_sysclk with dir = SND_SOC_CLOCK_OUT and
freq = 0?

  reply	other threads:[~2011-06-24  0:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  6:00 [PATCH 1/3] ASoC: Add ADAV80x codec driver Lars-Peter Clausen
2011-06-23  6:00 ` [PATCH 2/3] ASoC: Blackfin: Add machine driver for EVAL-ADAV80X boards Lars-Peter Clausen
2011-06-23  6:00 ` [PATCH 3/3] Blackfin: bf537: Stamp: Register adav801 codec and ASoC machine driver Lars-Peter Clausen
2011-06-23 12:34 ` [alsa-devel] [PATCH 1/3] ASoC: Add ADAV80x codec driver Liam Girdwood
2011-06-24  0:44   ` Lars-Peter Clausen [this message]
2011-06-24 12:00     ` 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=4E03DDEC.9060608@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=vapier.adi@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