Ignore:
Timestamp:
May 16, 2020, 10:05:07 AM (5 years ago)
Author:
Paul Smedley
Message:

Commit 3..102 changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-linux-3.2.102/alsa-kernel/pci/atiixp.c

    r598 r612  
    2626#include <linux/pci.h>
    2727#include <linux/slab.h>
    28 #include <linux/moduleparam.h>
     28#include <linux/module.h>
    2929#include <linux/mutex.h>
    3030#include <sound/core.h>
     
    3434#include <sound/ac97_codec.h>
    3535#include <sound/initval.h>
     36
     37#ifdef TARGET_OS2
     38#define KBUILD_MODNAME "atiixp"
     39#endif
    3640
    3741MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
     
    352356 * a static RING of buffer descriptors is used.
    353357 *
    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. 
    355359 */
    356360static int atiixp_build_dma_packets(struct atiixp *chip, struct atiixp_dma *dma,
     
    476480{
    477481        unsigned int data;
    478 
     482   
    479483        if (snd_atiixp_acquire_codec(chip) < 0)
    480484                return;
     
    491495        struct atiixp *chip = ac97->private_data;
    492496        return snd_atiixp_codec_read(chip, ac97->num, reg);
    493 
     497   
    494498}
    495499
     
    518522        udelay(10);
    519523        atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, 0);
    520 
     524   
    521525        timeout = 10;
    522526        while (! (atiixp_read(chip, CMD) & ATI_REG_CMD_ACLINK_ACTIVE)) {
     
    527531                mdelay(1);
    528532                atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET);
    529                 if (--timeout) {
     533                if (!--timeout) {
    530534                        snd_printk(KERN_ERR "atiixp: codec reset timeout\n");
    531535                        break;
     
    696700                return;
    697701        snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type);
     702        snd_pcm_stream_lock(dma->substream);
    698703        snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN);
     704        snd_pcm_stream_unlock(dma->substream);
    699705}
    700706
     
    939945        atiixp_update(chip, 6CH_REORDER, ATI_REG_6CH_REORDER_EN,
    940946                      substream->runtime->channels >= 6 ? ATI_REG_6CH_REORDER_EN: 0);
    941 
     947   
    942948        spin_unlock_irq(&chip->reg_lock);
    943949        return 0;
     
    16321638
    16331639        if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_SHARED,
    1634                         card->shortname, chip)) {
     1640                        KBUILD_MODNAME, chip)) {
    16351641                snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
    16361642                snd_atiixp_free(chip);
     
    17131719
    17141720static struct pci_driver driver = {
    1715         .name = "ATI IXP AC97 controller",
     1721        .name = KBUILD_MODNAME,
    17161722        .id_table = snd_atiixp_ids,
    17171723        .probe = snd_atiixp_probe,
Note: See TracChangeset for help on using the changeset viewer.