agm: plugins: Update errno in amp_pcm_get_param_get
Update errno in amp_pcm_get_param_get to avoid false update of SSR down
in agm clients. When sound card is up after SSR, and this API is called,
and it fails because of some other error, errno is still -ENETRESET due
to some other APIs failure during SSR resulting in false report of SSR
down in agm clients.
Change-Id: If3b73a3b2a06c12108b8ec1456ad34fd28b1abc9
diff --git a/plugins/tinyalsa/src/agm_mixer_plugin.c b/plugins/tinyalsa/src/agm_mixer_plugin.c
index cb85c9d..1cd1e16 100644
--- a/plugins/tinyalsa/src/agm_mixer_plugin.c
+++ b/plugins/tinyalsa/src/agm_mixer_plugin.c
@@ -1485,6 +1485,7 @@
free(pcm_adi->get_param_info[idx].get_param_payload);
pcm_adi->get_param_info[idx].get_param_payload = NULL;
pcm_adi->get_param_info[idx].get_param_payload_size = 0;
+ errno = ret;
return ret;
}