Lines Matching full:pcm
14 #include <sound/pcm.h>
24 return &chip->pcm[substream->stream]; in lola_get_pcm()
29 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_get_stream() local
31 return &pcm->streams[idx]; in lola_get_stream()
128 if (s->pcm->card != substream->pcm->card) in lola_sync_wait_for_fifo()
159 if (s->pcm->card != substream->pcm->card) in lola_sync_pause()
213 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_pcm_open() local
226 runtime->hw.channels_max = pcm->num_streams - str->index; in lola_pcm_open()
246 static void lola_cleanup_slave_streams(struct lola_pcm *pcm, in lola_cleanup_slave_streams() argument
250 for (i = str->index + 1; i < pcm->num_streams; i++) { in lola_cleanup_slave_streams()
251 struct lola_stream *s = &pcm->streams[i]; in lola_cleanup_slave_streams()
291 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_pcm_hw_free() local
296 lola_cleanup_slave_streams(pcm, str); in lola_pcm_hw_free()
340 static int lola_setup_periods(struct lola *chip, struct lola_pcm *pcm, in lola_setup_periods() argument
351 bdl = (__le32 *)(pcm->bdl->area + LOLA_BDL_ENTRY_SIZE * str->index); in lola_setup_periods()
427 static int lola_setup_controller(struct lola *chip, struct lola_pcm *pcm, in lola_setup_controller() argument
436 bdl = pcm->bdl->addr + LOLA_BDL_ENTRY_SIZE * str->index; in lola_setup_controller()
454 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_pcm_prepare() local
462 lola_cleanup_slave_streams(pcm, str); in lola_pcm_prepare()
463 if (str->index + runtime->channels > pcm->num_streams) { in lola_pcm_prepare()
481 err = lola_setup_periods(chip, pcm, substream, str); in lola_pcm_prepare()
494 err = lola_setup_controller(chip, pcm, str); in lola_pcm_prepare()
535 if (s->pcm->card != substream->pcm->card) in lola_pcm_trigger()
561 void lola_pcm_update(struct lola *chip, struct lola_pcm *pcm, unsigned int bits) in lola_pcm_update() argument
564 u8 num_streams = min_t(u8, pcm->num_streams, ARRAY_SIZE(pcm->streams)); in lola_pcm_update()
568 struct lola_stream *str = &pcm->streams[i]; in lola_pcm_update()
588 struct snd_pcm *pcm; in lola_create_pcm() local
592 chip->pcm[i].bdl = in lola_create_pcm()
595 if (!chip->pcm[i].bdl) in lola_create_pcm()
600 chip->pcm[SNDRV_PCM_STREAM_PLAYBACK].num_streams, in lola_create_pcm()
601 chip->pcm[SNDRV_PCM_STREAM_CAPTURE].num_streams, in lola_create_pcm()
602 &pcm); in lola_create_pcm()
605 strscpy(pcm->name, "Digigram Lola", sizeof(pcm->name)); in lola_create_pcm()
606 pcm->private_data = chip; in lola_create_pcm()
608 if (chip->pcm[i].num_streams) in lola_create_pcm()
609 snd_pcm_set_ops(pcm, i, &lola_pcm_ops); in lola_create_pcm()
612 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV_SG, in lola_create_pcm()
678 struct lola_pcm *pcm = &chip->pcm[dir]; in lola_init_pcm() local
682 for (i = 0; i < pcm->num_streams; i++, nid++) { in lola_init_pcm()
683 err = lola_init_stream(chip, &pcm->streams[i], i, nid, dir); in lola_init_pcm()