Commit 41bf4525 authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown

ASoC: Intel: avs: Test result of avs_get_module_entry()

While PROBE_MOD_UUID is always part of the base AudioDSP firmware
manifest, from maintenance point of view it is better to check the
result.

Fixes: dab8d000 ("ASoC: Intel: avs: Add data probing requests")
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://msgid.link/r/20240405090929.1184068-9-cezary.rojewski@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c7e832ca
......@@ -19,8 +19,11 @@ static int avs_dsp_init_probe(struct avs_dev *adev, union avs_connector_node_id
struct avs_probe_cfg cfg = {{0}};
struct avs_module_entry mentry;
u8 dummy;
int ret;
avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry);
ret = avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry);
if (ret)
return ret;
/*
* Probe module uses no cycles, audio data format and input and output
......@@ -39,9 +42,10 @@ static int avs_dsp_init_probe(struct avs_dev *adev, union avs_connector_node_id
static void avs_dsp_delete_probe(struct avs_dev *adev)
{
struct avs_module_entry mentry;
int ret;
avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry);
ret = avs_get_module_entry(adev, &AVS_PROBE_MOD_UUID, &mentry);
if (!ret)
/* There is only ever one probe module instance. */
avs_dsp_delete_module(adev, mentry.module_id, 0, INVALID_PIPELINE_ID, 0);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment