lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 23 Jun 2011 13:34:13 +0100
From:	Liam Girdwood <lrg@...com>
To:	Lars-Peter Clausen <lars@...afoo.de>
CC:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Mike Frysinger <vapier.adi@...il.com>,
	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"device-drivers-devel@...ckfin.uclinux.org" 
	<device-drivers-devel@...ckfin.uclinux.org>
Subject: Re: [alsa-devel] [PATCH 1/3] ASoC: Add ADAV80x codec driver

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@...afoo.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.

Liam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ