• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ snd_soc_unregister_codec函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: sta32x_i2c_remove

static int sta32x_i2c_remove(struct i2c_client *client)
{
	snd_soc_unregister_codec(&client->dev);
	return 0;
}
开发者ID:908626950,项目名称:linux,代码行数:5,代码来源:sta32x.c


示例2: lm4857_i2c_remove

static int __devexit lm4857_i2c_remove(struct i2c_client *i2c)
{
	snd_soc_unregister_codec(&i2c->dev);
	return 0;
}
开发者ID:404992361,项目名称:mi1_kernel,代码行数:5,代码来源:lm4857.c


示例3: pcm179x_common_exit

int pcm179x_common_exit(struct device *dev)
{
	snd_soc_unregister_codec(dev);
	return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:5,代码来源:pcm179x.c


示例4: ak4642_i2c_remove

static __devexit int ak4642_i2c_remove(struct i2c_client *client)
{
    snd_soc_unregister_codec(&client->dev);
    return 0;
}
开发者ID:adyjl,项目名称:DORIMANX_LG_STOCK_LP_KERNEL,代码行数:5,代码来源:ak4642.c


示例5: msm_hdmi_audio_codec_rx_plat_remove

static int msm_hdmi_audio_codec_rx_plat_remove(
		struct platform_device *pdev)
{
	snd_soc_unregister_codec(&pdev->dev);
	return 0;
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:6,代码来源:msm_hdmi_codec_rx.c


示例6: es7134_remove

static int es7134_remove(struct platform_device *pdev)
{
	snd_soc_unregister_codec(&pdev->dev);
	return 0;
}
开发者ID:asmalldev,项目名称:linux,代码行数:5,代码来源:es7134.c


示例7: cs4271_i2c_remove

static int __devexit cs4271_i2c_remove(struct i2c_client *client)
{
	snd_soc_unregister_codec(&client->dev);
	return 0;
}
开发者ID:adyjl,项目名称:DORIMANX_LG_STOCK_LP_KERNEL,代码行数:5,代码来源:cs4271.c


示例8: wm8741_i2c_remove

static int wm8741_i2c_remove(struct i2c_client *client)
{
	snd_soc_unregister_codec(&client->dev);
	kfree(i2c_get_clientdata(client));
	return 0;
}
开发者ID:454053205,项目名称:linux,代码行数:6,代码来源:wm8741.c


示例9: wm8961_register


//.........这里部分代码省略.........
	INIT_LIST_HEAD(&codec->dapm_paths);

	snd_soc_codec_set_drvdata(codec, wm8961);
	codec->name = "WM8961";
	codec->owner = THIS_MODULE;
	codec->dai = &wm8961_dai;
	codec->num_dai = 1;
	codec->reg_cache_size = ARRAY_SIZE(wm8961->reg_cache);
	codec->reg_cache = &wm8961->reg_cache;
	codec->bias_level = SND_SOC_BIAS_OFF;
	codec->set_bias_level = wm8961_set_bias_level;
	codec->volatile_register = wm8961_volatile_register;

	memcpy(codec->reg_cache, wm8961_reg_defaults,
	       sizeof(wm8961_reg_defaults));

	ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
		goto err;
	}

	reg = snd_soc_read(codec, WM8961_SOFTWARE_RESET);
	if (reg != 0x1801) {
		dev_err(codec->dev, "Device is not a WM8961: ID=0x%x\n", reg);
		ret = -EINVAL;
		goto err;
	}

	/* This isn't volatile - readback doesn't correspond to write */
	reg = codec->hw_read(codec, WM8961_RIGHT_INPUT_VOLUME);
	dev_info(codec->dev, "WM8961 family %d revision %c\n",
		 (reg & WM8961_DEVICE_ID_MASK) >> WM8961_DEVICE_ID_SHIFT,
		 ((reg & WM8961_CHIP_REV_MASK) >> WM8961_CHIP_REV_SHIFT)
		 + 'A');

	ret = wm8961_reset(codec);
	if (ret < 0) {
		dev_err(codec->dev, "Failed to issue reset\n");
		return ret;
	}

	/* Enable class W */
	reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_B);
	reg |= WM8961_CP_DYN_PWR_MASK;
	snd_soc_write(codec, WM8961_CHARGE_PUMP_B, reg);

	/* Latch volume update bits (right channel only, we always
	 * write both out) and default ZC on. */
	reg = snd_soc_read(codec, WM8961_ROUT1_VOLUME);
	snd_soc_write(codec, WM8961_ROUT1_VOLUME,
		     reg | WM8961_LO1ZC | WM8961_OUT1VU);
	snd_soc_write(codec, WM8961_LOUT1_VOLUME, reg | WM8961_LO1ZC);
	reg = snd_soc_read(codec, WM8961_ROUT2_VOLUME);
	snd_soc_write(codec, WM8961_ROUT2_VOLUME,
		     reg | WM8961_SPKRZC | WM8961_SPKVU);
	snd_soc_write(codec, WM8961_LOUT2_VOLUME, reg | WM8961_SPKLZC);

	reg = snd_soc_read(codec, WM8961_RIGHT_ADC_VOLUME);
	snd_soc_write(codec, WM8961_RIGHT_ADC_VOLUME, reg | WM8961_ADCVU);
	reg = snd_soc_read(codec, WM8961_RIGHT_INPUT_VOLUME);
	snd_soc_write(codec, WM8961_RIGHT_INPUT_VOLUME, reg | WM8961_IPVU);

	/* Use soft mute by default */
	reg = snd_soc_read(codec, WM8961_ADC_DAC_CONTROL_2);
	reg |= WM8961_DACSMM;
	snd_soc_write(codec, WM8961_ADC_DAC_CONTROL_2, reg);

	/* Use automatic clocking mode by default; for now this is all
	 * we support.
	 */
	reg = snd_soc_read(codec, WM8961_CLOCKING_3);
	reg &= ~WM8961_MANUAL_MODE;
	snd_soc_write(codec, WM8961_CLOCKING_3, reg);

	wm8961_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

	wm8961_dai.dev = codec->dev;

	wm8961_codec = codec;

	ret = snd_soc_register_codec(codec);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to register codec: %d\n", ret);
		return ret;
	}

	ret = snd_soc_register_dai(&wm8961_dai);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
		snd_soc_unregister_codec(codec);
		return ret;
	}

	return 0;

err:
	kfree(wm8961);
	return ret;
}
开发者ID:Axelfox,项目名称:2.6.35,代码行数:101,代码来源:wm8961.c


示例10: max98505_i2c_probe


//.........这里部分代码省略.........

		ret = of_property_read_u32(i2c->dev.of_node,
				"maxim,adc_threshold", &pdata->vstep.adc_thres);
		if (ret) {
			dev_err(&i2c->dev, "There is no adc_threshold property.");
			pdata->vstep.adc_thres = MAX98505_VSTEP_7;
		}

#ifdef USE_DSM_LOG
		ret = of_property_read_string(i2c->dev.of_node,
			"maxim,log_class", &class_name_log);
		if (ret) {
			dev_err(&i2c->dev, "There is no log_class property.\n");
			class_name_log = DEFAULT_LOG_CLASS_NAME;
		}
#endif /* USE_DSM_LOG */
	} else {
		pdata->sysclk = 12288000;
		pdata->spk_vol = 0x14;
		pdata->vmon_slot = 0;
	}

#ifdef USE_MAX98505_IRQ
	if (pdata != NULL && gpio_is_valid(pdata->irq)) {
		ret = gpio_request(pdata->irq, "max98505_irq_gpio");
		if (ret) {
			dev_err(&i2c->dev, "unable to request gpio [%d]",
					pdata->irq);
			goto err_irq_gpio_req;
		}
		ret = gpio_direction_input(pdata->irq);
		if (ret) {
			dev_err(&i2c->dev,
					"unable to set direction for gpio [%d]",
					pdata->irq);
			goto err_irq_gpio_req;
		}
		i2c->irq = gpio_to_irq(pdata->irq);

		ret = request_threaded_irq(i2c->irq, NULL, max98505_interrupt,
				IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
				"max98505_interrupt", max98505);
		if (ret)
			dev_err(&i2c->dev, "Failed to register interrupt");
	} else {
		dev_err(&i2c->dev, "irq gpio not provided\n");
	}
	dev_dbg(&i2c->dev, "requested irq for max98505");
	goto go_ahead_next_step;

err_irq_gpio_req:
	if (gpio_is_valid(pdata->irq))
		gpio_free(pdata->irq);

go_ahead_next_step:
#endif /* USE_MAX98505_IRQ */

#ifdef CONFIG_SND_SOC_MAXIM_DSM
	maxdsm_init();
	if (pinfo_status)
		maxdsm_update_info(pdata->pinfo);
#endif /* CONFIG_SND_SOC_MAXIM_DSM */

	ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_max98505,
			max98505_dai, ARRAY_SIZE(max98505_dai));
	if (ret) {
		dev_err(&i2c->dev, "Failed to register codec");
		goto err_register_codec;
	}

	max98505->regmap = regmap_init_i2c(i2c, &max98505_regmap);
	if (IS_ERR(max98505->regmap)) {
		ret = PTR_ERR(max98505->regmap);
		dev_err(&i2c->dev, "Failed to initialize regmap: %d", ret);
		goto err_regmap;
	}

	msg_maxim("exit, device '%s'", id->name);

	return 0;

err_regmap:
	snd_soc_unregister_codec(&i2c->dev);
	if (max98505->regmap)
		regmap_exit(max98505->regmap);

err_register_codec:
#ifdef CONFIG_SND_SOC_MAXIM_DSM
	maxdsm_deinit();
#endif /* CONFIG_SND_SOC_MAXIM_DSM */
	devm_kfree(&i2c->dev, max98505->pdata);

err_allocate_pdata:
	devm_kfree(&i2c->dev, max98505);

err_allocate_priv:
	msg_maxim("exit with errors. ret=%d", ret);

	return ret;
}
开发者ID:rafat2026,项目名称:SpaceX-Kernel-Exynos7420,代码行数:101,代码来源:max98505.c


示例11: adau1373_i2c_remove

static int __devexit adau1373_i2c_remove(struct i2c_client *client)
{
	snd_soc_unregister_codec(&client->dev);
	kfree(dev_get_drvdata(&client->dev));
	return 0;
}
开发者ID:GerardGarcia,项目名称:linux,代码行数:6,代码来源:adau1373.c


示例12: tlv320aic23_i2c_remove

static int tlv320aic23_i2c_remove(struct i2c_client *i2c)
{
  snd_soc_unregister_codec(&i2c->dev);
  return 0;
}
开发者ID:karolinaM,项目名称:Testing,代码行数:5,代码来源:tlv320aic23-i2c.c


示例13: wm8741_register

static int wm8741_register(struct wm8741_priv *wm8741,
			   enum snd_soc_control_type control)
{
	int ret;
	struct snd_soc_codec *codec = &wm8741->codec;
	int i;

	if (wm8741_codec) {
		dev_err(codec->dev, "Another WM8741 is registered\n");
		return -EINVAL;
	}

	mutex_init(&codec->mutex);
	INIT_LIST_HEAD(&codec->dapm_widgets);
	INIT_LIST_HEAD(&codec->dapm_paths);

	snd_soc_codec_set_drvdata(codec, wm8741);
	codec->name = "WM8741";
	codec->owner = THIS_MODULE;
	codec->bias_level = SND_SOC_BIAS_OFF;
	codec->set_bias_level = NULL;
	codec->dai = &wm8741_dai;
	codec->num_dai = 1;
	codec->reg_cache_size = WM8741_REGISTER_COUNT;
	codec->reg_cache = &wm8741->reg_cache;

	wm8741->rate_constraint.list = &wm8741->rate_constraint_list[0];
	wm8741->rate_constraint.count =
		ARRAY_SIZE(wm8741->rate_constraint_list);

	memcpy(codec->reg_cache, wm8741_reg_defaults,
		sizeof(wm8741->reg_cache));

	ret = snd_soc_codec_set_cache_io(codec, 7, 9, control);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
		goto err;
	}

	for (i = 0; i < ARRAY_SIZE(wm8741->supplies); i++)
		wm8741->supplies[i].supply = wm8741_supply_names[i];

	ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8741->supplies),
				 wm8741->supplies);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to request supplies: %d\n", ret);
		goto err;
	}

	ret = regulator_bulk_enable(ARRAY_SIZE(wm8741->supplies),
				    wm8741->supplies);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to enable supplies: %d\n", ret);
		goto err_get;
	}

	ret = wm8741_reset(codec);
	if (ret < 0) {
		dev_err(codec->dev, "Failed to issue reset\n");
		goto err_enable;
	}

	wm8741_dai.dev = codec->dev;

	/* Change some default settings - latch VU */
	wm8741->reg_cache[WM8741_DACLLSB_ATTENUATION] |= WM8741_UPDATELL;
	wm8741->reg_cache[WM8741_DACLMSB_ATTENUATION] |= WM8741_UPDATELM;
	wm8741->reg_cache[WM8741_DACRLSB_ATTENUATION] |= WM8741_UPDATERL;
	wm8741->reg_cache[WM8741_DACRLSB_ATTENUATION] |= WM8741_UPDATERM;

	wm8741_codec = codec;

	ret = snd_soc_register_codec(codec);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to register codec: %d\n", ret);
		return ret;
	}

	ret = snd_soc_register_dai(&wm8741_dai);
	if (ret != 0) {
		dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
		snd_soc_unregister_codec(codec);
		return ret;
	}

	dev_dbg(codec->dev, "Successful registration\n");
	return 0;

err_enable:
	regulator_bulk_disable(ARRAY_SIZE(wm8741->supplies), wm8741->supplies);

err_get:
	regulator_bulk_free(ARRAY_SIZE(wm8741->supplies), wm8741->supplies);

err:
	kfree(wm8741);
	return ret;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:98,代码来源:wm8741.c


示例14: sn95031_device_remove

static int __devexit sn95031_device_remove(struct platform_device *pdev)
{
	pr_debug("codec device remove called\n");
	snd_soc_unregister_codec(&pdev->dev);
	return 0;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:6,代码来源:sn95031.c


示例15: sii9022_hdmi_codec_unregister

void sii9022_hdmi_codec_unregister(struct device *dev)
{
	snd_soc_unregister_codec(dev);
}
开发者ID:pgurenko,项目名称:VAR-SOM-AM33-Kernel-3-14,代码行数:4,代码来源:encoder-sii9022-audio.c


示例16: wm8741_spi_remove

static int __devexit wm8741_spi_remove(struct spi_device *spi)
{
	snd_soc_unregister_codec(&spi->dev);
	kfree(spi_get_drvdata(spi));
	return 0;
}
开发者ID:454053205,项目名称:linux,代码行数:6,代码来源:wm8741.c


示例17: wm8731_spi_remove

static int wm8731_spi_remove(struct spi_device *spi)
{
	snd_soc_unregister_codec(&spi->dev);
	return 0;
}
开发者ID:engicam-stable,项目名称:engicam-kernel-geam6ul-3.14.38,代码行数:5,代码来源:wm8731.c


示例18: aic32x4_spi_remove

static int __devexit aic32x4_spi_remove(struct spi_device *spi)
{
	snd_soc_unregister_codec(&spi->dev);
	return 0;
}
开发者ID:darcyg,项目名称:ap_project_v2,代码行数:5,代码来源:tlv320aic32x4.c


示例19: wm9090_i2c_remove

static int wm9090_i2c_remove(struct i2c_client *i2c)
{
	snd_soc_unregister_codec(&i2c->dev);
	return 0;
}
开发者ID:908626950,项目名称:linux,代码行数:5,代码来源:wm9090.c


示例20: cx20442_platform_remove

static int __exit cx20442_platform_remove(struct platform_device *pdev)
{
	snd_soc_unregister_codec(&pdev->dev);
	return 0;
}
开发者ID:454053205,项目名称:linux,代码行数:5,代码来源:cx20442.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ snd_soc_unregister_component函数代码示例发布时间:2022-05-30
下一篇:
C++ snd_soc_unregister_card函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap