Message ID | d873df2b23a6d39099b3c62db8901d78a60d9362.1439550574.git.zidan.wang@freescale.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 50e0ee01382b8e08289d3db209738c5856fd25cf |
Headers | show |
On Fri, Aug 14, 2015 at 07:11:09PM +0800, Zidan Wang wrote: > add wm8960 support for fsl-asoc-card > > Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> > --- Please put a change log between these two lines next time. Thanks Nicolin > sound/soc/fsl/fsl-asoc-card.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c > index 040362f..5aeb6ed 100644 > --- a/sound/soc/fsl/fsl-asoc-card.c > +++ b/sound/soc/fsl/fsl-asoc-card.c > @@ -23,6 +23,7 @@ > > #include "../codecs/sgtl5000.h" > #include "../codecs/wm8962.h" > +#include "../codecs/wm8960.h" > > #define RX 0 > #define TX 1 > @@ -479,6 +480,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) > priv->codec_priv.fll_id = WM8962_SYSCLK_FLL; > priv->codec_priv.pll_id = WM8962_FLL; > priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; > + } else if (of_device_is_compatible(np, "fsl,imx-audio-wm8960")) { > + codec_dai_name = "wm8960-hifi"; > + priv->card.set_bias_level = fsl_asoc_card_set_bias_level; > + priv->codec_priv.fll_id = WM8960_SYSCLK_AUTO; > + priv->codec_priv.pll_id = WM8960_SYSCLK_AUTO; > + priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; > } else { > dev_err(&pdev->dev, "unknown Device Tree compatible\n"); > return -EINVAL; > @@ -582,6 +589,7 @@ static const struct of_device_id fsl_asoc_card_dt_ids[] = { > { .compatible = "fsl,imx-audio-cs42888", }, > { .compatible = "fsl,imx-audio-sgtl5000", }, > { .compatible = "fsl,imx-audio-wm8962", }, > + { .compatible = "fsl,imx-audio-wm8960", }, > {} > }; > > -- > 1.9.1 >
Hi Zidan, On Fri, Aug 14, 2015 at 8:11 AM, Zidan Wang <zidan.wang@freescale.com> wrote: > add wm8960 support for fsl-asoc-card > > Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Have you managed to get fsl-asoc-card to work with wm8960 on a imx7d-sdb board? I am trying to do this now, but after running 'aplay file.wav' I get no sound and the prompt never comes back.
Resending with Zidan's NXP email. On Tue, Apr 5, 2016 at 2:38 PM, Fabio Estevam <festevam@gmail.com> wrote: > Hi Zidan, > > On Fri, Aug 14, 2015 at 8:11 AM, Zidan Wang <zidan.wang@freescale.com> wrote: >> add wm8960 support for fsl-asoc-card >> >> Signed-off-by: Zidan Wang <zidan.wang@freescale.com> > > Have you managed to get fsl-asoc-card to work with wm8960 on a imx7d-sdb board? > > I am trying to do this now, but after running 'aplay file.wav' I get > no sound and the prompt never comes back.
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 040362f..5aeb6ed 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -23,6 +23,7 @@ #include "../codecs/sgtl5000.h" #include "../codecs/wm8962.h" +#include "../codecs/wm8960.h" #define RX 0 #define TX 1 @@ -479,6 +480,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) priv->codec_priv.fll_id = WM8962_SYSCLK_FLL; priv->codec_priv.pll_id = WM8962_FLL; priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; + } else if (of_device_is_compatible(np, "fsl,imx-audio-wm8960")) { + codec_dai_name = "wm8960-hifi"; + priv->card.set_bias_level = fsl_asoc_card_set_bias_level; + priv->codec_priv.fll_id = WM8960_SYSCLK_AUTO; + priv->codec_priv.pll_id = WM8960_SYSCLK_AUTO; + priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; } else { dev_err(&pdev->dev, "unknown Device Tree compatible\n"); return -EINVAL; @@ -582,6 +589,7 @@ static const struct of_device_id fsl_asoc_card_dt_ids[] = { { .compatible = "fsl,imx-audio-cs42888", }, { .compatible = "fsl,imx-audio-sgtl5000", }, { .compatible = "fsl,imx-audio-wm8962", }, + { .compatible = "fsl,imx-audio-wm8960", }, {} };
add wm8960 support for fsl-asoc-card Signed-off-by: Zidan Wang <zidan.wang@freescale.com> --- sound/soc/fsl/fsl-asoc-card.c | 8 ++++++++ 1 file changed, 8 insertions(+)