Lines Matching refs:cp

237 	struct pvr2_channel *cp;
241 for (cp = mp->mc_first; cp; cp = cp->mc_next) {
242 if (!cp->input_mask) continue;
243 tmsk &= cp->input_mask;
276 void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp)
279 cp->hdw = mp->hdw;
280 cp->mc_head = mp;
281 cp->mc_next = NULL;
282 cp->mc_prev = mp->mc_last;
284 mp->mc_last->mc_next = cp;
286 mp->mc_first = cp;
288 mp->mc_last = cp;
293 static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp)
295 if (!cp->stream) return;
296 pvr2_stream_kill(cp->stream->stream);
297 cp->stream->user = NULL;
298 cp->stream = NULL;
302 void pvr2_channel_done(struct pvr2_channel *cp)
304 struct pvr2_context *mp = cp->mc_head;
306 cp->input_mask = 0;
307 pvr2_channel_disclaim_stream(cp);
309 if (cp->mc_next) {
310 cp->mc_next->mc_prev = cp->mc_prev;
312 mp->mc_last = cp->mc_prev;
314 if (cp->mc_prev) {
315 cp->mc_prev->mc_next = cp->mc_next;
317 mp->mc_first = cp->mc_next;
319 cp->hdw = NULL;
324 int pvr2_channel_limit_inputs(struct pvr2_channel *cp,unsigned int cmsk)
329 struct pvr2_hdw *hdw = cp->hdw;
333 if (cmsk == cp->input_mask) {
338 pvr2_context_enter(cp->mc_head);
341 cp->input_mask = 0;
342 pvr2_context_reset_input_limits(cp->mc_head);
346 for (p2 = cp->mc_head->mc_first; p2; p2 = p2->mc_next) {
347 if (p2 == cp) continue;
361 cp->input_mask = cmsk;
364 pvr2_context_exit(cp->mc_head);
369 unsigned int pvr2_channel_get_limited_inputs(struct pvr2_channel *cp)
371 return cp->input_mask;
375 int pvr2_channel_claim_stream(struct pvr2_channel *cp,
379 pvr2_context_enter(cp->mc_head); do {
380 if (sp == cp->stream) break;
385 pvr2_channel_disclaim_stream(cp);
387 sp->user = cp;
388 cp->stream = sp;
390 pvr2_context_exit(cp->mc_head);
403 struct pvr2_ioread *cp;
404 cp = pvr2_ioread_create();
405 if (!cp) return NULL;
406 pvr2_ioread_setup(cp,sp->stream);
407 pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key));
408 return cp;