Skip to content

Commit 5ee1197

Browse files
kv2019iCommit Bot
authored andcommitted
FROMGIT: ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management
Opt-in to use snd_hdac_ext_bus_link_power() to manage HDA link power up/down events. This allows to reduce power consumption in cases where some HDA codecs are suspended, but other child devices (HDA or non-HDA codecs) remain active and controller itself remains in active state. By using snd_hdac_ext_bus_link_power(), the individual HDA links can be powered off and if all HDA codecs are powered down, the command DMA can also be shut down. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Chintan Patel <chintan.m.patel@intel.com> (cherry picked from commit 87fc20e https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next) BUG=b:176942010 TEST=Enabling Google Assistant meets Power KPI Change-Id: I18ff0b7a7fde82cb25878289cf4cd778441c0ae4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2679470 Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Curtis Malainey <cujomalainey@chromium.org> Tested-by: Jairaj Arava <jairaj.arava@intel.corp-partner.google.com> Commit-Queue: Curtis Malainey <cujomalainey@chromium.org>
1 parent d210dfd commit 5ee1197

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

sound/soc/sof/intel/hda-bus.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,21 @@
1919
#define sof_hda_ext_ops NULL
2020
#endif
2121

22+
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
23+
static const struct hdac_bus_ops bus_core_ops = {
24+
.command = snd_hdac_bus_send_cmd,
25+
.get_response = snd_hdac_bus_get_response,
26+
.link_power = snd_hdac_ext_bus_link_power,
27+
};
28+
#endif
29+
2230
/*
2331
* This can be used for both with/without hda link support.
2432
*/
2533
void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev)
2634
{
2735
#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
28-
snd_hdac_ext_bus_init(bus, dev, NULL, sof_hda_ext_ops);
36+
snd_hdac_ext_bus_init(bus, dev, &bus_core_ops, sof_hda_ext_ops);
2937
#else /* CONFIG_SND_SOC_SOF_HDA */
3038
memset(bus, 0, sizeof(*bus));
3139
bus->dev = dev;

0 commit comments

Comments
 (0)