summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2023-09-26 11:06:23 +0300
committerTakashi Iwai <tiwai@suse.de>2023-10-06 12:11:39 +0300
commit17dc03e6fdf320bf3179c863bbe314ae7f35c02e (patch)
treed9332db10482129a4b1bb2e8ef020367207137a7
parent25f85afdd37e5ea1d2b385a88cf4533378656724 (diff)
downloadlinux-17dc03e6fdf320bf3179c863bbe314ae7f35c02e.tar.xz
ASoC: Intel: Skylake: Use helper to setup HOST stream
snd_hdac_ext_host_stream_setup() abstracts the procedure details away. Simplify the code by using it. Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20230926080623.43927-5-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index ac3dc8c63c26..7502b2e70e46 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -124,7 +124,6 @@ static void skl_set_suspend_active(struct snd_pcm_substream *substream,
int skl_pcm_host_dma_prepare(struct device *dev, struct skl_pipe_params *params)
{
struct hdac_bus *bus = dev_get_drvdata(dev);
- struct skl_dev *skl = bus_to_skl(bus);
unsigned int format_val;
struct hdac_stream *hstream;
struct hdac_ext_stream *stream;
@@ -149,18 +148,7 @@ int skl_pcm_host_dma_prepare(struct device *dev, struct skl_pipe_params *params)
if (err < 0)
return err;
- /*
- * The recommended SDxFMT programming sequence for BXT
- * platforms is to couple the stream before writing the format
- */
- if (HDA_CONTROLLER_IS_APL(skl->pci)) {
- snd_hdac_ext_stream_decouple(bus, stream, false);
- err = snd_hdac_stream_setup(hdac_stream(stream));
- snd_hdac_ext_stream_decouple(bus, stream, true);
- } else {
- err = snd_hdac_stream_setup(hdac_stream(stream));
- }
-
+ err = snd_hdac_ext_host_stream_setup(stream);
if (err < 0)
return err;