From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> To: broonie@kernel.org Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Subject: [PATCH 2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params Date: Tue, 16 Nov 2021 11:46:22 +0000 [thread overview] Message-ID: <20211116114623.11891-3-srinivas.kandagatla@linaro.org> (raw) In-Reply-To: <20211116114623.11891-1-srinivas.kandagatla@linaro.org> Error returned from wcd934x_slim_set_hw_params() are not passed to upper layer, this could be misleading to the user which can start sending stream leading to unnecessary errors. Fix this by properly returning the errors. Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- sound/soc/codecs/wcd934x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index c496b359f2f4..4f568abd59e2 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -1896,9 +1896,8 @@ static int wcd934x_hw_params(struct snd_pcm_substream *substream, } wcd->dai[dai->id].sconfig.rate = params_rate(params); - wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream); - return 0; + return wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream); } static int wcd934x_hw_free(struct snd_pcm_substream *substream, -- 2.21.0
WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, tiwai@suse.com Subject: [PATCH 2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params Date: Tue, 16 Nov 2021 11:46:22 +0000 [thread overview] Message-ID: <20211116114623.11891-3-srinivas.kandagatla@linaro.org> (raw) In-Reply-To: <20211116114623.11891-1-srinivas.kandagatla@linaro.org> Error returned from wcd934x_slim_set_hw_params() are not passed to upper layer, this could be misleading to the user which can start sending stream leading to unnecessary errors. Fix this by properly returning the errors. Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- sound/soc/codecs/wcd934x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c index c496b359f2f4..4f568abd59e2 100644 --- a/sound/soc/codecs/wcd934x.c +++ b/sound/soc/codecs/wcd934x.c @@ -1896,9 +1896,8 @@ static int wcd934x_hw_params(struct snd_pcm_substream *substream, } wcd->dai[dai->id].sconfig.rate = params_rate(params); - wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream); - return 0; + return wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream); } static int wcd934x_hw_free(struct snd_pcm_substream *substream, -- 2.21.0
next prev parent reply other threads:[~2021-11-16 11:47 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-16 11:46 [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes Srinivas Kandagatla 2021-11-16 11:46 ` Srinivas Kandagatla 2021-11-16 11:46 ` [PATCH 1/3] ASoC: codecs: wcd938x: fix volatile register range Srinivas Kandagatla 2021-11-16 11:46 ` Srinivas Kandagatla 2021-11-16 11:46 ` Srinivas Kandagatla [this message] 2021-11-16 11:46 ` [PATCH 2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params Srinivas Kandagatla 2021-11-16 11:46 ` [PATCH 3/3] ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask Srinivas Kandagatla 2021-11-16 11:46 ` Srinivas Kandagatla 2021-11-16 17:48 ` [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes Mark Brown 2021-11-16 17:48 ` 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=20211116114623.11891-3-srinivas.kandagatla@linaro.org \ --to=srinivas.kandagatla@linaro.org \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=perex@perex.cz \ --cc=pierre-louis.bossart@linux.intel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.