Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15366742
  • 博文数量: 2005
  • 博客积分: 11986
  • 博客等级: 上将
  • 技术积分: 22535
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-17 13:56
文章分类

全部博文(2005)

文章存档

2014年(2)

2013年(2)

2012年(16)

2011年(66)

2010年(368)

2009年(743)

2008年(491)

2007年(317)

分类: LINUX

2009-11-19 14:02:28

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