Re: [ALSA - driver 0001138]: errors when installing au8820 modules

Takashi Iwai
2005-08-21T12:41:21Z

At Sat, 20 Aug 2005 08:45:47 +0800,
Raymond wrote:
>
> Takashi Iwai wrote:
> > At Fri, 05 Aug 2005 20:46:07 +0800,
> > Raymond wrote:
> >
> >>Takashi Iwai wrote:
> >>
> >>>At Fri, 29 Jul 2005 22:43:18 +0800,
> >>>Raymond wrote:
> >>>
> >>>
> >>>>Takashi Iwai wrote:
> >>>>
> >>>>
> >>>>>At Wed, 08 Jun 2005 17:06:39 +0800,
> >>>>>Raymond wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Is there any reason to make this change ?
> >>>>>>
> >>>>>>alsa-kernel/pci/au88x0/au88x0.c
> >>>>>>@@ -144,15 +144,18 @@
> >>>>>> // check PCI availability (DMA).
> >>>>>> if ((err = pci_enable_device(pci)) < 0)
> >>>>>> return err;
> >>>>>>- if (!pci_dma_supported(pci, VORTEX_DMA_MASK)) {
> >>>>>>+ if (pci_set_dma_mask(pci, VORTEX_DMA_MASK) < 0 ||
> >>>>>>+ pci_set_consistent_dma_mask(pci, VORTEX_DMA_MASK) < 0) {
> >>>>>> printk(KERN_ERR "error to set DMA mask\n");
> >>>>>>+ pci_disable_device(pci);
> >>>>>> return -ENXIO;
> >>>>>> }
> >>>>>>- pci_set_dma_mask(pci, VORTEX_DMA_MASK);
> >>>>>
> >>>>>
> >>>>>This is clean up.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
> >>>>>>- if (chip == NULL)
> >>>>>>+ if (chip == NULL) {
> >>>>>>+ pci_disable_device(pci);
> >>>>>> return -ENOMEM;
> >>>>>>+ }
> >>>>>
> >>>>>
> >>>>>This fixes the PCI state in the error path.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> chip->card = card;
> >>>>>>
> >>>>>>@@ -202,6 +205,8 @@
> >>>>>> goto alloc_out;
> >>>>>> }
> >>>>>>
> >>>>>>+ snd_card_set_dev(card, &pci->dev);
> >>>>>>+
> >>>>>> *rchip = chip;
> >>>>>
> >>>>>
> >>>>>And this sets up the missing sysfs stuff.
> >>>>>
> >>>>>
> >>>>
> >>>>It seem that these two patches for Kernel 2.6 were lost when au88x0
> >>>>migrate from alsa-driver to alsa-kernel.
> >>>
> >>>
> >>>You're right. It seems dropped at that time accidentally.
> >>>
> >>>Could you care to post a patch to fix them?
> >>>
> >>>
> >>
> >>
> >>au88x0_fix_fc4.patch (file# 4739)
> >>
> >>http://savannah.nongnu.org/patch/?func=detailitem&item_id=4107
> >>
> >>posted in the open vortex project patch manager (item id #4107) add back
> >>the two patches lost during au88x0 migrate from alsa-driver to alsa-kernel.
> >>
> >>http://savannah.nongnu.org/patch/download.php?item_id=4107&item_file_id=4739
> >>
> >>
> >>
> >>These are the two patches lost during au88x0 migrate from alsa-driver to
> >>alsa-kernel.
> >>
> >>http://www.mail-archive.com/alsa-cvslog@lists.sourceforge.net/msg03580.html
> >>
> >>* fixed the DMA allocation.
> >> pci_set_dma_mask() is called together with pci_set_consistent_dma_mask().
> >> also clean up the double check of mask.
> >>
> >>http://www.mail-archive.com/alsa-cvslog@lists.sourceforge.net/msg03642.html
> >>
> >>* added snd_card_set_dev() macro.
> >>* sysfsfied more pci, isapnp and usb drivers.
> >
> >
> > Fine, then could you make patches applicable to alsa-kernel tree and
> > post them to the list?
> > Also, please give signed-off-by for each patch.
> >
> >
> > thanks,
> >
> > Takashi
> >
>
> I am still using Kernel 2.4 which is not affected by the missing of
> these two patches.
>
> Is the missing of "snd_card_set_dev(card, &pci->dev);" affected only
> some distrubtion of Kernel 2.6 (32-bits platform) ?
>
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=299

Sure, it's only for 2.6, and it can't be critical.
It just adds the sysfs entry for udev/hal. It must work fine without
it.

> The reporter of bug 216 using Kernel 2.4 and the reporter of bug 299
> using Kernel 2.6

Then this will fix that bug very unlikely.

Takashi

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf