* [PATCH] soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed
@ 2023-03-16 1:30 Bard Liao
2023-03-16 6:03 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Bard Liao @ 2023-03-16 1:30 UTC (permalink / raw)
To: alsa-devel, vkoul
Cc: vinod.koul, linux-kernel, pierre-louis.bossart, bard.liao
From: Shuming Fan <shumingf@realtek.com>
The _sdw_prepare_stream function just returns the error code when
compute_params callback failed.
The cumulative bus bandwidth will keep the value and won't be decreased
by sdw_deprepare_stream function.
We should restore the value of cumulative bus bandwidth when
compute_params callback failed.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
drivers/soundwire/stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 8c6da1739e3d..136b6850a3f0 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -1369,7 +1369,7 @@ static int _sdw_prepare_stream(struct sdw_stream_runtime *stream,
if (ret < 0) {
dev_err(bus->dev, "Compute params failed: %d\n",
ret);
- return ret;
+ goto restore_params;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed
2023-03-16 1:30 [PATCH] soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed Bard Liao
@ 2023-03-16 6:03 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2023-03-16 6:03 UTC (permalink / raw)
To: Bard Liao; +Cc: alsa-devel, linux-kernel, pierre-louis.bossart, bard.liao
On 16-03-23, 09:30, Bard Liao wrote:
> From: Shuming Fan <shumingf@realtek.com>
>
> The _sdw_prepare_stream function just returns the error code when
> compute_params callback failed.
> The cumulative bus bandwidth will keep the value and won't be decreased
> by sdw_deprepare_stream function.
> We should restore the value of cumulative bus bandwidth when
> compute_params callback failed.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-16 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-16 1:30 [PATCH] soundwire: stream: restore cumulative bus bandwidth when compute_params callback failed Bard Liao
2023-03-16 6:03 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox