Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ce9e58e authored by Gangadhar S's avatar Gangadhar S
Browse files

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: default avatarGangadhar S <gangadha@codeaurora.org>
parent 353b81f1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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);