diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2021-12-24 10:10:32 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-12-24 14:06:48 +0000 |
commit | 636110411ca726f19ef8e87b0be51bb9a4cdef06 (patch) | |
tree | 22e6c5605c37427fadf3cc8e653bd0554a40c180 /sound/soc/intel/skylake | |
parent | e8444560b4d9302a511f0996f4cfdf85b628f4ca (diff) | |
download | linux-636110411ca726f19ef8e87b0be51bb9a4cdef06.tar.gz linux-636110411ca726f19ef8e87b0be51bb9a4cdef06.tar.bz2 linux-636110411ca726f19ef8e87b0be51bb9a4cdef06.zip |
ASoC: Intel/SOF: use set_stream() instead of set_tdm_slots() for HDAudio
Overloading the tx_mask with a linear value is asking for trouble and
only works because the codec_dai hw_params() is called before the
cpu_dai hw_params().
Move to the more generic set_stream() API to pass the hdac_stream
information.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211224021034.26635-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake')
-rw-r--r-- | sound/soc/intel/skylake/skl-pcm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index 9ecaf6a1e847..8378c187959f 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -562,11 +562,8 @@ static int skl_link_hw_params(struct snd_pcm_substream *substream, stream_tag = hdac_stream(link_dev)->stream_tag; - /* set the stream tag in the codec dai dma params */ - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - snd_soc_dai_set_tdm_slot(codec_dai, stream_tag, 0, 0, 0); - else - snd_soc_dai_set_tdm_slot(codec_dai, 0, stream_tag, 0, 0); + /* set the hdac_stream in the codec dai */ + snd_soc_dai_set_stream(codec_dai, hdac_stream(link_dev), substream->stream); p_params.s_fmt = snd_pcm_format_width(params_format(params)); p_params.ch = params_channels(params); |