aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl')
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl16
1 files changed, 8 insertions, 8 deletions
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 6feef9e82b63..68eeebc17ff4 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -1123,8 +1123,8 @@
1123 if ((err = pci_enable_device(pci)) < 0) 1123 if ((err = pci_enable_device(pci)) < 0)
1124 return err; 1124 return err;
1125 /* check PCI availability (28bit DMA) */ 1125 /* check PCI availability (28bit DMA) */
1126 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || 1126 if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
1127 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { 1127 pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
1128 printk(KERN_ERR "error to set 28bit mask DMA\n"); 1128 printk(KERN_ERR "error to set 28bit mask DMA\n");
1129 pci_disable_device(pci); 1129 pci_disable_device(pci);
1130 return -ENXIO; 1130 return -ENXIO;
@@ -1216,7 +1216,7 @@
1216 The allocation of PCI resources is done in the 1216 The allocation of PCI resources is done in the
1217 <function>probe()</function> function, and usually an extra 1217 <function>probe()</function> function, and usually an extra
1218 <function>xxx_create()</function> function is written for this 1218 <function>xxx_create()</function> function is written for this
1219 purpose. 1219 purpose.
1220 </para> 1220 </para>
1221 1221
1222 <para> 1222 <para>
@@ -1225,7 +1225,7 @@
1225 allocating resources. Also, you need to set the proper PCI DMA 1225 allocating resources. Also, you need to set the proper PCI DMA
1226 mask to limit the accessed i/o range. In some cases, you might 1226 mask to limit the accessed i/o range. In some cases, you might
1227 need to call <function>pci_set_master()</function> function, 1227 need to call <function>pci_set_master()</function> function,
1228 too. 1228 too.
1229 </para> 1229 </para>
1230 1230
1231 <para> 1231 <para>
@@ -1236,8 +1236,8 @@
1236<![CDATA[ 1236<![CDATA[
1237 if ((err = pci_enable_device(pci)) < 0) 1237 if ((err = pci_enable_device(pci)) < 0)
1238 return err; 1238 return err;
1239 if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || 1239 if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 ||
1240 pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { 1240 pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) {
1241 printk(KERN_ERR "error to set 28bit mask DMA\n"); 1241 printk(KERN_ERR "error to set 28bit mask DMA\n");
1242 pci_disable_device(pci); 1242 pci_disable_device(pci);
1243 return -ENXIO; 1243 return -ENXIO;
@@ -1256,13 +1256,13 @@
1256 functions. Unlike ALSA ver.0.5.x., there are no helpers for 1256 functions. Unlike ALSA ver.0.5.x., there are no helpers for
1257 that. And these resources must be released in the destructor 1257 that. And these resources must be released in the destructor
1258 function (see below). Also, on ALSA 0.9.x, you don't need to 1258 function (see below). Also, on ALSA 0.9.x, you don't need to
1259 allocate (pseudo-)DMA for PCI like ALSA 0.5.x. 1259 allocate (pseudo-)DMA for PCI like ALSA 0.5.x.
1260 </para> 1260 </para>
1261 1261
1262 <para> 1262 <para>
1263 Now assume that this PCI device has an I/O port with 8 bytes 1263 Now assume that this PCI device has an I/O port with 8 bytes
1264 and an interrupt. Then struct <structname>mychip</structname> will have the 1264 and an interrupt. Then struct <structname>mychip</structname> will have the
1265 following fields: 1265 following fields:
1266 1266
1267 <informalexample> 1267 <informalexample>
1268 <programlisting> 1268 <programlisting>