Lines Matching refs:substream
44 if (epcm->substream == NULL) in snd_emu10k1_pcm_interrupt()
48 epcm->substream->runtime->hw->pointer(emu, epcm->substream), in snd_emu10k1_pcm_interrupt()
49 snd_pcm_lib_period_bytes(epcm->substream), in snd_emu10k1_pcm_interrupt()
50 snd_pcm_lib_buffer_bytes(epcm->substream)); in snd_emu10k1_pcm_interrupt()
52 snd_pcm_period_elapsed(epcm->substream); in snd_emu10k1_pcm_interrupt()
91 static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_pointer() argument
93 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_pointer()
94 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_pointer()
288 struct snd_pcm_substream *substream = evoice->epcm->substream; in snd_emu10k1_pcm_init_voice() local
289 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_pcm_init_voice()
407 static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream, in snd_emu10k1_playback_hw_params() argument
410 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_hw_params()
411 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_params()
417 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_emu10k1_playback_hw_params()
423 epcm->memblk = snd_emu10k1_alloc_pages(emu, substream); in snd_emu10k1_playback_hw_params()
435 static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_playback_hw_free() argument
437 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_hw_free()
438 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_hw_free()
461 snd_pcm_lib_free_pages(substream); in snd_emu10k1_playback_hw_free()
465 static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_hw_free() argument
467 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_hw_free()
468 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_hw_free()
490 snd_pcm_lib_free_pages(substream); in snd_emu10k1_efx_playback_hw_free()
494 static int snd_emu10k1_playback_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_playback_prepare() argument
496 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_prepare()
497 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_prepare()
502 end_addr = snd_pcm_lib_period_bytes(substream); in snd_emu10k1_playback_prepare()
511 end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_playback_prepare()
514 &emu->pcm_mixer[substream->number]); in snd_emu10k1_playback_prepare()
518 &emu->pcm_mixer[substream->number]); in snd_emu10k1_playback_prepare()
522 static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_prepare() argument
524 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_prepare()
525 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_prepare()
532 end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_efx_playback_prepare()
578 static int snd_emu10k1_capture_hw_params(struct snd_pcm_substream *substream, in snd_emu10k1_capture_hw_params() argument
581 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_emu10k1_capture_hw_params()
584 static int snd_emu10k1_capture_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_capture_hw_free() argument
586 return snd_pcm_lib_free_pages(substream); in snd_emu10k1_capture_hw_free()
589 static int snd_emu10k1_capture_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_capture_prepare() argument
591 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_prepare()
592 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_prepare()
613 epcm->capture_bufsize = snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_capture_prepare()
643 runtime = evoice->epcm->substream->runtime; in snd_emu10k1_playback_invalidate_cache()
675 struct snd_pcm_substream *substream; in snd_emu10k1_playback_prepare_voice() local
682 substream = evoice->epcm->substream; in snd_emu10k1_playback_prepare_voice()
683 runtime = substream->runtime; in snd_emu10k1_playback_prepare_voice()
698 struct snd_pcm_substream *substream; in snd_emu10k1_playback_trigger_voice() local
704 substream = evoice->epcm->substream; in snd_emu10k1_playback_trigger_voice()
705 runtime = substream->runtime; in snd_emu10k1_playback_trigger_voice()
739 struct snd_pcm_substream *substream, in snd_emu10k1_playback_mangle_extra() argument
754 static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, in snd_emu10k1_playback_trigger() argument
757 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_trigger()
758 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_trigger()
776 snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); in snd_emu10k1_playback_trigger()
777 mix = &emu->pcm_mixer[substream->number]; in snd_emu10k1_playback_trigger()
802 static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream, in snd_emu10k1_capture_trigger() argument
805 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_trigger()
806 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_trigger()
868 static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_playback_pointer() argument
870 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_pointer()
871 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_pointer()
901 static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream, in snd_emu10k1_efx_playback_trigger() argument
904 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_trigger()
905 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_trigger()
952 static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_capture_pointer() argument
954 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_pointer()
955 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_pointer()
1077 static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_close() argument
1079 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_close()
1091 static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream) in snd_emu10k1_efx_playback_open() argument
1093 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_efx_playback_open()
1096 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_efx_playback_open()
1104 epcm->substream = substream; in snd_emu10k1_efx_playback_open()
1106 emu->pcm_playback_efx_substream = substream; in snd_emu10k1_efx_playback_open()
1124 static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) in snd_emu10k1_playback_open() argument
1126 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_open()
1129 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_playback_open()
1137 epcm->substream = substream; in snd_emu10k1_playback_open()
1158 mix = &emu->pcm_mixer[substream->number]; in snd_emu10k1_playback_open()
1166 snd_emu10k1_pcm_mixer_notify(emu, substream->number, 1); in snd_emu10k1_playback_open()
1170 static int snd_emu10k1_playback_close(struct snd_pcm_substream *substream) in snd_emu10k1_playback_close() argument
1172 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_playback_close()
1173 struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number]; in snd_emu10k1_playback_close()
1176 snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0); in snd_emu10k1_playback_close()
1180 static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream) in snd_emu10k1_capture_open() argument
1182 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_open()
1183 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_open()
1191 epcm->substream = substream; in snd_emu10k1_capture_open()
1201 emu->pcm_capture_substream = substream; in snd_emu10k1_capture_open()
1207 static int snd_emu10k1_capture_close(struct snd_pcm_substream *substream) in snd_emu10k1_capture_close() argument
1209 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_close()
1216 static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream) in snd_emu10k1_capture_mic_open() argument
1218 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_mic_open()
1220 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_mic_open()
1227 epcm->substream = substream; in snd_emu10k1_capture_mic_open()
1233 substream->runtime->private_data = epcm; in snd_emu10k1_capture_mic_open()
1234 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_mic_open()
1240 emu->pcm_capture_mic_substream = substream; in snd_emu10k1_capture_mic_open()
1245 static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream) in snd_emu10k1_capture_mic_close() argument
1247 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_mic_close()
1254 static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream) in snd_emu10k1_capture_efx_open() argument
1256 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_efx_open()
1258 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_capture_efx_open()
1267 epcm->substream = substream; in snd_emu10k1_capture_efx_open()
1273 substream->runtime->private_data = epcm; in snd_emu10k1_capture_efx_open()
1274 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; in snd_emu10k1_capture_efx_open()
1348 emu->pcm_capture_efx_substream = substream; in snd_emu10k1_capture_efx_open()
1353 static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream) in snd_emu10k1_capture_efx_close() argument
1355 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_capture_efx_close()
1401 struct snd_pcm_substream *substream; in snd_emu10k1_pcm() local
1420 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_emu10k1_pcm()
1421 …if ((err = snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, snd_dma_pci_data(emu->p… in snd_emu10k1_pcm()
1424 …for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substrea… in snd_emu10k1_pcm()
1425 …snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, … in snd_emu10k1_pcm()
1437 struct snd_pcm_substream *substream; in snd_emu10k1_pcm_multi() local
1455 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_emu10k1_pcm_multi()
1456 …if ((err = snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, snd_dma_pci_data(emu->p… in snd_emu10k1_pcm_multi()
1586 struct snd_pcm_substream *substream = private_data; in snd_emu10k1_fx8010_playback_irq() local
1587 snd_pcm_period_elapsed(substream); in snd_emu10k1_fx8010_playback_irq()
1614 static void fx8010_pb_trans_copy(struct snd_pcm_substream *substream, in fx8010_pb_trans_copy() argument
1617 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in fx8010_pb_trans_copy()
1618 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in fx8010_pb_trans_copy()
1620 unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); in fx8010_pb_trans_copy()
1643 static int snd_emu10k1_fx8010_playback_transfer(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_transfer() argument
1645 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_transfer()
1646 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_transfer()
1648 snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, fx8010_pb_trans_copy); in snd_emu10k1_fx8010_playback_transfer()
1652 static int snd_emu10k1_fx8010_playback_hw_params(struct snd_pcm_substream *substream, in snd_emu10k1_fx8010_playback_hw_params() argument
1655 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); in snd_emu10k1_fx8010_playback_hw_params()
1658 static int snd_emu10k1_fx8010_playback_hw_free(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_hw_free() argument
1660 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_hw_free()
1661 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_hw_free()
1666 snd_pcm_lib_free_pages(substream); in snd_emu10k1_fx8010_playback_hw_free()
1670 static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_prepare() argument
1672 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_prepare()
1673 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_prepare()
1674 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_prepare()
1685 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); in snd_emu10k1_fx8010_playback_prepare()
1699 static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substream, int cmd) in snd_emu10k1_fx8010_playback_trigger() argument
1701 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_trigger()
1702 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_trigger()
1723 …register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq); in snd_emu10k1_fx8010_playback_trigger()
1726 snd_emu10k1_fx8010_playback_transfer(substream); /* roll the ball */ in snd_emu10k1_fx8010_playback_trigger()
1746 static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_pointer() argument
1748 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_pointer()
1749 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_pointer()
1755 return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); in snd_emu10k1_fx8010_playback_pointer()
1777 static int snd_emu10k1_fx8010_playback_open(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_open() argument
1779 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_open()
1780 struct snd_pcm_runtime *runtime = substream->runtime; in snd_emu10k1_fx8010_playback_open()
1781 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_open()
1796 static int snd_emu10k1_fx8010_playback_close(struct snd_pcm_substream *substream) in snd_emu10k1_fx8010_playback_close() argument
1798 struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); in snd_emu10k1_fx8010_playback_close()
1799 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; in snd_emu10k1_fx8010_playback_close()