~ubuntu-branches/debian/experimental/linux-tools/experimental

« back to all changes in this revision

Viewing changes to include/sound/memalloc.h

  • Committer: Package Import Robot
  • Author(s): Ben Hutchings
  • Date: 2014-02-02 16:57:49 UTC
  • mfrom: (1.1.10) (0.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20140202165749-tw94o9t1t0a8txk6
Tags: 3.13-1~exp2
Merge changes from sid up to 3.12.6-3

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
#else
53
53
#define SNDRV_DMA_TYPE_DEV_SG   SNDRV_DMA_TYPE_DEV /* no SG-buf support */
54
54
#endif
 
55
#ifdef CONFIG_GENERIC_ALLOCATOR
 
56
#define SNDRV_DMA_TYPE_DEV_IRAM         4       /* generic device iram-buffer */
 
57
#else
 
58
#define SNDRV_DMA_TYPE_DEV_IRAM SNDRV_DMA_TYPE_DEV
 
59
#endif
55
60
 
56
61
/*
57
62
 * info for buffer allocation
103
108
{
104
109
        struct snd_sg_buf *sgbuf = dmab->private_data;
105
110
        dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr;
106
 
        addr &= PAGE_MASK;
 
111
        addr &= ~((dma_addr_t)PAGE_SIZE - 1);
107
112
        return addr + offset % PAGE_SIZE;
108
113
}
109
114