Lines Matching refs:pcm

37 	return &chip->pcm[substream->stream];  in lola_get_pcm()
42 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_get_stream() local
44 return &pcm->streams[idx]; in lola_get_stream()
141 if (s->pcm->card != substream->pcm->card) in lola_sync_wait_for_fifo()
172 if (s->pcm->card != substream->pcm->card) in lola_sync_pause()
226 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_pcm_open() local
239 runtime->hw.channels_max = pcm->num_streams - str->index; in lola_pcm_open()
259 static void lola_cleanup_slave_streams(struct lola_pcm *pcm, in lola_cleanup_slave_streams() argument
263 for (i = str->index + 1; i < pcm->num_streams; i++) { in lola_cleanup_slave_streams()
264 struct lola_stream *s = &pcm->streams[i]; in lola_cleanup_slave_streams()
305 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_pcm_hw_free() local
310 lola_cleanup_slave_streams(pcm, str); in lola_pcm_hw_free()
354 static int lola_setup_periods(struct lola *chip, struct lola_pcm *pcm, in lola_setup_periods() argument
365 bdl = (u32 *)(pcm->bdl.area + LOLA_BDL_ENTRY_SIZE * str->index); in lola_setup_periods()
441 static int lola_setup_controller(struct lola *chip, struct lola_pcm *pcm, in lola_setup_controller() argument
450 bdl = pcm->bdl.addr + LOLA_BDL_ENTRY_SIZE * str->index; in lola_setup_controller()
468 struct lola_pcm *pcm = lola_get_pcm(substream); in lola_pcm_prepare() local
476 lola_cleanup_slave_streams(pcm, str); in lola_pcm_prepare()
477 if (str->index + runtime->channels > pcm->num_streams) { in lola_pcm_prepare()
495 err = lola_setup_periods(chip, pcm, substream, str); in lola_pcm_prepare()
508 err = lola_setup_controller(chip, pcm, str); in lola_pcm_prepare()
549 if (s->pcm->card != substream->pcm->card) in lola_pcm_trigger()
575 void lola_pcm_update(struct lola *chip, struct lola_pcm *pcm, unsigned int bits) in lola_pcm_update() argument
579 for (i = 0; bits && i < pcm->num_streams; i++) { in lola_pcm_update()
581 struct lola_stream *str = &pcm->streams[i]; in lola_pcm_update()
603 struct snd_pcm *pcm; in lola_create_pcm() local
609 PAGE_SIZE, &chip->pcm[i].bdl); in lola_create_pcm()
615 chip->pcm[SNDRV_PCM_STREAM_PLAYBACK].num_streams, in lola_create_pcm()
616 chip->pcm[SNDRV_PCM_STREAM_CAPTURE].num_streams, in lola_create_pcm()
617 &pcm); in lola_create_pcm()
620 strlcpy(pcm->name, "Digigram Lola", sizeof(pcm->name)); in lola_create_pcm()
621 pcm->private_data = chip; in lola_create_pcm()
623 if (chip->pcm[i].num_streams) in lola_create_pcm()
624 snd_pcm_set_ops(pcm, i, &lola_pcm_ops); in lola_create_pcm()
627 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, in lola_create_pcm()
635 snd_dma_free_pages(&chip->pcm[0].bdl); in lola_free_pcm()
636 snd_dma_free_pages(&chip->pcm[1].bdl); in lola_free_pcm()
699 struct lola_pcm *pcm = &chip->pcm[dir]; in lola_init_pcm() local
703 for (i = 0; i < pcm->num_streams; i++, nid++) { in lola_init_pcm()
704 err = lola_init_stream(chip, &pcm->streams[i], i, nid, dir); in lola_init_pcm()