]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: max98373: Added TDM off if parameters are all zeroes
authorRyan Lee <RyanS.Lee@maximintegrated.com>
Wed, 10 Jan 2018 05:02:00 +0000 (21:02 -0800)
committerMark Brown <broonie@kernel.org>
Wed, 10 Jan 2018 10:26:23 +0000 (10:26 +0000)
Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98373.c

index cb389571b253a3926981ccd6f906eb5f34337ea2..ad17bb1fee7bc1a374bfcdec4a7db7c0d3785b4d 100644 (file)
@@ -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);