]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: amd: acp: Add PDM controller based dmic dai for Renoir
authorAjit Kumar Pandey <AjitKumar.Pandey@amd.com>
Mon, 17 Jan 2022 11:58:50 +0000 (17:28 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 28 Jan 2022 15:59:30 +0000 (15:59 +0000)
Renoir ACP IP has a PDM controller block. Add DMIC dai instance in
dai_driver struct to enable dmic capture support on Renoir platform.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220117115854.455995-3-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/Kconfig
sound/soc/amd/acp/acp-renoir.c

index 2e6d0259f2e9ebee1af08219cd5f40370697863b..f4ca7843391bd973d634cb015eed89900cf2d219 100644 (file)
@@ -29,6 +29,7 @@ config SND_AMD_ASOC_RENOIR
        tristate "AMD ACP ASOC Renoir Support"
        select SND_SOC_AMD_ACP_PCM
        select SND_SOC_AMD_ACP_I2S
+       select SND_SOC_AMD_ACP_PDM
        depends on X86 && PCI
        help
          This option enables Renoir I2S support on AMD platform.
index 9b321a055b520e0b42c35958094850e984849439..770a57a0677b83272070816c73115653ea8d683b 100644 (file)
@@ -97,6 +97,19 @@ static struct snd_soc_dai_driver acp_renoir_dai[] = {
        .ops = &asoc_acp_cpu_dai_ops,
        .probe = &asoc_acp_i2s_probe,
 },
+{
+       .name = "acp-pdm-dmic",
+       .id = DMIC_INSTANCE,
+       .capture = {
+               .rates = SNDRV_PCM_RATE_8000_48000,
+               .formats = SNDRV_PCM_FMTBIT_S32_LE,
+               .channels_min = 2,
+               .channels_max = 2,
+               .rate_min = 8000,
+               .rate_max = 48000,
+       },
+       .ops = &acp_dmic_dai_ops,
+},
 };
 
 static int renoir_audio_probe(struct platform_device *pdev)