本文整理汇总了C++中snd_soc_unregister_dai函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_soc_unregister_dai函数的具体用法?C++ snd_soc_unregister_dai怎么用?C++ snd_soc_unregister_dai使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snd_soc_unregister_dai函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: msm_dai_q6_dai_auxpcm_remove
static int msm_dai_q6_dai_auxpcm_remove(struct snd_soc_dai *dai)
{
struct msm_dai_q6_dai_data *dai_data;
int rc;
dai_data = dev_get_drvdata(dai->dev);
mutex_lock(&aux_pcm_mutex);
if (aux_pcm_count == 0) {
dev_dbg(dai->dev, "%s(): dai->id %d aux_pcm_count is 0. clean"
" up and return\n", __func__, dai->id);
goto done;
}
aux_pcm_count--;
if (aux_pcm_count > 0) {
dev_dbg(dai->dev, "%s(): dai->id %d aux_pcm_count = %d\n",
__func__, dai->id, aux_pcm_count);
goto done;
} else if (aux_pcm_count < 0) {
dev_err(dai->dev, "%s(): ERROR: dai->id %d"
" aux_pcm_count = %d < 0\n",
__func__, dai->id, aux_pcm_count);
goto done;
}
dev_dbg(dai->dev, "%s(): dai->id %d aux_pcm_count = %d."
"closing afe\n",
__func__, dai->id, aux_pcm_count);
rc = afe_close(PCM_RX); /* can block */
if (IS_ERR_VALUE(rc))
dev_err(dai->dev, "fail to close AUX PCM RX AFE port\n");
rc = afe_close(PCM_TX);
if (IS_ERR_VALUE(rc))
dev_err(dai->dev, "fail to close AUX PCM TX AFE port\n");
done:
kfree(dai_data);
snd_soc_unregister_dai(dai->dev);
mutex_unlock(&aux_pcm_mutex);
return 0;
}
开发者ID:ms79723,项目名称:HTC-Jewel-Kernel-OC,代码行数:48,代码来源:msm-dai-q6.c
示例2: wm8903_i2c_remove
static __devexit int wm8903_i2c_remove(struct i2c_client *client)
{
struct snd_soc_codec *codec = i2c_get_clientdata(client);
snd_soc_unregister_dai(&wm8903_dai);
snd_soc_unregister_codec(codec);
wm8903_set_bias_level(codec, SND_SOC_BIAS_OFF);
kfree(codec->private_data);
wm8903_codec = NULL;
wm8903_dai.dev = NULL;
return 0;
}
开发者ID:A2109devs,项目名称:lenovo_a2109a_kernel,代码行数:16,代码来源:wm8903.c
示例3: s3c64xx_i2sv4_dev_remove
static __devexit int s3c64xx_i2sv4_dev_remove(struct platform_device *pdev)
{
struct s3c_i2sv2_info *i2s = &s3c64xx_i2sv4;
struct resource *res;
snd_soc_unregister_dai(&pdev->dev);
clk_put(i2s->iis_cclk);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res)
release_mem_region(res->start, resource_size(res));
else
dev_warn(&pdev->dev, "Unable to get I2S SFR address\n");
return 0;
}
开发者ID:Adjustxx,项目名称:Savaged-Zen,代码行数:16,代码来源:s3c64xx-i2s-v4.c
示例4: davinci_mcasp_remove
static int davinci_mcasp_remove(struct platform_device *pdev)
{
struct davinci_audio_dev *dev = dev_get_drvdata(&pdev->dev);
struct resource *mem;
snd_soc_unregister_dai(&pdev->dev);
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem->start, resource_size(mem));
if (dev->version == MCASP_VERSION_3)
kfree(dev->xrsrctl);
kfree(dev);
return 0;
}
开发者ID:ravishankarkm,项目名称:openboard-source-code,代码行数:16,代码来源:davinci-mcasp.c
示例5: fsl_ssi_remove
static int fsl_ssi_remove(struct platform_device *pdev)
{
struct fsl_ssi_private *ssi_private = dev_get_drvdata(&pdev->dev);
platform_device_unregister(ssi_private->pdev);
snd_soc_unregister_dai(&pdev->dev);
device_remove_file(&pdev->dev, &ssi_private->dev_attr);
free_irq(ssi_private->irq, ssi_private);
irq_dispose_mapping(ssi_private->irq);
kfree(ssi_private);
dev_set_drvdata(&pdev->dev, NULL);
return 0;
}
开发者ID:33d,项目名称:linux-2.6.21-hh20,代码行数:16,代码来源:fsl_ssi.c
示例6: jz4740_i2s_dev_remove
static int __devexit jz4740_i2s_dev_remove(struct platform_device *pdev)
{
struct jz4740_i2s *i2s = platform_get_drvdata(pdev);
snd_soc_unregister_dai(&pdev->dev);
clk_put(i2s->clk_i2s);
clk_put(i2s->clk_aic);
iounmap(i2s->base);
release_mem_region(i2s->mem->start, resource_size(i2s->mem));
platform_set_drvdata(pdev, NULL);
kfree(i2s);
return 0;
}
开发者ID:Adjustxx,项目名称:Savaged-Zen,代码行数:17,代码来源:jz4740-i2s.c
示例7: davinci_mcasp_remove
static int davinci_mcasp_remove(struct platform_device *pdev)
{
struct davinci_audio_dev *dev = dev_get_drvdata(&pdev->dev);
struct resource *mem;
snd_soc_unregister_dai(&pdev->dev);
clk_disable(dev->clk);
clk_put(dev->clk);
dev->clk = NULL;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem->start, (mem->end - mem->start) + 1);
kfree(dev);
return 0;
}
开发者ID:CallMeVentus,项目名称:i9070_kernel_CoCore-P,代码行数:17,代码来源:davinci-mcasp.c
示例8: asoc_mcbsp_remove
static int asoc_mcbsp_remove(struct platform_device *pdev)
{
struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
snd_soc_unregister_dai(&pdev->dev);
if (mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp->pdata->ops->free(mcbsp->id);
omap_mcbsp_sysfs_remove(mcbsp);
clk_put(mcbsp->fclk);
platform_set_drvdata(pdev, NULL);
return 0;
}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:17,代码来源:omap-mcbsp.c
示例9: mxs_saif_remove
static int __devexit mxs_saif_remove(struct platform_device *pdev)
{
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct mxs_saif *saif = platform_get_drvdata(pdev);
platform_device_unregister(saif->soc_platform_pdev);
snd_soc_unregister_dai(&pdev->dev);
iounmap(saif->base);
release_mem_region(res->start, resource_size(res));
free_irq(saif->irq, saif);
clk_put(saif->clk);
kfree(saif);
return 0;
}
开发者ID:33d,项目名称:linux-2.6.21-hh20,代码行数:18,代码来源:mxs-saif.c
示例10: au1xpsc_i2s_drvremove
static int __devexit au1xpsc_i2s_drvremove(struct platform_device *pdev)
{
struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
snd_soc_unregister_dai(&pdev->dev);
au_writel(0, I2S_CFG(wd));
au_sync();
au_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd));
au_sync();
iounmap(wd->mmio);
release_mem_region(r->start, resource_size(r));
kfree(wd);
return 0;
}
开发者ID:454053205,项目名称:linux,代码行数:18,代码来源:psc-i2s.c
示例11: davinci_mcasp_remove
static int davinci_mcasp_remove(struct platform_device *pdev)
{
struct snd_platform_data *pdata = pdev->dev.platform_data;
struct davinci_audio_dev *dev;
struct resource *mem;
snd_soc_unregister_dai(&davinci_mcasp_dai[pdata->op_mode]);
dev = davinci_mcasp_dai[pdata->op_mode].private_data;
clk_disable(dev->clk);
clk_put(dev->clk);
dev->clk = NULL;
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem->start, (mem->end - mem->start) + 1);
kfree(dev);
return 0;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:19,代码来源:davinci-mcasp.c
示例12: s3c_pcm_dev_remove
static __devexit int s3c_pcm_dev_remove(struct platform_device *pdev)
{
struct s3c_pcm_info *pcm = &s3c_pcm[pdev->id];
struct resource *mem_res;
snd_soc_unregister_dai(&pdev->dev);
iounmap(pcm->regs);
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem_res->start, resource_size(mem_res));
clk_disable(pcm->cclk);
clk_disable(pcm->pclk);
clk_put(pcm->pclk);
clk_put(pcm->cclk);
return 0;
}
开发者ID:Adjustxx,项目名称:Savaged-Zen,代码行数:19,代码来源:s3c-pcm.c
示例13: spdif_remove
static __devexit int spdif_remove(struct platform_device *pdev)
{
struct snd_soc_dai *dai = &samsung_spdif_dai;
struct samsung_spdif_info *spdif = &spdif_info;
struct resource *mem_res;
snd_soc_unregister_dai(dai);
iounmap(spdif->regs);
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(mem_res->start, resource_size(mem_res));
clk_disable(spdif->pclk);
clk_disable(spdif->sclk);
clk_put(spdif->pclk);
clk_put(spdif->sclk);
return 0;
}
开发者ID:FrozenData,项目名称:SGS2-Kernel-Update2,代码行数:20,代码来源:spdif.c
示例14: twl6040_codec_remove
static int __devexit twl6040_codec_remove(struct platform_device *pdev)
{
struct twl6040_data *priv = snd_soc_codec_get_drvdata(twl6040_codec);
int audpwron = priv->audpwron;
int naudint = priv->naudint;
if (gpio_is_valid(audpwron))
gpio_free(audpwron);
if (naudint)
free_irq(naudint, twl6040_codec);
snd_soc_unregister_dai(&twl6040_dai);
snd_soc_unregister_codec(twl6040_codec);
kfree(twl6040_codec);
twl6040_codec = NULL;
return 0;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:20,代码来源:twl6040.c
示例15: asoc_dmic_remove
static int __devexit asoc_dmic_remove(struct platform_device *pdev)
{
struct tegra_dmic *dmic = platform_get_drvdata(pdev);
struct resource *res;
tegra_dmic_debug_remove(dmic);
snd_soc_unregister_dai(&pdev->dev);
iounmap(dmic->io_base);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(res->start, resource_size(res));
if (dmic->parent)
clk_put(dmic->parent);
if (dmic->clk)
clk_put(dmic->clk);
kfree(dmic);
return 0;
}
开发者ID:Packmaan7144,项目名称:kernel_nvidia_s8515,代码行数:21,代码来源:tegra_dmic.c
示例16: sun7i_pcm_dev_remove
static int __devexit sun7i_pcm_dev_remove(struct platform_device *pdev)
{
if(pcm_used) {
pcm_used = 0;
if ((NULL == i2s_moduleclk) ||(IS_ERR(i2s_moduleclk))) {
printk("i2s_moduleclk handle is invalid, just return\n");
return -EFAULT;
} else {
/*release the module clock*/
clk_disable(i2s_moduleclk);
}
if ((NULL == i2s_pllx8) ||(IS_ERR(i2s_pllx8))) {
printk("i2s_pllx8 handle is invalid, just return\n");
return -EFAULT;
} else {
/*release pllx8clk*/
clk_put(i2s_pllx8);
}
if ((NULL == i2s_pll2clk) ||(IS_ERR(i2s_pll2clk))) {
printk("i2s_pll2clk handle is invalid, just return\n");
return -EFAULT;
} else {
/*release pll2clk*/
clk_put(i2s_pll2clk);
}
if ((NULL == i2s_apbclk) ||(IS_ERR(i2s_apbclk))) {
printk("i2s_apbclk handle is invalid, just return\n");
return -EFAULT;
} else {
/*release apbclk*/
clk_put(i2s_apbclk);
/*gpio_release(i2s_handle, 2);*/
snd_soc_unregister_dai(&pdev->dev);
platform_set_drvdata(pdev, NULL);
}
}
return 0;
}
开发者ID:mfkiwl,项目名称:PhoenixA20_linux_sourcecode,代码行数:39,代码来源:sun7i-pcm.c
示例17: au1xpsc_i2s_drvremove
static int __devexit au1xpsc_i2s_drvremove(struct platform_device *pdev)
{
struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev);
if (wd->dmapd)
au1xpsc_pcm_destroy(wd->dmapd);
snd_soc_unregister_dai(&au1xpsc_i2s_dai);
au_writel(0, I2S_CFG(wd));
au_sync();
au_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd));
au_sync();
iounmap(wd->mmio);
release_resource(wd->ioarea);
kfree(wd->ioarea);
kfree(wd);
au1xpsc_i2s_workdata = NULL; /* MDEV */
return 0;
}
开发者ID:KaZoom,项目名称:buildroot-linux-kernel-m3,代码行数:23,代码来源:psc-i2s.c
示例18: fsl_ssi_probe
//.........这里部分代码省略.........
return -ENODEV;
}
/* The DAI name is the last part of the full name of the node. */
p = strrchr(np->full_name, '/') + 1;
ssi_private = kzalloc(sizeof(struct fsl_ssi_private) + strlen(p),
GFP_KERNEL);
if (!ssi_private) {
dev_err(&pdev->dev, "could not allocate DAI object\n");
return -ENOMEM;
}
strcpy(ssi_private->name, p);
/* Initialize this copy of the CPU DAI driver structure */
memcpy(&ssi_private->cpu_dai_drv, &fsl_ssi_dai_template,
sizeof(fsl_ssi_dai_template));
ssi_private->cpu_dai_drv.name = ssi_private->name;
/* Get the addresses and IRQ */
ret = of_address_to_resource(np, 0, &res);
if (ret) {
dev_err(&pdev->dev, "could not determine device resources\n");
kfree(ssi_private);
return ret;
}
ssi_private->ssi = ioremap(res.start, 1 + res.end - res.start);
ssi_private->ssi_phys = res.start;
ssi_private->irq = irq_of_parse_and_map(np, 0);
/* Are the RX and the TX clocks locked? */
if (of_find_property(np, "fsl,ssi-asynchronous", NULL))
ssi_private->asynchronous = 1;
else
ssi_private->cpu_dai_drv.symmetric_rates = 1;
/* Determine the FIFO depth. */
iprop = of_get_property(np, "fsl,fifo-depth", NULL);
if (iprop)
ssi_private->fifo_depth = *iprop;
else
/* Older 8610 DTs didn't have the fifo-depth property */
ssi_private->fifo_depth = 8;
/* Initialize the the device_attribute structure */
dev_attr = &ssi_private->dev_attr;
dev_attr->attr.name = "statistics";
dev_attr->attr.mode = S_IRUGO;
dev_attr->show = fsl_sysfs_ssi_show;
ret = device_create_file(&pdev->dev, dev_attr);
if (ret) {
dev_err(&pdev->dev, "could not create sysfs %s file\n",
ssi_private->dev_attr.attr.name);
goto error;
}
/* Register with ASoC */
dev_set_drvdata(&pdev->dev, ssi_private);
ret = snd_soc_register_dai(&pdev->dev, &ssi_private->cpu_dai_drv);
if (ret) {
dev_err(&pdev->dev, "failed to register DAI: %d\n", ret);
goto error;
}
/* Trigger the machine driver's probe function. The platform driver
* name of the machine driver is taken from the /model property of the
* device tree. We also pass the address of the CPU DAI driver
* structure.
*/
sprop = of_get_property(of_find_node_by_path("/"), "model", NULL);
/* Sometimes the model name has a "fsl," prefix, so we strip that. */
p = strrchr(sprop, ',');
if (p)
sprop = p + 1;
snprintf(name, sizeof(name), "snd-soc-%s", sprop);
make_lowercase(name);
ssi_private->pdev =
platform_device_register_data(&pdev->dev, name, 0, NULL, 0);
if (IS_ERR(ssi_private->pdev)) {
ret = PTR_ERR(ssi_private->pdev);
dev_err(&pdev->dev, "failed to register platform: %d\n", ret);
goto error;
}
return 0;
error:
snd_soc_unregister_dai(&pdev->dev);
dev_set_drvdata(&pdev->dev, NULL);
if (dev_attr)
device_remove_file(&pdev->dev, dev_attr);
irq_dispose_mapping(ssi_private->irq);
iounmap(ssi_private->ssi);
kfree(ssi_private);
return ret;
}
开发者ID:ANFS,项目名称:ANFS-kernel,代码行数:101,代码来源:fsl_ssi.c
示例19: au1xpsc_ac97_exit
static void __exit au1xpsc_ac97_exit(void)
{
snd_soc_unregister_dai(&au1xpsc_ac97_dai);
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:4,代码来源:psc-ac97.c
示例20: s3c2412_iis_dev_remove
static __devexit int s3c2412_iis_dev_remove(struct platform_device *pdev)
{
snd_soc_unregister_dai(&pdev->dev);
return 0;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:5,代码来源:s3c2412-i2s.c
注:本文中的snd_soc_unregister_dai函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论