本文整理汇总了C++中snd_soc_register_component函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_soc_register_component函数的具体用法?C++ snd_soc_register_component怎么用?C++ snd_soc_register_component使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snd_soc_register_component函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: msm_dai_stub_dev_probe
static int msm_dai_stub_dev_probe(struct platform_device *pdev)
{
int rc, id = -1;
const char *stub_dev_id = "qcom,msm-dai-stub-dev-id";
rc = of_property_read_u32(pdev->dev.of_node, stub_dev_id, &id);
if (rc) {
dev_err(&pdev->dev,
"%s: missing %s in dt node\n", __func__, stub_dev_id);
return rc;
}
pdev->id = id;
dev_set_name(&pdev->dev, "%s.%d", "msm-dai-stub-dev", id);
pr_debug("%s: dev name %s, id:%d\n", __func__,
dev_name(&pdev->dev), pdev->id);
switch (id) {
case STUB_RX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_stub_dai_rx, 1);
break;
case STUB_TX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_stub_dai_tx[0], 1);
break;
case STUB_1_TX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_stub_dai_tx[1], 1);
break;
case STUB_DTMF_TX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component,
&msm_dai_stub_dtmf_tx_dai, 1);
break;
case STUB_HOST_RX_CAPTURE_TX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component,
&msm_dai_stub_host_capture_tx_dai[0], 1);
break;
case STUB_HOST_TX_CAPTURE_TX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component,
&msm_dai_stub_host_capture_tx_dai[1], 1);
break;
case STUB_HOST_RX_PLAYBACK_RX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component,
&msm_dai_stub_host_playback_rx_dai[0], 1);
break;
case STUB_HOST_TX_PLAYBACK_RX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component,
&msm_dai_stub_host_playback_rx_dai[1], 1);
break;
}
return rc;
}
开发者ID:Nothing-Dev,项目名称:android_kernel_huawei_hwY635,代码行数:60,代码来源:msm-dai-stub-v2.c
示例2: sst_byt_pcm_dev_probe
static int sst_byt_pcm_dev_probe(struct platform_device *pdev)
{
struct sst_pdata *sst_pdata = dev_get_platdata(&pdev->dev);
int ret;
ret = sst_byt_dsp_init(&pdev->dev, sst_pdata);
if (ret < 0)
return -ENODEV;
ret = snd_soc_register_platform(&pdev->dev, &byt_soc_platform);
if (ret < 0)
goto err_plat;
ret = snd_soc_register_component(&pdev->dev, &byt_dai_component,
byt_dais, ARRAY_SIZE(byt_dais));
if (ret < 0)
goto err_comp;
return 0;
err_comp:
snd_soc_unregister_platform(&pdev->dev);
err_plat:
sst_byt_dsp_free(&pdev->dev, sst_pdata);
return ret;
}
开发者ID:Nukil,项目名称:linux-2.6,代码行数:26,代码来源:sst-baytrail-pcm.c
示例3: pxa2xx_ac97_dev_probe
static int pxa2xx_ac97_dev_probe(struct platform_device *pdev)
{
int ret;
if (pdev->id != -1) {
dev_err(&pdev->dev, "PXA2xx has only one AC97 port.\n");
return -ENXIO;
}
ret = pxa2xx_ac97_hw_probe(pdev);
if (ret) {
dev_err(&pdev->dev, "PXA2xx AC97 hw probe error (%d)\n", ret);
return ret;
}
ret = snd_soc_set_ac97_ops(&pxa2xx_ac97_ops);
if (ret != 0)
return ret;
/* Punt most of the init to the SoC probe; we may need the machine
* driver to do interesting things with the clocking to get us up
* and running.
*/
return snd_soc_register_component(&pdev->dev, &pxa_ac97_component,
pxa_ac97_dai_driver, ARRAY_SIZE(pxa_ac97_dai_driver));
}
开发者ID:020gzh,项目名称:linux,代码行数:26,代码来源:pxa2xx-ac97.c
示例4: 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;
}
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:ratsbu11,项目名称:android_kernel_asus_zenfone5,代码行数:33,代码来源:pcm.c
示例5: asoc_ssc_init
static int asoc_ssc_init(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct ssc_device *ssc = platform_get_drvdata(pdev);
int ret;
ret = snd_soc_register_component(dev, &atmel_ssc_component,
&atmel_ssc_dai, 1);
if (ret) {
dev_err(dev, "Could not register DAI: %d\n", ret);
goto err;
}
if (ssc->pdata->use_dma)
ret = atmel_pcm_dma_platform_register(dev);
else
ret = atmel_pcm_pdc_platform_register(dev);
if (ret) {
dev_err(dev, "Could not register PCM: %d\n", ret);
goto err_unregister_dai;
}
return 0;
err_unregister_dai:
snd_soc_unregister_component(dev);
err:
return ret;
}
开发者ID:BozkurTR,项目名称:kernel,代码行数:30,代码来源:atmel_ssc_dai.c
示例6: msm_dai_q6_hdmi_dev_probe
/* To do: change to register DAIs as batch */
static int msm_dai_q6_hdmi_dev_probe(struct platform_device *pdev)
{
int rc, id;
const char *q6_dev_id = "qcom,msm-dai-q6-dev-id";
rc = of_property_read_u32(pdev->dev.of_node, q6_dev_id, &id);
if (rc) {
dev_err(&pdev->dev,
"%s: missing %s in dt node\n", __func__, q6_dev_id);
return rc;
}
pdev->id = id;
dev_set_name(&pdev->dev, "%s.%d", "msm-dai-q6-hdmi", id);
pr_debug("%s: dev name %s, id:%d\n", __func__,
dev_name(&pdev->dev), pdev->id);
switch (pdev->id) {
case HDMI_RX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_hdmi_q6_component,
&msm_dai_q6_hdmi_hdmi_rx_dai, 1);
break;
default:
dev_err(&pdev->dev, "invalid device ID %d\n", pdev->id);
rc = -ENODEV;
break;
}
return rc;
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:32,代码来源:msm-dai-q6-hdmi-v2.c
示例7: ath79_i2s_drv_probe
static int ath79_i2s_drv_probe(struct platform_device *pdev)
{
printk("%s\n", __FUNCTION__);
spin_lock_init(&ath79_stereo_lock);
ath79_stereo_reset();
return snd_soc_register_component(&pdev->dev, &ath79_i2s_component, &ath79_i2s_dai, 1);
}
开发者ID:bright-things,项目名称:ionic-bt-public,代码行数:8,代码来源:ath79-i2s.c
示例8: msm_fe_dai_dev_probe
static int msm_fe_dai_dev_probe(struct platform_device *pdev)
{
dev_dbg(&pdev->dev, "%s: dev name %s\n", __func__,
dev_name(&pdev->dev));
return snd_soc_register_component(&pdev->dev, &msm_fe_dai_component,
msm_fe_dais, ARRAY_SIZE(msm_fe_dais));
}
开发者ID:AudioGod,项目名称:Gods_kernel_yu_msm8916,代码行数:8,代码来源:msm-dai-fe.c
示例9: au1xac97c_drvprobe
static int au1xac97c_drvprobe(struct platform_device *pdev)
{
int ret;
struct resource *iores, *dmares;
struct au1xpsc_audio_data *ctx;
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;
mutex_init(&ctx->lock);
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!iores)
return -ENODEV;
if (!devm_request_mem_region(&pdev->dev, iores->start,
resource_size(iores),
pdev->name))
return -EBUSY;
ctx->mmio = devm_ioremap_nocache(&pdev->dev, iores->start,
resource_size(iores));
if (!ctx->mmio)
return -EBUSY;
dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
if (!dmares)
return -EBUSY;
ctx->dmaids[SNDRV_PCM_STREAM_PLAYBACK] = dmares->start;
dmares = platform_get_resource(pdev, IORESOURCE_DMA, 1);
if (!dmares)
return -EBUSY;
ctx->dmaids[SNDRV_PCM_STREAM_CAPTURE] = dmares->start;
/* switch it on */
WR(ctx, AC97_ENABLE, EN_D | EN_CE);
WR(ctx, AC97_ENABLE, EN_CE);
ctx->cfg = CFG_RC(3) | CFG_XS(3);
WR(ctx, AC97_CONFIG, ctx->cfg);
platform_set_drvdata(pdev, ctx);
ret = snd_soc_set_ac97_ops(&ac97c_bus_ops);
if (ret)
return ret;
ret = snd_soc_register_component(&pdev->dev, &au1xac97c_component,
&au1xac97c_dai_driver, 1);
if (ret)
return ret;
ac97c_workdata = ctx;
return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:57,代码来源:ac97c.c
示例10: msm_dai_stub_dev_probe
static int msm_dai_stub_dev_probe(struct platform_device *pdev)
{
int rc, id = -1;
const char *stub_dev_id = "qcom,msm-dai-stub-dev-id";
rc = of_property_read_u32(pdev->dev.of_node, stub_dev_id, &id);
if (rc) {
dev_err(&pdev->dev,
"%s: missing %s in dt node\n", __func__, stub_dev_id);
return rc;
}
pdev->id = id;
dev_set_name(&pdev->dev, "%s.%d", "msm-dai-stub-dev", id);
pr_debug("%s: dev name %s, id:%d\n", __func__,
dev_name(&pdev->dev), pdev->id);
switch (id) {
case STUB_RX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_stub_dai_rx, 1);
break;
case STUB_TX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_stub_dai_tx[0], 1);
break;
case STUB_1_TX:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_stub_dai_tx[1], 1);
case TFA9890_LEFT_STUB:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_tfa9890_stub_dai_rx[0], 1);
break;
case TFA9890_RIGHT_STUB:
rc = snd_soc_register_component(&pdev->dev,
&msm_dai_stub_component, &msm_dai_tfa9890_stub_dai_rx[1], 1);
break;
}
return rc;
}
开发者ID:AICP,项目名称:kernel_moto_shamu,代码行数:42,代码来源:msm-dai-stub-v2.c
示例11: msm_dai_q6_hdmi_dev_probe
/* To do: change to register DAIs as batch */
static int msm_dai_q6_hdmi_dev_probe(struct platform_device *pdev)
{
int rc = 0;
dev_info(&pdev->dev, "dev name %s dev-id %d\n",
dev_name(&pdev->dev), pdev->id);
rc = snd_soc_register_component(&pdev->dev, &msm_hdmi_q6_component,
&msm_dai_q6_hdmi_hdmi_rx_dai, 1);
return rc;
}
开发者ID:kongzizaixian,项目名称:kernel,代码行数:12,代码来源:msm-dai-q6-hdmi.c
示例12: au1xpsc_i2s_drvprobe
static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
{
struct resource *iores, *dmares;
unsigned long sel;
struct au1xpsc_audio_data *wd;
wd = devm_kzalloc(&pdev->dev, sizeof(struct au1xpsc_audio_data),
GFP_KERNEL);
if (!wd)
return -ENOMEM;
iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
wd->mmio = devm_ioremap_resource(&pdev->dev, iores);
if (IS_ERR(wd->mmio))
return PTR_ERR(wd->mmio);
dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0);
if (!dmares)
return -EBUSY;
wd->dmaids[SNDRV_PCM_STREAM_PLAYBACK] = dmares->start;
dmares = platform_get_resource(pdev, IORESOURCE_DMA, 1);
if (!dmares)
return -EBUSY;
wd->dmaids[SNDRV_PCM_STREAM_CAPTURE] = dmares->start;
/* preserve PSC clock source set up by platform (dev.platform_data
* is already occupied by soc layer)
*/
sel = __raw_readl(PSC_SEL(wd)) & PSC_SEL_CLK_MASK;
__raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd));
wmb(); /* drain writebuffer */
__raw_writel(PSC_SEL_PS_I2SMODE | sel, PSC_SEL(wd));
__raw_writel(0, I2S_CFG(wd));
wmb(); /* drain writebuffer */
/* preconfigure: set max rx/tx fifo depths */
wd->cfg |= PSC_I2SCFG_RT_FIFO8 | PSC_I2SCFG_TT_FIFO8;
/* don't wait for I2S core to become ready now; clocks may not
* be running yet; depending on clock input for PSC a wait might
* time out.
*/
/* name the DAI like this device instance ("au1xpsc-i2s.PSCINDEX") */
memcpy(&wd->dai_drv, &au1xpsc_i2s_dai_template,
sizeof(struct snd_soc_dai_driver));
wd->dai_drv.name = dev_name(&pdev->dev);
platform_set_drvdata(pdev, wd);
return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component,
&wd->dai_drv, 1);
}
开发者ID:020gzh,项目名称:linux,代码行数:54,代码来源:psc-i2s.c
示例13: spdif_out_probe
static int spdif_out_probe(struct platform_device *pdev)
{
struct spdif_out_dev *host;
struct spear_spdif_platform_data *pdata;
struct resource *res;
int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -EINVAL;
if (!devm_request_mem_region(&pdev->dev, res->start,
resource_size(res), pdev->name)) {
dev_warn(&pdev->dev, "Failed to get memory resourse\n");
return -ENOENT;
}
host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL);
if (!host) {
dev_warn(&pdev->dev, "kzalloc fail\n");
return -ENOMEM;
}
host->io_base = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (!host->io_base) {
dev_warn(&pdev->dev, "ioremap failed\n");
return -ENOMEM;
}
host->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(host->clk))
return PTR_ERR(host->clk);
pdata = dev_get_platdata(&pdev->dev);
host->dma_params.data = pdata->dma_params;
host->dma_params.addr = res->start + SPDIF_OUT_FIFO_DATA;
host->dma_params.max_burst = 16;
host->dma_params.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
host->dma_params.filter = pdata->filter;
dev_set_drvdata(&pdev->dev, host);
ret = snd_soc_register_component(&pdev->dev, &spdif_out_component,
&spdif_out_dai, 1);
if (ret != 0) {
clk_put(host->clk);
return ret;
}
return 0;
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:53,代码来源:spdif_out.c
示例14: rt5350_pcm_dev_probe
static int rt5350_pcm_dev_probe(struct platform_device *pdev)
{
struct rt5350_pcm *pcm;
int ret;
snd_dmaengine_pcm_register(&pdev->dev,
&rt5350_dmaengine_pcm_config,
SND_DMAENGINE_PCM_FLAG_COMPAT);
pcm = kzalloc(sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return -ENOMEM;
pcm->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!pcm->mem) {
ret = -ENOENT;
goto err_free;
}
pcm->mem = request_mem_region(pcm->mem->start, resource_size(pcm->mem),
pdev->name);
if (!pcm->mem) {
ret = -EBUSY;
goto err_free;
}
pcm->base = ioremap_nocache(pcm->mem->start, resource_size(pcm->mem));
if (!pcm->base) {
ret = -EBUSY;
goto err_release_mem_region;
}
pcm->phys_base = pcm->mem->start;
platform_set_drvdata(pdev, pcm);
ret = snd_soc_register_component(&pdev->dev, &rt5350_pcm_component,
&rt5350_pcm_dai, 1);
if (!ret) {
dev_err(&pdev->dev, "loaded\n");
return ret;
}
dev_err(&pdev->dev, "Failed to register DAI\n");
iounmap(pcm->base);
err_release_mem_region:
release_mem_region(pcm->mem->start, resource_size(pcm->mem));
err_free:
kfree(pcm);
return ret;
}
开发者ID:qrsrjm,项目名称:openwrt-rt5350,代码行数:53,代码来源:rt5350-pcm.c
示例15: psc_i2s_of_probe
/* ---------------------------------------------------------------------
* OF platform bus binding code:
* - Probe/remove operations
* - OF device match table
*/
static int psc_i2s_of_probe(struct platform_device *op)
{
int rc;
struct psc_dma *psc_dma;
struct mpc52xx_psc __iomem *regs;
rc = mpc5200_audio_dma_create(op);
if (rc != 0)
return rc;
rc = snd_soc_register_component(&op->dev, &psc_i2s_component,
psc_i2s_dai, ARRAY_SIZE(psc_i2s_dai));
if (rc != 0) {
pr_err("Failed to register DAI\n");
return rc;
}
psc_dma = dev_get_drvdata(&op->dev);
regs = psc_dma->psc_regs;
/* Configure the serial interface mode; defaulting to CODEC8 mode */
psc_dma->sicr = MPC52xx_PSC_SICR_DTS1 | MPC52xx_PSC_SICR_I2S |
MPC52xx_PSC_SICR_CLKPOL;
out_be32(&psc_dma->psc_regs->sicr,
psc_dma->sicr | MPC52xx_PSC_SICR_SIM_CODEC_8);
/* Check for the codec handle. If it is not present then we
* are done */
if (!of_get_property(op->dev.of_node, "codec-handle", NULL))
return 0;
/* Due to errata in the dma mode; need to line up enabling
* the transmitter with a transition on the frame sync
* line */
/* first make sure it is low */
while ((in_8(®s->ipcr_acr.ipcr) & 0x80) != 0)
;
/* then wait for the transition to high */
while ((in_8(®s->ipcr_acr.ipcr) & 0x80) == 0)
;
/* Finally, enable the PSC.
* Receiver must always be enabled; even when we only want
* transmit. (see 15.3.2.3 of MPC5200B User's Guide) */
/* Go */
out_8(&psc_dma->psc_regs->command,
MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE);
return 0;
}
开发者ID:3null,项目名称:linux,代码行数:57,代码来源:mpc5200_psc_i2s.c
示例16: tegra_soc_platform_probe
static int tegra_soc_platform_probe(struct platform_device *pdev)
{
int ret = 0;
tegra_pcm_platform_register(&pdev->dev);
ret = snd_soc_register_component(&pdev->dev, &tegra_fast_pcm_component,
tegra_fast_dai, ARRAY_SIZE(tegra_fast_dai));
if (ret)
dev_err(&pdev->dev, "Could not register component: %d\n", ret);
return 0;
}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:13,代码来源:tegra_pcm.c
示例17: asoc_dmic_probe
static int asoc_dmic_probe(struct platform_device *pdev)
{
struct omap_dmic *dmic;
struct resource *res;
int ret;
dmic = devm_kzalloc(&pdev->dev, sizeof(struct omap_dmic), GFP_KERNEL);
if (!dmic)
return -ENOMEM;
platform_set_drvdata(pdev, dmic);
dmic->dev = &pdev->dev;
dmic->sysclk = OMAP_DMIC_SYSCLK_SYNC_MUX_CLKS;
mutex_init(&dmic->mutex);
dmic->fclk = clk_get(dmic->dev, "fck");
if (IS_ERR(dmic->fclk)) {
dev_err(dmic->dev, "cant get fck\n");
return -ENODEV;
}
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dma");
if (!res) {
dev_err(dmic->dev, "invalid dma memory resource\n");
ret = -ENODEV;
goto err_put_clk;
}
dmic->dma_data.addr = res->start + OMAP_DMIC_DATA_REG;
dmic->dma_data.filter_data = "up_link";
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
dmic->io_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(dmic->io_base)) {
ret = PTR_ERR(dmic->io_base);
goto err_put_clk;
}
ret = snd_soc_register_component(&pdev->dev, &omap_dmic_component,
&omap_dmic_dai, 1);
if (ret)
goto err_put_clk;
return 0;
err_put_clk:
clk_put(dmic->fclk);
return ret;
}
开发者ID:AeroGirl,项目名称:VAR-SOM-AM33-SDK7-Kernel,代码行数:51,代码来源:omap-dmic.c
示例18: mtk_routing_dev_probe
static int mtk_routing_dev_probe(struct platform_device *pdev)
{
int rc = 0;
pr_debug("mtk_routing_dev_probe name %s\n", dev_name(&pdev->dev));
if (pdev->dev.of_node) {
dev_set_name(&pdev->dev, "%s", MT_SOC_ROUTING_DAI_NAME);
}
pr_debug("%s: dev name %s\n", __func__, dev_name(&pdev->dev));
rc = snd_soc_register_component(&pdev->dev, &dai_routing_component,
mtk_routing_dai, ARRAY_SIZE(mtk_routing_dai));
return rc;
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:15,代码来源:mt_soc_dai_routing.c
示例19: sprd_vaudio_drv_probe
static int sprd_vaudio_drv_probe(struct platform_device *pdev)
{
int ret;
sp_asoc_pr_dbg("%s\n", __func__);
ret =
snd_soc_register_component(&pdev->dev, &sprd_vaudio_component,
sprd_vaudio_dai,
ARRAY_SIZE(sprd_vaudio_dai));
sp_asoc_pr_dbg("return %i\n", ret);
return ret;
}
开发者ID:NhlalukoG,项目名称:android_kernel_samsung_goyave3g,代码行数:15,代码来源:vaudio.c
示例20: mtk_dai_stub_dev_probe
static int mtk_dai_stub_dev_probe(struct platform_device *pdev)
{
int rc = 0;
printk("mtk_dai_stub_dev_probe name %s\n", dev_name(&pdev->dev));
if (pdev->dev.of_node)
{
dev_set_name(&pdev->dev, "%s", MT_SOC_DAI_NAME);
}
printk("%s: dev name %s\n", __func__, dev_name(&pdev->dev));
rc = snd_soc_register_component(&pdev->dev, &mt_dai_component,
mtk_dai_stub_dai, ARRAY_SIZE(mtk_dai_stub_dai));
printk("%s: rc = %d\n", __func__, rc);
return rc;
}
开发者ID:Scorpio92,项目名称:mediatek,代码行数:18,代码来源:mt_soc_dai_stub.c
注:本文中的snd_soc_register_component函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论