hc
2024-10-16 50a212ec906f7524620675f0c57357691c26c81f
kernel/include/sound/soc-dpcm.h
....@@ -103,6 +103,16 @@
103103 int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */
104104 };
105105
106
+#define for_each_dpcm_fe(be, stream, _dpcm) \
107
+ list_for_each_entry(_dpcm, &(be)->dpcm[stream].fe_clients, list_fe)
108
+
109
+#define for_each_dpcm_be(fe, stream, _dpcm) \
110
+ list_for_each_entry(_dpcm, &(fe)->dpcm[stream].be_clients, list_be)
111
+#define for_each_dpcm_be_safe(fe, stream, _dpcm, __dpcm) \
112
+ list_for_each_entry_safe(_dpcm, __dpcm, &(fe)->dpcm[stream].be_clients, list_be)
113
+#define for_each_dpcm_be_rollback(fe, stream, _dpcm) \
114
+ list_for_each_entry_continue_reverse(_dpcm, &(fe)->dpcm[stream].be_clients, list_be)
115
+
106116 /* can this BE stop and free */
107117 int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
108118 struct snd_soc_pcm_runtime *be, int stream);
....@@ -110,6 +120,10 @@
110120 /* can this BE perform a hw_params() */
111121 int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
112122 struct snd_soc_pcm_runtime *be, int stream);
123
+
124
+/* can this BE perform prepare */
125
+int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe,
126
+ struct snd_soc_pcm_runtime *be, int stream);
113127
114128 /* is the current PCM operation for this FE ? */
115129 int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream);
....@@ -122,21 +136,20 @@
122136 struct snd_pcm_substream *
123137 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream);
124138
125
-/* get the BE runtime state */
126
-enum snd_soc_dpcm_state
127
- snd_soc_dpcm_be_get_state(struct snd_soc_pcm_runtime *be, int stream);
139
+/* update audio routing between PCMs and any DAI links */
140
+int snd_soc_dpcm_runtime_update(struct snd_soc_card *card);
128141
129
-/* set the BE runtime state */
130
-void snd_soc_dpcm_be_set_state(struct snd_soc_pcm_runtime *be, int stream,
131
- enum snd_soc_dpcm_state state);
132
-
133
-/* internal use only */
134
-int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute);
142
+#ifdef CONFIG_DEBUG_FS
135143 void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd);
136
-int soc_dpcm_runtime_update(struct snd_soc_card *);
144
+#else
145
+static inline void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
146
+{
147
+}
148
+#endif
137149
138150 int dpcm_path_get(struct snd_soc_pcm_runtime *fe,
139151 int stream, struct snd_soc_dapm_widget_list **list_);
152
+void dpcm_path_put(struct snd_soc_dapm_widget_list **list);
140153 int dpcm_process_paths(struct snd_soc_pcm_runtime *fe,
141154 int stream, struct snd_soc_dapm_widget_list **list, int new);
142155 int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream);
....@@ -149,11 +162,5 @@
149162 int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream);
150163 int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
151164 int event);
152
-
153
-static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list)
154
-{
155
- kfree(*list);
156
-}
157
-
158165
159166 #endif