public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Zidan Wang <zidan.wang@freescale.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org, timur@tabi.org,
	tiwai@suse.com
Subject: Re: [PATCH] ASoC: fsl-asoc-card: add wm8960 support
Date: Tue, 11 Aug 2015 20:42:59 -0700	[thread overview]
Message-ID: <20150812034257.GA2980@Asurada-CZ80> (raw)
In-Reply-To: <dc4e5a52a90982cea95445e27a30f2ad6cb73513.1439349623.git.zidan.wang@freescale.com>

On Wed, Aug 12, 2015 at 11:22:30AM +0800, Zidan Wang wrote:
> add wm8960 support for fsl-asoc-card
> 
> Signed-off-by: Zidan Wang <zidan.wang@freescale.com>

> +	gpr_np = of_parse_phandle(np, "gpr", 0);
> +	if (gpr_np) {
> +		priv->gpr = syscon_node_to_regmap(gpr_np);
> +		if (IS_ERR(priv->gpr)) {
> +			ret = PTR_ERR(priv->gpr);
> +			dev_err(&pdev->dev, "failed to get gpr regmap\n");
> +			goto fail;
> +		}
> +		/*
> +		 * for imx6ul we should set SAI2_MCLK_DIR to enable
> +		 * codec MCLK
> +		 */
> +		if (of_device_is_compatible(np, "fsl,imx6ul-evk-wm8960"))
> +			regmap_update_bits(priv->gpr, 4, 1 << 20, 1 << 20);

What's this SAI2_MCLK_DIR? Can you provide the description of it?

And why not put it inside:
 +	} else if (of_device_is_compatible(np, "fsl,imx-audio-wm8960")) {
 +		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;

> @@ -521,7 +545,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
>  	/* Normal DAI Link */
>  	priv->dai_link[0].cpu_of_node = cpu_np;
>  	priv->dai_link[0].codec_of_node = codec_np;
> -	priv->dai_link[0].codec_dai_name = codec_dev->name;
> +	if (strstr(codec_dev->name, "wm8960"))
> +		priv->dai_link[0].codec_dai_name = "wm8960-hifi";
> +	else
> +		priv->dai_link[0].codec_dai_name = codec_dev->name;

What happens to the codec_dev->name over here so that you need to
specify the name?

Nicolin

  reply	other threads:[~2015-08-12  3:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12  3:22 [PATCH] ASoC: fsl-asoc-card: add wm8960 support Zidan Wang
2015-08-12  3:42 ` Nicolin Chen [this message]
2015-08-12  4:45   ` Zidan Wang
2015-08-12  6:40     ` Nicolin Chen
2015-08-12  7:39       ` Zidan Wang
2015-08-12  9:03         ` Nicolin Chen
2015-08-12 22:27         ` Nicolin Chen
2015-08-14  2:21           ` Zidan Wang
2015-08-14  3:58             ` Nicolin Chen
2015-08-14  7:38               ` Zidan Wang
2015-08-14  9:22                 ` Nicolin Chen
2015-09-06 11:33                   ` Shawn Guo
2015-09-17  8:03                     ` Nicolin Chen
2015-09-18 13:19                       ` Shawn Guo
2015-09-19 17:50                         ` Nicolin Chen
2015-08-12 12:05 ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150812034257.GA2980@Asurada-CZ80 \
    --to=nicoleotsuka@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=timur@tabi.org \
    --cc=tiwai@suse.com \
    --cc=zidan.wang@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox