From: Ondrej Zary <linux@rainbow-software.org>
To: alsa-devel@alsa-project.org
Subject: [PATCH 1/2] snd-ice1712: restore AK4xxx volumes on resume
Date: Thu, 3 Apr 2014 23:09:37 +0200 [thread overview]
Message-ID: <1396559378-23980-1-git-send-email-linux@rainbow-software.org> (raw)
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>
---
sound/pci/ice1712/delta.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c
index 3764a27..bb34608 100644
--- a/sound/pci/ice1712/delta.c
+++ b/sound/pci/ice1712/delta.c
@@ -578,7 +578,8 @@ static struct snd_ak4xxx_private akm_vx442_priv = {
#ifdef CONFIG_PM_SLEEP
static int snd_ice1712_delta_resume(struct snd_ice1712 *ice)
{
- unsigned char akm_backup[AK4XXX_IMAGE_SIZE];
+ unsigned char akm_img_bak[AK4XXX_IMAGE_SIZE];
+ unsigned char akm_vol_bak[AK4XXX_IMAGE_SIZE];
/* init spdif */
switch (ice->eeprom.subvendor) {
@@ -603,9 +604,11 @@ static int snd_ice1712_delta_resume(struct snd_ice1712 *ice)
/* init codec and restore registers */
if (ice->akm_codecs) {
- memcpy(akm_backup, ice->akm->images, sizeof(akm_backup));
+ memcpy(akm_img_bak, ice->akm->images, sizeof(akm_img_bak));
+ memcpy(akm_vol_bak, ice->akm->volumes, sizeof(akm_vol_bak));
snd_akm4xxx_init(ice->akm);
- memcpy(ice->akm->images, akm_backup, sizeof(akm_backup));
+ memcpy(ice->akm->images, akm_img_bak, sizeof(akm_img_bak));
+ memcpy(ice->akm->volumes, akm_vol_bak, sizeof(akm_vol_bak));
snd_akm4xxx_reset(ice->akm, 0);
}
--
Ondrej Zary
next reply other threads:[~2014-04-03 21:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 21:09 Ondrej Zary [this message]
2014-04-03 21:09 ` [PATCH 2/2] snd-ice1712: Save/restore routing and rate registers Ondrej Zary
2014-04-04 14:24 ` [PATCH 1/2] snd-ice1712: restore AK4xxx volumes on resume Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396559378-23980-1-git-send-email-linux@rainbow-software.org \
--to=linux@rainbow-software.org \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.