From 393df6f321c757d164fa412b7eae527a8e2acb75 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Sat, 14 Oct 2023 00:19:50 +0200 Subject: ASoC: simple-card-utils: Make simple_util_remove() return void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. simple_util_remove() returned zero unconditionally. Make it return void instead and convert all users to struct platform_device::remove_new(). Signed-off-by: Uwe Kleine-König Reviewed-by: Herve Codina Link: https://lore.kernel.org/r/20231013221945.1489203-13-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown --- include/sound/simple_card_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 18e7a0b89395..e5da10b4c43b 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -188,7 +188,7 @@ int simple_util_init_aux_jacks(struct simple_util_priv *priv, char *prefix); int simple_util_init_priv(struct simple_util_priv *priv, struct link_info *li); -int simple_util_remove(struct platform_device *pdev); +void simple_util_remove(struct platform_device *pdev); int graph_util_card_probe(struct snd_soc_card *card); int graph_util_is_ports0(struct device_node *port); -- cgit From f0220575e65abe09c09cd17826a3cdea76e8d58f Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Fri, 27 Oct 2023 11:57:46 +0100 Subject: ASoC: soc-dai: add flag to mute and unmute stream during trigger In some setups like Speaker amps which are very sensitive, ex: keeping them unmute without actual data stream for very short duration results in a static charge and results in pop and clicks. To minimize this, provide a way to mute and unmute such codecs during trigger callbacks. Signed-off-by: Srinivas Kandagatla Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20231027105747.32450-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown --- include/sound/soc-dai.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sound') diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 5fcfba47d98c..adcd8719d343 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -370,6 +370,7 @@ struct snd_soc_dai_ops { /* bit field */ unsigned int no_capture_mute:1; + unsigned int mute_unmute_on_trigger:1; }; struct snd_soc_cdai_ops { -- cgit