From d2ef58aa67ac2339495abf9d5751234df36996b1 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Thu, 23 May 2019 23:56:50 -0700 Subject: [PATCH] ASoC: SOF: hda: set autosuspend delay for hda bus device Set the autosuspend delay for hda bus device. This prevents the hda codec device from entering runtime suspend when running stress tests involving opening/closing streams one after the other. Signed-off-by: Ranjani Sridharan --- sound/soc/sof/intel/hda-codec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index 0d8437b080bfa5..f2e7fca9192408 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -95,6 +95,7 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address) int hda_codec_probe_bus(struct snd_sof_dev *sdev) { struct hdac_bus *bus = sof_to_bus(sdev); + struct hda_bus *hbus = sof_to_hbus(sdev); int i, ret; /* probe codecs in avail slots */ @@ -111,6 +112,9 @@ int hda_codec_probe_bus(struct snd_sof_dev *sdev) } } + /* set autosuspend delay for hda bus device */ + snd_hda_set_power_save(hbus, SND_SOF_SUSPEND_DELAY_MS); + return 0; } EXPORT_SYMBOL(hda_codec_probe_bus);