mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] AC97 WM9713 power and audio changes
@ 2004-03-04 12:02 Liam Girdwood
  0 siblings, 0 replies; only message in thread
From: Liam Girdwood @ 2004-03-04 12:02 UTC (permalink / raw)
  To: Jeff Garzik, Alan Cox; +Cc: Linux Kernel

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

Hi,

I've attached a patch against 2.4.25 that improves performance and power
levels in the WM9713. 

Jeff, this depends on the previous AC97 patch I sent.

Changes:-

  o Lower power consumption
  o Better quality playback and record.
  o Codec specific init() is now done after initialisation of the mixer
channel volumes. This prevents any init settings being clobbered by the
mixer volumes.


Liam  

[-- Attachment #2: wm9713.diff --]
[-- Type: text/x-patch, Size: 1594 bytes --]

diff -urN a/drivers/sound/ac97_codec.c b/drivers/sound/ac97_codec.c
--- a/drivers/sound/ac97_codec.c	2004-03-04 10:24:26.000000000 +0000
+++ b/drivers/sound/ac97_codec.c	2004-03-04 10:29:17.000000000 +0000
@@ -932,11 +932,6 @@
 	codec->recmask_io = ac97_recmask_io;
 	codec->mixer_ioctl = ac97_mixer_ioctl;
 
-	/* codec specific initialization for 4-6 channel output or secondary codec stuff */
-	if (codec->codec_ops->init != NULL) {
-		codec->codec_ops->init(codec);
-	}
-
 	/* initialize mixer channel volumes */
 	for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
 		struct mixer_defaults *md = &mixer_defaults[i];
@@ -947,6 +942,11 @@
 		ac97_set_mixer(codec, md->mixer, md->value);
 	}
 
+	/* codec specific initialization for 4-6 channel output or secondary codec stuff */
+	if (codec->codec_ops->init != NULL) {
+		codec->codec_ops->init(codec);
+	}
+	
 	/*
 	 *	Volume is MUTE only on this device. We have to initialise
 	 *	it but its useless beyond that.
@@ -1104,10 +1104,12 @@
 /* WM9713 */
 static int wolfson_init13(struct ac97_codec * codec)
 {
-	codec->codec_write(codec, AC97_MASTER_VOL_STEREO, 0x0000);
-	codec->codec_write(codec, AC97_HEADPHONE_VOL, 0x0000); 
 	codec->codec_write(codec, AC97_RECORD_GAIN, 0x00a0);	
-	codec->codec_write(codec, AC97_EXTEND_MODEM_STAT, 0x0000);
+	codec->codec_write(codec, AC97_POWER_CONTROL, 0x0000);
+	codec->codec_write(codec, AC97_EXTENDED_MODEM_ID, 0xDA00);
+	codec->codec_write(codec, AC97_EXTEND_MODEM_STAT, 0x3810);
+	codec->codec_write(codec, AC97_PHONE_VOL, 0x0808);
+	codec->codec_write(codec, AC97_PCBEEP_VOL, 0x0808);
 	return 0;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-04 12:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04 12:02 [PATCH] AC97 WM9713 power and audio changes Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®