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:	Mon, 19 Sep 2011 12:00:06 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Peter Ujfalusi <peter.ujfalusi@...com>
Cc:	Samuel Ortiz <samuel.ortiz@...el.com>,
	Dmitry Torokhov <dtor@...l.ru>, Liam Girdwood <lrg@...com>,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
	Misael Lopez Cruz <misael.lopez@...com>
Subject: Re: [PATCH 07/17] ASoC: twl6040: Lower the initial gains

On Thu, Sep 15, 2011 at 03:39:29PM +0300, Peter Ujfalusi wrote:
> The default gains on outputs/inputs are set to 0dB.
> To be able to handle pop noise better, we need to lower
> the gains on controls, where it is possible.

It looks like what you really want to do here is implement support
having PGAs able to cache the gain the user has set but hold the gain at
zero while the PGA is disabled.  This would be generally useful, a lot
of older parts liked to have the PGAs muted when powering them.

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
> ---
>  sound/soc/codecs/twl6040.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
> index 987d9c9..1f6068b 100644
> --- a/sound/soc/codecs/twl6040.c
> +++ b/sound/soc/codecs/twl6040.c
> @@ -269,6 +269,13 @@ static void twl6040_init_chip(struct snd_soc_codec *codec)
>  	/* No imput selected for microphone amplifiers */
>  	twl6040_write_reg_cache(codec, TWL6040_REG_MICLCTL, 0x18);
>  	twl6040_write_reg_cache(codec, TWL6040_REG_MICRCTL, 0x18);
> +
> +	/* Lower the gains */
> +	twl6040_write_reg_cache(codec, TWL6040_REG_HSGAIN, 0xff);
> +	twl6040_write_reg_cache(codec, TWL6040_REG_EARCTL, 0x1e);
> +	twl6040_write_reg_cache(codec, TWL6040_REG_HFLGAIN, 0x1d);
> +	twl6040_write_reg_cache(codec, TWL6040_REG_HFRGAIN, 0x1d);
> +	twl6040_write_reg_cache(codec, TWL6040_REG_LINEGAIN, 0);
>  }
>  
>  static void twl6040_restore_regs(struct snd_soc_codec *codec)
> -- 
> 1.7.6.1
> 
--
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