mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 14:48:06 +00:00
ASoC: SOF: Intel: hda-ipc: read all IPC registers first
Align with hardware recommended sequences, and read all IPC registers before doing any other actions. Playing with BUSY and DONE bits may invalidate values. The values read may not actually be necessary but at least this provides a snapshot of the IPC registers with no consistency issues. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3f58521bc8
commit
5dbeb82874
1 changed files with 2 additions and 5 deletions
|
@ -145,6 +145,8 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
|
|||
HDA_DSP_REG_HIPCIE);
|
||||
hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT);
|
||||
hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCCTL);
|
||||
hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCI);
|
||||
hipcte = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCTE);
|
||||
|
||||
/* reenable IPC interrupt */
|
||||
snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIC,
|
||||
|
@ -153,8 +155,6 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
|
|||
/* is this a reply message from the DSP */
|
||||
if (hipcie & HDA_DSP_REG_HIPCIE_DONE &&
|
||||
hipcctl & HDA_DSP_REG_HIPCCTL_DONE) {
|
||||
hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR,
|
||||
HDA_DSP_REG_HIPCI);
|
||||
msg = hipci & HDA_DSP_REG_HIPCI_MSG_MASK;
|
||||
msg_ext = hipcie & HDA_DSP_REG_HIPCIE_MSG_MASK;
|
||||
|
||||
|
@ -202,9 +202,6 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)
|
|||
/* is this a new message from DSP */
|
||||
if (hipct & HDA_DSP_REG_HIPCT_BUSY &&
|
||||
hipcctl & HDA_DSP_REG_HIPCCTL_BUSY) {
|
||||
|
||||
hipcte = snd_sof_dsp_read(sdev, HDA_DSP_BAR,
|
||||
HDA_DSP_REG_HIPCTE);
|
||||
msg = hipct & HDA_DSP_REG_HIPCT_MSG_MASK;
|
||||
msg_ext = hipcte & HDA_DSP_REG_HIPCTE_MSG_MASK;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue