Skip to contentSkip to conversation

emu10k1: Fix outl() in snd_emu10k1_resume_regs()

PATCH In review Arnaud Patard (Rtp) 2 participants 2 messages Oct 1, 2006 – Oct 4, 2006 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 emu10k1: Fix outl() in snd_emu10k1_resume_regs()

Hi,

I've given a try to S3/S4 states on my box at home and it turned out that I had to reenable the Analog/Digital output switch to get sound again.
A quick look at the resume code showed that it was trying to restore the A_IOCFG and HCFG ports content with arguments to outl() reversed. My trivial patch fixes this issue.

Regards,
Arnaud

The emu10k1 driver saves the A_IOCFG and HCFG register on suspend and restores it on resumes. Unfortunately, this doesn't work as the arguments to outl() are reversed.

---
sound/pci/emu10k1/emu10k1_main.c | 4 2 + 2 - 0 !

 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/emu10k1/emu10k1_main.c +2 -2
Index: linux-2.6.18-rc7/sound/pci/emu10k1/emu10k1_main.c
===================================================================
@@ -1460,8 +1460,8 @@ void snd_emu10k1_resume_regs(struct snd_
 
 	/* resore for spdif */
 	if (emu->audigy)
-		outl(emu->port + A_IOCFG, emu->saved_a_iocfg);
-	outl(emu->port + HCFG, emu->saved_hcfg);
+		outl(emu->saved_a_iocfg, emu->port + A_IOCFG);
+	outl(emu->saved_hcfg, emu->port + HCFG);
 
 	val = emu->saved_ptr;
 	for (reg = saved_regs; *reg != 0xff; reg++)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#1 lore raw

At Sun, 01 Oct 2006 20:39:33 +0200,

Quoted 10 lines · Arnaud Patard (Rtp)

Hi,

I've given a try to S3/S4 states on my box at home and it turned out that I had to reenable the Analog/Digital output switch to get sound again.
A quick look at the resume code showed that it was trying to restore the A_IOCFG and HCFG ports content with arguments to outl() reversed. My trivial patch fixes this issue.

Doh. Now applied to ALSA tree.

Thanks.

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV