本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例9: asoc_compr_platform_register
int asoc_compr_platform_register(struct device *dev)
{
return snd_soc_register_platform(dev, &samsung_compr_platform);
}
示例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);
}
示例11: omap_pcm_probe
static __devinit int omap_pcm_probe(struct platform_device *pdev)
{
return snd_soc_register_platform(&pdev->dev,
&omap_soc_platform);
}
示例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);
}
示例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);
}
示例14: s3c_soc_platform_init
static int __init s3c_soc_platform_init(void)
{
return snd_soc_register_platform(&s3c24xx_soc_platform);
}
示例15: sun4i_soc_platform_hdmiaudio_init
static int __init sun4i_soc_platform_hdmiaudio_init(void)
{
return snd_soc_register_platform(&sun4i_soc_platform_hdmiaudio);
}