hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/sound/hda/ext/hdac_ext_controller.c
....@@ -1,18 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * hdac-ext-controller.c - HD-audio extended controller functions.
34 *
45 * Copyright (C) 2014-2015 Intel Corp
56 * Author: Jeeja KP <jeeja.kp@intel.com>
67 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; version 2 of the License.
11
- *
12
- * This program is distributed in the hope that it will be useful, but
13
- * WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * General Public License for more details.
168 *
179 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1810 */
....@@ -36,7 +28,7 @@
3628
3729 /**
3830 * snd_hdac_ext_bus_ppcap_enable - enable/disable processing pipe capability
39
- * @ebus: HD-audio extended core bus
31
+ * @bus: the pointer to HDAC bus object
4032 * @enable: flag to turn on/off the capability
4133 */
4234 void snd_hdac_ext_bus_ppcap_enable(struct hdac_bus *bus, bool enable)
....@@ -58,7 +50,7 @@
5850
5951 /**
6052 * snd_hdac_ext_bus_ppcap_int_enable - ppcap interrupt enable/disable
61
- * @ebus: HD-audio extended core bus
53
+ * @bus: the pointer to HDAC bus object
6254 * @enable: flag to enable/disable interrupt
6355 */
6456 void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_bus *bus, bool enable)
....@@ -85,7 +77,7 @@
8577
8678 /**
8779 * snd_hdac_ext_bus_get_ml_capabilities - get multilink capability
88
- * @ebus: HD-audio extended core bus
80
+ * @bus: the pointer to HDAC bus object
8981 *
9082 * This will parse all links and read the mlink capabilities and add them
9183 * in hlink_list of extended hdac bus
....@@ -125,7 +117,7 @@
125117 /**
126118 * snd_hdac_link_free_all- free hdac extended link objects
127119 *
128
- * @ebus: HD-audio ext core bus
120
+ * @bus: the pointer to HDAC bus object
129121 */
130122
131123 void snd_hdac_link_free_all(struct hdac_bus *bus)
....@@ -142,7 +134,7 @@
142134
143135 /**
144136 * snd_hdac_ext_bus_get_link_index - get link based on codec name
145
- * @ebus: HD-audio extended core bus
137
+ * @bus: the pointer to HDAC bus object
146138 * @codec_name: codec name
147139 */
148140 struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus,
....@@ -221,7 +213,7 @@
221213
222214 /**
223215 * snd_hdac_ext_bus_link_power_up_all -power up all hda link
224
- * @ebus: HD-audio extended bus
216
+ * @bus: the pointer to HDAC bus object
225217 */
226218 int snd_hdac_ext_bus_link_power_up_all(struct hdac_bus *bus)
227219 {
....@@ -242,7 +234,7 @@
242234
243235 /**
244236 * snd_hdac_ext_bus_link_power_down_all -power down all hda link
245
- * @ebus: HD-audio extended bus
237
+ * @bus: the pointer to HDAC bus object
246238 */
247239 int snd_hdac_ext_bus_link_power_down_all(struct hdac_bus *bus)
248240 {
....@@ -282,6 +274,11 @@
282274 ret = snd_hdac_ext_bus_link_power_up(link);
283275
284276 /*
277
+ * clear the register to invalidate all the output streams
278
+ */
279
+ snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV,
280
+ ML_LOSIDV_STREAM_MASK, 0);
281
+ /*
285282 * wait for 521usec for codec to report status
286283 * HDA spec section 4.3 - Codec Discovery
287284 */