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..491ac8d 100644
- --- a/sound/soc/codecs/alc5632.c
- +++ b/sound/soc/codecs/alc5632.c
- @@ -50,8 +50,7 @@ static void alc5632_fill_cache(struct snd_soc_codec *codec)
- static inline int alc5632_reset(struct snd_soc_codec *codec)
- {
- - snd_soc_write(codec, ALC5632_RESET, 0);
- - return snd_soc_read(codec, ALC5632_RESET);
- + return snd_soc_write(codec, ALC5632_RESET, 0);
- }
- static int amp_mixer_event(struct snd_soc_dapm_widget *w,
- @@ -876,7 +875,18 @@ static struct snd_soc_dai_driver alc5632_dai = {
- static int alc5632_suspend(struct snd_soc_codec *codec, pm_message_t mesg)
- {
- - alc5632_set_bias_level(codec, SND_SOC_BIAS_OFF);
- + int i, step = codec->driver->reg_cache_step;
- + u16 *cache = codec->reg_cache;
- +
- + for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
- + cache[i] = codec->hw_read(codec, i);
- +
- +printk("%s\n", "Its our reg_cache");
- + for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
- + printk("%d\n", cache[i]);
- +printk("%s\n", "End");
- +
- + alc5632_set_bias_level(codec, SND_SOC_BIAS_OFF);
- return 0;
- }
- @@ -885,6 +895,10 @@ static int alc5632_resume(struct snd_soc_codec *codec)
- int i, step = codec->driver->reg_cache_step;
- u16 *cache = codec->reg_cache;
- + for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
- + printk("%d\n", cache[i]);
- +
- +
- /* Sync reg_cache with the hardware */
- for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
- snd_soc_write(codec, i, cache[i]);
- @@ -897,7 +911,13 @@ static int alc5632_resume(struct snd_soc_codec *codec)
- codec->dapm.bias_level = SND_SOC_BIAS_ON;
- alc5632_set_bias_level(codec, codec->dapm.bias_level);
- }
- +for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
- + cache[i] = codec->hw_read(codec, i);
- +printk("%s\n", "Its our reg_cache after suspend");
- +for (i = 2 ; i < codec->driver->reg_cache_size ; i += step)
- + printk("%d\n", cache[i]);
- +printk("%s\n", "End");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment