@@ -1498,7 +1498,7 @@ inline void find_strm_handle(struct strm_res_object **strmres,
{
rcu_read_lock();
*strmres = idr_find(((struct process_context *)pr_ctxt)->strm_idp,
- (int)hstream);
+ (int)hstream - 1);
rcu_read_unlock();
return;
}
@@ -1713,6 +1713,8 @@ u32 strmwrap_open(union Trapped_Args *args, void *pr_ctxt)
args->args_strm_open.index, &attr, &strm_res_obj,
pr_ctxt);
CP_TO_USR(args->args_strm_open.ph_stream, &strm_res_obj->id, status, 1);
+ if (DSP_SUCCEEDED(status))
+ *args->args_strm_open.ph_stream += 1;
return status;
}