Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
soc-dpcm.h
Go to the documentation of this file.
1 /*
2  * linux/sound/soc-dpcm.h -- ALSA SoC Dynamic PCM Support
3  *
4  * Author: Liam Girdwood <[email protected]>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10 
11 #ifndef __LINUX_SND_SOC_DPCM_H
12 #define __LINUX_SND_SOC_DPCM_H
13 
14 #include <linux/list.h>
15 #include <sound/pcm.h>
16 
17 struct snd_soc_pcm_runtime;
18 
19 /*
20  * Types of runtime_update to perform. e.g. originated from FE PCM ops
21  * or audio route changes triggered by muxes/mixers.
22  */
27 };
28 
29 /*
30  * Dynamic PCM Frontend -> Backend link management states.
31  */
33  SND_SOC_DPCM_LINK_STATE_NEW = 0, /* newly created link */
34  SND_SOC_DPCM_LINK_STATE_FREE, /* link to be dismantled */
35 };
36 
37 /*
38  * Dynamic PCM Frontend -> Backend link PCM states.
39  */
51 };
52 
53 /*
54  * Dynamic PCM trigger ordering. Triggering flexibility is required as some
55  * DSPs require triggering before/after their CPU platform and DAIs.
56  *
57  * i.e. some clients may want to manually order this call in their PCM
58  * trigger() whilst others will just use the regular core ordering.
59  */
64 };
65 
66 /*
67  * Dynamic PCM link
68  * This links together a FE and BE DAI at runtime and stores the link
69  * state information and the hw_params configuration.
70  */
71 struct snd_soc_dpcm {
72  /* FE and BE DAIs*/
75 
76  /* link state */
78 
79  /* list of BE and FE for this DPCM link */
82 
83  /* hw params for this link - may be different for each link */
85 #ifdef CONFIG_DEBUG_FS
86  struct dentry *debugfs_state;
87 #endif
88 };
89 
90 /*
91  * Dynamic PCM runtime data.
92  */
96 
97  int users;
100 
101  /* state and update */
104 };
105 
106 /* can this BE stop and free */
108  struct snd_soc_pcm_runtime *be, int stream);
109 
110 /* can this BE perform a hw_params() */
112  struct snd_soc_pcm_runtime *be, int stream);
113 
114 /* is the current PCM operation for this FE ? */
115 int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream);
116 
117 /* is the current PCM operation for this BE ? */
119  struct snd_soc_pcm_runtime *be, int stream);
120 
121 /* get the substream for this BE */
122 struct snd_pcm_substream *
124 
125 /* get the BE runtime state */
128 
129 /* set the BE runtime state */
132 
133 /* internal use only */
137 
138 #endif