hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/sound/hda/hdac_stream.c
....@@ -143,6 +143,33 @@
143143 EXPORT_SYMBOL_GPL(snd_hdac_stream_stop);
144144
145145 /**
146
+ * snd_hdac_stop_streams - stop all streams
147
+ * @bus: HD-audio core bus
148
+ */
149
+void snd_hdac_stop_streams(struct hdac_bus *bus)
150
+{
151
+ struct hdac_stream *stream;
152
+
153
+ list_for_each_entry(stream, &bus->stream_list, list)
154
+ snd_hdac_stream_stop(stream);
155
+}
156
+EXPORT_SYMBOL_GPL(snd_hdac_stop_streams);
157
+
158
+/**
159
+ * snd_hdac_stop_streams_and_chip - stop all streams and chip if running
160
+ * @bus: HD-audio core bus
161
+ */
162
+void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus)
163
+{
164
+
165
+ if (bus->chip_init) {
166
+ snd_hdac_stop_streams(bus);
167
+ snd_hdac_bus_stop_chip(bus);
168
+ }
169
+}
170
+EXPORT_SYMBOL_GPL(snd_hdac_stop_streams_and_chip);
171
+
172
+/**
146173 * snd_hdac_stream_reset - reset a stream
147174 * @azx_dev: HD-audio core stream to reset
148175 */