alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
	Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	alsa-devel@alsa-project.org,
	Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
	Sangbeom Kim <sbkim73@samsung.com>,
	Denis Carikli <denis@eukrea.com>,
	Manuel Lauss <manuel.lauss@googlemail.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Daniel Mack <daniel@zonque.org>
Subject: Re: [PATCH 01/21] ASoC: sam9g20_wm8731: Use static DAI format setup
Date: Sun, 4 Jan 2015 09:11:01 +0800	[thread overview]
Message-ID: <54A89325.9030708@atmel.com> (raw)
In-Reply-To: <1420128990-6872-2-git-send-email-lars@metafoo.de>

Hi Lars-Peter Clausen,

On 01/02/2015 12:16 AM, Lars-Peter Clausen wrote:
> Set the dai_fmt field in the dai_link struct instead of manually calling
> snd_soc_dai_fmt(). This makes the code cleaner and shorter.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.
Acked-by: Bo Shen <voice.shen@atmel.com>

> ---
>   sound/soc/atmel/sam9g20_wm8731.c | 30 ++----------------------------
>   1 file changed, 2 insertions(+), 28 deletions(-)
>
> diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c
> index 66b66d0..98ca634 100644
> --- a/sound/soc/atmel/sam9g20_wm8731.c
> +++ b/sound/soc/atmel/sam9g20_wm8731.c
> @@ -64,33 +64,6 @@
>
>   static struct clk *mclk;
>
> -static int at91sam9g20ek_hw_params(struct snd_pcm_substream *substream,
> -	struct snd_pcm_hw_params *params)
> -{
> -	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> -	struct snd_soc_dai *codec_dai = rtd->codec_dai;
> -	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
> -	int ret;
> -
> -	/* set codec DAI configuration */
> -	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
> -		SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
> -	if (ret < 0)
> -		return ret;
> -
> -	/* set cpu DAI configuration */
> -	ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
> -		SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
> -	if (ret < 0)
> -		return ret;
> -
> -	return 0;
> -}
> -
> -static struct snd_soc_ops at91sam9g20ek_ops = {
> -	.hw_params = at91sam9g20ek_hw_params,
> -};
> -
>   static int at91sam9g20ek_set_bias_level(struct snd_soc_card *card,
>   					struct snd_soc_dapm_context *dapm,
>   					enum snd_soc_bias_level level)
> @@ -173,7 +146,8 @@ static struct snd_soc_dai_link at91sam9g20ek_dai = {
>   	.init = at91sam9g20ek_wm8731_init,
>   	.platform_name = "at91rm9200_ssc.0",
>   	.codec_name = "wm8731.0-001b",
> -	.ops = &at91sam9g20ek_ops,
> +	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
> +		   SND_SOC_DAIFMT_CBM_CFM,
>   };
>
>   static struct snd_soc_card snd_soc_at91sam9g20ek = {
>

Best Regards,
Bo Shen

  reply	other threads:[~2015-01-04  1:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01 16:16 [PATCH 00/21] ASoC: Use static DAI format setup Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 01/21] ASoC: sam9g20_wm8731: " Lars-Peter Clausen
2015-01-04  1:11   ` Bo Shen [this message]
2015-01-01 16:16 ` [PATCH 02/21] ASoC: db1200: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 03/21] ASoC: eureka-tlv320: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 04/21] ASoC: mx27vis-aci32x4: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 05/21] ASoC: wm1133-ev1: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 06/21] ASoC: mxs-sgtl5000: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 07/21] ASoC: ams-delta: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 08/21] ASoC: raumfeld: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 09/21] ASoC: zylonite: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 10/21] ASoC: goni_wm8994: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 11/21] ASoC: h1940_uda1380: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 12/21] ASoC: jive_wm8750: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 13/21] ASoC: neo1973_wm8753: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 14/21] ASoC: rx1950_uda1380: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 15/21] ASoC: s3c24xx_simtec: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 16/21] ASoC: s3c24xx_uda134x: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 17/21] ASoC: smartq_wm8987: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 18/21] ASoC: smdk_wm8580: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 19/21] ASoC: smdk_wm8570pcm: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 20/21] ASoC: smdk_wm8994pcm: " Lars-Peter Clausen
2015-01-01 16:16 ` [PATCH 21/21] ASoC: migor: " Lars-Peter Clausen
2015-01-06 17:34 ` [PATCH 00/21] ASoC: " Mark Brown

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=54A89325.9030708@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=denis@eukrea.com \
    --cc=fabio.estevam@freescale.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=manuel.lauss@googlemail.com \
    --cc=sbkim73@samsung.com \
    --cc=shawn.guo@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).