~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/cirrus/ep93xx-pcm.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-only
  2 /*
  3  * linux/sound/arm/ep93xx-pcm.c - EP93xx ALSA PCM interface
  4  *
  5  * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
  6  * Copyright (C) 2006 Applied Data Systems
  7  *
  8  * Rewritten for the SoC audio subsystem (Based on PXA2xx code):
  9  *   Copyright (c) 2008 Ryan Mallon
 10  */
 11 
 12 #include <linux/module.h>
 13 #include <linux/init.h>
 14 #include <linux/platform_device.h>
 15 #include <linux/dmaengine.h>
 16 
 17 #include <sound/pcm.h>
 18 #include <sound/soc.h>
 19 #include <sound/dmaengine_pcm.h>
 20 
 21 #include <linux/platform_data/dma-ep93xx.h>
 22 
 23 #include "ep93xx-pcm.h"
 24 
 25 static const struct snd_pcm_hardware ep93xx_pcm_hardware = {
 26         .info                   = (SNDRV_PCM_INFO_MMAP          |
 27                                    SNDRV_PCM_INFO_MMAP_VALID    |
 28                                    SNDRV_PCM_INFO_INTERLEAVED   |
 29                                    SNDRV_PCM_INFO_BLOCK_TRANSFER),
 30         .buffer_bytes_max       = 131072,
 31         .period_bytes_min       = 32,
 32         .period_bytes_max       = 32768,
 33         .periods_min            = 1,
 34         .periods_max            = 32,
 35         .fifo_size              = 32,
 36 };
 37 
 38 static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_param)
 39 {
 40         struct ep93xx_dma_data *data = filter_param;
 41 
 42         if (data->direction == ep93xx_dma_chan_direction(chan)) {
 43                 chan->private = data;
 44                 return true;
 45         }
 46 
 47         return false;
 48 }
 49 
 50 static const struct snd_dmaengine_pcm_config ep93xx_dmaengine_pcm_config = {
 51         .pcm_hardware = &ep93xx_pcm_hardware,
 52         .compat_filter_fn = ep93xx_pcm_dma_filter,
 53         .prealloc_buffer_size = 131072,
 54 };
 55 
 56 int devm_ep93xx_pcm_platform_register(struct device *dev)
 57 {
 58         return devm_snd_dmaengine_pcm_register(dev,
 59                 &ep93xx_dmaengine_pcm_config,
 60                 SND_DMAENGINE_PCM_FLAG_NO_DT |
 61                 SND_DMAENGINE_PCM_FLAG_COMPAT);
 62 }
 63 EXPORT_SYMBOL_GPL(devm_ep93xx_pcm_platform_register);
 64 
 65 MODULE_AUTHOR("Ryan Mallon");
 66 MODULE_DESCRIPTION("EP93xx ALSA PCM interface");
 67 MODULE_LICENSE("GPL");
 68 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php