lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190422061334.4243-1-akshu.agrawal@amd.com>
Date:   Mon, 22 Apr 2019 06:14:07 +0000
From:   "Agrawal, Akshu" <Akshu.Agrawal@....com>
To:     unlisted-recipients:; (no To-header on input)
CC:     "Agrawal, Akshu" <Akshu.Agrawal@....com>,
        "djkurtz@...omium.org" <djkurtz@...omium.org>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Adam.Thomson.Opensource@...semi.com" 
        <Adam.Thomson.Opensource@...semi.com>,
        Support Opensource <support.opensource@...semi.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." 
        <alsa-devel@...a-project.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: [PATCH] ASoC: DA7219: Fix failure in hw_params by not letting
 set_rate error out

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@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ