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

TOMOYO Linux Cross Reference
Linux/sound/soc/spear/spear_pcm.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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 /*
  2  * ALSA PCM interface for ST SPEAr Processors
  3  *
  4  * sound/soc/spear/spear_pcm.c
  5  *
  6  * Copyright (C) 2012 ST Microelectronics
  7  * Rajeev Kumar<rajeevkumar.linux@gmail.com>
  8  *
  9  * This file is licensed under the terms of the GNU General Public
 10  * License version 2. This program is licensed "as is" without any
 11  * warranty of any kind, whether express or implied.
 12  */
 13 
 14 #include <linux/module.h>
 15 #include <linux/dmaengine.h>
 16 #include <linux/platform_device.h>
 17 #include <sound/dmaengine_pcm.h>
 18 #include <sound/pcm.h>
 19 #include <sound/soc.h>
 20 #include <sound/spear_dma.h>
 21 #include "spear_pcm.h"
 22 
 23 static const struct snd_pcm_hardware spear_pcm_hardware = {
 24         .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
 25                  SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
 26                  SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME),
 27         .buffer_bytes_max = 16 * 1024, /* max buffer size */
 28         .period_bytes_min = 2 * 1024, /* 1 msec data minimum period size */
 29         .period_bytes_max = 2 * 1024, /* maximum period size */
 30         .periods_min = 1, /* min # periods */
 31         .periods_max = 8, /* max # of periods */
 32         .fifo_size = 0, /* fifo size in bytes */
 33 };
 34 
 35 static const struct snd_dmaengine_pcm_config spear_dmaengine_pcm_config = {
 36         .pcm_hardware = &spear_pcm_hardware,
 37         .prealloc_buffer_size = 16 * 1024,
 38 };
 39 
 40 int devm_spear_pcm_platform_register(struct device *dev,
 41                         struct snd_dmaengine_pcm_config *config,
 42                         bool (*filter)(struct dma_chan *chan, void *slave))
 43 {
 44         *config = spear_dmaengine_pcm_config;
 45         config->compat_filter_fn = filter;
 46 
 47         return devm_snd_dmaengine_pcm_register(dev, config,
 48                 SND_DMAENGINE_PCM_FLAG_NO_DT |
 49                 SND_DMAENGINE_PCM_FLAG_COMPAT);
 50 }
 51 EXPORT_SYMBOL_GPL(devm_spear_pcm_platform_register);
 52 
 53 MODULE_AUTHOR("Rajeev Kumar <rajeevkumar.linux@gmail.com>");
 54 MODULE_DESCRIPTION("SPEAr PCM DMA module");
 55 MODULE_LICENSE("GPL");
 56 

~ [ 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