Skip to content

Commit

Permalink
ASoC: davinci-mcasp: Fix TDM slot rx/tx mask associations
Browse files Browse the repository at this point in the history
Fixes the associations between the tx_mask and rx_mask and the associated
playback / capture streams during setting of the TDM slot. With this
patch in place it is now possible for example to only populate tx_mask
(leaving rx_mask as 0) for output-only codecs to control the TDM slot(s)
the McASP serial port uses for transmit. Before that, this scenario
would incorrectly rely on the rx_mask for this.

Signed-off-by: Andreas Dannenberg <[email protected]>
Reviewed-by: Jyri Sarha <[email protected]>
Acked-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Andreas Dannenberg authored and broonie committed Nov 10, 2015
1 parent bb9a13a commit 1bdd593
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/davinci/davinci-mcasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ static int davinci_mcasp_set_tdm_slot(struct snd_soc_dai *dai,
}

mcasp->tdm_slots = slots;
mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = rx_mask;
mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = tx_mask;
mcasp->tdm_mask[SNDRV_PCM_STREAM_PLAYBACK] = tx_mask;
mcasp->tdm_mask[SNDRV_PCM_STREAM_CAPTURE] = rx_mask;
mcasp->slot_width = slot_width;

return davinci_mcasp_set_ch_constraints(mcasp);
Expand Down

0 comments on commit 1bdd593

Please sign in to comment.