summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/pcm3168a.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2019-07-25 11:33:21 +0300
committerMark Brown <broonie@kernel.org>2019-07-25 13:57:59 +0100
commitf2c8b57014038ae064a0f918f939af510f0aed02 (patch)
treed73e60d7a34e4cc2cf7a8048185b83bab7558e75 /sound/soc/codecs/pcm3168a.c
parentbdc873feec900005d52f9afd3a63290531c0c1f4 (diff)
downloadlinux-f2c8b57014038ae064a0f918f939af510f0aed02.tar.gz
linux-f2c8b57014038ae064a0f918f939af510f0aed02.tar.bz2
linux-f2c8b57014038ae064a0f918f939af510f0aed02.zip
ASoC: pcm3168a: Allow all channels in case of parallel DIN/DOUT setup
If multi DIN/DOUT mode is selected (tdm_slots == 2) then configure the channel constraint to allow all channels. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20190725083321.6776-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/pcm3168a.c')
-rw-r--r--sound/soc/codecs/pcm3168a.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 5d59ce254821..e84a1509fe65 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -599,6 +599,10 @@ static int pcm3168a_startup(struct snd_pcm_substream *substream,
SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
sample_min, 32);
+ /* Allow all channels in multi DIN/DOUT mode */
+ if (pcm3168a->tdm_slots == 2)
+ channel_max = channel_maxs[tx];
+
snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_CHANNELS,
2, channel_max);