Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
- index 2c2b9a2..b57d171 100644
- --- a/sound/soc/codecs/alc5632.c
- +++ b/sound/soc/codecs/alc5632.c
- @@ -48,6 +48,15 @@ static void alc5632_fill_cache(struct snd_soc_codec *codec)
- cache[i] = codec->hw_read(codec, i);
- }
- +static void alc5632_print_cache(struct snd_soc_codec *codec)
- +{
- + int i, step = codec->driver->reg_cache_step;
- + u16 *cache = codec->reg_cache;
- +
- + /* not really efficient ... */
- + for (i = 0 ; i < codec->driver->reg_cache_size ; i += step)
- + printk("%d",cache[i]);
- +
- static inline int alc5632_reset(struct snd_soc_codec *codec)
- {
- snd_soc_write(codec, ALC5632_RESET, 0);
- @@ -876,6 +885,9 @@ static struct snd_soc_dai_driver alc5632_dai = {
- static int alc5632_suspend(struct snd_soc_codec *codec, pm_message_t mesg)
- {
- + alc5632_print_cache(codec);
- + alc5632_fill_cache(codec);
- + alc5632_print_cache(codec);
- alc5632_set_bias_level(codec, SND_SOC_BIAS_OFF);
- return 0;
- }
- @@ -884,7 +896,7 @@ static int alc5632_resume(struct snd_soc_codec *codec)
- {
- int i, step = codec->driver->reg_cache_step;
- u16 *cache = codec->reg_cache;
- -
- + alc5632_print_cache(codec);
- /* Sync reg_cache with the hardware */
- for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
- snd_soc_write(codec, i, cache[i]);
Advertisement
Add Comment
Please, Sign In to add comment