Debian Codegraph @

sound/soc/intel/avs/lnl.c

raw
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright(c) 2021-2025 Intel Corporation
4 *
5 * Authors: Cezary Rojewski <[email protected]>
6 * Amadeusz Slawinski <[email protected]>
7 */
8
9 #include <sound/hdaudio_ext.h>
10 #include "avs.h"
11 #include "debug.h"
12 #include "registers.h"
13
14 int avs_lnl_core_stall(struct avs_dev *adev, u32 core_mask, bool stall)
15 {
16 struct hdac_bus *bus = &adev->base.core;
17 struct hdac_ext_link *hlink;
18 int ret;
19
20 ret = avs_mtl_core_stall(adev, core_mask, stall);
21
22 /* On unstall, route interrupts from the links to the DSP firmware. */
23 if (!ret && !stall)
24 list_for_each_entry(hlink, &bus->hlink_list, list)
25 snd_hdac_updatel(hlink->ml_addr, AZX_REG_ML_LCTL, AZX_ML_LCTL_OFLEN,
26 AZX_ML_LCTL_OFLEN);
27 return ret;
28 }