summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/msm/msm8998.c9
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);