Update of /cvsroot/alsa/alsa-kernel/Documentation/DocBook In directory sc8-pr-cvs1:/tmp/cvs-serv12541/Documentation/DocBook
Modified Files: writing-an-alsa-driver.tmpl Log Message: - 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. Index: writing-an-alsa-driver.tmpl =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/Documentation/DocBook/writing-an-alsa-driver.tmpl,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- writing-an-alsa-driver.tmpl 30 Dec 2003 09:06:19 -0000 1.19 +++ writing-an-alsa-driver.tmpl 19 Jan 2004 18:37:35 -0000 1.20 @@ -1291,11 +1291,11 @@ // check PCI availability (28bit DMA) if ((err = pci_enable_device(pci)) < 0) return err; - if (!pci_dma_supported(pci, 0x0fffffff)) { + if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || + pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); return -ENXIO; } - pci_set_consistent_dma_mask(pci, 0x0fffffff); chip = snd_magic_kcalloc(mychip_t, 0, GFP_KERNEL); if (chip == NULL) @@ -1409,11 +1409,12 @@ <![CDATA[ if ((err = pci_enable_device(pci)) < 0) return err; - if (!pci_dma_supported(pci, 0x0fffffff)) { + if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || + pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); return -ENXIO; } - pci_set_consistent_dma_mask(pci, 0x0fffffff); + ]]> </programlisting> </informalexample> ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog