All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] emu10k1: Fix outl() in snd_emu10k1_resume_regs()
@ 2006-10-01 18:39 Arnaud Patard
  2006-10-04 16:20 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaud Patard @ 2006-10-01 18:39 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emu10k1_hcfg_regs_resume_fix.patch --]
[-- Type: text/x-patch, Size: 1012 bytes --]

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.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

---
 sound/pci/emu10k1/emu10k1_main.c |    4 	2 +	2 -	0 !
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.18-rc7/sound/pci/emu10k1/emu10k1_main.c
===================================================================
--- linux-2.6.18-rc7.orig/sound/pci/emu10k1/emu10k1_main.c	2006-10-01 19:49:28.000000000 +0200
+++ linux-2.6.18-rc7/sound/pci/emu10k1/emu10k1_main.c	2006-10-01 20:21:08.000000000 +0200
@@ -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++)

[-- Attachment #3: Type: text/plain, Size: 348 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] emu10k1: Fix outl() in snd_emu10k1_resume_regs()
  2006-10-01 18:39 [PATCH] emu10k1: Fix outl() in snd_emu10k1_resume_regs() Arnaud Patard
@ 2006-10-04 16:20 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2006-10-04 16:20 UTC (permalink / raw)
  To: Arnaud Patard (Rtp); +Cc: alsa-devel

At Sun, 01 Oct 2006 20:39:33 +0200,
Arnaud Patard (Rtp) wrote:
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-04 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-01 18:39 [PATCH] emu10k1: Fix outl() in snd_emu10k1_resume_regs() Arnaud Patard
2006-10-04 16:20 ` Takashi Iwai

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.