diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 104593fa08..d8329a79bc 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -68,7 +68,8 @@ MODULE_LICENSE("GPL"); | |||
68 | MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}," | 68 | MODULE_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}}"); | ||
72 | MODULE_DESCRIPTION("Intel HDA driver"); | 73 | MODULE_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 | */ |
645 | static void azx_init_chip(azx_t *chip) | 652 | static 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 | }; |
1440 | MODULE_DEVICE_TABLE(pci, azx_ids); | 1457 | MODULE_DEVICE_TABLE(pci, azx_ids); |