Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions sound/soc/sof/intel/hda-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,31 @@ int hda_dsp_stream_hw_params(struct snd_sof_dev *sdev,
sd_offset + SOF_HDA_ADSP_REG_CL_SD_CBL,
hstream->bufsize);

Comment thread
plbossart marked this conversation as resolved.
Outdated
/*
* Recommended hardware programming sequence for HDAudio DMA format
*
* 1. Put DMA into coupled mode by clearing PPCTL.PROCEN bit
* for corresponding stream index before the time of writing
* format to SDxFMT register.
* 2. Write SDxFMT
* 3. Set PPCTL.PROCEN bit for corresponding stream index to
* enable decoupled mode
*/

/* couple host and link DMA, disable DSP features */
snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL,
mask, 0);

/* program stream format */
snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR,
sd_offset +
SOF_HDA_ADSP_REG_CL_SD_FORMAT,
0xffff, hstream->format_val);

/* decouple host and link DMA, enable DSP features */
snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL,
mask, mask);

/* program last valid index */
snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR,
sd_offset + SOF_HDA_ADSP_REG_CL_SD_LVI,
Expand Down