Lines Matching refs:substream
44 if (epcm->substream == NULL) in snd_emu10k1_pcm_interrupt()
49 epcm->substream->runtime->hw->pointer(emu, epcm->substream), in snd_emu10k1_pcm_interrupt()
50 snd_pcm_lib_period_bytes(epcm->substream), in snd_emu10k1_pcm_interrupt()
51 snd_pcm_lib_buffer_bytes(epcm->substream)); in snd_emu10k1_pcm_interrupt()
53 snd_pcm_period_elapsed(epcm->substream); in snd_emu10k1_pcm_interrupt()
92 static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_pointer() argument
94 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_pointer()
95 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_pointer()
289 struct snd_pcm_substream *substream = evoice->epcm->substream; in snd_emu10k1_pcm_init_voice() local
290 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_pcm_init_voice()
408 static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream, in snd_emu10k1_playback_hw_params() argument
411 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_hw_params()
412 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_params()
418 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_emu10k1_playback_hw_params()
424 epcm->memblk = snd_emu10k1_alloc_pages(emu, substream); in snd_emu10k1_playback_hw_params()
436 static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_playback_hw_free() argument
438 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_hw_free()
439 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_free()
462 snd_pcm_lib_free_pages(substream); in snd_emu10k1_playback_hw_free()
466 static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_hw_free() argument
468 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_hw_free()
469 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_hw_free()
491 snd_pcm_lib_free_pages(substream); in snd_emu10k1_efx_playback_hw_free()
495 static int snd_emu10k1_playback_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_playback_prepare() argument
497 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_prepare()
498 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare()
503 end_addr = snd_pcm_lib_period_bytes(substream); in snd_emu10k1_playback_prepare()
512 end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_playback_prepare()
515 &emu->pcm_mixer[substream->number]); in snd_emu10k1_playback_prepare()
519 &emu->pcm_mixer[substream->number]); in snd_emu10k1_playback_prepare()
523 static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_prepare() argument
525 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_prepare()
526 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_prepare()
533 end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_efx_playback_prepare()
579 static int snd_emu10k1_capture_hw_params(struct snd_pcm_substream *substream, in snd_emu10k1_capture_hw_params() argument
582 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_emu10k1_capture_hw_params()
585 static int snd_emu10k1_capture_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_capture_hw_free() argument
587 return snd_pcm_lib_free_pages(substream); in snd_emu10k1_capture_hw_free()
590 static int snd_emu10k1_capture_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_capture_prepare() argument
592 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_prepare()
593 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_prepare()
614 epcm->capture_bufsize = snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_capture_prepare()
644 runtime = evoice->epcm->substream->runtime; in snd_emu10k1_playback_invalidate_cache()
676 struct snd_pcm_substream *substream; in snd_emu10k1_playback_prepare_voice() local
683 substream = evoice->epcm->substream; in snd_emu10k1_playback_prepare_voice()
684 runtime = substream->runtime; in snd_emu10k1_playback_prepare_voice()
699 struct snd_pcm_substream *substream; in snd_emu10k1_playback_trigger_voice() local
705 substream = evoice->epcm->substream; in snd_emu10k1_playback_trigger_voice()
706 runtime = substream->runtime; in snd_emu10k1_playback_trigger_voice()
740 struct snd_pcm_substream *substream, in snd_emu10k1_playback_mangle_extra() argument
755 static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, in snd_emu10k1_playback_trigger() argument
758 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_trigger()
759 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_trigger()
778 snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); in snd_emu10k1_playback_trigger()
779 mix = &emu->pcm_mixer[substream->number]; in snd_emu10k1_playback_trigger()
804 static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream, in snd_emu10k1_capture_trigger() argument
807 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_trigger()
808 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_trigger()
873 static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_playback_pointer() argument
875 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_pointer()
876 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_pointer()
906 static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream, in snd_emu10k1_efx_playback_trigger() argument
909 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_trigger()
910 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_trigger()
957 static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_capture_pointer() argument
959 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_pointer()
960 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_pointer()
1082 static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_close() argument
1084 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_close()
1096 static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_open() argument
1098 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_open()
1101 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_open()
1109 epcm->substream = substream; in snd_emu10k1_efx_playback_open()
1111 emu->pcm_playback_efx_substream = substream; in snd_emu10k1_efx_playback_open()
1129 static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) in snd_emu10k1_playback_open() argument
1131 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_open()
1134 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_open()
1142 epcm->substream = substream; in snd_emu10k1_playback_open()
1163 mix = &emu->pcm_mixer[substream->number]; in snd_emu10k1_playback_open()
1171 snd_emu10k1_pcm_mixer_notify(emu, substream->number, 1); in snd_emu10k1_playback_open()
1175 static int snd_emu10k1_playback_close(struct snd_pcm_substream *substream) in snd_emu10k1_playback_close() argument
1177 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_close()
1178 struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number]; in snd_emu10k1_playback_close()
1181 snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0); in snd_emu10k1_playback_close()
1185 static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream) in snd_emu10k1_capture_open() argument
1187 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_open()
1188 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_open()
1196 epcm->substream = substream; in snd_emu10k1_capture_open()
1206 emu->pcm_capture_substream = substream; in snd_emu10k1_capture_open()
1212 static int snd_emu10k1_capture_close(struct snd_pcm_substream *substream) in snd_emu10k1_capture_close() argument
1214 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_close()
1221 static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream) in snd_emu10k1_capture_mic_open() argument
1223 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_mic_open()
1225 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_mic_open()
1232 epcm->substream = substream; in snd_emu10k1_capture_mic_open()
1238 substream->runtime->private_data = epcm; in snd_emu10k1_capture_mic_open()
1239 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_mic_open()
1245 emu->pcm_capture_mic_substream = substream; in snd_emu10k1_capture_mic_open()
1250 static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream) in snd_emu10k1_capture_mic_close() argument
1252 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_mic_close()
1259 static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream) in snd_emu10k1_capture_efx_open() argument
1261 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_efx_open()
1263 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_efx_open()
1272 epcm->substream = substream; in snd_emu10k1_capture_efx_open()
1278 substream->runtime->private_data = epcm; in snd_emu10k1_capture_efx_open()
1279 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_efx_open()
1353 emu->pcm_capture_efx_substream = substream; in snd_emu10k1_capture_efx_open()
1358 static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream) in snd_emu10k1_capture_efx_close() argument
1360 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_efx_close()
1406 struct snd_pcm_substream *substream; in snd_emu10k1_pcm() local
1422 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_emu10k1_pcm()
1423 …if ((err = snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, snd_dma_pci_data(emu->p… in snd_emu10k1_pcm()
1426 …for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substrea… in snd_emu10k1_pcm()
1427 …snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, … in snd_emu10k1_pcm()
1435 struct snd_pcm_substream *substream; in snd_emu10k1_pcm_multi() local
1450 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_emu10k1_pcm_multi()
1451 …if ((err = snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, snd_dma_pci_data(emu->p… in snd_emu10k1_pcm_multi()
1572 struct snd_pcm_substream *substream = private_data; in snd_emu10k1_fx8010_playback_irq() local
1573 snd_pcm_period_elapsed(substream); in snd_emu10k1_fx8010_playback_irq()
1601 static void fx8010_pb_trans_copy(struct snd_pcm_substream *substream, in fx8010_pb_trans_copy() argument
1604 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in fx8010_pb_trans_copy()
1605 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in fx8010_pb_trans_copy()
1607 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); in fx8010_pb_trans_copy()
1630 static int snd_emu10k1_fx8010_playback_transfer(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_transfer() argument
1632 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_transfer()
1633 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_transfer()
1635 snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy); in snd_emu10k1_fx8010_playback_transfer()
1639 static int snd_emu10k1_fx8010_playback_hw_params(struct snd_pcm_substream *substream, in snd_emu10k1_fx8010_playback_hw_params() argument
1642 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_emu10k1_fx8010_playback_hw_params()
1645 static int snd_emu10k1_fx8010_playback_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_hw_free() argument
1647 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_hw_free()
1648 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_hw_free()
1653 snd_pcm_lib_free_pages(substream); in snd_emu10k1_fx8010_playback_hw_free()
1657 static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_prepare() argument
1659 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_prepare()
1660 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_prepare()
1661 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_prepare()
1672 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_fx8010_playback_prepare()
1686 static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substream, int cmd) in snd_emu10k1_fx8010_playback_trigger() argument
1688 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_trigger()
1689 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_trigger()
1710 …register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq); in snd_emu10k1_fx8010_playback_trigger()
1713 snd_emu10k1_fx8010_playback_transfer(substream); /* roll the ball */ in snd_emu10k1_fx8010_playback_trigger()
1733 static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_pointer() argument
1735 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_pointer()
1736 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_pointer()
1742 return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); in snd_emu10k1_fx8010_playback_pointer()
1764 static int snd_emu10k1_fx8010_playback_open(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_open() argument
1766 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_open()
1767 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_open()
1768 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_open()
1783 static int snd_emu10k1_fx8010_playback_close(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_close() argument
1785 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_close()
1786 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_close()