Guest User

Untitled

a guest
Oct 12th, 2011
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
  2. index 2c2b9a2..b57d171 100644
  3. --- a/sound/soc/codecs/alc5632.c
  4. +++ b/sound/soc/codecs/alc5632.c
  5. @@ -48,6 +48,15 @@ static void alc5632_fill_cache(struct snd_soc_codec *codec)
  6. cache[i] = codec->hw_read(codec, i);
  7. }
  8.  
  9. +static void alc5632_print_cache(struct snd_soc_codec *codec)
  10. +{
  11. + int i, step = codec->driver->reg_cache_step;
  12. + u16 *cache = codec->reg_cache;
  13. +
  14. + /* not really efficient ... */
  15. + for (i = 0 ; i < codec->driver->reg_cache_size ; i += step)
  16. + printk("%d",cache[i]);
  17. +
  18. static inline int alc5632_reset(struct snd_soc_codec *codec)
  19. {
  20. snd_soc_write(codec, ALC5632_RESET, 0);
  21. @@ -876,6 +885,9 @@ static struct snd_soc_dai_driver alc5632_dai = {
  22.  
  23. static int alc5632_suspend(struct snd_soc_codec *codec, pm_message_t mesg)
  24. {
  25. + alc5632_print_cache(codec);
  26. + alc5632_fill_cache(codec);
  27. + alc5632_print_cache(codec);
  28. alc5632_set_bias_level(codec, SND_SOC_BIAS_OFF);
  29. return 0;
  30. }
  31. @@ -884,7 +896,7 @@ static int alc5632_resume(struct snd_soc_codec *codec)
  32. {
  33. int i, step = codec->driver->reg_cache_step;
  34. u16 *cache = codec->reg_cache;
  35. -
  36. + alc5632_print_cache(codec);
  37. /* Sync reg_cache with the hardware */
  38. for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
  39. snd_soc_write(codec, i, cache[i]);
  40.  
Advertisement
Add Comment
Please, Sign In to add comment