From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Cc: alsa-devel@alsa-project.org, Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: Re: [PATCH 2/3] ASoC: omap-twl4030: Use snd_soc_runtime_set_dai_fmt()
Date: Wed, 7 Jan 2015 14:23:52 +0200 [thread overview]
Message-ID: <54AD2558.4030009@ti.com> (raw)
In-Reply-To: <1420553842-17335-2-git-send-email-lars@metafoo.de>
On 01/06/2015 04:17 PM, Lars-Peter Clausen wrote:
> Use snd_soc_runtime_set_dai_fmt() to configure the format for the DAI link
> rather than configuring each DAI individually.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> sound/soc/omap/omap-twl4030.c | 20 +-------------------
> 1 file changed, 1 insertion(+), 19 deletions(-)
>
> diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c
> index 5e551c7..fb1f6bb 100644
> --- a/sound/soc/omap/omap-twl4030.c
> +++ b/sound/soc/omap/omap-twl4030.c
> @@ -53,11 +53,7 @@ static int omap_twl4030_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;
> - struct snd_soc_card *card = rtd->card;
> unsigned int fmt;
> - int ret;
>
> switch (params_channels(params)) {
> case 2: /* Stereo I2S mode */
> @@ -74,21 +70,7 @@ static int omap_twl4030_hw_params(struct snd_pcm_substream *substream,
> return -EINVAL;
> }
>
> - /* Set codec DAI configuration */
> - ret = snd_soc_dai_set_fmt(codec_dai, fmt);
> - if (ret < 0) {
> - dev_err(card->dev, "can't set codec DAI configuration\n");
> - return ret;
> - }
> -
> - /* Set cpu DAI configuration */
> - ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
> - if (ret < 0) {
> - dev_err(card->dev, "can't set cpu DAI configuration\n");
> - return ret;
> - }
> -
> - return 0;
> + return snd_soc_runtime_set_dai_fmt(rtd, fmt);
> }
>
> static struct snd_soc_ops omap_twl4030_ops = {
>
--
Péter
next prev parent reply other threads:[~2015-01-07 12:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-06 14:17 [PATCH 1/3] ASoC: Add helper function for changing the DAI link format Lars-Peter Clausen
2015-01-06 14:17 ` [PATCH 2/3] ASoC: omap-twl4030: Use snd_soc_runtime_set_dai_fmt() Lars-Peter Clausen
2015-01-07 12:23 ` Peter Ujfalusi [this message]
2015-01-06 14:17 ` [PATCH 3/3] ASoC: mop500_ab8500: " Lars-Peter Clausen
2015-01-07 18:04 ` [PATCH 1/3] ASoC: Add helper function for changing the DAI link format 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=54AD2558.4030009@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@bitmer.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.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;
as well as URLs for NNTP newsgroup(s).