Lines Matching refs:pipe
73 struct mixart_pipe *pipe, int start) in mixart_set_pipe_state() argument
81 switch(pipe->status) { in mixart_set_pipe_state()
115 group_state.pipe_uid[0] = pipe->group_uid; in mixart_set_pipe_state()
122 request.uid = pipe->group_uid; /*(struct mixart_uid){0,0};*/ in mixart_set_pipe_state()
162 pipe->status = PIPE_RUNNING; in mixart_set_pipe_state()
165 pipe->status = PIPE_STOPPED; in mixart_set_pipe_state()
172 struct mixart_pipe *pipe, unsigned int rate) in mixart_set_clock() argument
179 switch(pipe->status) { in mixart_set_clock()
201 clock_properties.uid_caller[0] = pipe->group_uid; in mixart_set_clock()
218 if(rate) pipe->status = PIPE_CLOCK_SET; in mixart_set_clock()
219 else pipe->status = PIPE_RUNNING; in mixart_set_clock()
233 struct mixart_pipe *pipe; in snd_mixart_add_ref_pipe() local
238 pipe = &(chip->pipe_in_ana); /* analog inputs */ in snd_mixart_add_ref_pipe()
240 pipe = &(chip->pipe_in_dig); /* digital inputs */ in snd_mixart_add_ref_pipe()
246 pipe = &(chip->pipe_out_ana); /* analog outputs */ in snd_mixart_add_ref_pipe()
248 pipe = &(chip->pipe_out_dig); /* digital outputs */ in snd_mixart_add_ref_pipe()
255 if( (monitoring == 0) && (pipe->references >= stream_count) ) { in snd_mixart_add_ref_pipe()
260 if( pipe->status == PIPE_UNDEFINED ) { in snd_mixart_add_ref_pipe()
284 buf->sgroup_req.connector = pipe->uid_left_connector; /* the left connector */ in snd_mixart_add_ref_pipe()
326 pipe->group_uid = buf->sgroup_resp.group; /* id of the pipe, as returned by embedded */ in snd_mixart_add_ref_pipe()
327 pipe->stream_count = buf->sgroup_resp.stream_count; in snd_mixart_add_ref_pipe()
330 pipe->status = PIPE_STOPPED; in snd_mixart_add_ref_pipe()
334 if(monitoring) pipe->monitoring = 1; in snd_mixart_add_ref_pipe()
335 else pipe->references++; in snd_mixart_add_ref_pipe()
337 return pipe; in snd_mixart_add_ref_pipe()
342 struct mixart_pipe *pipe, int monitoring) in snd_mixart_kill_ref_pipe() argument
346 if(pipe->status == PIPE_UNDEFINED) in snd_mixart_kill_ref_pipe()
350 pipe->monitoring = 0; in snd_mixart_kill_ref_pipe()
352 pipe->references--; in snd_mixart_kill_ref_pipe()
354 if((pipe->references <= 0) && (pipe->monitoring == 0)) { in snd_mixart_kill_ref_pipe()
360 err = mixart_set_clock( mgr, pipe, 0); in snd_mixart_kill_ref_pipe()
367 err = mixart_set_pipe_state(mgr, pipe, 0); in snd_mixart_kill_ref_pipe()
374 request.data = &pipe->group_uid; /* the streaming group ! */ in snd_mixart_kill_ref_pipe()
375 request.size = sizeof(pipe->group_uid); in snd_mixart_kill_ref_pipe()
385 pipe->group_uid = (struct mixart_uid){0,0}; in snd_mixart_kill_ref_pipe()
386 pipe->stream_count = 0; in snd_mixart_kill_ref_pipe()
387 pipe->status = PIPE_UNDEFINED; in snd_mixart_kill_ref_pipe()
404 stream_state_req.stream_info.stream_desc.uid_pipe = stream->pipe->group_uid; in mixart_set_stream_state()
507 if(stream->pipe->references == 1) { in snd_mixart_prepare()
508 if( mixart_set_clock(chip->mgr, stream->pipe, subs->runtime->rate) ) in snd_mixart_prepare()
581 stream_param.stream_desc[0].uid_pipe = stream->pipe->group_uid; in mixart_set_format()
728 struct mixart_pipe *pipe; in snd_mixart_playback_open() local
759 pipe = snd_mixart_add_ref_pipe(chip, pcm_number, 0, 0); in snd_mixart_playback_open()
761 if (pipe == NULL) { in snd_mixart_playback_open()
767 err = mixart_set_pipe_state(chip->mgr, pipe, 1); in snd_mixart_playback_open()
770 snd_mixart_kill_ref_pipe(chip->mgr, pipe, 0); in snd_mixart_playback_open()
775 stream->pipe = pipe; in snd_mixart_playback_open()
807 struct mixart_pipe *pipe; in snd_mixart_capture_open() local
840 pipe = snd_mixart_add_ref_pipe(chip, pcm_number, 1, 0); in snd_mixart_capture_open()
842 if (pipe == NULL) { in snd_mixart_capture_open()
848 err = mixart_set_pipe_state(chip->mgr, pipe, 1); in snd_mixart_capture_open()
851 snd_mixart_kill_ref_pipe(chip->mgr, pipe, 0); in snd_mixart_capture_open()
856 stream->pipe = pipe; in snd_mixart_capture_open()
899 if (snd_mixart_kill_ref_pipe(mgr, stream->pipe, 0 ) < 0) { in snd_mixart_close()
906 stream->pipe = NULL; in snd_mixart_close()