ALSA/ad1816a: Fix modprobe snd_mpu401 && modprobe snd_ad1816a
PATCH 1/1 ALSA/ad1816a: Fix modprobe snd_mpu401 && modprobe snd_ad1816a
From: Rask Ingemann Lambertsen <[email protected]>
The ad1816a driver fails if the mpu401 driver has been loaded first. This
patch against linux 2.6.20 fixes it by just ignoring the MPU-401 device in that case, so that the rest of the sound card can be used. The ad1816a driver already handles the MPU-401 device being unavailable due to lack of resources in the same way.
---
Another way of fixing the failure would be to remove the MPU-401 related
code from the ad1816a driver, so the MPU-401 device is always handled by the mpu401 driver. I'll write such a patch if you think that's better.
sound/isa/ad1816a/ad1816a.c renamed from sound/isa/ad1816a/ad1816a.c-orig +6 -2
@@ -129,8 +129,8 @@ static int __devinit snd_card_ad1816a_pn } acard->devmpu =pnp_request_card_device (card, id->devs[1 ].id,NULL );if (acard->devmpu ==NULL ) { -kfree (cfg); -return -EBUSY ; + mpu_port[dev] =-1 ; + snd_printk(KERN_WARNING PFX "MPU401 device busy, skipping.\n"); } pdev = acard->dev;
@@ -162,6 +162,10 @@ static int __devinit snd_card_ad1816a_pn dma2[dev] =pnp_dma (pdev,1 ); irq[dev] =pnp_irq (pdev,0 ); +if (acard->devmpu ==NULL ) { +kfree (cfg); +return 0 ; + } pdev = acard->devmpu;pnp_init_resource_table (cfg);
Signature · 8 lines
Rask Ingemann Lambertsen ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Takashi Iwai
AppliedAt Sun, 18 Mar 2007 20:28:07 +0100,
Quoted 10 lines · Rask Ingemann Lambertsen
From: Rask Ingemann Lambertsen <[email protected]>
The ad1816a driver fails if the mpu401 driver has been loaded first. This
patch against linux 2.6.20 fixes it by just ignoring the MPU-401 device in that case, so that the rest of the sound card can be used. The ad1816a driver already handles the MPU-401 device being unavailable due to lack of resources in the same way.Signed-off-by Rask Ingemann Lambertsen <[email protected]>
Thanks, applied to HG tree now.
Quoted 5 lines
---
Another way of fixing the failure would be to remove the MPU-401 related
code from the ad1816a driver, so the MPU-401 device is always handled by the mpu401 driver. I'll write such a patch if you think that's better.
We should keep the compatibility as much as possible, especially for such an old thing. If the current design works, let's keep it as it is.
Takashi
Quoted 39 lines
sound/isa/ad1816a/ad1816a.c renamed from sound/isa/ad1816a/ad1816a.c-orig +6
-2@@ -129,8 +129,8 @@ static int __devinit snd_card_ad1816a_pn } acard->devmpu =pnp_request_card_device (card, id->devs[1 ].id,NULL );if (acard->devmpu ==NULL ) { -kfree (cfg); -return -EBUSY ; + mpu_port[dev] =-1 ; + snd_printk(KERN_WARNING PFX "MPU401 device busy, skipping.\n"); } pdev = acard->dev;@@ -162,6 +162,10 @@ static int __devinit snd_card_ad1816a_pn dma2[dev] =pnp_dma (pdev,1 ); irq[dev] =pnp_irq (pdev,0 ); +if (acard->devmpu ==NULL ) { +kfree (cfg); +return 0 ; + } pdev = acard->devmpu;pnp_init_resource_table (cfg);Signature · 12 lines
Rask Ingemann Lambertsen ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Alsa-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/alsa-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV