ASoC: Intel: avs: Restore stream decoupling on prepare
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Fri, 5 Apr 2024 09:09:17 +0000 (11:09 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 5 Apr 2024 12:13:01 +0000 (13:13 +0100)
Revert changes from commit b87b8f43afd5 ("ASoC: Intel: avs: Drop
superfluous stream decoupling") to restore working streaming during S3.

Fixes: b87b8f43afd5 ("ASoC: Intel: avs: Drop superfluous stream decoupling")
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/pcm.c

index 2cafbc392cdbe50695150e61d835d29b82bfa0a4..72f1bc3b7b1fe4d70f866867c773845b5688dcce 100644 (file)
@@ -356,6 +356,7 @@ static int avs_dai_hda_be_prepare(struct snd_pcm_substream *substream, struct sn
                                           stream_info->sig_bits);
        format_val = snd_hdac_stream_format(runtime->channels, bits, runtime->rate);
 
+       snd_hdac_ext_stream_decouple(bus, link_stream, true);
        snd_hdac_ext_stream_reset(link_stream);
        snd_hdac_ext_stream_setup(link_stream, format_val);
 
@@ -611,6 +612,7 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so
        struct avs_dev *adev = to_avs_dev(dai->dev);
        struct hdac_ext_stream *host_stream;
        unsigned int format_val;
+       struct hdac_bus *bus;
        unsigned int bits;
        int ret;
 
@@ -620,6 +622,8 @@ static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_so
        if (hdac_stream(host_stream)->prepared)
                return 0;
 
+       bus = hdac_stream(host_stream)->bus;
+       snd_hdac_ext_stream_decouple(bus, data->host_stream, true);
        snd_hdac_stream_reset(hdac_stream(host_stream));
 
        stream_info = snd_soc_dai_get_pcm_stream(dai, substream->stream);