Skip to content

Commit 51f6786

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: fsl-asoc-card: add wm8904 codec support
wm8904 codec is used on i.MX95 Toradex board Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1713165456-3494-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 863f94a commit 51f6786

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sound/soc/fsl/fsl-asoc-card.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "../codecs/wm8994.h"
2929
#include "../codecs/tlv320aic31xx.h"
3030
#include "../codecs/nau8822.h"
31+
#include "../codecs/wm8904.h"
3132

3233
#define DRIVER_NAME "fsl-asoc-card"
3334

@@ -709,6 +710,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
709710
priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
710711
if (codec_dev)
711712
priv->codec_priv.mclk = devm_clk_get(codec_dev, NULL);
713+
} else if (of_device_is_compatible(np, "fsl,imx-audio-wm8904")) {
714+
codec_dai_name = "wm8904-hifi";
715+
priv->codec_priv.mclk_id = WM8904_FLL_MCLK;
716+
priv->codec_priv.fll_id = WM8904_CLK_FLL;
717+
priv->codec_priv.pll_id = WM8904_FLL_MCLK;
718+
priv->dai_fmt |= SND_SOC_DAIFMT_CBP_CFP;
712719
} else {
713720
dev_err(&pdev->dev, "unknown Device Tree compatible\n");
714721
ret = -EINVAL;
@@ -935,6 +942,7 @@ static const struct of_device_id fsl_asoc_card_dt_ids[] = {
935942
{ .compatible = "fsl,imx-audio-si476x", },
936943
{ .compatible = "fsl,imx-audio-wm8958", },
937944
{ .compatible = "fsl,imx-audio-nau8822", },
945+
{ .compatible = "fsl,imx-audio-wm8904", },
938946
{}
939947
};
940948
MODULE_DEVICE_TABLE(of, fsl_asoc_card_dt_ids);

0 commit comments

Comments
 (0)