Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1307788
  • 博文数量: 860
  • 博客积分: 425
  • 博客等级: 下士
  • 技术积分: 1464
  • 用 户 组: 普通用户
  • 注册时间: 2011-08-20 19:57
个人简介

对技术执着

文章分类

全部博文(860)

文章存档

2019年(16)

2018年(12)

2015年(732)

2013年(85)

2012年(15)

我的朋友

分类: LINUX

2015-03-14 17:12:27

int snd_pcm_plugin_build_route(struct snd_pcm_substream *plug,
                   struct snd_pcm_plugin_format *src_format,
                   struct snd_pcm_plugin_format *dst_format,
                   struct snd_pcm_plugin **r_plugin)
{
    struct snd_pcm_plugin *plugin;
    int err;

    if (snd_BUG_ON(!r_plugin))
        return -ENXIO;
    *r_plugin = NULL;
    if (snd_BUG_ON(src_format->rate != dst_format->rate))
        return -ENXIO;
    if (snd_BUG_ON(src_format->format != dst_format->format))
        return -ENXIO;

    err = snd_pcm_plugin_build(plug, "route conversion", 《浅析alsa声卡驱动snd_pcm_plugin_build函数》
                   src_format, dst_format, 0, &plugin);
    if (err < 0)
        return err;

    plugin->transfer = route_transfer; 《浅析alsa声卡驱动route_transfer函数》
    *r_plugin = plugin;
    return 0;
}
阅读(352) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~