From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>,
alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: [PATCH 3/3] ASoC: mop500_ab8500: Use snd_soc_runtime_set_dai_fmt()
Date: Tue, 6 Jan 2015 15:17:22 +0100 [thread overview]
Message-ID: <1420553842-17335-3-git-send-email-lars@metafoo.de> (raw)
In-Reply-To: <1420553842-17335-1-git-send-email-lars@metafoo.de>
Use snd_soc_runtime_set_dai_fmt() to configure the format for the DAI link
rather than configuring each DAI individually.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
sound/soc/ux500/mop500_ab8500.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c
index be4f1ac7..aa65370 100644
--- a/sound/soc/ux500/mop500_ab8500.c
+++ b/sound/soc/ux500/mop500_ab8500.c
@@ -290,21 +290,9 @@ static int mop500_ab8500_hw_params(struct snd_pcm_substream *substream,
SND_SOC_DAIFMT_GATED;
}
- ret = snd_soc_dai_set_fmt(codec_dai, fmt);
- if (ret < 0) {
- dev_err(dev,
- "%s: ERROR: snd_soc_dai_set_fmt failed for codec_dai (ret = %d)!\n",
- __func__, ret);
- return ret;
- }
-
- ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
- if (ret < 0) {
- dev_err(dev,
- "%s: ERROR: snd_soc_dai_set_fmt failed for cpu_dai (ret = %d)!\n",
- __func__, ret);
+ ret = snd_soc_runtime_set_dai_fmt(rtd, fmt);
+ if (ret)
return ret;
- }
/* Setup TDM-slots */
--
1.8.0
next prev parent reply other threads:[~2015-01-06 14:17 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
2015-01-06 14:17 ` Lars-Peter Clausen [this message]
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=1420553842-17335-3-git-send-email-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@bitmer.com \
--cc=lgirdwood@gmail.com \
--cc=peter.ujfalusi@ti.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).