cpu_dai,codec_dai,dai_link的关系

// cpu_dai单元
struct snd_soc_dai s3c24xx_i2s_dai = {
    .name = "s3c24xx-i2s",
    .id = 0,
    .probe = s3c24xx_i2s_probe,
    .suspend = s3c24xx_i2s_suspend,
    .resume = s3c24xx_i2s_resume,
    .playback = {
        .channels_min = 2,
        .channels_max = 2,
        .rates = S3C24XX_I2S_RATES,
        .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE,},
    .capture = {
        .channels_min = 2,
        .channels_max = 2,
        .rates = S3C24XX_I2S_RATES,
        .formats = SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE,},
    .ops = &s3c24xx_i2s_dai_ops,
};
//platform单元
struct snd_soc_platform s3c24xx_soc_platform = {
    .name        = "s3c24xx-audio",
    .pcm_ops     = &s3c_dma_ops,
    .pcm_new    = s3c_dma_new,
    .pcm_free    = s3c_dma_free_dma_buffers,
};


static struct snd_pcm_ops s3c_dma_ops = {
    .open        = s3c_dma_open,
    .close        = s3c_dma_close,
    .ioctl        = snd_pcm_lib_ioctl,
    .hw_params    = s3c_dma_hw_params,
    .hw_free    = s3c_dma_hw_free,
    .prepare    = s3c_dma_prepare,
    .trigger    = s3c_dma_trigger,
    .pointer    = s3c_dma_pointer,
    .mmap        = s3c_dma_mmap,
};
// codec_dai单元
struct snd_soc_dai uda134x_dai = {
    .name = "UDA134X",
   
    .playback = {
        .stream_name = "Playback",
        .channels_min = 1,
        .channels_max = 2,
        .rates = UDA134X_RATES,
        .formats = UDA134X_FORMATS,
    },
   
    .capture = {
        .stream_name = "Capture",
        .channels_min = 1,
        .channels_max = 2,
        .rates = UDA134X_RATES,
        .formats = UDA134X_FORMATS,
    },
   
    .ops = &uda134x_dai_ops,
};


//card_dai_link单元
static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {
    .name = "UDA134X",
    .stream_name = "UDA134X",
    .codec_dai = &uda134x_dai,
    .cpu_dai = &s3c24xx_i2s_dai,
    .ops = &s3c24xx_uda134x_ops,
};

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值