From: "Gyeongtaek Lee" <gt82.lee@samsung.com>
To: <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, khw0178.kim@samsung.com,
'Takashi Iwai' <tiwai@suse.de>,
'Pierre-Louis Bossart' <pierre-louis.bossart@linux.intel.com>,
lgirdwood@gmail.com, kimty@samsung.com, donggyun.ko@samsung.com,
hmseo@samsung.com, s47.kang@samsung.com, pilsun.jang@samsung.com,
tkjung@samsung.com
Subject: [PATCH] ASoC: soc-dai: fix up hw params only if it is needed
Date: Fri, 14 May 2021 21:30:51 +0900 [thread overview]
Message-ID: <000401d748bc$fa466d50$eed347f0$@samsung.com> (raw)
In-Reply-To:
If fixed hw params won't be used, fixing up isn't needed also.
Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
---
sound/soc/soc-dai.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 080fbe053fc5..4df1aae8abf3 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -327,14 +327,15 @@ int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
int ret = 0;
- /* perform any topology hw_params fixups before DAI */
- ret = snd_soc_link_be_hw_params_fixup(rtd, params);
- if (ret < 0)
- goto end;
-
if (dai->driver->ops &&
- dai->driver->ops->hw_params)
+ dai->driver->ops->hw_params) {
+ /* perform any topology hw_params fixups before DAI */
+ ret = snd_soc_link_be_hw_params_fixup(rtd, params);
+ if (ret < 0)
+ goto end;
+
ret = dai->driver->ops->hw_params(substream, params, dai);
+ }
/* mark substream if succeeded */
if (ret == 0)
base-commit: c06a2ba62fc401b7aaefd23f5d0bc06d2457ccc1
--
2.21.0
next parent reply other threads:[~2021-05-14 12:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210514123052epcas2p37cb55a80e713340c1f2ee96c31ffa591@epcas2p3.samsung.com>
2021-05-14 12:30 ` Gyeongtaek Lee [this message]
2021-05-19 16:10 ` [PATCH] ASoC: soc-dai: fix up hw params only if it is needed 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='000401d748bc$fa466d50$eed347f0$@samsung.com' \
--to=gt82.lee@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=donggyun.ko@samsung.com \
--cc=hmseo@samsung.com \
--cc=khw0178.kim@samsung.com \
--cc=kimty@samsung.com \
--cc=lgirdwood@gmail.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=pilsun.jang@samsung.com \
--cc=s47.kang@samsung.com \
--cc=tiwai@suse.de \
--cc=tkjung@samsung.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