ASoC: SOF: Intel: hda: clear stream status and wakests properly
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Wed, 12 Jun 2019 17:23:45 +0000 (12:23 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 17 Jun 2019 12:45:50 +0000 (13:45 +0100)
Stream status and WAKESTS registers need to be cleared by writing
to them with snd_sof_dsp_write(). snd_sof_dsp_update_bits() only
writes if the value is changed and will result in not clearing
the status.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-ctrl.c

index 688ab8d895a974d7e65ce1170af50288f33e4f2f..ea63f83a509bb5f681f1ce702e9d2384161543e2 100644 (file)
@@ -217,17 +217,14 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset)
        /* clear stream status */
        list_for_each_entry(stream, &bus->stream_list, list) {
                sd_offset = SOF_STREAM_SD_OFFSET(stream);
-               snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR,
-                                       sd_offset +
-                                       SOF_HDA_ADSP_REG_CL_SD_STS,
-                                       SOF_HDA_CL_DMA_SD_INT_MASK,
-                                       SOF_HDA_CL_DMA_SD_INT_MASK);
+               snd_sof_dsp_write(sdev, HDA_DSP_HDA_BAR,
+                                 sd_offset + SOF_HDA_ADSP_REG_CL_SD_STS,
+                                 SOF_HDA_CL_DMA_SD_INT_MASK);
        }
 
        /* clear WAKESTS */
-       snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_WAKESTS,
-                               SOF_HDA_WAKESTS_INT_MASK,
-                               SOF_HDA_WAKESTS_INT_MASK);
+       snd_sof_dsp_write(sdev, HDA_DSP_HDA_BAR, SOF_HDA_WAKESTS,
+                         SOF_HDA_WAKESTS_INT_MASK);
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
        /* clear rirb status */
@@ -295,17 +292,14 @@ void hda_dsp_ctrl_stop_chip(struct snd_sof_dev *sdev)
        /* clear stream status */
        list_for_each_entry(stream, &bus->stream_list, list) {
                sd_offset = SOF_STREAM_SD_OFFSET(stream);
-               snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR,
-                                       sd_offset +
-                                       SOF_HDA_ADSP_REG_CL_SD_STS,
-                                       SOF_HDA_CL_DMA_SD_INT_MASK,
-                                       SOF_HDA_CL_DMA_SD_INT_MASK);
+               snd_sof_dsp_write(sdev, HDA_DSP_HDA_BAR,
+                                 sd_offset + SOF_HDA_ADSP_REG_CL_SD_STS,
+                                 SOF_HDA_CL_DMA_SD_INT_MASK);
        }
 
        /* clear WAKESTS */
-       snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_WAKESTS,
-                               SOF_HDA_WAKESTS_INT_MASK,
-                               SOF_HDA_WAKESTS_INT_MASK);
+       snd_sof_dsp_write(sdev, HDA_DSP_HDA_BAR, SOF_HDA_WAKESTS,
+                         SOF_HDA_WAKESTS_INT_MASK);
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
        /* clear rirb status */