[alsa-devel] [RFC PATCH 3/6] ASoC: sgtl5000: initialize CHIP_ANA_POWER to power-on defaults

Mark Brown broonie at kernel.org
Fri Mar 6 21:12:07 CET 2015


On Thu, Feb 26, 2015 at 03:54:30PM -0700, Eric Nelson wrote:
> Initialize CHIP_ANA_POWER to match power on defaults, which disables
> ADC, DAC, and charge pumps.

> +++ b/sound/soc/codecs/sgtl5000.c
> @@ -47,12 +47,10 @@ static const struct reg_default sgtl5000_reg_defaults[] = {
>  	{ SGTL5000_CHIP_ANA_ADC_CTRL,		0x0000 },
>  	{ SGTL5000_CHIP_ANA_HP_CTRL,		0x1818 },
>  	{ SGTL5000_CHIP_ANA_CTRL,		0x0111 },
> -	{ SGTL5000_CHIP_LINREG_CTRL,		0x0000 },
>  	{ SGTL5000_CHIP_REF_CTRL,		0x0000 },
>  	{ SGTL5000_CHIP_MIC_CTRL,		0x0000 },
>  	{ SGTL5000_CHIP_LINE_OUT_CTRL,		0x0000 },
>  	{ SGTL5000_CHIP_LINE_OUT_VOL,		0x0404 },
> -	{ SGTL5000_CHIP_ANA_POWER,		0x7060 },

Two big problems here.  One is that this appears to also affect
LINREG_CTRL which your changelog didn't mention.  The other is that
contrary to what the changelog says this isn't fixing the default, it's
removing it.  The whole point of the register defaults table is to
contain the default power on register values, if it contains other
things that is a bug and should be fixed by changing the values not
removing them.

Given that confusion I'm really having a hard time understanding the
rest of the commit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150306/0fb86f35/attachment.sig>


More information about the Alsa-devel mailing list