From: Ryan Lee Date: Wed, 10 Jan 2018 05:02:00 +0000 (-0800) Subject: ASoC: max98373: Added TDM off if parameters are all zeroes X-Git-Tag: v4.16-rc1~43^2~1^2~2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=3831a5b87ff87a31dba2f212bcecd4f2b8c7c6d4;p=linux.git ASoC: max98373: Added TDM off if parameters are all zeroes Signed-off-by: Ryan Lee Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c index cb389571b253..ad17bb1fee7b 100644 --- a/sound/soc/codecs/max98373.c +++ b/sound/soc/codecs/max98373.c @@ -311,7 +311,10 @@ static int max98373_dai_tdm_slot(struct snd_soc_dai *dai, unsigned int mask; int x, slot_found; - max98373->tdm_mode = true; + if (!tx_mask && !rx_mask && !slots && !slot_width) + max98373->tdm_mode = false; + else + max98373->tdm_mode = true; /* BCLK configuration */ bsel = max98373_get_bclk_sel(slots * slot_width);