mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
ASoC: Set idle_bias_off flag in snd_soc_codec_driver
Since commit 33c5f969
"ASoC: Allow idle_bias_off to be specified in CODEC
drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver
for devices can unconditionally support idle_bias_off.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
7c08b51f2f
commit
eb3032f8b9
@ -1244,8 +1244,6 @@ static int adau1373_probe(struct snd_soc_codec *codec)
|
||||
return ret;
|
||||
}
|
||||
|
||||
codec->dapm.idle_bias_off = true;
|
||||
|
||||
if (pdata) {
|
||||
if (pdata->num_drc > ARRAY_SIZE(pdata->drc_setting))
|
||||
return -EINVAL;
|
||||
@ -1340,6 +1338,7 @@ static struct snd_soc_codec_driver adau1373_codec_driver = {
|
||||
.suspend = adau1373_suspend,
|
||||
.resume = adau1373_resume,
|
||||
.set_bias_level = adau1373_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
.reg_cache_size = ARRAY_SIZE(adau1373_default_regs),
|
||||
.reg_cache_default = adau1373_default_regs,
|
||||
.reg_word_size = sizeof(uint8_t),
|
||||
|
@ -457,7 +457,6 @@ static int adau1701_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
int ret;
|
||||
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
codec->control_data = to_i2c_client(codec->dev);
|
||||
|
||||
ret = adau1701_load_firmware(codec);
|
||||
@ -473,6 +472,7 @@ static int adau1701_probe(struct snd_soc_codec *codec)
|
||||
static struct snd_soc_codec_driver adau1701_codec_drv = {
|
||||
.probe = adau1701_probe,
|
||||
.set_bias_level = adau1701_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
|
||||
.reg_cache_size = ADAU1701_NUM_REGS,
|
||||
.reg_word_size = sizeof(u16),
|
||||
|
@ -827,8 +827,6 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
pr_debug("codec_probe called\n");
|
||||
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
|
||||
/* PCM interface config
|
||||
* This sets the pcm rx slot conguration to max 6 slots
|
||||
* for max 4 dais (2 stereo and 2 mono)
|
||||
@ -891,6 +889,7 @@ struct snd_soc_codec_driver sn95031_codec = {
|
||||
.read = sn95031_read,
|
||||
.write = sn95031_write,
|
||||
.set_bias_level = sn95031_set_vaud_bias,
|
||||
.idle_bias_off = true,
|
||||
.dapm_widgets = sn95031_dapm_widgets,
|
||||
.num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets),
|
||||
.dapm_routes = sn95031_audio_map,
|
||||
|
@ -1377,7 +1377,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
|
||||
|
||||
INIT_LIST_HEAD(&aic3x->list);
|
||||
aic3x->codec = codec;
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
|
||||
ret = snd_soc_codec_set_cache_io(codec, 8, 8, aic3x->control_type);
|
||||
if (ret != 0) {
|
||||
@ -1471,6 +1470,7 @@ static int aic3x_remove(struct snd_soc_codec *codec)
|
||||
|
||||
static struct snd_soc_codec_driver soc_codec_dev_aic3x = {
|
||||
.set_bias_level = aic3x_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
.reg_cache_size = ARRAY_SIZE(aic3x_reg),
|
||||
.reg_word_size = sizeof(u8),
|
||||
.reg_cache_default = aic3x_reg,
|
||||
|
@ -1395,7 +1395,6 @@ static int dac33_soc_probe(struct snd_soc_codec *codec)
|
||||
|
||||
codec->control_data = dac33->control_data;
|
||||
codec->hw_write = (hw_write_t) i2c_master_send;
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
dac33->codec = codec;
|
||||
|
||||
/* Read the tlv320dac33 ID registers */
|
||||
@ -1476,6 +1475,7 @@ static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = {
|
||||
.read = dac33_read_reg_cache,
|
||||
.write = dac33_write_locked,
|
||||
.set_bias_level = dac33_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
.reg_cache_size = ARRAY_SIZE(dac33_reg),
|
||||
.reg_word_size = sizeof(u8),
|
||||
.reg_cache_default = dac33_reg,
|
||||
|
@ -2227,7 +2227,6 @@ static int twl4030_soc_probe(struct snd_soc_codec *codec)
|
||||
snd_soc_codec_set_drvdata(codec, twl4030);
|
||||
/* Set the defaults, and power up the codec */
|
||||
twl4030->sysclk = twl4030_audio_get_mclk() / 1000;
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
|
||||
twl4030_init_chip(codec);
|
||||
|
||||
@ -2253,6 +2252,7 @@ static struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
|
||||
.read = twl4030_read_reg_cache,
|
||||
.write = twl4030_write,
|
||||
.set_bias_level = twl4030_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
.reg_cache_size = sizeof(twl4030_reg),
|
||||
.reg_word_size = sizeof(u8),
|
||||
.reg_cache_default = twl4030_reg,
|
||||
|
@ -580,8 +580,6 @@ static int wm8770_probe(struct snd_soc_codec *codec)
|
||||
wm8770 = snd_soc_codec_get_drvdata(codec);
|
||||
wm8770->codec = codec;
|
||||
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
|
||||
ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8770->control_type);
|
||||
if (ret < 0) {
|
||||
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
|
||||
@ -679,6 +677,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8770 = {
|
||||
.suspend = wm8770_suspend,
|
||||
.resume = wm8770_resume,
|
||||
.set_bias_level = wm8770_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
.reg_cache_size = ARRAY_SIZE(wm8770_reg_defs),
|
||||
.reg_word_size = sizeof (u16),
|
||||
.reg_cache_default = wm8770_reg_defs
|
||||
|
@ -549,7 +549,6 @@ static int wm8804_probe(struct snd_soc_codec *codec)
|
||||
|
||||
wm8804 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
codec->control_data = wm8804->regmap;
|
||||
|
||||
ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP);
|
||||
@ -678,6 +677,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8804 = {
|
||||
.suspend = wm8804_suspend,
|
||||
.resume = wm8804_resume,
|
||||
.set_bias_level = wm8804_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
|
||||
.controls = wm8804_snd_controls,
|
||||
.num_controls = ARRAY_SIZE(wm8804_snd_controls),
|
||||
|
@ -2088,7 +2088,6 @@ static int wm8904_probe(struct snd_soc_codec *codec)
|
||||
int ret, i;
|
||||
|
||||
codec->cache_sync = 1;
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
codec->control_data = wm8904->regmap;
|
||||
|
||||
switch (wm8904->devtype) {
|
||||
@ -2237,6 +2236,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8904 = {
|
||||
.suspend = wm8904_suspend,
|
||||
.resume = wm8904_resume,
|
||||
.set_bias_level = wm8904_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
};
|
||||
|
||||
static const struct regmap_config wm8904_regmap = {
|
||||
|
@ -2047,7 +2047,6 @@ static int wm8995_probe(struct snd_soc_codec *codec)
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
codec->dapm.idle_bias_off = 1;
|
||||
wm8995 = snd_soc_codec_get_drvdata(codec);
|
||||
wm8995->codec = codec;
|
||||
|
||||
@ -2241,6 +2240,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8995 = {
|
||||
.suspend = wm8995_suspend,
|
||||
.resume = wm8995_resume,
|
||||
.set_bias_level = wm8995_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
};
|
||||
|
||||
static struct regmap_config wm8995_regmap = {
|
||||
|
@ -2804,7 +2804,6 @@ static int wm8996_probe(struct snd_soc_codec *codec)
|
||||
int ret;
|
||||
struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
|
||||
struct i2c_client *i2c = to_i2c_client(codec->dev);
|
||||
struct snd_soc_dapm_context *dapm = &codec->dapm;
|
||||
int i, irq_flags;
|
||||
|
||||
wm8996->codec = codec;
|
||||
@ -2812,8 +2811,6 @@ static int wm8996_probe(struct snd_soc_codec *codec)
|
||||
init_completion(&wm8996->dcs_done);
|
||||
init_completion(&wm8996->fll_lock);
|
||||
|
||||
dapm->idle_bias_off = true;
|
||||
|
||||
codec->control_data = wm8996->regmap;
|
||||
|
||||
ret = snd_soc_codec_set_cache_io(codec, 16, 16, SND_SOC_REGMAP);
|
||||
@ -3067,6 +3064,7 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8996 = {
|
||||
.probe = wm8996_probe,
|
||||
.remove = wm8996_remove,
|
||||
.set_bias_level = wm8996_set_bias_level,
|
||||
.idle_bias_off = true,
|
||||
.seq_notifier = wm8996_seq_notifier,
|
||||
.controls = wm8996_snd_controls,
|
||||
.num_controls = ARRAY_SIZE(wm8996_snd_controls),
|
||||
|
Loading…
Reference in New Issue
Block a user