]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: fsl_audmix: Split playback and capture stream to different DAI
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 12 Jun 2024 06:40:51 +0000 (14:40 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 26 Jun 2024 16:48:13 +0000 (17:48 +0100)
As audmix requires playback and capture stream in different
master/slave mode, so separate playback and capture stream to
different DAI. There are three DAIs required, two DAIs for playback
one DAI for capture.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718174452-17596-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_audmix.c

index 0ab2c19621175e8c951393fb44b8594fd52eb0ac..1671a3037c6048adbedf32853b64125a7bb029fc 100644 (file)
@@ -326,15 +326,6 @@ static struct snd_soc_dai_driver fsl_audmix_dai[] = {
                        .rates = SNDRV_PCM_RATE_8000_96000,
                        .formats = FSL_AUDMIX_FORMATS,
                },
-               .capture = {
-                       .stream_name = "AUDMIX-Capture-0",
-                       .channels_min = 8,
-                       .channels_max = 8,
-                       .rate_min = 8000,
-                       .rate_max = 96000,
-                       .rates = SNDRV_PCM_RATE_8000_96000,
-                       .formats = FSL_AUDMIX_FORMATS,
-               },
                .ops = &fsl_audmix_dai_ops,
        },
        {
@@ -349,8 +340,13 @@ static struct snd_soc_dai_driver fsl_audmix_dai[] = {
                        .rates = SNDRV_PCM_RATE_8000_96000,
                        .formats = FSL_AUDMIX_FORMATS,
                },
+               .ops = &fsl_audmix_dai_ops,
+       },
+       {
+               .id   = 2,
+               .name = "audmix-2",
                .capture = {
-                       .stream_name = "AUDMIX-Capture-1",
+                       .stream_name = "AUDMIX-Capture-0",
                        .channels_min = 8,
                        .channels_max = 8,
                        .rate_min = 8000,