Lines Matching full:cp

237 	struct pvr2_channel *cp;  in pvr2_context_reset_input_limits()  local
241 for (cp = mp->mc_first; cp; cp = cp->mc_next) { in pvr2_context_reset_input_limits()
242 if (!cp->input_mask) continue; in pvr2_context_reset_input_limits()
243 tmsk &= cp->input_mask; in pvr2_context_reset_input_limits()
275 void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp) in pvr2_channel_init() argument
278 cp->hdw = mp->hdw; in pvr2_channel_init()
279 cp->mc_head = mp; in pvr2_channel_init()
280 cp->mc_next = NULL; in pvr2_channel_init()
281 cp->mc_prev = mp->mc_last; in pvr2_channel_init()
283 mp->mc_last->mc_next = cp; in pvr2_channel_init()
285 mp->mc_first = cp; in pvr2_channel_init()
287 mp->mc_last = cp; in pvr2_channel_init()
292 static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp) in pvr2_channel_disclaim_stream() argument
294 if (!cp->stream) return; in pvr2_channel_disclaim_stream()
295 pvr2_stream_kill(cp->stream->stream); in pvr2_channel_disclaim_stream()
296 cp->stream->user = NULL; in pvr2_channel_disclaim_stream()
297 cp->stream = NULL; in pvr2_channel_disclaim_stream()
301 void pvr2_channel_done(struct pvr2_channel *cp) in pvr2_channel_done() argument
303 struct pvr2_context *mp = cp->mc_head; in pvr2_channel_done()
305 cp->input_mask = 0; in pvr2_channel_done()
306 pvr2_channel_disclaim_stream(cp); in pvr2_channel_done()
308 if (cp->mc_next) { in pvr2_channel_done()
309 cp->mc_next->mc_prev = cp->mc_prev; in pvr2_channel_done()
311 mp->mc_last = cp->mc_prev; in pvr2_channel_done()
313 if (cp->mc_prev) { in pvr2_channel_done()
314 cp->mc_prev->mc_next = cp->mc_next; in pvr2_channel_done()
316 mp->mc_first = cp->mc_next; in pvr2_channel_done()
318 cp->hdw = NULL; in pvr2_channel_done()
323 int pvr2_channel_limit_inputs(struct pvr2_channel *cp,unsigned int cmsk) in pvr2_channel_limit_inputs() argument
328 struct pvr2_hdw *hdw = cp->hdw; in pvr2_channel_limit_inputs()
332 if (cmsk == cp->input_mask) { in pvr2_channel_limit_inputs()
337 pvr2_context_enter(cp->mc_head); in pvr2_channel_limit_inputs()
340 cp->input_mask = 0; in pvr2_channel_limit_inputs()
341 pvr2_context_reset_input_limits(cp->mc_head); in pvr2_channel_limit_inputs()
345 for (p2 = cp->mc_head->mc_first; p2; p2 = p2->mc_next) { in pvr2_channel_limit_inputs()
346 if (p2 == cp) continue; in pvr2_channel_limit_inputs()
360 cp->input_mask = cmsk; in pvr2_channel_limit_inputs()
363 pvr2_context_exit(cp->mc_head); in pvr2_channel_limit_inputs()
368 unsigned int pvr2_channel_get_limited_inputs(struct pvr2_channel *cp) in pvr2_channel_get_limited_inputs() argument
370 return cp->input_mask; in pvr2_channel_get_limited_inputs()
374 int pvr2_channel_claim_stream(struct pvr2_channel *cp, in pvr2_channel_claim_stream() argument
378 pvr2_context_enter(cp->mc_head); do { in pvr2_channel_claim_stream()
379 if (sp == cp->stream) break; in pvr2_channel_claim_stream()
384 pvr2_channel_disclaim_stream(cp); in pvr2_channel_claim_stream()
386 sp->user = cp; in pvr2_channel_claim_stream()
387 cp->stream = sp; in pvr2_channel_claim_stream()
389 pvr2_context_exit(cp->mc_head); in pvr2_channel_claim_stream()
402 struct pvr2_ioread *cp; in pvr2_channel_create_mpeg_stream() local
403 cp = pvr2_ioread_create(); in pvr2_channel_create_mpeg_stream()
404 if (!cp) return NULL; in pvr2_channel_create_mpeg_stream()
405 pvr2_ioread_setup(cp,sp->stream); in pvr2_channel_create_mpeg_stream()
406 pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); in pvr2_channel_create_mpeg_stream()
407 return cp; in pvr2_channel_create_mpeg_stream()