[alsa-devel] [PATCH 1/4] ASoC: tlv320dac33: Optimize power up, and restore
Peter Ujfalusi
peter.ujfalusi at nokia.com
Fri Apr 30 09:37:37 CEST 2010
On Friday 30 April 2010 10:31:52 Ujfalusi Peter (Nokia-D/Tampere) wrote:
> On power up we only need to initialize the codec, and
> restore only registers, which are not in either in DAPM
> nor in the playback start sequence.
> These are mostly gain related registers.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
...
> +
> + /* Restore only selected registers (gains mostly) */
> + dac33_write(codec, DAC33_LDAC_DIG_VOL_CTRL,
> + dac33_read_reg_cache(codec, DAC33_LDAC_DIG_VOL_CTRL));
> + dac33_write(codec, DAC33_RDAC_DIG_VOL_CTRL,
> + dac33_read_reg_cache(codec, DAC33_RDAC_DIG_VOL_CTRL));
> +
> + dac33_write(codec, DAC33_LDAC_DIG_VOL_CTRL,
> + dac33_read_reg_cache(codec, DAC33_LDAC_DIG_VOL_CTRL));
> + dac33_write(codec, DAC33_RDAC_DIG_VOL_CTRL,
> + dac33_read_reg_cache(codec, DAC33_RDAC_DIG_VOL_CTRL));
Hmm, restoring the same registers twice...
I'll remove the duplication in the v2 series (which I'm sure will come)
> +
> + dac33_write(codec, DAC33_LINEL_TO_LLO_VOL,
> + dac33_read_reg_cache(codec, DAC33_LINEL_TO_LLO_VOL));
> + dac33_write(codec, DAC33_LINER_TO_RLO_VOL,
> + dac33_read_reg_cache(codec, DAC33_LINER_TO_RLO_VOL));
> }
>
--
Péter
More information about the Alsa-devel
mailing list