Chinaunix首页 | 论坛 | 博客
  • 博客访问: 808631
  • 博文数量: 489
  • 博客积分: 475
  • 博客等级: 下士
  • 技术积分: 3087
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 16:28
文章分类

全部博文(489)

文章存档

2013年(7)

2012年(301)

2011年(181)

分类:

2012-04-19 13:52:32

将音频数据真实的发送到外部音频接口硬件
/**
 * 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);
}
阅读(541) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~