{
rcu_read_lock();
*strmres = idr_find(((struct process_context *)pr_ctxt)->stream_id,
- (int)hstream);
+ (int)hstream - 1);
rcu_read_unlock();
return;
}
struct strm_res_object *strm_res_obj;
struct dsp_streamattrin strm_attr_in;
struct node_res_object *node_res;
+ int strmid;
find_node_handle(&node_res, pr_ctxt, args->args_strm_open.hnode);
args->args_strm_open.direction,
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 (!status) {
+ strmid = strm_res_obj->id + 1;
+ CP_TO_USR(args->args_strm_open.ph_stream, &strmid, status, 1);
+ }
return status;
}