aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederick Li <fli@ati.com>2005-05-12 08:55:20 -0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 04:08:40 -0400
commitf5d40b30ed4daf09f1d43f9b2da1263b17a53c28 (patch)
tree3feeb8d026591a719520e896a938c815dc7c2e90
parent2fa522bed875cf0bde9e9fdb8fdd852c9d74d67d (diff)
[ALSA] Adding support for ATI IXP450 HD Audio device support
Documentation,HDA Intel driver This patch changes the Intel HD Audio device driver to include the support of HD Audio device embedded in ATI south bridge IXP450. Because the design of ATI chipset follows intel HD Audio specification 1.0, the programming method is the same as that of intel HD Audio device exception one minor change which requires to enable snoop for DMA transport. There are 3 changes that have been made to hda_intel.c file. 1. Added device ID for ATI HD Audio device; 2. Increase maximum CODEC supported to 4; 3. Enable snoop during the driver initialization. Signed-off-by: Frederick Li <fli@ati.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt2
-rw-r--r--sound/pci/hda/hda_intel.c23
2 files changed, 21 insertions, 4 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index d49325ed706f..587eddcad912 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -615,7 +615,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
615 Module snd-hda-intel 615 Module snd-hda-intel
616 -------------------- 616 --------------------
617 617
618 Module for Intel HD Audio (ICH6, ICH6M, ICH7) 618 Module for Intel HD Audio (ICH6, ICH6M, ICH7), ATI SB450
619 619
620 model - force the model name 620 model - force the model name
621 position_fix - Fix DMA pointer (0 = FIFO size, 1 = none, 2 = POSBUF) 621 position_fix - Fix DMA pointer (0 = FIFO size, 1 = none, 2 = POSBUF)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 104593fa08eb..d8329a79bcd2 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -68,7 +68,8 @@ MODULE_LICENSE("GPL");
68MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}," 68MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},"
69 "{Intel, ICH6M}," 69 "{Intel, ICH6M},"
70 "{Intel, ICH7}," 70 "{Intel, ICH7},"
71 "{Intel, ESB2}}"); 71 "{Intel, ESB2},"
72 "{ATI, SB450}}");
72MODULE_DESCRIPTION("Intel HDA driver"); 73MODULE_DESCRIPTION("Intel HDA driver");
73 74
74#define SFX "hda-intel: " 75#define SFX "hda-intel: "
@@ -153,7 +154,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
153 154
154/* STATESTS int mask: SD2,SD1,SD0 */ 155/* STATESTS int mask: SD2,SD1,SD0 */
155#define STATESTS_INT_MASK 0x07 156#define STATESTS_INT_MASK 0x07
156#define AZX_MAX_CODECS 3 157#define AZX_MAX_CODECS 4
157 158
158/* SD_CTL bits */ 159/* SD_CTL bits */
159#define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ 160#define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */
@@ -193,6 +194,12 @@ enum {
193 POS_FIX_POSBUF 194 POS_FIX_POSBUF
194}; 195};
195 196
197/* Defines for ATI HD Audio support in SB450 south bridge */
198#define ATI_SB450_HDAUDIO_PCI_DEVICE_ID 0x437b
199#define ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR 0x42
200#define ATI_SB450_HDAUDIO_ENABLE_SNOOP 0x02
201
202
196/* 203/*
197 * Use CORB/RIRB for communication from/to codecs. 204 * Use CORB/RIRB for communication from/to codecs.
198 * This is the way recommended by Intel (see below). 205 * This is the way recommended by Intel (see below).
@@ -644,7 +651,7 @@ static void azx_stream_stop(azx_t *chip, azx_dev_t *azx_dev)
644 */ 651 */
645static void azx_init_chip(azx_t *chip) 652static void azx_init_chip(azx_t *chip)
646{ 653{
647 unsigned char tcsel_reg; 654 unsigned char tcsel_reg, ati_misc_cntl2;
648 655
649 /* Clear bits 0-2 of PCI register TCSEL (at offset 0x44) 656 /* Clear bits 0-2 of PCI register TCSEL (at offset 0x44)
650 * TCSEL == Traffic Class Select Register, which sets PCI express QOS 657 * TCSEL == Traffic Class Select Register, which sets PCI express QOS
@@ -668,6 +675,15 @@ static void azx_init_chip(azx_t *chip)
668 azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr); 675 azx_writel(chip, DPLBASE, (u32)chip->posbuf.addr);
669 azx_writel(chip, DPUBASE, upper_32bit(chip->posbuf.addr)); 676 azx_writel(chip, DPUBASE, upper_32bit(chip->posbuf.addr));
670 } 677 }
678
679 /* For ATI SB450 azalia HD audio, we need to enable snoop */
680 if (chip->pci->vendor == PCI_VENDOR_ID_ATI &&
681 chip->pci->device == ATI_SB450_HDAUDIO_PCI_DEVICE_ID) {
682 pci_read_config_byte(chip->pci, ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR,
683 &ati_misc_cntl2);
684 pci_write_config_byte(chip->pci, ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR,
685 (ati_misc_cntl2 & 0xf8) | ATI_SB450_HDAUDIO_ENABLE_SNOOP);
686 }
671} 687}
672 688
673 689
@@ -1435,6 +1451,7 @@ static struct pci_device_id azx_ids[] = {
1435 { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICH6 */ 1451 { 0x8086, 0x2668, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICH6 */
1436 { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICH7 */ 1452 { 0x8086, 0x27d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ICH7 */
1437 { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ESB2 */ 1453 { 0x8086, 0x269a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ESB2 */
1454 { 0x1002, 0x437b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* ATI SB450 */
1438 { 0, } 1455 { 0, }
1439}; 1456};
1440MODULE_DEVICE_TABLE(pci, azx_ids); 1457MODULE_DEVICE_TABLE(pci, azx_ids);