OSDN Git Service

ASoC: stm32: sai: increase channels_max limit
authorOlivier Moysan <olivier.moysan@st.com>
Wed, 17 Nov 2021 11:00:31 +0000 (12:00 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 17 Nov 2021 13:04:53 +0000 (13:04 +0000)
The SAI peripheral supports up to 16 channels in TDM mode (8L+8R).
The driver currently supports TDM over two channels.
Increase SAI DAI playback/record channels_max,
to also allow up to 16 channels in TDM mode.

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/20211117110031.19345-1-olivier.moysan@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/stm/stm32_sai_sub.c

index 9c3b8e2..95cd38a 100644 (file)
@@ -1294,7 +1294,7 @@ static struct snd_soc_dai_driver stm32_sai_playback_dai = {
                .id = 1, /* avoid call to fmt_single_name() */
                .playback = {
                        .channels_min = 1,
-                       .channels_max = 2,
+                       .channels_max = 16,
                        .rate_min = 8000,
                        .rate_max = 192000,
                        .rates = SNDRV_PCM_RATE_CONTINUOUS,
@@ -1312,7 +1312,7 @@ static struct snd_soc_dai_driver stm32_sai_capture_dai = {
                .id = 1, /* avoid call to fmt_single_name() */
                .capture = {
                        .channels_min = 1,
-                       .channels_max = 2,
+                       .channels_max = 16,
                        .rate_min = 8000,
                        .rate_max = 192000,
                        .rates = SNDRV_PCM_RATE_CONTINUOUS,