当前位置: 首页>>代码示例>>C++>>正文


C++ snd_soc_register_platform函数代码示例

本文整理汇总了C++中snd_soc_register_platform函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_soc_register_platform函数的具体用法?C++ snd_soc_register_platform怎么用?C++ snd_soc_register_platform使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了snd_soc_register_platform函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ssp_dai_probe

static int ssp_dai_probe(struct platform_device *pdev)
{
	int ret;
	struct workqueue_struct *ssp_dai_wq;

	pr_debug("SSP DAI: FCT %s enters\n",
			__func__);

	ret = snd_soc_register_platform(&pdev->dev,
				&soc_ssp_platform_drv);
	if (ret) {
		pr_err("registering SSP PLATFORM failed\n");
		snd_soc_unregister_dai(&pdev->dev);
		return -EBUSY;
	}

	ret = snd_soc_register_dais(&pdev->dev,
			intel_ssp_platform_dai,
			ARRAY_SIZE(intel_ssp_platform_dai));

	if (ret) {
		pr_err("registering cpu DAIs failed\n");
		snd_soc_unregister_dai(&pdev->dev);
		return -EBUSY;
	}

	ssp_dai_wq = create_workqueue("ssp_transfer_data");

	if (!ssp_dai_wq) {
		pr_err("work queue failed\n");
		snd_soc_unregister_dai(&pdev->dev);
		return -ENOMEM;
	}

	platform_set_drvdata(pdev, ssp_dai_wq);

	pr_debug("SSP DAI: FCT %s leaves %d\n",
			__func__, ret);

	return ret;
}
开发者ID:kamarush,项目名称:ZTE_GXIn_Kernel-3.0.8,代码行数:41,代码来源:mid_ssp.c

示例2: mtk_fmtx_probe

static int mtk_fmtx_probe(struct platform_device *pdev)
{
    PRINTK_AUD_FMTX("%s \n", __func__);

    pdev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
    if (!pdev->dev.dma_mask)
    {
        pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
    }

    if (pdev->dev.of_node)
    {
        dev_set_name(&pdev->dev, "%s", MT_SOC_FM_MRGTX_PCM);
    }

    PRINTK_AUD_FMTX("%s: dev name %s\n", __func__, dev_name(&pdev->dev));

    mDev = &pdev->dev;

    return snd_soc_register_platform(&pdev->dev,
                                     &mtk_fmtx_soc_platform);
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:22,代码来源:mt_soc_pcm_fmtx.c

示例3: mtk_i2s0_probe

static int mtk_i2s0_probe(struct platform_device *pdev)
{
    printk("%s \n", __func__);

    pdev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
    if (!pdev->dev.dma_mask)
    {
        pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
    }

    if (pdev->dev.of_node)
    {
        dev_set_name(&pdev->dev, "%s", MT_SOC_I2S0_PCM);
    }

    printk("%s: dev name %s\n", __func__, dev_name(&pdev->dev));

    mDev = &pdev->dev;

    return snd_soc_register_platform(&pdev->dev,
                                     &mtk_i2s0_soc_platform);
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:22,代码来源:mt_soc_pcm_dl1_i2s0.c

示例4: cygnus_soc_platform_register

int cygnus_soc_platform_register(struct device *dev,
				 struct cygnus_audio *cygaud)
{
	int rc = 0;

	dev_dbg(dev, "%s Enter\n", __func__);

	rc = devm_request_irq(dev, cygaud->irq_num, cygnus_dma_irq,
				IRQF_SHARED, "cygnus-audio", cygaud);
	if (rc) {
		dev_err(dev, "%s request_irq error %d\n", __func__, rc);
		return rc;
	}

	rc = snd_soc_register_platform(dev, &cygnus_soc_platform);
	if (rc) {
		dev_err(dev, "%s failed\n", __func__);
		return rc;
	}

	return 0;
}
开发者ID:AK101111,项目名称:linux,代码行数:22,代码来源:cygnus-pcm.c

示例5: mt_pcm_routing_dev_probe

static int mt_pcm_routing_dev_probe(struct platform_device *pdev)
{
	struct device *dev = &pdev->dev;
	struct mt_pcm_routing_priv *priv;

	pr_debug("%s dev name %s\n", __func__, dev_name(&pdev->dev));

	if (dev->of_node) {
		dev_set_name(dev, "%s", MT_SOC_ROUTING_PCM);
		pr_debug("%s set dev name %s\n", __func__, dev_name(dev));
	}

	priv = devm_kzalloc(dev, sizeof(struct mt_pcm_routing_priv), GFP_KERNEL);
	if (unlikely(!priv)) {
		pr_err("%s failed to allocate private data\n", __func__);
		return -ENOMEM;
	}

	dev_set_drvdata(dev, priv);

	return snd_soc_register_platform(dev, &mt_pcm_routing_platform);
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:22,代码来源:mt_afe_pcm_routing.c

示例6: sst_platform_probe

static int sst_platform_probe(struct platform_device *pdev)
{
	struct sst_data *sst;
	int ret;
	struct sst_platform_data *pdata = pdev->dev.platform_data;

	pr_debug("sst_platform_probe called\n");
	sst = devm_kzalloc(&pdev->dev, sizeof(*sst), GFP_KERNEL);
	if (sst == NULL) {
		pr_err("kzalloc failed\n");
		return -ENOMEM;
	}

	if (dpcm_enable == 1) {
		pr_info("dpcm enabled; overriding stream map\n");
		pdata->pdev_strm_map = dpcm_strm_map;
		pdata->strm_map_size = ARRAY_SIZE(dpcm_strm_map);
	}
	sst_pdev = &pdev->dev;
	sst->pdata = pdata;
	mutex_init(&sst->lock);
	dev_set_drvdata(&pdev->dev, sst);

	ret = snd_soc_register_platform(&pdev->dev,
					 &sst_soc_platform_drv);
	if (ret) {
		pr_err("registering soc platform failed\n");
		return ret;
	}
	ret = snd_soc_register_component(&pdev->dev, &pcm_component,
				sst_platform_dai, ARRAY_SIZE(sst_platform_dai));
	if (ret) {
		pr_err("registering cpu dais failed\n");
		snd_soc_unregister_platform(&pdev->dev);
	}

	return ret;
}
开发者ID:wejgomi,项目名称:nexus-player,代码行数:38,代码来源:pcm.c

示例7: sst_platform_probe

static int sst_platform_probe(struct platform_device *pdev)
{
	struct sst_data *drv;
	int ret;
	struct sst_platform_data *pdata;

	drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
	if (drv == NULL) {
		return -ENOMEM;
	}

	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
	if (pdata == NULL) {
		return -ENOMEM;
	}

	pdata->pdev_strm_map = dpcm_strm_map;
	pdata->strm_map_size = ARRAY_SIZE(dpcm_strm_map);
	drv->pdata = pdata;
	drv->pdev = pdev;
	mutex_init(&drv->lock);
	dev_set_drvdata(&pdev->dev, drv);

	ret = snd_soc_register_platform(&pdev->dev, &sst_soc_platform_drv);
	if (ret) {
		dev_err(&pdev->dev, "registering soc platform failed\n");
		return ret;
	}

	ret = snd_soc_register_component(&pdev->dev, &sst_component,
				sst_platform_dai, ARRAY_SIZE(sst_platform_dai));
	if (ret) {
		dev_err(&pdev->dev, "registering cpu dais failed\n");
		snd_soc_unregister_platform(&pdev->dev);
	}
	return ret;
}
开发者ID:383530895,项目名称:linux,代码行数:37,代码来源:sst-mfld-platform-pcm.c

示例8: skl_platform_register

int skl_platform_register(struct device *dev)
{
	int ret;
	struct hdac_ext_bus *ebus = dev_get_drvdata(dev);
	struct skl *skl = ebus_to_skl(ebus);

	INIT_LIST_HEAD(&skl->ppl_list);

	ret = snd_soc_register_platform(dev, &skl_platform_drv);
	if (ret) {
		dev_err(dev, "soc platform registration failed %d\n", ret);
		return ret;
	}
	ret = snd_soc_register_component(dev, &skl_component,
				skl_platform_dai,
				ARRAY_SIZE(skl_platform_dai));
	if (ret) {
		dev_err(dev, "soc component registration failed %d\n", ret);
		snd_soc_unregister_platform(dev);
	}

	return ret;

}
开发者ID:AK101111,项目名称:linux,代码行数:24,代码来源:skl-pcm.c

示例9: asoc_compr_platform_register

int asoc_compr_platform_register(struct device *dev)
{
    return snd_soc_register_platform(dev, &samsung_compr_platform);
}
开发者ID:rafat2026,项目名称:SpaceX-Kernel-Exynos7420,代码行数:4,代码来源:compr.c

示例10: snd_soc_dummy_probe

static __devinit int snd_soc_dummy_probe(struct platform_device *pdev)
{
	return snd_soc_register_platform(&pdev->dev, &dummy_platform);
}
开发者ID:olegk0,项目名称:rk3x_kernel_3.0.36,代码行数:4,代码来源:soc-utils.c

示例11: omap_pcm_probe

static __devinit int omap_pcm_probe(struct platform_device *pdev)
{
	return snd_soc_register_platform(&pdev->dev,
			&omap_soc_platform);
}
开发者ID:Loller79,项目名称:Solid_Kernel-STOCK-KK-CAF,代码行数:5,代码来源:omap-pcm.c

示例12: mt76xx_platform_drv_probe

static int mt76xx_platform_drv_probe(struct platform_device *pdev)
{
    //printk("******* %s *******\n", __func__);
    return snd_soc_register_platform(&pdev->dev, &mt76xx_soc_platform);
}
开发者ID:openspeaker,项目名称:os-wrt-cc,代码行数:5,代码来源:mt76xx_pcm.c

示例13: davinci_soc_platform_probe

static int __devinit davinci_soc_platform_probe(struct platform_device *pdev)
{
	return snd_soc_register_platform(&pdev->dev, &davinci_soc_platform);
}
开发者ID:454053205,项目名称:linux,代码行数:4,代码来源:davinci-pcm.c

示例14: s3c_soc_platform_init

static int __init s3c_soc_platform_init(void)
{
    return snd_soc_register_platform(&s3c24xx_soc_platform);
}
开发者ID:mik9,项目名称:i5700-leshak-kernel,代码行数:4,代码来源:s3c-pcm-sol.c

示例15: sun4i_soc_platform_hdmiaudio_init

static int __init sun4i_soc_platform_hdmiaudio_init(void)
{
	return snd_soc_register_platform(&sun4i_soc_platform_hdmiaudio);
}
开发者ID:murphy666,项目名称:sun4i-kernel,代码行数:4,代码来源:sun4i-hdmipcm.c


注:本文中的snd_soc_register_platform函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。