diff options
Diffstat (limited to 'sound/pci/atiixp.c')
-rw-r--r-- | sound/pci/atiixp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 457228fb22aa..085a52b8c807 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -37,7 +37,7 @@ | |||
37 | MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>"); | 37 | MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>"); |
38 | MODULE_DESCRIPTION("ATI IXP AC97 controller"); | 38 | MODULE_DESCRIPTION("ATI IXP AC97 controller"); |
39 | MODULE_LICENSE("GPL"); | 39 | MODULE_LICENSE("GPL"); |
40 | MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250/300/400}}"); | 40 | MODULE_SUPPORTED_DEVICE("{{ATI,IXP150/200/250/300/400/600}}"); |
41 | 41 | ||
42 | static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ | 42 | static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ |
43 | static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ | 43 | static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ |
@@ -290,6 +290,7 @@ static struct pci_device_id snd_atiixp_ids[] = { | |||
290 | { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ | 290 | { 0x1002, 0x4341, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB200 */ |
291 | { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ | 291 | { 0x1002, 0x4361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB300 */ |
292 | { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ | 292 | { 0x1002, 0x4370, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB400 */ |
293 | { 0x1002, 0x4382, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* SB600 */ | ||
293 | { 0, } | 294 | { 0, } |
294 | }; | 295 | }; |
295 | 296 | ||
@@ -722,7 +723,9 @@ static int snd_atiixp_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
722 | struct atiixp_dma *dma = substream->runtime->private_data; | 723 | struct atiixp_dma *dma = substream->runtime->private_data; |
723 | int err = 0; | 724 | int err = 0; |
724 | 725 | ||
725 | snd_assert(dma->ops->enable_transfer && dma->ops->flush_dma, return -EINVAL); | 726 | if (snd_BUG_ON(!dma->ops->enable_transfer || |
727 | !dma->ops->flush_dma)) | ||
728 | return -EINVAL; | ||
726 | 729 | ||
727 | spin_lock(&chip->reg_lock); | 730 | spin_lock(&chip->reg_lock); |
728 | switch (cmd) { | 731 | switch (cmd) { |
@@ -1032,7 +1035,8 @@ static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream, | |||
1032 | struct snd_pcm_runtime *runtime = substream->runtime; | 1035 | struct snd_pcm_runtime *runtime = substream->runtime; |
1033 | int err; | 1036 | int err; |
1034 | 1037 | ||
1035 | snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); | 1038 | if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma)) |
1039 | return -EINVAL; | ||
1036 | 1040 | ||
1037 | if (dma->opened) | 1041 | if (dma->opened) |
1038 | return -EBUSY; | 1042 | return -EBUSY; |
@@ -1064,7 +1068,8 @@ static int snd_atiixp_pcm_close(struct snd_pcm_substream *substream, | |||
1064 | { | 1068 | { |
1065 | struct atiixp *chip = snd_pcm_substream_chip(substream); | 1069 | struct atiixp *chip = snd_pcm_substream_chip(substream); |
1066 | /* disable DMA bits */ | 1070 | /* disable DMA bits */ |
1067 | snd_assert(dma->ops && dma->ops->enable_dma, return -EINVAL); | 1071 | if (snd_BUG_ON(!dma->ops || !dma->ops->enable_dma)) |
1072 | return -EINVAL; | ||
1068 | spin_lock_irq(&chip->reg_lock); | 1073 | spin_lock_irq(&chip->reg_lock); |
1069 | dma->ops->enable_dma(chip, 0); | 1074 | dma->ops->enable_dma(chip, 0); |
1070 | spin_unlock_irq(&chip->reg_lock); | 1075 | spin_unlock_irq(&chip->reg_lock); |