Lines Matching defs:cobsc

96 static void cobalt_alsa_announce_pcm_data(struct snd_cobalt_card *cobsc,
110 dprintk("cobalt alsa announce ptr=%p data=%p num_bytes=%zd\n", cobsc,
113 substream = cobsc->capture_pcm_substream;
142 oldptr = cobsc->hwptr_done_capture;
164 cobsc->hwptr_done_capture += length;
165 if (cobsc->hwptr_done_capture >=
167 cobsc->hwptr_done_capture -=
170 cobsc->capture_transfer_done += length;
171 if (cobsc->capture_transfer_done >=
173 cobsc->capture_transfer_done -=
209 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
210 struct cobalt_stream *s = cobsc->s;
214 cobsc->capture_pcm_substream = substream;
216 cobsc->alsa_record_cnt++;
217 if (cobsc->alsa_record_cnt == 1) {
222 cobsc->alsa_record_cnt--;
231 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
232 struct cobalt_stream *s = cobsc->s;
234 cobsc->alsa_record_cnt--;
235 if (cobsc->alsa_record_cnt == 0)
242 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
244 cobsc->hwptr_done_capture = 0;
245 cobsc->capture_transfer_done = 0;
266 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
268 hwptr_done = cobsc->hwptr_done_capture;
296 static void cobalt_alsa_pb_pcm_data(struct snd_cobalt_card *cobsc,
309 dprintk("cobalt alsa pb ptr=%p data=%p samples=%zd\n", cobsc,
312 substream = cobsc->playback_pcm_substream;
341 pos = cobsc->pb_pos % cobsc->pb_size;
342 for (i = 0; i < cobsc->pb_count / (8 * 4); i++)
348 cobsc->pb_pos += i * stride;
351 if (cobsc->pb_pos % cobsc->pb_count == 0)
369 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
371 struct cobalt_stream *s = cobsc->s;
375 cobsc->playback_pcm_substream = substream;
377 cobsc->alsa_playback_cnt++;
378 if (cobsc->alsa_playback_cnt == 1) {
383 cobsc->alsa_playback_cnt--;
393 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
394 struct cobalt_stream *s = cobsc->s;
396 cobsc->alsa_playback_cnt--;
397 if (cobsc->alsa_playback_cnt == 0)
404 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
406 cobsc->pb_size = snd_pcm_lib_buffer_bytes(substream);
407 cobsc->pb_count = snd_pcm_lib_period_bytes(substream);
408 cobsc->pb_pos = 0;
416 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
420 if (cobsc->alsa_pb_channel)
422 cobsc->alsa_pb_channel = true;
425 cobsc->alsa_pb_channel = false;
435 struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream);
438 ptr = cobsc->pb_pos;
460 int snd_cobalt_pcm_create(struct snd_cobalt_card *cobsc)
463 struct snd_card *sc = cobsc->sc;
464 struct cobalt_stream *s = cobsc->s;
496 sp->private_data = cobsc;
522 sp->private_data = cobsc;