本文整理汇总了C++中snd_soc_register_platform函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_soc_register_platform函数的具体用法?C++ snd_soc_register_platform怎么用?C++ snd_soc_register_platform使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snd_soc_register_platform函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: samsung_asoc_platform_probe
static int __devinit samsung_asoc_platform_probe(struct platform_device *pdev)
{
atomic_set(&dram_usage_cnt, 0);
return snd_soc_register_platform(&pdev->dev, &samsung_asoc_platform);
}
开发者ID:poldo964,项目名称:android_kernel_samsung_kminilte,代码行数:6,代码来源:dma.c
示例17: sun7i_spdif_pcm_probe
static int __devinit sun7i_spdif_pcm_probe(struct platform_device *pdev)
{
return snd_soc_register_platform(&pdev->dev, &sun7i_soc_platform);
}
开发者ID:mfkiwl,项目名称:PhoenixA20_linux_sourcecode,代码行数:4,代码来源:sun7i_spdma.c
示例18: kirkwood_i2s_dev_probe
static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
{
struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data;
struct snd_soc_dai_driver *soc_dai = kirkwood_i2s_dai;
struct kirkwood_dma_data *priv;
struct resource *mem;
struct device_node *np = pdev->dev.of_node;
int err;
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
if (!priv) {
dev_err(&pdev->dev, "allocation failed\n");
return -ENOMEM;
}
dev_set_drvdata(&pdev->dev, priv);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->io = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(priv->io))
return PTR_ERR(priv->io);
priv->irq = platform_get_irq(pdev, 0);
if (priv->irq <= 0) {
dev_err(&pdev->dev, "platform_get_irq failed\n");
return -ENXIO;
}
if (np) {
priv->burst = 128; /* might be 32 or 128 */
} else if (data) {
priv->burst = data->burst;
} else {
dev_err(&pdev->dev, "no DT nor platform data ?!\n");
return -EINVAL;
}
priv->clk = devm_clk_get(&pdev->dev, np ? "internal" : NULL);
if (IS_ERR(priv->clk)) {
dev_err(&pdev->dev, "no clock\n");
return PTR_ERR(priv->clk);
}
err = clk_prepare_enable(priv->clk);
if (err < 0)
return err;
priv->extclk = devm_clk_get(&pdev->dev, "extclk");
if (IS_ERR(priv->extclk)) {
if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
return -EPROBE_DEFER;
} else {
if (priv->extclk == priv->clk) {
devm_clk_put(&pdev->dev, priv->extclk);
priv->extclk = ERR_PTR(-EINVAL);
} else {
dev_info(&pdev->dev, "found external clock\n");
clk_prepare_enable(priv->extclk);
soc_dai = kirkwood_i2s_dai_extclk;
}
}
/* Some sensible defaults - this reflects the powerup values */
priv->ctl_play = KIRKWOOD_PLAYCTL_SIZE_24;
priv->ctl_rec = KIRKWOOD_RECCTL_SIZE_24;
/* Select the burst size */
if (priv->burst == 32) {
priv->ctl_play |= KIRKWOOD_PLAYCTL_BURST_32;
priv->ctl_rec |= KIRKWOOD_RECCTL_BURST_32;
} else {
priv->ctl_play |= KIRKWOOD_PLAYCTL_BURST_128;
priv->ctl_rec |= KIRKWOOD_RECCTL_BURST_128;
}
err = snd_soc_register_component(&pdev->dev, &kirkwood_i2s_component,
soc_dai, 2);
if (err) {
dev_err(&pdev->dev, "snd_soc_register_component failed\n");
goto err_component;
}
err = snd_soc_register_platform(&pdev->dev, &kirkwood_soc_platform);
if (err) {
dev_err(&pdev->dev, "snd_soc_register_platform failed\n");
goto err_platform;
}
kirkwood_i2s_init(priv);
return 0;
err_platform:
snd_soc_unregister_component(&pdev->dev);
err_component:
if (!IS_ERR(priv->extclk))
clk_disable_unprepare(priv->extclk);
clk_disable_unprepare(priv->clk);
return err;
}
开发者ID:3null,项目名称:linux,代码行数:99,代码来源:kirkwood-i2s.c
示例19: mt76xx_pcm_init
static int __init mt76xx_pcm_init(void)
{
printk("******* %s *******\n", __func__);
return snd_soc_register_platform(&mt76xx_soc_platform);
}
开发者ID:openspeaker,项目名称:os-wrt-cc,代码行数:6,代码来源:mt76xx_pcm.c
示例20: msm_pcm_probe
static __devinit int msm_pcm_probe(struct platform_device *pdev)
{
pr_debug("%s: dev name %s\n", __func__, dev_name(&pdev->dev));
return snd_soc_register_platform(&pdev->dev,
&msm_soc_platform);
}
开发者ID:ShinySide,项目名称:HispAsian_Kernel_NH7,代码行数:6,代码来源:msm-pcm-voice.c
注:本文中的snd_soc_register_platform函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论