diff options
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 1a7e82104bb9..b9a8e238b0a8 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -199,7 +199,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 }; | |||
199 | 199 | ||
200 | /* STATESTS int mask: SD2,SD1,SD0 */ | 200 | /* STATESTS int mask: SD2,SD1,SD0 */ |
201 | #define STATESTS_INT_MASK 0x07 | 201 | #define STATESTS_INT_MASK 0x07 |
202 | #define AZX_MAX_CODECS 4 | 202 | #define AZX_MAX_CODECS 3 |
203 | 203 | ||
204 | /* SD_CTL bits */ | 204 | /* SD_CTL bits */ |
205 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ | 205 | #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */ |
@@ -1285,7 +1285,7 @@ static int __devinit create_codec_pcm(struct azx *chip, struct hda_codec *codec, | |||
1285 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &azx_pcm_ops); | 1285 | snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &azx_pcm_ops); |
1286 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, | 1286 | snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, |
1287 | snd_dma_pci_data(chip->pci), | 1287 | snd_dma_pci_data(chip->pci), |
1288 | 1024 * 64, 1024 * 128); | 1288 | 1024 * 64, 1024 * 1024); |
1289 | chip->pcm[pcm_dev] = pcm; | 1289 | chip->pcm[pcm_dev] = pcm; |
1290 | if (chip->pcm_devs < pcm_dev + 1) | 1290 | if (chip->pcm_devs < pcm_dev + 1) |
1291 | chip->pcm_devs = pcm_dev + 1; | 1291 | chip->pcm_devs = pcm_dev + 1; |
@@ -1391,6 +1391,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect) | |||
1391 | return -1; | 1391 | return -1; |
1392 | } | 1392 | } |
1393 | chip->irq = chip->pci->irq; | 1393 | chip->irq = chip->pci->irq; |
1394 | pci_intx(chip->pci, !chip->msi); | ||
1394 | return 0; | 1395 | return 0; |
1395 | } | 1396 | } |
1396 | 1397 | ||
@@ -1502,6 +1503,31 @@ static int azx_dev_free(struct snd_device *device) | |||
1502 | } | 1503 | } |
1503 | 1504 | ||
1504 | /* | 1505 | /* |
1506 | * white/black-listing for position_fix | ||
1507 | */ | ||
1508 | static const struct snd_pci_quirk position_fix_list[] __devinitdata = { | ||
1509 | SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_NONE), | ||
1510 | {} | ||
1511 | }; | ||
1512 | |||
1513 | static int __devinit check_position_fix(struct azx *chip, int fix) | ||
1514 | { | ||
1515 | const struct snd_pci_quirk *q; | ||
1516 | |||
1517 | if (fix == POS_FIX_AUTO) { | ||
1518 | q = snd_pci_quirk_lookup(chip->pci, position_fix_list); | ||
1519 | if (q) { | ||
1520 | snd_printdd(KERN_INFO | ||
1521 | "hda_intel: position_fix set to %d " | ||
1522 | "for device %04x:%04x\n", | ||
1523 | q->value, q->subvendor, q->subdevice); | ||
1524 | return q->value; | ||
1525 | } | ||
1526 | } | ||
1527 | return fix; | ||
1528 | } | ||
1529 | |||
1530 | /* | ||
1505 | * constructor | 1531 | * constructor |
1506 | */ | 1532 | */ |
1507 | static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | 1533 | static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, |
@@ -1535,7 +1561,8 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
1535 | chip->driver_type = driver_type; | 1561 | chip->driver_type = driver_type; |
1536 | chip->msi = enable_msi; | 1562 | chip->msi = enable_msi; |
1537 | 1563 | ||
1538 | chip->position_fix = position_fix; | 1564 | chip->position_fix = check_position_fix(chip, position_fix); |
1565 | |||
1539 | chip->single_cmd = single_cmd; | 1566 | chip->single_cmd = single_cmd; |
1540 | 1567 | ||
1541 | #if BITS_PER_LONG != 64 | 1568 | #if BITS_PER_LONG != 64 |