Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tobin Davis <tdavis@dsl-only.net>
To: ALSA Developers <alsa-devel@alsa-project.org>
Cc: Takashi Iwai <tiwai@suse.de>
Subject: HDA - enable snoop on SCH
Date: Sat, 02 Feb 2008 10:34:44 -0800	[thread overview]
Message-ID: <1201977284.24072.105.camel@razman.gruemaster.com> (raw)

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

This patch enables snoop on Intel SCH chipset, eliminating static during
playback.


Signed off by Tobin Davis <tdavis@dsl-only.net>


P.S. I know this is real close to the final release, but it is
critically needed for product enabling.  The patch has no effect on
other components, and has been tested on production desktop and laptop
systems, along with Intel's Mobile Internet Device.  This is the last
patch needed for release.

P.P.S  Forgot to include the patch in the last email.  Doh.

[-- Attachment #2: hda-snoop.patch --]
[-- Type: text/x-patch, Size: 1639 bytes --]

diff -r 823ccbb17a3d pci/hda/hda_intel.c
--- a/pci/hda/hda_intel.c	Wed Jan 30 14:58:38 2008 +0100
+++ b/pci/hda/hda_intel.c	Sat Feb 02 10:26:04 2008 -0800
@@ -275,6 +275,11 @@ enum {
 #define NVIDIA_HDA_TRANSREG_ADDR      0x4e
 #define NVIDIA_HDA_ENABLE_COHBITS     0x0f
 
+/* Defines for Intel SCH HDA snoop control */
+#define INTEL_SCH_HDA_DEVC      0x78
+#define INTEL_SCH_HDA_DEVC_NOSNOOP       (0x1<<11)
+
+
 /*
  */
 
@@ -868,6 +873,8 @@ static void update_pci_byte(struct pci_d
 
 static void azx_init_pci(struct azx *chip)
 {
+	unsigned short snoop;
+
 	/* Clear bits 0-2 of PCI register TCSEL (at offset 0x44)
 	 * TCSEL == Traffic Class Select Register, which sets PCI express QOS
 	 * Ensuring these bits are 0 clears playback static on some HD Audio
@@ -888,6 +895,19 @@ static void azx_init_pci(struct azx *chi
 				NVIDIA_HDA_TRANSREG_ADDR,
 				0x0f, NVIDIA_HDA_ENABLE_COHBITS);
 		break;
+	case AZX_DRIVER_SCH:
+		pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop);
+		if (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) {
+			pci_write_config_word(chip->pci, INTEL_SCH_HDA_DEVC, \
+				snoop & (~INTEL_SCH_HDA_DEVC_NOSNOOP));
+			pci_read_config_word(chip->pci,
+				INTEL_SCH_HDA_DEVC, &snoop);
+			snd_printdd("HDA snoop disabled, enabling ... %s\n",\
+				(snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) \
+				? "Failed" : "OK");
+		}
+		break;
+
         }
 }
 
@@ -1040,6 +1060,7 @@ static int azx_setup_controller(struct a
 
 static unsigned int azx_max_codecs[] __devinitdata = {
 	[AZX_DRIVER_ICH] = 3,
+	[AZX_DRIVER_SCH] = 3,
 	[AZX_DRIVER_ATI] = 4,
 	[AZX_DRIVER_ATIHDMI] = 4,
 	[AZX_DRIVER_VIA] = 3,		/* FIXME: correct? */

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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

             reply	other threads:[~2008-02-02 18:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-02 18:34 Tobin Davis [this message]
2008-02-03  9:11 ` HDA - enable snoop on SCH Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2008-02-02 18:33 HDA - enable snoop on sch Tobin Davis

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=1201977284.24072.105.camel@razman.gruemaster.com \
    --to=tdavis@dsl-only.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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