mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Agrawal, Akshu" <Akshu.Agrawal@amd.com>
To: unlisted-recipients:; (no To-header on input)
Cc: "Agrawal, Akshu" <Akshu.Agrawal@amd.com>,
	"djkurtz@chromium.org" <djkurtz@chromium.org>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Adam.Thomson.Opensource@diasemi.com" 
	<Adam.Thomson.Opensource@diasemi.com>,
	Support Opensource <support.opensource@diasemi.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	"moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..."  <alsa-devel@alsa-project.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH] ASoC: DA7219: Fix failure in hw_params by not letting set_rate error out
Date: Mon, 22 Apr 2019 06:14:07 +0000	[thread overview]
Message-ID: <20190422061334.4243-1-akshu.agrawal@amd.com> (raw)

We need to set minimum bclk 64x of wclk as this is hw constraint in one
of the component used.
Since, clk_set_rate and clk is enabled in machine driver the
clk_set_rate in hw_params of da7219 fails and errors out and when it
tries to override the value.

In cases like these not only clk_set_rate of da7219 codec should fail
and not override the value but also should not error out.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
---
 sound/soc/codecs/da7219.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 5f5fa3416af3..a041dbf442af 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1621,13 +1621,7 @@ static int da7219_hw_params(struct snd_pcm_substream *substream,
 
 		if (bclk) {
 			bclk_rate = frame_size * sr;
-			ret = clk_set_rate(bclk, bclk_rate);
-			if (ret) {
-				dev_err(component->dev,
-					"Failed to set BCLK rate %lu: %d\n",
-					bclk_rate, ret);
-				return ret;
-			}
+			clk_set_rate(bclk, bclk_rate);
 		} else {
 			ret = da7219_set_bclks_per_wclk(component, frame_size);
 			if (ret) {
-- 
2.17.1


             reply	other threads:[~2019-04-22  6:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22  6:14 Agrawal, Akshu [this message]
2019-04-22  7:39 ` [alsa-devel] " Cheng-yi Chiang
2019-04-22  8:23   ` Agrawal, Akshu

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=20190422061334.4243-1-akshu.agrawal@amd.com \
    --to=akshu.agrawal@amd.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=djkurtz@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=support.opensource@diasemi.com \
    --cc=tiwai@suse.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

all inboxes | Powered by JetHome®