| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * hdac-ext-controller.c - HD-audio extended controller functions. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2014-2015 Intel Corp |
|---|
| 5 | 6 | * Author: Jeeja KP <jeeja.kp@intel.com> |
|---|
| 6 | 7 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 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. |
|---|
| 16 | 8 | * |
|---|
| 17 | 9 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 18 | 10 | */ |
|---|
| .. | .. |
|---|
| 36 | 28 | |
|---|
| 37 | 29 | /** |
|---|
| 38 | 30 | * 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 |
|---|
| 40 | 32 | * @enable: flag to turn on/off the capability |
|---|
| 41 | 33 | */ |
|---|
| 42 | 34 | void snd_hdac_ext_bus_ppcap_enable(struct hdac_bus *bus, bool enable) |
|---|
| .. | .. |
|---|
| 58 | 50 | |
|---|
| 59 | 51 | /** |
|---|
| 60 | 52 | * 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 |
|---|
| 62 | 54 | * @enable: flag to enable/disable interrupt |
|---|
| 63 | 55 | */ |
|---|
| 64 | 56 | void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_bus *bus, bool enable) |
|---|
| .. | .. |
|---|
| 85 | 77 | |
|---|
| 86 | 78 | /** |
|---|
| 87 | 79 | * 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 |
|---|
| 89 | 81 | * |
|---|
| 90 | 82 | * This will parse all links and read the mlink capabilities and add them |
|---|
| 91 | 83 | * in hlink_list of extended hdac bus |
|---|
| .. | .. |
|---|
| 125 | 117 | /** |
|---|
| 126 | 118 | * snd_hdac_link_free_all- free hdac extended link objects |
|---|
| 127 | 119 | * |
|---|
| 128 | | - * @ebus: HD-audio ext core bus |
|---|
| 120 | + * @bus: the pointer to HDAC bus object |
|---|
| 129 | 121 | */ |
|---|
| 130 | 122 | |
|---|
| 131 | 123 | void snd_hdac_link_free_all(struct hdac_bus *bus) |
|---|
| .. | .. |
|---|
| 142 | 134 | |
|---|
| 143 | 135 | /** |
|---|
| 144 | 136 | * 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 |
|---|
| 146 | 138 | * @codec_name: codec name |
|---|
| 147 | 139 | */ |
|---|
| 148 | 140 | struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus, |
|---|
| .. | .. |
|---|
| 221 | 213 | |
|---|
| 222 | 214 | /** |
|---|
| 223 | 215 | * 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 |
|---|
| 225 | 217 | */ |
|---|
| 226 | 218 | int snd_hdac_ext_bus_link_power_up_all(struct hdac_bus *bus) |
|---|
| 227 | 219 | { |
|---|
| .. | .. |
|---|
| 242 | 234 | |
|---|
| 243 | 235 | /** |
|---|
| 244 | 236 | * 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 |
|---|
| 246 | 238 | */ |
|---|
| 247 | 239 | int snd_hdac_ext_bus_link_power_down_all(struct hdac_bus *bus) |
|---|
| 248 | 240 | { |
|---|
| .. | .. |
|---|
| 282 | 274 | ret = snd_hdac_ext_bus_link_power_up(link); |
|---|
| 283 | 275 | |
|---|
| 284 | 276 | /* |
|---|
| 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 | + /* |
|---|
| 285 | 282 | * wait for 521usec for codec to report status |
|---|
| 286 | 283 | * HDA spec section 4.3 - Codec Discovery |
|---|
| 287 | 284 | */ |
|---|