cobsc 25 drivers/media/pci/cobalt/cobalt-alsa-main.c static void snd_cobalt_card_free(struct snd_cobalt_card *cobsc) cobsc 27 drivers/media/pci/cobalt/cobalt-alsa-main.c if (cobsc == NULL) cobsc 30 drivers/media/pci/cobalt/cobalt-alsa-main.c cobsc->s->alsa = NULL; cobsc 32 drivers/media/pci/cobalt/cobalt-alsa-main.c kfree(cobsc); cobsc 46 drivers/media/pci/cobalt/cobalt-alsa-main.c struct snd_cobalt_card **cobsc) cobsc 48 drivers/media/pci/cobalt/cobalt-alsa-main.c *cobsc = kzalloc(sizeof(struct snd_cobalt_card), GFP_KERNEL); cobsc 49 drivers/media/pci/cobalt/cobalt-alsa-main.c if (*cobsc == NULL) cobsc 52 drivers/media/pci/cobalt/cobalt-alsa-main.c (*cobsc)->s = s; cobsc 53 drivers/media/pci/cobalt/cobalt-alsa-main.c (*cobsc)->sc = sc; cobsc 55 drivers/media/pci/cobalt/cobalt-alsa-main.c sc->private_data = *cobsc; cobsc 61 drivers/media/pci/cobalt/cobalt-alsa-main.c static int snd_cobalt_card_set_names(struct snd_cobalt_card *cobsc) cobsc 63 drivers/media/pci/cobalt/cobalt-alsa-main.c struct cobalt_stream *s = cobsc->s; cobsc 65 drivers/media/pci/cobalt/cobalt-alsa-main.c struct snd_card *sc = cobsc->sc; cobsc 86 drivers/media/pci/cobalt/cobalt-alsa-main.c struct snd_cobalt_card *cobsc; cobsc 103 drivers/media/pci/cobalt/cobalt-alsa-main.c ret = snd_cobalt_card_create(s, sc, &cobsc); cobsc 111 drivers/media/pci/cobalt/cobalt-alsa-main.c snd_cobalt_card_set_names(cobsc); cobsc 113 drivers/media/pci/cobalt/cobalt-alsa-main.c ret = snd_cobalt_pcm_create(cobsc); cobsc 123 drivers/media/pci/cobalt/cobalt-alsa-main.c s->alsa = cobsc; cobsc 138 drivers/media/pci/cobalt/cobalt-alsa-main.c kfree(cobsc); cobsc 145 drivers/media/pci/cobalt/cobalt-alsa-main.c struct snd_cobalt_card *cobsc = s->alsa; cobsc 147 drivers/media/pci/cobalt/cobalt-alsa-main.c if (cobsc) cobsc 148 drivers/media/pci/cobalt/cobalt-alsa-main.c snd_card_free(cobsc->sc); cobsc 97 drivers/media/pci/cobalt/cobalt-alsa-pcm.c static void cobalt_alsa_announce_pcm_data(struct snd_cobalt_card *cobsc, cobsc 111 drivers/media/pci/cobalt/cobalt-alsa-pcm.c dprintk("cobalt alsa announce ptr=%p data=%p num_bytes=%zd\n", cobsc, cobsc 114 drivers/media/pci/cobalt/cobalt-alsa-pcm.c substream = cobsc->capture_pcm_substream; cobsc 143 drivers/media/pci/cobalt/cobalt-alsa-pcm.c oldptr = cobsc->hwptr_done_capture; cobsc 165 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->hwptr_done_capture += length; cobsc 166 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->hwptr_done_capture >= cobsc 168 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->hwptr_done_capture -= cobsc 171 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->capture_transfer_done += length; cobsc 172 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->capture_transfer_done >= cobsc 174 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->capture_transfer_done -= cobsc 210 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 211 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct cobalt_stream *s = cobsc->s; cobsc 215 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->capture_pcm_substream = substream; cobsc 217 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_record_cnt++; cobsc 218 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->alsa_record_cnt == 1) { cobsc 223 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_record_cnt--; cobsc 232 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 233 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct cobalt_stream *s = cobsc->s; cobsc 235 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_record_cnt--; cobsc 236 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->alsa_record_cnt == 0) cobsc 291 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 293 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->hwptr_done_capture = 0; cobsc 294 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->capture_transfer_done = 0; cobsc 315 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 317 drivers/media/pci/cobalt/cobalt-alsa-pcm.c hwptr_done = cobsc->hwptr_done_capture; cobsc 345 drivers/media/pci/cobalt/cobalt-alsa-pcm.c static void cobalt_alsa_pb_pcm_data(struct snd_cobalt_card *cobsc, cobsc 358 drivers/media/pci/cobalt/cobalt-alsa-pcm.c dprintk("cobalt alsa pb ptr=%p data=%p samples=%zd\n", cobsc, cobsc 361 drivers/media/pci/cobalt/cobalt-alsa-pcm.c substream = cobsc->playback_pcm_substream; cobsc 390 drivers/media/pci/cobalt/cobalt-alsa-pcm.c pos = cobsc->pb_pos % cobsc->pb_size; cobsc 391 drivers/media/pci/cobalt/cobalt-alsa-pcm.c for (i = 0; i < cobsc->pb_count / (8 * 4); i++) cobsc 397 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->pb_pos += i * stride; cobsc 400 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->pb_pos % cobsc->pb_count == 0) cobsc 418 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 420 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct cobalt_stream *s = cobsc->s; cobsc 424 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->playback_pcm_substream = substream; cobsc 426 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_playback_cnt++; cobsc 427 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->alsa_playback_cnt == 1) { cobsc 432 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_playback_cnt--; cobsc 442 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 443 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct cobalt_stream *s = cobsc->s; cobsc 445 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_playback_cnt--; cobsc 446 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->alsa_playback_cnt == 0) cobsc 453 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 455 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->pb_size = snd_pcm_lib_buffer_bytes(substream); cobsc 456 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->pb_count = snd_pcm_lib_period_bytes(substream); cobsc 457 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->pb_pos = 0; cobsc 465 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 469 drivers/media/pci/cobalt/cobalt-alsa-pcm.c if (cobsc->alsa_pb_channel) cobsc 471 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_pb_channel = true; cobsc 474 drivers/media/pci/cobalt/cobalt-alsa-pcm.c cobsc->alsa_pb_channel = false; cobsc 484 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_cobalt_card *cobsc = snd_pcm_substream_chip(substream); cobsc 487 drivers/media/pci/cobalt/cobalt-alsa-pcm.c ptr = cobsc->pb_pos; cobsc 525 drivers/media/pci/cobalt/cobalt-alsa-pcm.c int snd_cobalt_pcm_create(struct snd_cobalt_card *cobsc) cobsc 528 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct snd_card *sc = cobsc->sc; cobsc 529 drivers/media/pci/cobalt/cobalt-alsa-pcm.c struct cobalt_stream *s = cobsc->s; cobsc 559 drivers/media/pci/cobalt/cobalt-alsa-pcm.c sp->private_data = cobsc; cobsc 583 drivers/media/pci/cobalt/cobalt-alsa-pcm.c sp->private_data = cobsc; cobsc 10 drivers/media/pci/cobalt/cobalt-alsa-pcm.h int snd_cobalt_pcm_create(struct snd_cobalt_card *cobsc);