X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Documentation%2Fsound%2Falsa%2FDocBook%2Fwriting-an-alsa-driver.tmpl;h=68eeebc17ff43508a8fbae95f2432258eb6ebfc7;hb=7c8ce71b092425f1e938285cab2a679c09444d9b;hp=4963d83d15118d332dedc2910b5e0836237689b0;hpb=37ef4399a6bb265d3035e6d6e45f7677b132a3ba;p=pandora-kernel.git diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl index 4963d83d1511..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 @@ if ((err = pci_enable_device(pci)) < 0) return err; /* check PCI availability (28bit DMA) */ - if (pci_set_dma_mask(pci, 0x0fffffff) < 0 || - pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) { + if (pci_set_dma_mask(pci, DMA_28BIT_MASK) < 0 || + pci_set_consistent_dma_mask(pci, DMA_28BIT_MASK) < 0) { printk(KERN_ERR "error to set 28bit mask DMA\n"); pci_disable_device(pci); return -ENXIO; @@ -1216,7 +1216,7 @@ The allocation of PCI resources is done in the probe() function, and usually an extra xxx_create() function is written for this - purpose. + purpose. @@ -1225,7 +1225,7 @@ allocating resources. Also, you need to set the proper PCI DMA mask to limit the accessed i/o range. In some cases, you might need to call pci_set_master() function, - too. + too. @@ -1236,8 +1236,8 @@ Now assume that this PCI device has an I/O port with 8 bytes and an interrupt. Then struct mychip will have the - following fields: + following fields: @@ -1834,7 +1834,7 @@ mychip_set_sample_format(chip, runtime->format); mychip_set_sample_rate(chip, runtime->rate); mychip_set_channels(chip, runtime->channels); - mychip_set_dma_setup(chip, runtime->dma_area, + mychip_set_dma_setup(chip, runtime->dma_addr, chip->buffer_size, chip->period_size); return 0; @@ -2836,7 +2836,7 @@ struct _snd_pcm_runtime { Note that this callback became non-atomic since the recent version. - You can use schedule-related fucntions safely in this callback now. + You can use schedule-related functions safely in this callback now. @@ -3388,7 +3388,7 @@ struct _snd_pcm_runtime { .name = "PCM Playback Switch", .index = 0, .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, - .private_values = 0xffff, + .private_value = 0xffff, .info = my_control_info, .get = my_control_get, .put = my_control_put @@ -3449,7 +3449,7 @@ struct _snd_pcm_runtime { - The private_values field contains + The private_value field contains an arbitrary long integer value for this record. When using generic info, get and @@ -5206,14 +5206,14 @@ struct _snd_pcm_runtime { You need to pass the snd_dma_pci_data(pci), where pci is the struct pci_dev pointer of the chip as well. - The snd_sg_buf_t instance is created as + The struct snd_sg_buf instance is created as substream->dma_private. You can cast the pointer like: dma_private; + struct snd_sg_buf *sgbuf = (struct snd_sg_buf *)substream->dma_private; ]]> @@ -5577,7 +5577,7 @@ struct _snd_pcm_runtime {