mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08:00
ASoC: SOF: hda-stream: only enable DPIB if needed
The existing code is inconsistent, we should only enable DPIB if the 'use_posbuf' field is true. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20211207193947.71080-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
12ce213821
commit
ae81d8fd57
@ -626,9 +626,10 @@ int hda_dsp_stream_hw_params(struct snd_sof_dev *sdev,
|
||||
sd_offset + SOF_HDA_ADSP_REG_CL_SD_BDLPU,
|
||||
upper_32_bits(hstream->bdl.addr));
|
||||
|
||||
/* enable position buffer */
|
||||
if (!(snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_ADSP_DPLBASE)
|
||||
& SOF_HDA_ADSP_DPLBASE_ENABLE)) {
|
||||
/* enable position buffer, if needed */
|
||||
if (bus->use_posbuf && bus->posbuf.addr &&
|
||||
!(snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_ADSP_DPLBASE)
|
||||
& SOF_HDA_ADSP_DPLBASE_ENABLE)) {
|
||||
snd_sof_dsp_write(sdev, HDA_DSP_HDA_BAR, SOF_HDA_ADSP_DPUBASE,
|
||||
upper_32_bits(bus->posbuf.addr));
|
||||
snd_sof_dsp_write(sdev, HDA_DSP_HDA_BAR, SOF_HDA_ADSP_DPLBASE,
|
||||
|
Loading…
Reference in New Issue
Block a user