Lines Matching refs:pipe

60 				 struct mixart_pipe *pipe, int start)
68 switch(pipe->status) {
78 "error mixart_set_pipe_state called with wrong pipe->status!\n");
79 return -EINVAL; /* function called with wrong pipe status */
98 /* start or stop the pipe (1 pipe) */
102 group_state.pipe_uid[0] = pipe->group_uid;
109 request.uid = pipe->group_uid; /*(struct mixart_uid){0,0};*/
149 pipe->status = PIPE_RUNNING;
152 pipe->status = PIPE_STOPPED;
159 struct mixart_pipe *pipe, unsigned int rate)
166 switch(pipe->status) {
178 "error mixart_set_clock(%d) called with wrong pipe->status !\n",
189 clock_properties.uid_caller[0] = pipe->group_uid;
206 if(rate) pipe->status = PIPE_CLOCK_SET;
207 else pipe->status = PIPE_RUNNING;
214 * Allocate or reference output pipe for analog IOs (pcmp0/1)
221 struct mixart_pipe *pipe;
226 pipe = &(chip->pipe_in_ana); /* analog inputs */
228 pipe = &(chip->pipe_in_dig); /* digital inputs */
234 pipe = &(chip->pipe_out_ana); /* analog outputs */
236 pipe = &(chip->pipe_out_dig); /* digital outputs */
243 if( (monitoring == 0) && (pipe->references >= stream_count) ) {
247 /* pipe is not yet defined */
248 if( pipe->status == PIPE_UNDEFINED ) {
272 buf->sgroup_req.connector = pipe->uid_left_connector; /* the left connector */
314 pipe->group_uid = buf->sgroup_resp.group; /* id of the pipe, as returned by embedded */
315 pipe->stream_count = buf->sgroup_resp.stream_count;
316 /* pipe->stream_uid[i] = buf->sgroup_resp.stream[i].stream_uid; */
318 pipe->status = PIPE_STOPPED;
322 if(monitoring) pipe->monitoring = 1;
323 else pipe->references++;
325 return pipe;
330 struct mixart_pipe *pipe, int monitoring)
334 if(pipe->status == PIPE_UNDEFINED)
338 pipe->monitoring = 0;
340 pipe->references--;
342 if((pipe->references <= 0) && (pipe->monitoring == 0)) {
348 err = mixart_set_clock( mgr, pipe, 0);
354 /* stop the pipe */
355 err = mixart_set_pipe_state(mgr, pipe, 0);
357 dev_err(&mgr->pci->dev, "error stopping pipe!\n");
362 request.data = &pipe->group_uid; /* the streaming group ! */
363 request.size = sizeof(pipe->group_uid);
365 /* delete the pipe */
373 pipe->group_uid = (struct mixart_uid){0,0};
374 pipe->stream_count = 0;
375 pipe->status = PIPE_UNDEFINED;
392 stream_state_req.stream_info.stream_desc.uid_pipe = stream->pipe->group_uid;
494 /* set the clock only once (first stream) on the same pipe */
495 if(stream->pipe->references == 1) {
496 if( mixart_set_clock(chip->mgr, stream->pipe, subs->runtime->rate) )
569 stream_param.stream_desc[0].uid_pipe = stream->pipe->group_uid;
712 struct mixart_pipe *pipe;
742 /* get pipe pointer (out pipe) */
743 pipe = snd_mixart_add_ref_pipe(chip, pcm_number, 0, 0);
745 if (pipe == NULL) {
750 /* start the pipe if necessary */
751 err = mixart_set_pipe_state(chip->mgr, pipe, 1);
753 dev_err(chip->card->dev, "error starting pipe!\n");
754 snd_mixart_kill_ref_pipe(chip->mgr, pipe, 0);
759 stream->pipe = pipe;
791 struct mixart_pipe *pipe;
823 /* get pipe pointer (in pipe) */
824 pipe = snd_mixart_add_ref_pipe(chip, pcm_number, 1, 0);
826 if (pipe == NULL) {
831 /* start the pipe if necessary */
832 err = mixart_set_pipe_state(chip->mgr, pipe, 1);
834 dev_err(chip->card->dev, "error starting pipe!\n");
835 snd_mixart_kill_ref_pipe(chip->mgr, pipe, 0);
840 stream->pipe = pipe;
882 /* delete pipe */
883 if (snd_mixart_kill_ref_pipe(mgr, stream->pipe, 0 ) < 0) {
890 stream->pipe = NULL;