hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
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);
....@@ -122,21 +132,20 @@
122132 struct snd_pcm_substream *
123133 snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream);
124134
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);
135
+/* update audio routing between PCMs and any DAI links */
136
+int snd_soc_dpcm_runtime_update(struct snd_soc_card *card);
128137
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);
138
+#ifdef CONFIG_DEBUG_FS
135139 void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd);
136
-int soc_dpcm_runtime_update(struct snd_soc_card *);
140
+#else
141
+static inline void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
142
+{
143
+}
144
+#endif
137145
138146 int dpcm_path_get(struct snd_soc_pcm_runtime *fe,
139147 int stream, struct snd_soc_dapm_widget_list **list_);
148
+void dpcm_path_put(struct snd_soc_dapm_widget_list **list);
140149 int dpcm_process_paths(struct snd_soc_pcm_runtime *fe,
141150 int stream, struct snd_soc_dapm_widget_list **list, int new);
142151 int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream);
....@@ -149,11 +158,5 @@
149158 int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream);
150159 int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
151160 int event);
152
-
153
-static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list)
154
-{
155
- kfree(*list);
156
-}
157
-
158161
159162 #endif