- Timestamp:
- May 16, 2020, 10:05:07 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-linux-3.2.102/alsa-kernel/pci/atiixp.c
r598 r612 26 26 #include <linux/pci.h> 27 27 #include <linux/slab.h> 28 #include <linux/module param.h>28 #include <linux/module.h> 29 29 #include <linux/mutex.h> 30 30 #include <sound/core.h> … … 34 34 #include <sound/ac97_codec.h> 35 35 #include <sound/initval.h> 36 37 #ifdef TARGET_OS2 38 #define KBUILD_MODNAME "atiixp" 39 #endif 36 40 37 41 MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>"); … … 352 356 * a static RING of buffer descriptors is used. 353 357 * 354 * the ring is built in this function, and is set up to the hardware. 358 * the ring is built in this function, and is set up to the hardware. 355 359 */ 356 360 static int atiixp_build_dma_packets(struct atiixp *chip, struct atiixp_dma *dma, … … 476 480 { 477 481 unsigned int data; 478 482 479 483 if (snd_atiixp_acquire_codec(chip) < 0) 480 484 return; … … 491 495 struct atiixp *chip = ac97->private_data; 492 496 return snd_atiixp_codec_read(chip, ac97->num, reg); 493 497 494 498 } 495 499 … … 518 522 udelay(10); 519 523 atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, 0); 520 524 521 525 timeout = 10; 522 526 while (! (atiixp_read(chip, CMD) & ATI_REG_CMD_ACLINK_ACTIVE)) { … … 527 531 mdelay(1); 528 532 atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); 529 if ( --timeout) {533 if (!--timeout) { 530 534 snd_printk(KERN_ERR "atiixp: codec reset timeout\n"); 531 535 break; … … 696 700 return; 697 701 snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type); 702 snd_pcm_stream_lock(dma->substream); 698 703 snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); 704 snd_pcm_stream_unlock(dma->substream); 699 705 } 700 706 … … 939 945 atiixp_update(chip, 6CH_REORDER, ATI_REG_6CH_REORDER_EN, 940 946 substream->runtime->channels >= 6 ? ATI_REG_6CH_REORDER_EN: 0); 941 947 942 948 spin_unlock_irq(&chip->reg_lock); 943 949 return 0; … … 1632 1638 1633 1639 if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_SHARED, 1634 card->shortname, chip)) {1640 KBUILD_MODNAME, chip)) { 1635 1641 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1636 1642 snd_atiixp_free(chip); … … 1713 1719 1714 1720 static struct pci_driver driver = { 1715 .name = "ATI IXP AC97 controller",1721 .name = KBUILD_MODNAME, 1716 1722 .id_table = snd_atiixp_ids, 1717 1723 .probe = snd_atiixp_probe,
Note:
See TracChangeset
for help on using the changeset viewer.