]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/drivers/ml403-ac97cr.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-omap-h63xx.git] / sound / drivers / ml403-ac97cr.c
index 22223152a347ef14bed6d958e15d8b98e507f032..7783843ca9ae95ce9dd2acee69eb970acd914348 100644 (file)
  * accesses to a minimum, because after a variable amount of accesses, the AC97
  * controller doesn't raise the register access finished bit anymore ...
  *
- * - Capture support works - basically, but after ~30s (with rates > ~20kHz)
- * ALSA stops reading captured samples from the intermediate buffer and
- * therefore a overrun happens - ATM I don't know what's wrong.
- *
  * - Playback support seems to be pretty stable - no issues here.
+ * - Capture support "works" now, too. Overruns don't happen any longer so often.
+ *   But there might still be some ...
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/moduleparam.h>
 
@@ -1156,7 +1153,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
        /* get irq */
        irq = platform_get_irq(pfdev, 0);
        if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
-                       pfdev->dev.bus_id, (void *)ml403_ac97cr)) {
+                       dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
                snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
                           "unable to grab IRQ %d\n",
                           irq);
@@ -1169,7 +1166,7 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
                   ml403_ac97cr->irq);
        irq = platform_get_irq(pfdev, 1);
        if (request_irq(irq, snd_ml403_ac97cr_irq, IRQF_DISABLED,
-                       pfdev->dev.bus_id, (void *)ml403_ac97cr)) {
+                       dev_name(&pfdev->dev), (void *)ml403_ac97cr)) {
                snd_printk(KERN_ERR SND_ML403_AC97CR_DRIVER ": "
                           "unable to grab IRQ %d\n",
                           irq);
@@ -1194,8 +1191,6 @@ snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev,
                return err;
        }
 
-       snd_card_set_dev(card, &pfdev->dev);
-
        *rml403_ac97cr = ml403_ac97cr;
        return 0;
 }
@@ -1314,6 +1309,8 @@ static int __devinit snd_ml403_ac97cr_probe(struct platform_device *pfdev)
                (unsigned long)ml403_ac97cr->port, ml403_ac97cr->irq,
                ml403_ac97cr->capture_irq, dev + 1);
 
+       snd_card_set_dev(card, &pfdev->dev);
+
        err = snd_card_register(card);
        if (err < 0) {
                snd_card_free(card);
@@ -1331,11 +1328,15 @@ static int snd_ml403_ac97cr_remove(struct platform_device *pfdev)
        return 0;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:" SND_ML403_AC97CR_DRIVER);
+
 static struct platform_driver snd_ml403_ac97cr_driver = {
        .probe = snd_ml403_ac97cr_probe,
        .remove = snd_ml403_ac97cr_remove,
        .driver = {
                .name = SND_ML403_AC97CR_DRIVER,
+               .owner = THIS_MODULE,
        },
 };