mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
To: Jeff Garzik <jgarzik@pobox.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] AC97 WM9713 power and audio changes
Date: Thu, 04 Mar 2004 12:02:20 +0000	[thread overview]
Message-ID: <1078401740.3382.270.camel@cearnarfon> (raw)

[-- 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;
 }

                 reply	other threads:[~2004-03-04 12:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1078401740.3382.270.camel@cearnarfon \
    --to=liam.girdwood@wolfsonmicro.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.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 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®