mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
audio: fix no audio after resume of ad82584f [1/1]
PD#SWPL-4090 Problem: No audio after suspend and resume. Suspend won't save the mute value, and after resume, it could not be restored. Solution: Add a mute val to save when suspend, and after resume, restore the mute value. Verify: Verified by QA. Change-Id: Ie24bb11f5c565048391846a66b5d12bab1d55666 Signed-off-by: Shuai Li <shuai.li@amlogic.com>
This commit is contained in:
@@ -598,6 +598,7 @@ struct ad82584f_priv {
|
||||
unsigned char Ch1_vol;
|
||||
unsigned char Ch2_vol;
|
||||
unsigned char master_vol;
|
||||
unsigned char mute_val;
|
||||
|
||||
#ifdef CONFIG_HAS_EARLYSUSPEND
|
||||
struct early_suspend early_suspend;
|
||||
@@ -860,6 +861,7 @@ static int ad82584f_suspend(struct snd_soc_codec *codec)
|
||||
ad82584f->Ch1_vol = snd_soc_read(codec, C1VOL);
|
||||
ad82584f->Ch2_vol = snd_soc_read(codec, C2VOL);
|
||||
ad82584f->master_vol = snd_soc_read(codec, MVOL);
|
||||
ad82584f->mute_val = snd_soc_read(codec, MUTE);
|
||||
|
||||
ad82584f_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
@@ -877,6 +879,7 @@ static int ad82584f_resume(struct snd_soc_codec *codec)
|
||||
snd_soc_write(codec, C1VOL, ad82584f->Ch1_vol);
|
||||
snd_soc_write(codec, C2VOL, ad82584f->Ch2_vol);
|
||||
snd_soc_write(codec, MVOL, ad82584f->master_vol);
|
||||
snd_soc_write(codec, MUTE, ad82584f->mute_val);
|
||||
|
||||
ad82584f_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user