[alsa-devel] [PATCH] ALSA : Au88x0 - Support 4 channels playback when AC97 codec has SDAC bit , Reduce the number of playback devices of au8830 from 32 to 16
[PATCH - ALSA 1/2] Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit
- Check SDAC bit of AC97 codec for supporting 4 channels playback.
[PATCH - ALSA 2/2] Au88x0 - Reduce the number of playback subdevices of au8830 from 32 to 16
- The maximum number of playback streams depend on the number of sample rate conveters (16) and the number of DMA channels (32).
At Fri, 13 Jan 2012 18:47:45 +0800, Raymond Yau wrote:
[PATCH - ALSA 1/2] Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit
- Check SDAC bit of AC97 codec for supporting 4 channels playback.
[PATCH - ALSA 2/2] Au88x0 - Reduce the number of playback subdevices of au8830 from 32 to 16
- The maximum number of playback streams depend on the number of sample rate conveters (16) and the number of DMA channels (32).
Applied both patches. Thanks.
Takashi
2012/1/16, Takashi Iwai tiwai@suse.de:
At Fri, 13 Jan 2012 18:47:45 +0800, Raymond Yau wrote:
[PATCH - ALSA 1/2] Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit
- Check SDAC bit of AC97 codec for supporting 4 channels playback.
[PATCH - ALSA 2/2] Au88x0 - Reduce the number of playback subdevices of au8830 from 32 to 16
- The maximum number of playback streams depend on the number of sample rate conveters (16) and the number of DMA channels (32).
Applied both patches. Thanks.
Does alsa require the driver to provide private_free for ac97_bus and ac97 ?
There is a bug report
snd_vortex_dev_free() BUG: unable to handle kernel NULL pointer
https://bugzilla.redhat.com/show_bug.cgi?id=788978
It seem that snd_ac97_bus() fail
However I cannot reproduce the bug in 2.6 kernel,
Do 3.x kernel require mixer created after pcm devices ?
:Call Trace: : [<ffffffff810dec3d>] __free_irq+0x17d/0x220 : [<ffffffff810dee65>] free_irq+0x55/0xd0 : [<ffffffffa04e2d64>] snd_vortex_dev_free+0x44/0x80 [snd_au8830] : [<ffffffffa01c0aa1>] snd_device_free+0x71/0x170 [snd] : [<ffffffffa01c0f51>] snd_device_free_all+0x61/0xb0 [snd] : [<ffffffffa01b9908>] snd_card_do_free+0x58/0x140 [snd] : [<ffffffffa01badf3>] snd_card_free+0xa3/0xc0 [snd] : [<ffffffffa0261b8f>] ? snd_ac97_bus+0xaf/0x130 [snd_ac97_codec] : [<ffffffffa04e6a9f>] snd_vortex_probe+0x1c40/0x1d09 [snd_au8830] : [<ffffffff812db37c>] local_pci_probe+0x5c/0xd0 : [<ffffffff812dcc19>] pci_device_probe+0x109/0x130 : [<ffffffff813932cc>] driver_probe_device+0x9c/0x300 : [<ffffffff813935db>] __driver_attach+0xab/0xb0 : [<ffffffff81393530>] ? driver_probe_device+0x300/0x300 : [<ffffffff81393530>] ? driver_probe_device+0x300/0x300 : [<ffffffff8139214c>] bus_for_each_dev+0x5c/0x90 : [<ffffffff81392ede>] driver_attach+0x1e/0x20 : [<ffffffff81392ae0>] bus_add_driver+0x1b0/0x2a0 : [<ffffffffa04ed000>] ? 0xffffffffa04ecfff : [<ffffffff81393b36>] driver_register+0x76/0x140 : [<ffffffff815e554d>] ? notifier_call_chain+0x4d/0x70 : [<ffffffffa04ed000>] ? 0xffffffffa04ecfff : [<ffffffff812dc8f6>] __pci_register_driver+0x56/0xd0 : [<ffffffff81041673>] ? set_memory_nx+0x43/0x50 : [<ffffffffa04ed01e>] alsa_card_vortex_init+0x1e/0x1000 [snd_au8830] : [<ffffffff81002042>] do_one_initcall+0x42/0x180 : [<ffffffff810ac970>] sys_init_module+0xc0/0x230 : [<ffffffff815e9782>] system_call_fastpath+0x16/0x1b
At Tue, 28 Feb 2012 11:04:07 +0800, Raymond Yau wrote:
2012/1/16, Takashi Iwai tiwai@suse.de:
At Fri, 13 Jan 2012 18:47:45 +0800, Raymond Yau wrote:
[PATCH - ALSA 1/2] Au88x0 - Support 4 channels playback when AC97 codecs has SDAC bit
- Check SDAC bit of AC97 codec for supporting 4 channels playback.
[PATCH - ALSA 2/2] Au88x0 - Reduce the number of playback subdevices of au8830 from 32 to 16
- The maximum number of playback streams depend on the number of sample rate conveters (16) and the number of DMA channels (32).
Applied both patches. Thanks.
Does alsa require the driver to provide private_free for ac97_bus and ac97 ?
No, and it must be irrelevant.
There is a bug report
snd_vortex_dev_free() BUG: unable to handle kernel NULL pointer
https://bugzilla.redhat.com/show_bug.cgi?id=788978
It seem that snd_ac97_bus() fail
Or something else. au88x0 is built in a strange way, sourcing all *.c files into one, so we can't see the exact point.
In anyway, the Oops isn't because the probing fails but due to concurrent accesses while removing irq, etc. Maybe a patch like below can help.
However I cannot reproduce the bug in 2.6 kernel,
Do 3.x kernel require mixer created after pcm devices ?
No.
Takashi
:Call Trace: : [<ffffffff810dec3d>] __free_irq+0x17d/0x220 : [<ffffffff810dee65>] free_irq+0x55/0xd0 : [<ffffffffa04e2d64>] snd_vortex_dev_free+0x44/0x80 [snd_au8830] : [<ffffffffa01c0aa1>] snd_device_free+0x71/0x170 [snd] : [<ffffffffa01c0f51>] snd_device_free_all+0x61/0xb0 [snd] : [<ffffffffa01b9908>] snd_card_do_free+0x58/0x140 [snd] : [<ffffffffa01badf3>] snd_card_free+0xa3/0xc0 [snd] : [<ffffffffa0261b8f>] ? snd_ac97_bus+0xaf/0x130 [snd_ac97_codec] : [<ffffffffa04e6a9f>] snd_vortex_probe+0x1c40/0x1d09 [snd_au8830] : [<ffffffff812db37c>] local_pci_probe+0x5c/0xd0 : [<ffffffff812dcc19>] pci_device_probe+0x109/0x130 : [<ffffffff813932cc>] driver_probe_device+0x9c/0x300 : [<ffffffff813935db>] __driver_attach+0xab/0xb0 : [<ffffffff81393530>] ? driver_probe_device+0x300/0x300 : [<ffffffff81393530>] ? driver_probe_device+0x300/0x300 : [<ffffffff8139214c>] bus_for_each_dev+0x5c/0x90 : [<ffffffff81392ede>] driver_attach+0x1e/0x20 : [<ffffffff81392ae0>] bus_add_driver+0x1b0/0x2a0 : [<ffffffffa04ed000>] ? 0xffffffffa04ecfff : [<ffffffff81393b36>] driver_register+0x76/0x140 : [<ffffffff815e554d>] ? notifier_call_chain+0x4d/0x70 : [<ffffffffa04ed000>] ? 0xffffffffa04ecfff : [<ffffffff812dc8f6>] __pci_register_driver+0x56/0xd0 : [<ffffffff81041673>] ? set_memory_nx+0x43/0x50 : [<ffffffffa04ed01e>] alsa_card_vortex_init+0x1e/0x1000 [snd_au8830] : [<ffffffff81002042>] do_one_initcall+0x42/0x180 : [<ffffffff810ac970>] sys_init_module+0xc0/0x230 : [<ffffffff815e9782>] system_call_fastpath+0x16/0x1b
--- diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index f13ad53..506d2fc 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c @@ -123,10 +123,10 @@ static int snd_vortex_dev_free(struct snd_device *device) { vortex_t *vortex = device->device_data;
+ free_irq(vortex->irq, vortex); vortex_gameport_unregister(vortex); vortex_core_shutdown(vortex); // Take down PCI interface. - free_irq(vortex->irq, vortex); iounmap(vortex->mmio); pci_release_regions(vortex->pci_dev); pci_disable_device(vortex->pci_dev); diff --git a/sound/pci/au88x0/au88x0_core.c b/sound/pci/au88x0/au88x0_core.c index 1181c5e..525f881 100644 --- a/sound/pci/au88x0/au88x0_core.c +++ b/sound/pci/au88x0/au88x0_core.c @@ -2477,7 +2477,7 @@ static irqreturn_t vortex_interrupt(int irq, void *dev_id) hwread(vortex->mmio, VORTEX_IRQ_STAT); handled = 1; } - if (source & IRQ_MIDI) { + if ((source & IRQ_MIDI) && vortex->rmidi) { snd_mpu401_uart_interrupt(vortex->irq, vortex->rmidi->private_data); handled = 1;
participants (2)
-
Raymond Yau
-
Takashi Iwai