diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2014-04-03 17:09:37 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-04-04 10:22:34 -0400 |
commit | 6e61246f5aeaede80e7a00e8b1de7ae07b1315e7 (patch) | |
tree | dd54ab8ac7d485ba924e4e1837169fc1f720a4cd /sound | |
parent | d272ccd0d084766a3e2adba10bea47091b6d68e7 (diff) |
ALSA: ice1712: restore AK4xxx volumes on resume
Also restore AK4xxx mixer volumes on resume for M-Audio ICE1712-based cards.
This fixes incorrect (sound working) zero mixer volumes after resume.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/ice1712/delta.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index b3eed8d6bfc5..496dbd0ad5db 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c | |||
@@ -579,7 +579,8 @@ static struct snd_ak4xxx_private akm_vx442_priv = { | |||
579 | #ifdef CONFIG_PM_SLEEP | 579 | #ifdef CONFIG_PM_SLEEP |
580 | static int snd_ice1712_delta_resume(struct snd_ice1712 *ice) | 580 | static int snd_ice1712_delta_resume(struct snd_ice1712 *ice) |
581 | { | 581 | { |
582 | unsigned char akm_backup[AK4XXX_IMAGE_SIZE]; | 582 | unsigned char akm_img_bak[AK4XXX_IMAGE_SIZE]; |
583 | unsigned char akm_vol_bak[AK4XXX_IMAGE_SIZE]; | ||
583 | 584 | ||
584 | /* init spdif */ | 585 | /* init spdif */ |
585 | switch (ice->eeprom.subvendor) { | 586 | switch (ice->eeprom.subvendor) { |
@@ -604,9 +605,11 @@ static int snd_ice1712_delta_resume(struct snd_ice1712 *ice) | |||
604 | 605 | ||
605 | /* init codec and restore registers */ | 606 | /* init codec and restore registers */ |
606 | if (ice->akm_codecs) { | 607 | if (ice->akm_codecs) { |
607 | memcpy(akm_backup, ice->akm->images, sizeof(akm_backup)); | 608 | memcpy(akm_img_bak, ice->akm->images, sizeof(akm_img_bak)); |
609 | memcpy(akm_vol_bak, ice->akm->volumes, sizeof(akm_vol_bak)); | ||
608 | snd_akm4xxx_init(ice->akm); | 610 | snd_akm4xxx_init(ice->akm); |
609 | memcpy(ice->akm->images, akm_backup, sizeof(akm_backup)); | 611 | memcpy(ice->akm->images, akm_img_bak, sizeof(akm_img_bak)); |
612 | memcpy(ice->akm->volumes, akm_vol_bak, sizeof(akm_vol_bak)); | ||
610 | snd_akm4xxx_reset(ice->akm, 0); | 613 | snd_akm4xxx_reset(ice->akm, 0); |
611 | } | 614 | } |
612 | 615 | ||