Lines Matching refs:pipe

59 				 struct mixart_pipe *pipe, int start)
67 switch(pipe->status) {
77 "error mixart_set_pipe_state called with wrong pipe->status!\n");
78 return -EINVAL; /* function called with wrong pipe status */
97 /* start or stop the pipe (1 pipe) */
101 group_state.pipe_uid = pipe->group_uid;
108 request.uid = pipe->group_uid; /*(struct mixart_uid){0,0};*/
148 pipe->status = PIPE_RUNNING;
151 pipe->status = PIPE_STOPPED;
158 struct mixart_pipe *pipe, unsigned int rate)
165 switch(pipe->status) {
177 "error mixart_set_clock(%d) called with wrong pipe->status !\n",
188 clock_properties.uid_caller = pipe->group_uid;
205 if(rate) pipe->status = PIPE_CLOCK_SET;
206 else pipe->status = PIPE_RUNNING;
213 * Allocate or reference output pipe for analog IOs (pcmp0/1)
220 struct mixart_pipe *pipe;
225 pipe = &(chip->pipe_in_ana); /* analog inputs */
227 pipe = &(chip->pipe_in_dig); /* digital inputs */
233 pipe = &(chip->pipe_out_ana); /* analog outputs */
235 pipe = &(chip->pipe_out_dig); /* digital outputs */
242 if( (monitoring == 0) && (pipe->references >= stream_count) ) {
246 /* pipe is not yet defined */
247 if( pipe->status == PIPE_UNDEFINED ) {
271 buf->sgroup_req.connector = pipe->uid_left_connector; /* the left connector */
313 pipe->group_uid = buf->sgroup_resp.group; /* id of the pipe, as returned by embedded */
314 pipe->stream_count = buf->sgroup_resp.stream_count;
315 /* pipe->stream_uid[i] = buf->sgroup_resp.stream[i].stream_uid; */
317 pipe->status = PIPE_STOPPED;
321 if(monitoring) pipe->monitoring = 1;
322 else pipe->references++;
324 return pipe;
329 struct mixart_pipe *pipe, int monitoring)
333 if(pipe->status == PIPE_UNDEFINED)
337 pipe->monitoring = 0;
339 pipe->references--;
341 if((pipe->references <= 0) && (pipe->monitoring == 0)) {
347 err = mixart_set_clock( mgr, pipe, 0);
353 /* stop the pipe */
354 err = mixart_set_pipe_state(mgr, pipe, 0);
356 dev_err(&mgr->pci->dev, "error stopping pipe!\n");
361 request.data = &pipe->group_uid; /* the streaming group ! */
362 request.size = sizeof(pipe->group_uid);
364 /* delete the pipe */
372 pipe->group_uid = (struct mixart_uid){0,0};
373 pipe->stream_count = 0;
374 pipe->status = PIPE_UNDEFINED;
391 stream_state_req.stream_info.stream_desc.uid_pipe = stream->pipe->group_uid;
493 /* set the clock only once (first stream) on the same pipe */
494 if(stream->pipe->references == 1) {
495 if( mixart_set_clock(chip->mgr, stream->pipe, subs->runtime->rate) )
568 stream_param.stream_desc.uid_pipe = stream->pipe->group_uid;
711 struct mixart_pipe *pipe;
741 /* get pipe pointer (out pipe) */
742 pipe = snd_mixart_add_ref_pipe(chip, pcm_number, 0, 0);
744 if (pipe == NULL) {
749 /* start the pipe if necessary */
750 err = mixart_set_pipe_state(chip->mgr, pipe, 1);
752 dev_err(chip->card->dev, "error starting pipe!\n");
753 snd_mixart_kill_ref_pipe(chip->mgr, pipe, 0);
758 stream->pipe = pipe;
790 struct mixart_pipe *pipe;
822 /* get pipe pointer (in pipe) */
823 pipe = snd_mixart_add_ref_pipe(chip, pcm_number, 1, 0);
825 if (pipe == NULL) {
830 /* start the pipe if necessary */
831 err = mixart_set_pipe_state(chip->mgr, pipe, 1);
833 dev_err(chip->card->dev, "error starting pipe!\n");
834 snd_mixart_kill_ref_pipe(chip->mgr, pipe, 0);
839 stream->pipe = pipe;
881 /* delete pipe */
882 if (snd_mixart_kill_ref_pipe(mgr, stream->pipe, 0 ) < 0) {
889 stream->pipe = NULL;