Lines Matching refs:substream
369 static int snd_als300_playback_open(struct snd_pcm_substream *substream) in snd_als300_playback_open() argument
371 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_playback_open()
372 struct snd_pcm_runtime *runtime = substream->runtime; in snd_als300_playback_open()
378 chip->playback_substream = substream; in snd_als300_playback_open()
386 static int snd_als300_playback_close(struct snd_pcm_substream *substream) in snd_als300_playback_close() argument
388 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_playback_close()
391 data = substream->runtime->private_data; in snd_als300_playback_close()
394 snd_pcm_lib_free_pages(substream); in snd_als300_playback_close()
398 static int snd_als300_capture_open(struct snd_pcm_substream *substream) in snd_als300_capture_open() argument
400 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_capture_open()
401 struct snd_pcm_runtime *runtime = substream->runtime; in snd_als300_capture_open()
407 chip->capture_substream = substream; in snd_als300_capture_open()
415 static int snd_als300_capture_close(struct snd_pcm_substream *substream) in snd_als300_capture_close() argument
417 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_capture_close()
420 data = substream->runtime->private_data; in snd_als300_capture_close()
423 snd_pcm_lib_free_pages(substream); in snd_als300_capture_close()
427 static int snd_als300_pcm_hw_params(struct snd_pcm_substream *substream, in snd_als300_pcm_hw_params() argument
430 return snd_pcm_lib_malloc_pages(substream, in snd_als300_pcm_hw_params()
434 static int snd_als300_pcm_hw_free(struct snd_pcm_substream *substream) in snd_als300_pcm_hw_free() argument
436 return snd_pcm_lib_free_pages(substream); in snd_als300_pcm_hw_free()
439 static int snd_als300_playback_prepare(struct snd_pcm_substream *substream) in snd_als300_playback_prepare() argument
442 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_playback_prepare()
443 struct snd_pcm_runtime *runtime = substream->runtime; in snd_als300_playback_prepare()
444 unsigned short period_bytes = snd_pcm_lib_period_bytes(substream); in snd_als300_playback_prepare()
445 unsigned short buffer_bytes = snd_pcm_lib_buffer_bytes(substream); in snd_als300_playback_prepare()
468 static int snd_als300_capture_prepare(struct snd_pcm_substream *substream) in snd_als300_capture_prepare() argument
471 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_capture_prepare()
472 struct snd_pcm_runtime *runtime = substream->runtime; in snd_als300_capture_prepare()
473 unsigned short period_bytes = snd_pcm_lib_period_bytes(substream); in snd_als300_capture_prepare()
474 unsigned short buffer_bytes = snd_pcm_lib_buffer_bytes(substream); in snd_als300_capture_prepare()
497 static int snd_als300_trigger(struct snd_pcm_substream *substream, int cmd) in snd_als300_trigger() argument
499 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_trigger()
505 data = substream->runtime->private_data; in snd_als300_trigger()
541 static snd_pcm_uframes_t snd_als300_pointer(struct snd_pcm_substream *substream) in snd_als300_pointer() argument
544 struct snd_als300 *chip = snd_pcm_substream_chip(substream); in snd_als300_pointer()
548 data = substream->runtime->private_data; in snd_als300_pointer()
549 period_bytes = snd_pcm_lib_period_bytes(substream); in snd_als300_pointer()
563 return bytes_to_frames(substream->runtime, current_ptr); in snd_als300_pointer()