diff options
| author | Gangadhar S <gangadha@codeaurora.org> | 2020-09-15 09:51:27 +0530 |
|---|---|---|
| committer | Gangadhar S <gangadha@codeaurora.org> | 2020-09-15 10:20:19 +0530 |
| commit | 9ce9e58eb76239c09059764092f0e69d67ccf9b5 (patch) | |
| tree | 8506e1d30227693be00b27b07f99084377eb2af9 | |
| parent | 353b81f1fbec379322908cec16dcb7f6b3167fb6 (diff) | |
asoc: msm8998: Configure TDM for full slots
- Dynamic configuration of TDM is not supported
with fixed slot mask
- changes to override slot mask when TDM configured
to use all slots available.
Change-Id: I36ddac1355b158be7a7a458b18522c13f31c46c3
Signed-off-by: Gangadhar S <gangadha@codeaurora.org>
| -rw-r--r-- | sound/soc/msm/msm8998.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/msm/msm8998.c b/sound/soc/msm/msm8998.c index c1b238e18f9e..8b3da6d7dd64 100644 --- a/sound/soc/msm/msm8998.c +++ b/sound/soc/msm/msm8998.c @@ -6260,6 +6260,15 @@ static int msm8998_tdm_snd_hw_params(struct snd_pcm_substream *substream, slot_width, slots, tdm_interface); pr_debug("%s: slot_mask :%x\n", __func__, slot_mask); + if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { + /* over write slot-mask if configured for full slots */ + if ((slots == 32) && (slot_width == 16)) + slot_mask = 0xffffffff; + else if ((slots == 16) && (slot_width == 32)) + slot_mask = 0xffff; + pr_debug("%s:slot_mask :%x slots %d slot_width %d\n", __func__, + slot_mask, slots, slot_width); + } if (!slot_mask) { pr_err("%s: invalid slot_mask 0x%x\n", __func__, slot_mask); |
