Skip to content

Commit

Permalink
ASoC: Intel: Used lock version to update shim registers
Browse files Browse the repository at this point in the history
We need hold lock each time updating shirm registers, otherwise,
we may set unexpected values to them when they are set in
different thread at different time sequence.

The notification work will be scheduled in global work queue,
which won't hold this sst->spinlock itself, so here we need
change to use the lock version to update shim registers.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jie Yang authored and Mark Brown committed Jan 27, 2015
1 parent f81677b commit 09a34aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/intel/sst-haswell-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,11 @@ static void hsw_notification_work(struct work_struct *work)
}

/* tell DSP that notification has been handled */
sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IPCD,
sst_dsp_shim_update_bits(hsw->dsp, SST_IPCD,
SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE);

/* unmask busy interrupt */
sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0);
sst_dsp_shim_update_bits(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0);
}

static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header)
Expand Down

0 comments on commit 09a34aa

Please sign in to comment.