将音频数据真实的发送到外部音频接口硬件
/**
* snd_pcm_start - start all linked streams
* @substream: the PCM substream instance
*/
int snd_pcm_start(struct snd_pcm_substream *substream)
{
// 启动发送,将streams中的所有音频数据递交到硬件[luther.gliethttp]
// 执行snd_pcm_action_start
// ==> snd_pcm_do_start
// ==> substream->ops->trigger(substream, SNDRV_PCM_TRIGGER_START);
// ==> 即调用soc_pcm_ops.soc_pcm_trigger
// ==> platform->pcm_ops->trigger
// ==> 最后调用s3c24xx_pcm_trigger启动s3c24xx处理器的DMA通道发送音频数据到外围接口硬件[luther.gliethttp]
// 这里的platform就是s3c24xx_soc_platform
// struct snd_soc_platform s3c24xx_soc_platform = {
// .name = "s3c24xx-audio",
// .pcm_ops = &s3c24xx_pcm_ops,
// .pcm_new = s3c24xx_pcm_new,
// .pcm_free = s3c24xx_pcm_free_dma_buffers,
//};
// 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,
//};
return snd_pcm_action(&snd_pcm_action_start, substream,
SNDRV_PCM_STATE_RUNNING);
}
阅读(7264) | 评论(0) | 转发(1) |