Skip to content

Commit

Permalink
ASoC: Intel: Skylake: Use helper to setup HOST stream
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
crojewsk-intel authored and tiwai committed Oct 6, 2023
1 parent 25f85af commit 17dc03e
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions sound/soc/intel/skylake/skl-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 17dc03e

Please sign in to comment.