.name = "msm-mic-dai-"#link_id, \ .id = (link_id), \ .capture = { \ .stream_name = "auto-capture-"#link_id, \ .rates = SNDRV_PCM_RATE_8000_96000, \ .formats = SNDRV_PCM_FMTBIT_S16_LE, \ .rate_min = 8000, \ .rate_max = 96000, \ .channels_min = 1, \ .channels_max = 2, \ }, \ .ops = &msm_cpu_dai_ops, \ } static struct snd_soc_dai_driver msm_cpu_mi2s_dai = MSM_DAI_SPEAKER_BUILDER(0); static struct snd_soc_dai_driver msm_cpu_sec_i2s_dai = MSM_DAI_SEC_SPEAKER_BUILDER(3); static struct snd_soc_dai_driver msm_cpu_pri_mic_dai = MSM_DAI_MIC_BUILDER(5); static __devinit int msm_cpu_dai_dev_probe(struct platform_device *pdev) { int rc = 0; dev_dbg(&pdev->dev, "%s: dev name %s\n", __func__, dev_name(&pdev->dev)); switch (pdev->id) { case MSM_MI2S_RX: snd_soc_register_dai(&pdev->dev, &msm_cpu_mi2s_dai); break; case SECONDARY_I2S_RX:
.name = "msm-mic-dai-"#link_id, \ .id = (link_id), \ .capture = { \ .rates = SNDRV_PCM_RATE_8000_96000, \ .formats = SNDRV_PCM_FMTBIT_S16_LE, \ .rate_min = 8000, \ .rate_max = 96000, \ .channels_min = 1, \ .channels_max = 2, \ }, \ .ops = &msm_cpu_dai_ops, \ } struct snd_soc_dai msm_cpu_dai[] = { MSM_DAI_SPEAKER_BUILDER(0), MSM_DAI_SPEAKER_BUILDER(1), MSM_DAI_SPEAKER_BUILDER(2), MSM_DAI_SPEAKER_BUILDER(3), MSM_DAI_SPEAKER_BUILDER(4), MSM_DAI_MIC_BUILDER(5), MSM_DAI_MIC_BUILDER(6), MSM_DAI_MIC_BUILDER(7), }; EXPORT_SYMBOL_GPL(msm_cpu_dai); static int __init msm_cpu_dai_init(void) { return snd_soc_register_dais(msm_cpu_dai, ARRAY_SIZE(msm_cpu_dai)); } module_init(msm_cpu_dai_init);