Lines Matching refs:substream
50 struct snd_pcm_substream *substream);
53 struct snd_pcm_substream *substream);
762 static unsigned int snd_trident_control_mode(struct snd_pcm_substream *substream) in snd_trident_control_mode() argument
765 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_control_mode()
797 static int snd_trident_ioctl(struct snd_pcm_substream *substream, in snd_trident_ioctl() argument
804 return snd_pcm_lib_ioctl(substream, cmd, arg); in snd_trident_ioctl()
819 static int snd_trident_allocate_pcm_mem(struct snd_pcm_substream *substream, in snd_trident_allocate_pcm_mem() argument
822 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_allocate_pcm_mem()
823 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_allocate_pcm_mem()
827 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_trident_allocate_pcm_mem()
833 voice->memblk = snd_trident_alloc_pages(trident, substream); in snd_trident_allocate_pcm_mem()
853 static int snd_trident_allocate_evoice(struct snd_pcm_substream *substream, in snd_trident_allocate_evoice() argument
856 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_allocate_evoice()
857 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_allocate_evoice()
869 evoice->substream = substream; in snd_trident_allocate_evoice()
893 static int snd_trident_hw_params(struct snd_pcm_substream *substream, in snd_trident_hw_params() argument
898 err = snd_trident_allocate_pcm_mem(substream, hw_params); in snd_trident_hw_params()
900 err = snd_trident_allocate_evoice(substream, hw_params); in snd_trident_hw_params()
915 static int snd_trident_hw_free(struct snd_pcm_substream *substream) in snd_trident_hw_free() argument
917 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_hw_free()
918 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_hw_free()
928 snd_pcm_lib_free_pages(substream); in snd_trident_hw_free()
947 static int snd_trident_playback_prepare(struct snd_pcm_substream *substream) in snd_trident_playback_prepare() argument
949 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_playback_prepare()
950 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_playback_prepare()
953 struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[substream->number]; in snd_trident_playback_prepare()
969 voice->CTRL = snd_trident_control_mode(substream); in snd_trident_playback_prepare()
1033 static int snd_trident_capture_hw_params(struct snd_pcm_substream *substream, in snd_trident_capture_hw_params() argument
1036 return snd_trident_allocate_pcm_mem(substream, hw_params); in snd_trident_capture_hw_params()
1050 static int snd_trident_capture_prepare(struct snd_pcm_substream *substream) in snd_trident_capture_prepare() argument
1052 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_capture_prepare()
1053 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_capture_prepare()
1072 ESO_bytes = snd_pcm_lib_buffer_bytes(substream) - 1; in snd_trident_capture_prepare()
1112 voice->CTRL = snd_trident_control_mode(substream); in snd_trident_capture_prepare()
1142 static int snd_trident_si7018_capture_hw_params(struct snd_pcm_substream *substream, in snd_trident_si7018_capture_hw_params() argument
1147 if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) in snd_trident_si7018_capture_hw_params()
1150 return snd_trident_allocate_evoice(substream, hw_params); in snd_trident_si7018_capture_hw_params()
1164 static int snd_trident_si7018_capture_hw_free(struct snd_pcm_substream *substream) in snd_trident_si7018_capture_hw_free() argument
1166 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_si7018_capture_hw_free()
1167 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_si7018_capture_hw_free()
1171 snd_pcm_lib_free_pages(substream); in snd_trident_si7018_capture_hw_free()
1190 static int snd_trident_si7018_capture_prepare(struct snd_pcm_substream *substream) in snd_trident_si7018_capture_prepare() argument
1192 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_si7018_capture_prepare()
1193 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_si7018_capture_prepare()
1206 voice->CTRL = snd_trident_control_mode(substream); in snd_trident_si7018_capture_prepare()
1261 static int snd_trident_foldback_prepare(struct snd_pcm_substream *substream) in snd_trident_foldback_prepare() argument
1263 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_foldback_prepare()
1264 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_foldback_prepare()
1284 voice->CTRL = snd_trident_control_mode(substream); in snd_trident_foldback_prepare()
1339 static int snd_trident_spdif_hw_params(struct snd_pcm_substream *substream, in snd_trident_spdif_hw_params() argument
1342 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_spdif_hw_params()
1346 err = snd_trident_allocate_pcm_mem(substream, hw_params); in snd_trident_spdif_hw_params()
1351 err = snd_trident_allocate_evoice(substream, hw_params); in snd_trident_spdif_hw_params()
1404 static int snd_trident_spdif_prepare(struct snd_pcm_substream *substream) in snd_trident_spdif_prepare() argument
1406 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_spdif_prepare()
1407 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_spdif_prepare()
1410 struct snd_trident_pcm_mixer *mix = &trident->pcm_mixer[substream->number]; in snd_trident_spdif_prepare()
1439 voice->CTRL = snd_trident_control_mode(substream); in snd_trident_spdif_prepare()
1480 voice->CTRL = snd_trident_control_mode(substream); in snd_trident_spdif_prepare()
1543 static int snd_trident_trigger(struct snd_pcm_substream *substream, in snd_trident_trigger() argument
1547 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_trigger()
1570 snd_pcm_group_for_each_entry(s, substream) { in snd_trident_trigger()
1589 snd_pcm_trigger_done(s, substream); in snd_trident_trigger()
1642 static snd_pcm_uframes_t snd_trident_playback_pointer(struct snd_pcm_substream *substream) in snd_trident_playback_pointer() argument
1644 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_playback_pointer()
1645 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_playback_pointer()
1681 static snd_pcm_uframes_t snd_trident_capture_pointer(struct snd_pcm_substream *substream) in snd_trident_capture_pointer() argument
1683 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_capture_pointer()
1684 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_capture_pointer()
1711 static snd_pcm_uframes_t snd_trident_spdif_pointer(struct snd_pcm_substream *substream) in snd_trident_spdif_pointer() argument
1713 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_spdif_pointer()
1714 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_spdif_pointer()
1856 static int snd_trident_playback_open(struct snd_pcm_substream *substream) in snd_trident_playback_open() argument
1858 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_playback_open()
1859 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_playback_open()
1865 snd_trident_pcm_mixer_build(trident, voice, substream); in snd_trident_playback_open()
1866 voice->substream = substream; in snd_trident_playback_open()
1870 snd_pcm_set_sync(substream); in snd_trident_playback_open()
1884 static int snd_trident_playback_close(struct snd_pcm_substream *substream) in snd_trident_playback_close() argument
1886 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_playback_close()
1887 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_playback_close()
1890 snd_trident_pcm_mixer_free(trident, voice, substream); in snd_trident_playback_close()
1905 static int snd_trident_spdif_open(struct snd_pcm_substream *substream) in snd_trident_spdif_open() argument
1907 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_spdif_open()
1909 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_spdif_open()
1915 voice->substream = substream; in snd_trident_spdif_open()
1946 static int snd_trident_spdif_close(struct snd_pcm_substream *substream) in snd_trident_spdif_close() argument
1948 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_spdif_close()
1984 static int snd_trident_capture_open(struct snd_pcm_substream *substream) in snd_trident_capture_open() argument
1986 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_capture_open()
1988 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_capture_open()
1994 voice->substream = substream; in snd_trident_capture_open()
1998 snd_pcm_set_sync(substream); in snd_trident_capture_open()
2012 static int snd_trident_capture_close(struct snd_pcm_substream *substream) in snd_trident_capture_close() argument
2028 static int snd_trident_foldback_open(struct snd_pcm_substream *substream) in snd_trident_foldback_open() argument
2030 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_foldback_open()
2032 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_foldback_open()
2037 voice->foldback_chan = substream->number; in snd_trident_foldback_open()
2038 voice->substream = substream; in snd_trident_foldback_open()
2055 static int snd_trident_foldback_close(struct snd_pcm_substream *substream) in snd_trident_foldback_close() argument
2057 struct snd_trident *trident = snd_pcm_substream_chip(substream); in snd_trident_foldback_close()
2059 struct snd_pcm_runtime *runtime = substream->runtime; in snd_trident_foldback_close()
2200 struct snd_pcm_substream *substream; in snd_trident_pcm() local
2201 …for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substre… in snd_trident_pcm()
2202 snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, in snd_trident_pcm()
2205 snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream, in snd_trident_pcm()
2232 struct snd_pcm_substream *substream; in snd_trident_foldback_pcm() local
2246 substream = foldback->streams[SNDRV_PCM_STREAM_CAPTURE].substream; in snd_trident_foldback_pcm()
2247 strcpy(substream->name, "Front Mixer"); in snd_trident_foldback_pcm()
2248 substream = substream->next; in snd_trident_foldback_pcm()
2249 strcpy(substream->name, "Reverb Mixer"); in snd_trident_foldback_pcm()
2250 substream = substream->next; in snd_trident_foldback_pcm()
2251 strcpy(substream->name, "Chorus Mixer"); in snd_trident_foldback_pcm()
2253 substream = substream->next; in snd_trident_foldback_pcm()
2254 strcpy(substream->name, "Second AC'97 ADC"); in snd_trident_foldback_pcm()
2921 struct snd_pcm_substream *substream) in snd_trident_pcm_mixer_build() argument
2925 if (snd_BUG_ON(!trident || !voice || !substream)) in snd_trident_pcm_mixer_build()
2927 tmix = &trident->pcm_mixer[substream->number]; in snd_trident_pcm_mixer_build()
2933 snd_trident_notify_pcm_change(trident, tmix, substream->number, 1); in snd_trident_pcm_mixer_build()
2937 …(struct snd_trident *trident, struct snd_trident_voice *voice, struct snd_pcm_substream *substream) in snd_trident_pcm_mixer_free() argument
2941 if (snd_BUG_ON(!trident || !substream)) in snd_trident_pcm_mixer_free()
2943 tmix = &trident->pcm_mixer[substream->number]; in snd_trident_pcm_mixer_free()
2945 snd_trident_notify_pcm_change(trident, tmix, substream->number, 0); in snd_trident_pcm_mixer_free()
3746 if (!voice->pcm || voice->substream == NULL) { in snd_trident_interrupt()
3798 snd_pcm_period_elapsed(voice->substream); in snd_trident_interrupt()
3835 pvoice->substream = NULL; in snd_trident_alloc_voice()
3881 voice->substream = NULL; in snd_trident_free_voice()