snd_pcm_ops
As a newcomer to alsa, I have a few more probably simple questions. I noticed in the SOC drivers, that when the struct snd_pcm_ops is filled in, .copy is omitted, for example in file s3c24xx-pcm.c, you see the following initialization.
static struct snd_pcm_ops s3c24xx_pcm_ops = {
.open = s3c24xx_pcm_open,
.close = s3c24xx_pcm_close,
.ioctl = snd_pcm_lib_ioctl,
.hw_params = s3c24xx_pcm_hw_params,
.hw_free = s3c24xx_pcm_hw_free,
.prepare = s3c24xx_pcm_prepare,
.trigger = s3c24xx_pcm_trigger,
.pointer = s3c24xx_pcm_pointer,
.mmap = s3c24xx_pcm_mmap,
};How is this supposed to work if somewhere down the line substream->ops->copy is called?
Thanks in advance for any pointers.
Quoted 2 lines · John Kacur
How is this supposed to work if somewhere down the line
substream->ops->copyis called?
copy() is an optional operation - if it is not provided then the ALSA core provides$ a default implementation (see snd_pcm_lib_write_transfer() for example).