xref: /OK3568_Linux_fs/kernel/sound/soc/tegra/tegra_pcm.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * tegra_pcm.h - Definitions for Tegra PCM driver
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Author: Stephen Warren <swarren@nvidia.com>
6*4882a593Smuzhiyun  * Copyright (C) 2010,2012 - NVIDIA, Inc.
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * Based on code copyright/by:
9*4882a593Smuzhiyun  *
10*4882a593Smuzhiyun  * Copyright (c) 2009-2010, NVIDIA Corporation.
11*4882a593Smuzhiyun  * Scott Peterson <speterson@nvidia.com>
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * Copyright (C) 2010 Google, Inc.
14*4882a593Smuzhiyun  * Iliyan Malchev <malchev@google.com>
15*4882a593Smuzhiyun  */
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun #ifndef __TEGRA_PCM_H__
18*4882a593Smuzhiyun #define __TEGRA_PCM_H__
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #include <sound/dmaengine_pcm.h>
21*4882a593Smuzhiyun #include <sound/asound.h>
22*4882a593Smuzhiyun 
23*4882a593Smuzhiyun int tegra_pcm_construct(struct snd_soc_component *component,
24*4882a593Smuzhiyun 			struct snd_soc_pcm_runtime *rtd);
25*4882a593Smuzhiyun void tegra_pcm_destruct(struct snd_soc_component *component,
26*4882a593Smuzhiyun 			struct snd_pcm *pcm);
27*4882a593Smuzhiyun int tegra_pcm_open(struct snd_soc_component *component,
28*4882a593Smuzhiyun 		   struct snd_pcm_substream *substream);
29*4882a593Smuzhiyun int tegra_pcm_close(struct snd_soc_component *component,
30*4882a593Smuzhiyun 		    struct snd_pcm_substream *substream);
31*4882a593Smuzhiyun int tegra_pcm_hw_params(struct snd_soc_component *component,
32*4882a593Smuzhiyun 			struct snd_pcm_substream *substream,
33*4882a593Smuzhiyun 			struct snd_pcm_hw_params *params);
34*4882a593Smuzhiyun int tegra_pcm_hw_free(struct snd_soc_component *component,
35*4882a593Smuzhiyun 		      struct snd_pcm_substream *substream);
36*4882a593Smuzhiyun int tegra_pcm_mmap(struct snd_soc_component *component,
37*4882a593Smuzhiyun 		   struct snd_pcm_substream *substream,
38*4882a593Smuzhiyun 		   struct vm_area_struct *vma);
39*4882a593Smuzhiyun snd_pcm_uframes_t tegra_pcm_pointer(struct snd_soc_component *component,
40*4882a593Smuzhiyun 				    struct snd_pcm_substream *substream);
41*4882a593Smuzhiyun int tegra_pcm_platform_register(struct device *dev);
42*4882a593Smuzhiyun int tegra_pcm_platform_register_with_chan_names(struct device *dev,
43*4882a593Smuzhiyun 				struct snd_dmaengine_pcm_config *config,
44*4882a593Smuzhiyun 				char *txdmachan, char *rxdmachan);
45*4882a593Smuzhiyun void tegra_pcm_platform_unregister(struct device *dev);
46*4882a593Smuzhiyun 
47*4882a593Smuzhiyun #endif
48