• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/core/

Lines Matching refs:dmab

174  * @dmab: buffer allocation record to store the allocated data
183 struct snd_dma_buffer *dmab)
187 if (WARN_ON(!dmab))
190 dmab->dev.type = type;
191 dmab->dev.dev = device;
192 dmab->bytes = 0;
195 dmab->area = snd_malloc_pages(size, (unsigned long)device);
196 dmab->addr = 0;
200 dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr);
205 snd_malloc_sgbuf_pages(device, size, dmab, NULL);
210 dmab->area = NULL;
211 dmab->addr = 0;
214 if (! dmab->area)
216 dmab->bytes = size;
225 * @dmab: buffer allocation record to store the allocated data
236 struct snd_dma_buffer *dmab)
240 while ((err = snd_dma_alloc_pages(type, device, size, dmab)) < 0) {
252 if (! dmab->area)
260 * @dmab: the buffer allocation record to release
264 void snd_dma_free_pages(struct snd_dma_buffer *dmab)
266 switch (dmab->dev.type) {
268 snd_free_pages(dmab->area, dmab->bytes);
272 snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr);
277 snd_free_sgbuf_pages(dmab);
281 printk(KERN_ERR "snd-malloc: invalid device type %d\n", dmab->dev.type);
288 * @dmab: the buffer allocation record to store
296 size_t snd_dma_get_reserved_buf(struct snd_dma_buffer *dmab, unsigned int id)
300 if (WARN_ON(!dmab))
306 (mem->buffer.dev.dev == NULL || dmab->dev.dev == NULL ||
307 ! memcmp(&mem->buffer.dev, &dmab->dev, sizeof(dmab->dev)))) {
308 struct device *dev = dmab->dev.dev;
310 *dmab = mem->buffer;
311 if (dmab->dev.dev == NULL)
312 dmab->dev.dev = dev;
315 return dmab->bytes;
324 * @dmab: the buffer to reserve
331 int snd_dma_reserve_buf(struct snd_dma_buffer *dmab, unsigned int id)
335 if (WARN_ON(!dmab))
341 mem->buffer = *dmab;
459 struct snd_dma_buffer dmab;
460 memset(&dmab, 0, sizeof(dmab));
462 size, &dmab) < 0) {
467 snd_dma_reserve_buf(&dmab, snd_dma_pci_buf_id(pci));
473 struct snd_dma_buffer dmab;
474 memset(&dmab, 0, sizeof(dmab));
476 size, &dmab) < 0) {
480 snd_dma_reserve_buf(&dmab, (unsigned int)((vendor << 16) | device));