]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: qcom: q6apm: return error code to consumers on failures
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Thu, 28 May 2026 18:58:01 +0000 (19:58 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2026 16:19:11 +0000 (17:19 +0100)
Return errors from audioreach_set_media_format() to ensure callers are
notified when media format setup fails.

This could hide failures while programming media format parameters for
individual modules and allow graph setup to continue with incomplete
configuration.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260528185806.6316-3-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/qdsp6/q6apm.c

index 2ab378fb503267c533b05dd69a76e7180e6f72d9..2cebeb767cd66f29bf72ff70eecc92294fb97f2f 100644 (file)
@@ -194,10 +194,7 @@ int q6apm_graph_media_format_shmem(struct q6apm_graph *graph,
        if (!module)
                return -ENODEV;
 
-       audioreach_set_media_format(graph, module, cfg);
-
-       return 0;
-
+       return audioreach_set_media_format(graph, module, cfg);
 }
 EXPORT_SYMBOL_GPL(q6apm_graph_media_format_shmem);
 
@@ -399,6 +396,7 @@ int q6apm_graph_media_format_pcm(struct q6apm_graph *graph, struct audioreach_mo
        struct audioreach_sub_graph *sgs;
        struct audioreach_container *container;
        struct audioreach_module *module;
+       int ret;
 
        list_for_each_entry(sgs, &info->sg_list, node) {
                list_for_each_entry(container, &sgs->container_list, node) {
@@ -407,7 +405,9 @@ int q6apm_graph_media_format_pcm(struct q6apm_graph *graph, struct audioreach_mo
                                        (module->module_id == MODULE_ID_RD_SHARED_MEM_EP))
                                        continue;
 
-                               audioreach_set_media_format(graph, module, cfg);
+                               ret = audioreach_set_media_format(graph, module, cfg);
+                               if (ret)
+                                       return ret;
                        }
                }
        }