diff options
Diffstat (limited to 'sound/isa/opti9xx/opti92x-ad1848.c')
-rw-r--r-- | sound/isa/opti9xx/opti92x-ad1848.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index cd6e60a6a4ea..5cd555325b9d 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c | |||
@@ -252,7 +252,7 @@ static int __devinit snd_opti9xx_init(struct snd_opti9xx *chip, | |||
252 | #endif /* OPTi93X */ | 252 | #endif /* OPTi93X */ |
253 | 253 | ||
254 | default: | 254 | default: |
255 | snd_printk("chip %d not supported\n", hardware); | 255 | snd_printk(KERN_ERR "chip %d not supported\n", hardware); |
256 | return -ENODEV; | 256 | return -ENODEV; |
257 | } | 257 | } |
258 | return 0; | 258 | return 0; |
@@ -294,7 +294,7 @@ static unsigned char snd_opti9xx_read(struct snd_opti9xx *chip, | |||
294 | #endif /* OPTi93X */ | 294 | #endif /* OPTi93X */ |
295 | 295 | ||
296 | default: | 296 | default: |
297 | snd_printk("chip %d not supported\n", chip->hardware); | 297 | snd_printk(KERN_ERR "chip %d not supported\n", chip->hardware); |
298 | } | 298 | } |
299 | 299 | ||
300 | spin_unlock_irqrestore(&chip->lock, flags); | 300 | spin_unlock_irqrestore(&chip->lock, flags); |
@@ -336,7 +336,7 @@ static void snd_opti9xx_write(struct snd_opti9xx *chip, unsigned char reg, | |||
336 | #endif /* OPTi93X */ | 336 | #endif /* OPTi93X */ |
337 | 337 | ||
338 | default: | 338 | default: |
339 | snd_printk("chip %d not supported\n", chip->hardware); | 339 | snd_printk(KERN_ERR "chip %d not supported\n", chip->hardware); |
340 | } | 340 | } |
341 | 341 | ||
342 | spin_unlock_irqrestore(&chip->lock, flags); | 342 | spin_unlock_irqrestore(&chip->lock, flags); |
@@ -412,7 +412,7 @@ static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip) | |||
412 | #endif /* OPTi93X */ | 412 | #endif /* OPTi93X */ |
413 | 413 | ||
414 | default: | 414 | default: |
415 | snd_printk("chip %d not supported\n", chip->hardware); | 415 | snd_printk(KERN_ERR "chip %d not supported\n", chip->hardware); |
416 | return -EINVAL; | 416 | return -EINVAL; |
417 | } | 417 | } |
418 | 418 | ||
@@ -430,7 +430,8 @@ static int __devinit snd_opti9xx_configure(struct snd_opti9xx *chip) | |||
430 | wss_base_bits = 0x02; | 430 | wss_base_bits = 0x02; |
431 | break; | 431 | break; |
432 | default: | 432 | default: |
433 | snd_printk("WSS port 0x%lx not valid\n", chip->wss_base); | 433 | snd_printk(KERN_WARNING "WSS port 0x%lx not valid\n", |
434 | chip->wss_base); | ||
434 | goto __skip_base; | 435 | goto __skip_base; |
435 | } | 436 | } |
436 | snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(1), wss_base_bits << 4, 0x30); | 437 | snd_opti9xx_write_mask(chip, OPTi9XX_MC_REG(1), wss_base_bits << 4, 0x30); |
@@ -455,7 +456,7 @@ __skip_base: | |||
455 | irq_bits = 0x04; | 456 | irq_bits = 0x04; |
456 | break; | 457 | break; |
457 | default: | 458 | default: |
458 | snd_printk("WSS irq # %d not valid\n", chip->irq); | 459 | snd_printk(KERN_WARNING "WSS irq # %d not valid\n", chip->irq); |
459 | goto __skip_resources; | 460 | goto __skip_resources; |
460 | } | 461 | } |
461 | 462 | ||
@@ -470,13 +471,14 @@ __skip_base: | |||
470 | dma_bits = 0x03; | 471 | dma_bits = 0x03; |
471 | break; | 472 | break; |
472 | default: | 473 | default: |
473 | snd_printk("WSS dma1 # %d not valid\n", chip->dma1); | 474 | snd_printk(KERN_WARNING "WSS dma1 # %d not valid\n", |
475 | chip->dma1); | ||
474 | goto __skip_resources; | 476 | goto __skip_resources; |
475 | } | 477 | } |
476 | 478 | ||
477 | #if defined(CS4231) || defined(OPTi93X) | 479 | #if defined(CS4231) || defined(OPTi93X) |
478 | if (chip->dma1 == chip->dma2) { | 480 | if (chip->dma1 == chip->dma2) { |
479 | snd_printk("don't want to share dmas\n"); | 481 | snd_printk(KERN_ERR "don't want to share dmas\n"); |
480 | return -EBUSY; | 482 | return -EBUSY; |
481 | } | 483 | } |
482 | 484 | ||
@@ -485,7 +487,8 @@ __skip_base: | |||
485 | case 1: | 487 | case 1: |
486 | break; | 488 | break; |
487 | default: | 489 | default: |
488 | snd_printk("WSS dma2 # %d not valid\n", chip->dma2); | 490 | snd_printk(KERN_WARNING "WSS dma2 # %d not valid\n", |
491 | chip->dma2); | ||
489 | goto __skip_resources; | 492 | goto __skip_resources; |
490 | } | 493 | } |
491 | dma_bits |= 0x04; | 494 | dma_bits |= 0x04; |
@@ -516,7 +519,8 @@ __skip_resources: | |||
516 | mpu_port_bits = 0x00; | 519 | mpu_port_bits = 0x00; |
517 | break; | 520 | break; |
518 | default: | 521 | default: |
519 | snd_printk("MPU-401 port 0x%lx not valid\n", | 522 | snd_printk(KERN_WARNING |
523 | "MPU-401 port 0x%lx not valid\n", | ||
520 | chip->mpu_port); | 524 | chip->mpu_port); |
521 | goto __skip_mpu; | 525 | goto __skip_mpu; |
522 | } | 526 | } |
@@ -535,7 +539,7 @@ __skip_resources: | |||
535 | mpu_irq_bits = 0x01; | 539 | mpu_irq_bits = 0x01; |
536 | break; | 540 | break; |
537 | default: | 541 | default: |
538 | snd_printk("MPU-401 irq # %d not valid\n", | 542 | snd_printk(KERN_WARNING "MPU-401 irq # %d not valid\n", |
539 | chip->mpu_irq); | 543 | chip->mpu_irq); |
540 | goto __skip_mpu; | 544 | goto __skip_mpu; |
541 | } | 545 | } |
@@ -726,7 +730,7 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card) | |||
726 | if (chip->wss_base == SNDRV_AUTO_PORT) { | 730 | if (chip->wss_base == SNDRV_AUTO_PORT) { |
727 | chip->wss_base = snd_legacy_find_free_ioport(possible_ports, 4); | 731 | chip->wss_base = snd_legacy_find_free_ioport(possible_ports, 4); |
728 | if (chip->wss_base < 0) { | 732 | if (chip->wss_base < 0) { |
729 | snd_printk("unable to find a free WSS port\n"); | 733 | snd_printk(KERN_ERR "unable to find a free WSS port\n"); |
730 | return -EBUSY; | 734 | return -EBUSY; |
731 | } | 735 | } |
732 | } | 736 | } |
@@ -815,14 +819,8 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card) | |||
815 | chip->fm_port, chip->fm_port + 4 - 1); | 819 | chip->fm_port, chip->fm_port + 4 - 1); |
816 | } | 820 | } |
817 | if (opl3) { | 821 | if (opl3) { |
818 | #ifdef CS4231 | 822 | error = snd_opl3_hwdep_new(opl3, 0, 1, &synth); |
819 | const int t1dev = 1; | 823 | if (error < 0) |
820 | #else | ||
821 | const int t1dev = 0; | ||
822 | #endif | ||
823 | if ((error = snd_opl3_timer_new(opl3, t1dev, t1dev+1)) < 0) | ||
824 | return error; | ||
825 | if ((error = snd_opl3_hwdep_new(opl3, 0, 1, &synth)) < 0) | ||
826 | return error; | 824 | return error; |
827 | } | 825 | } |
828 | } | 826 | } |
@@ -900,7 +898,7 @@ static int __devinit snd_opti9xx_isa_probe(struct device *devptr, | |||
900 | #if defined(CS4231) || defined(OPTi93X) | 898 | #if defined(CS4231) || defined(OPTi93X) |
901 | if (dma2 == SNDRV_AUTO_DMA) { | 899 | if (dma2 == SNDRV_AUTO_DMA) { |
902 | if ((dma2 = snd_legacy_find_free_dma(possible_dma2s[dma1 % 4])) < 0) { | 900 | if ((dma2 = snd_legacy_find_free_dma(possible_dma2s[dma1 % 4])) < 0) { |
903 | snd_printk("unable to find a free DMA2\n"); | 901 | snd_printk(KERN_ERR "unable to find a free DMA2\n"); |
904 | return -EBUSY; | 902 | return -EBUSY; |
905 | } | 903 | } |
906 | } | 904 | } |