aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 34940a079051..a8c6f3420344 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -458,6 +458,7 @@ enum {
458 AZX_DRIVER_ULI, 458 AZX_DRIVER_ULI,
459 AZX_DRIVER_NVIDIA, 459 AZX_DRIVER_NVIDIA,
460 AZX_DRIVER_TERA, 460 AZX_DRIVER_TERA,
461 AZX_DRIVER_CTX,
461 AZX_DRIVER_GENERIC, 462 AZX_DRIVER_GENERIC,
462 AZX_NUM_DRIVERS, /* keep this as last entry */ 463 AZX_NUM_DRIVERS, /* keep this as last entry */
463}; 464};
@@ -473,6 +474,7 @@ static char *driver_short_names[] __devinitdata = {
473 [AZX_DRIVER_ULI] = "HDA ULI M5461", 474 [AZX_DRIVER_ULI] = "HDA ULI M5461",
474 [AZX_DRIVER_NVIDIA] = "HDA NVidia", 475 [AZX_DRIVER_NVIDIA] = "HDA NVidia",
475 [AZX_DRIVER_TERA] = "HDA Teradici", 476 [AZX_DRIVER_TERA] = "HDA Teradici",
477 [AZX_DRIVER_CTX] = "HDA Creative",
476 [AZX_DRIVER_GENERIC] = "HD-Audio Generic", 478 [AZX_DRIVER_GENERIC] = "HD-Audio Generic",
477}; 479};
478 480
@@ -563,7 +565,10 @@ static void azx_init_cmd_io(struct azx *chip)
563 /* reset the rirb hw write pointer */ 565 /* reset the rirb hw write pointer */
564 azx_writew(chip, RIRBWP, ICH6_RIRBWP_RST); 566 azx_writew(chip, RIRBWP, ICH6_RIRBWP_RST);
565 /* set N=1, get RIRB response interrupt for new entry */ 567 /* set N=1, get RIRB response interrupt for new entry */
566 azx_writew(chip, RINTCNT, 1); 568 if (chip->driver_type == AZX_DRIVER_CTX)
569 azx_writew(chip, RINTCNT, 0xc0);
570 else
571 azx_writew(chip, RINTCNT, 1);
567 /* enable rirb dma and response irq */ 572 /* enable rirb dma and response irq */
568 azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN); 573 azx_writeb(chip, RIRBCTL, ICH6_RBCTL_DMA_EN | ICH6_RBCTL_IRQ_EN);
569 spin_unlock_irq(&chip->reg_lock); 574 spin_unlock_irq(&chip->reg_lock);
@@ -1136,8 +1141,11 @@ static irqreturn_t azx_interrupt(int irq, void *dev_id)
1136 /* clear rirb int */ 1141 /* clear rirb int */
1137 status = azx_readb(chip, RIRBSTS); 1142 status = azx_readb(chip, RIRBSTS);
1138 if (status & RIRB_INT_MASK) { 1143 if (status & RIRB_INT_MASK) {
1139 if (status & RIRB_INT_RESPONSE) 1144 if (status & RIRB_INT_RESPONSE) {
1145 if (chip->driver_type == AZX_DRIVER_CTX)
1146 udelay(80);
1140 azx_update_rirb(chip); 1147 azx_update_rirb(chip);
1148 }
1141 azx_writeb(chip, RIRBSTS, RIRB_INT_MASK); 1149 azx_writeb(chip, RIRBSTS, RIRB_INT_MASK);
1142 } 1150 }
1143 1151
@@ -1647,7 +1655,7 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
1647 struct azx_dev *azx_dev = get_azx_dev(substream); 1655 struct azx_dev *azx_dev = get_azx_dev(substream);
1648 struct hda_pcm_stream *hinfo = apcm->hinfo[substream->stream]; 1656 struct hda_pcm_stream *hinfo = apcm->hinfo[substream->stream];
1649 struct snd_pcm_runtime *runtime = substream->runtime; 1657 struct snd_pcm_runtime *runtime = substream->runtime;
1650 unsigned int bufsize, period_bytes, format_val; 1658 unsigned int bufsize, period_bytes, format_val, stream_tag;
1651 int err; 1659 int err;
1652 1660
1653 azx_stream_reset(chip, azx_dev); 1661 azx_stream_reset(chip, azx_dev);
@@ -1689,7 +1697,12 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
1689 else 1697 else
1690 azx_dev->fifo_size = 0; 1698 azx_dev->fifo_size = 0;
1691 1699
1692 return snd_hda_codec_prepare(apcm->codec, hinfo, azx_dev->stream_tag, 1700 stream_tag = azx_dev->stream_tag;
1701 /* CA-IBG chips need the playback stream starting from 1 */
1702 if (chip->driver_type == AZX_DRIVER_CTX &&
1703 stream_tag > chip->capture_streams)
1704 stream_tag -= chip->capture_streams;
1705 return snd_hda_codec_prepare(apcm->codec, hinfo, stream_tag,
1693 azx_dev->format_val, substream); 1706 azx_dev->format_val, substream);
1694} 1707}
1695 1708
@@ -2285,9 +2298,11 @@ static int azx_dev_free(struct snd_device *device)
2285 */ 2298 */
2286static struct snd_pci_quirk position_fix_list[] __devinitdata = { 2299static struct snd_pci_quirk position_fix_list[] __devinitdata = {
2287 SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB), 2300 SND_PCI_QUIRK(0x1025, 0x009f, "Acer Aspire 5110", POS_FIX_LPIB),
2301 SND_PCI_QUIRK(0x1025, 0x026f, "Acer Aspire 5538", POS_FIX_LPIB),
2288 SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB), 2302 SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
2289 SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB), 2303 SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
2290 SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB), 2304 SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
2305 SND_PCI_QUIRK(0x1028, 0x0470, "Dell Inspiron 1120", POS_FIX_LPIB),
2291 SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB), 2306 SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
2292 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), 2307 SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
2293 SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), 2308 SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
@@ -2794,10 +2809,10 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
2794 { PCI_DEVICE(PCI_VENDOR_ID_CREATIVE, PCI_ANY_ID), 2809 { PCI_DEVICE(PCI_VENDOR_ID_CREATIVE, PCI_ANY_ID),
2795 .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8, 2810 .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8,
2796 .class_mask = 0xffffff, 2811 .class_mask = 0xffffff,
2797 .driver_data = AZX_DRIVER_GENERIC }, 2812 .driver_data = AZX_DRIVER_CTX },
2798#else 2813#else
2799 /* this entry seems still valid -- i.e. without emu20kx chip */ 2814 /* this entry seems still valid -- i.e. without emu20kx chip */
2800 { PCI_DEVICE(0x1102, 0x0009), .driver_data = AZX_DRIVER_GENERIC }, 2815 { PCI_DEVICE(0x1102, 0x0009), .driver_data = AZX_DRIVER_CTX },
2801#endif 2816#endif
2802 /* AMD/ATI Generic, PCI class code and Vendor ID for HD Audio */ 2817 /* AMD/ATI Generic, PCI class code and Vendor ID for HD Audio */
2803 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_ANY_ID), 2818 { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_ANY_ID),