Skip to content

Commit 73b5f01

Browse files
serhiy-katsyuba-intellgirdwood
authored andcommitted
idc: dp: Remove redundant switch code
The switch code is not needed because the comp_trigger() call above invokes comp_trigger_local(), which already contains the appropriate switch logic. The version in comp_trigger_local() is the correct implementation for DP, with schedule_task_cancel() call removed by d99cea9. This commit fixes DP tests with DP modules located on secondary cores. Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
1 parent ba6c760 commit 73b5f01

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

src/idc/idc.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -222,32 +222,12 @@ static int idc_trigger(uint32_t comp_id)
222222
struct idc *idc = *idc_get();
223223
struct idc_payload *payload = idc_payload_get(idc, cpu_get_id());
224224
uint32_t cmd = *(uint32_t *)payload;
225-
int ret;
226225

227226
ipc_dev = ipc_get_comp_by_id(ipc, comp_id);
228227
if (!ipc_dev)
229228
return -ENODEV;
230229

231-
ret = comp_trigger(ipc_dev->cd, cmd);
232-
if (ret < 0)
233-
goto out;
234-
235-
/* schedule or cancel task */
236-
switch (cmd) {
237-
case COMP_TRIGGER_START:
238-
case COMP_TRIGGER_RELEASE:
239-
schedule_task(ipc_dev->cd->task, 0, ipc_dev->cd->period);
240-
break;
241-
case COMP_TRIGGER_XRUN:
242-
case COMP_TRIGGER_PAUSE:
243-
case COMP_TRIGGER_STOP:
244-
schedule_task_cancel(ipc_dev->cd->task);
245-
break;
246-
}
247-
248-
out:
249-
250-
return ret;
230+
return comp_trigger(ipc_dev->cd, cmd);
251231
}
252232

253233
/**

0 commit comments

Comments
 (0)