示例#1
0
static int adav80x_resume(struct snd_soc_codec *codec)
{
	adav80x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
	codec->cache_sync = 1;
	snd_soc_cache_sync(codec);

	return 0;
}
示例#2
0
static int adav80x_probe(struct snd_soc_codec *codec)
{
	int ret;
	struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);

	ret = snd_soc_codec_set_cache_io(codec, 7, 9, adav80x->control_type);
	if (ret) {
		dev_err(codec->dev, "failed to set cache I/O: %d\n", ret);
		return ret;
	}

	/* Force PLLs on for SYSCLK output */
	snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL1");
	snd_soc_dapm_force_enable_pin(&codec->dapm, "PLL2");

	/* Power down S/PDIF receiver, since it is currently not supported */
	snd_soc_write(codec, ADAV80X_PLL_OUTE, 0x20);
	/* Disable DAC zero flag */
	snd_soc_write(codec, ADAV80X_DAC_CTRL3, 0x6);

	return adav80x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
}
示例#3
0
static int adav80x_remove(struct snd_soc_codec *codec)
{
	return adav80x_set_bias_level(codec, SND_SOC_BIAS_OFF);
}
示例#4
0
static int adav80x_suspend(struct snd_soc_codec *codec, pm_message_t state)
{
	return adav80x_set_bias_level(codec, SND_SOC_BIAS_OFF);
}