mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
Merge branch 'topic/dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-tas751x
This commit is contained in:
commit
ab303e4a17
|
|
@ -444,6 +444,9 @@ int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,
|
|||
struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm(
|
||||
struct snd_kcontrol *kcontrol);
|
||||
|
||||
int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm,
|
||||
enum snd_soc_bias_level level);
|
||||
|
||||
/* dapm widget types */
|
||||
enum snd_soc_dapm_type {
|
||||
snd_soc_dapm_input = 0, /* input pin */
|
||||
|
|
@ -623,4 +626,35 @@ struct snd_soc_dapm_stats {
|
|||
int neighbour_checks;
|
||||
};
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_init_bias_level() - Initialize DAPM bias level
|
||||
* @dapm: The DAPM context to initialize
|
||||
* @level: The DAPM level to initialize to
|
||||
*
|
||||
* This function only sets the driver internal state of the DAPM level and will
|
||||
* not modify the state of the device. Hence it should not be used during normal
|
||||
* operation, but only to synchronize the internal state to the device state.
|
||||
* E.g. during driver probe to set the DAPM level to the one corresponding with
|
||||
* the power-on reset state of the device.
|
||||
*
|
||||
* To change the DAPM state of the device use snd_soc_dapm_set_bias_level().
|
||||
*/
|
||||
static inline void snd_soc_dapm_init_bias_level(
|
||||
struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level)
|
||||
{
|
||||
dapm->bias_level = level;
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_get_bias_level() - Get current DAPM bias level
|
||||
* @dapm: The context for which to get the bias level
|
||||
*
|
||||
* Returns: The current bias level of the passed DAPM context.
|
||||
*/
|
||||
static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level(
|
||||
struct snd_soc_dapm_context *dapm)
|
||||
{
|
||||
return dapm->bias_level;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -807,7 +807,7 @@ struct snd_soc_codec {
|
|||
/* component */
|
||||
struct snd_soc_component component;
|
||||
|
||||
/* dapm */
|
||||
/* Don't access this directly, use snd_soc_codec_get_dapm() */
|
||||
struct snd_soc_dapm_context dapm;
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
|
@ -1269,6 +1269,58 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
|
|||
return component->dapm_ptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_codec_get_dapm() - Returns the DAPM context for the CODEC
|
||||
* @codec: The CODEC for which to get the DAPM context
|
||||
*
|
||||
* Note: Use this function instead of directly accessing the CODEC's dapm field
|
||||
*/
|
||||
static inline struct snd_soc_dapm_context *snd_soc_codec_get_dapm(
|
||||
struct snd_soc_codec *codec)
|
||||
{
|
||||
return &codec->dapm;
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_init_bias_level() - Initialize CODEC DAPM bias level
|
||||
* @dapm: The CODEC for which to initialize the DAPM bias level
|
||||
* @level: The DAPM level to initialize to
|
||||
*
|
||||
* Initializes the CODEC DAPM bias level. See snd_soc_dapm_init_bias_level().
|
||||
*/
|
||||
static inline void snd_soc_codec_init_bias_level(struct snd_soc_codec *codec,
|
||||
enum snd_soc_bias_level level)
|
||||
{
|
||||
snd_soc_dapm_init_bias_level(snd_soc_codec_get_dapm(codec), level);
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_get_bias_level() - Get current CODEC DAPM bias level
|
||||
* @codec: The CODEC for which to get the DAPM bias level
|
||||
*
|
||||
* Returns: The current DAPM bias level of the CODEC.
|
||||
*/
|
||||
static inline enum snd_soc_bias_level snd_soc_codec_get_bias_level(
|
||||
struct snd_soc_codec *codec)
|
||||
{
|
||||
return snd_soc_dapm_get_bias_level(snd_soc_codec_get_dapm(codec));
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_codec_force_bias_level() - Set the CODEC DAPM bias level
|
||||
* @codec: The CODEC for which to set the level
|
||||
* @level: The level to set to
|
||||
*
|
||||
* Forces the CODEC bias level to a specific state. See
|
||||
* snd_soc_dapm_force_bias_level().
|
||||
*/
|
||||
static inline int snd_soc_codec_force_bias_level(struct snd_soc_codec *codec,
|
||||
enum snd_soc_bias_level level)
|
||||
{
|
||||
return snd_soc_dapm_force_bias_level(snd_soc_codec_get_dapm(codec),
|
||||
level);
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol
|
||||
* @kcontrol: The kcontrol
|
||||
|
|
|
|||
|
|
@ -1156,7 +1156,6 @@ static int pm860x_set_bias_level(struct snd_soc_codec *codec,
|
|||
pm860x_set_bits(pm860x->i2c, REG_MISC2, data, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1444,7 +1444,6 @@ static int adau1373_set_bias_level(struct snd_soc_codec *codec,
|
|||
ADAU1373_PWDN_CTRL3_PWR_EN, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -565,7 +565,6 @@ static int adau1701_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -466,7 +466,6 @@ static int adau1761_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,6 @@ static int adau1781_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -493,12 +493,7 @@ static int adau1977_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int adau1977_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
|
||||
|
|
|
|||
|
|
@ -714,7 +714,6 @@ static int adav80x_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -341,7 +341,6 @@ static int ak4535_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_update_bits(codec, AK4535_PM1, 0x80, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -439,7 +439,6 @@ static int ak4641_set_bias_level(struct snd_soc_codec *codec,
|
|||
regcache_mark_dirty(ak4641->regmap);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -482,7 +482,6 @@ static int ak4642_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_update_bits(codec, PW_MGMT1, PMVCM, PMVCM);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -577,7 +577,6 @@ static int ak4671_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, AK4671_AD_DA_POWER_MANAGEMENT, 0x00);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -826,7 +826,6 @@ static int alc5623_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, ALC5623_PWR_MANAG_ADD1, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1000,7 +1000,6 @@ static int alc5632_set_bias_level(struct snd_soc_codec *codec,
|
|||
ALC5632_PWR_MANAG_ADD1_MASK, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ static int cq93vc_set_bias_level(struct snd_soc_codec *codec,
|
|||
DAVINCI_VC_REG12_POWER_ALL_OFF);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -503,7 +503,6 @@ static int cs4265_set_bias_level(struct snd_soc_codec *codec,
|
|||
CS4265_PWRCTL_PDN);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -908,7 +908,6 @@ static int cs42l52_set_bias_level(struct snd_soc_codec *codec,
|
|||
regcache_cache_only(cs42l52->regmap, true);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -978,7 +978,6 @@ static int cs42l56_set_bias_level(struct snd_soc_codec *codec,
|
|||
cs42l56->supplies);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1228,7 +1228,6 @@ static int cs42l73_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_update_bits(codec, CS42L73_DMMCC, CS42L73_MCLKDIS, 1);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -351,8 +351,6 @@ static int cx20442_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (!err)
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1387,7 +1387,6 @@ static int da7213_set_bias_level(struct snd_soc_codec *codec,
|
|||
DA7213_VMID_EN | DA7213_BIAS_EN, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1502,8 +1502,6 @@ static int da732x_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1377,7 +1377,6 @@ static int da9055_set_bias_level(struct snd_soc_codec *codec,
|
|||
DA9055_VMID_EN | DA9055_BIAS_EN, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -566,7 +566,6 @@ static int es8328_set_bias_level(struct snd_soc_codec *codec,
|
|||
0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -909,8 +909,6 @@ static int isabelle_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -281,8 +281,6 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,8 +89,6 @@ static int lm4857_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1284,8 +1284,6 @@ static int lm49453_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1584,7 +1584,6 @@ static int max98088_set_bias_level(struct snd_soc_codec *codec,
|
|||
regcache_mark_dirty(max98088->regmap);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1824,7 +1824,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
|
|||
regcache_mark_dirty(max98090->regmap);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1678,7 +1678,6 @@ static int max98095_set_bias_level(struct snd_soc_codec *codec,
|
|||
regcache_mark_dirty(max98095->regmap);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2198,7 +2197,7 @@ static int max98095_suspend(struct snd_soc_codec *codec)
|
|||
if (max98095->headphone_jack || max98095->mic_jack)
|
||||
max98095_jack_detect_disable(codec);
|
||||
|
||||
max98095_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2208,7 +2207,7 @@ static int max98095_resume(struct snd_soc_codec *codec)
|
|||
struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
|
||||
struct i2c_client *client = to_i2c_client(codec->dev);
|
||||
|
||||
max98095_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
if (max98095->headphone_jack || max98095->mic_jack) {
|
||||
max98095_jack_detect_enable(codec);
|
||||
|
|
|
|||
|
|
@ -264,7 +264,6 @@ static int max9850_set_bias_level(struct snd_soc_codec *codec,
|
|||
case SND_SOC_BIAS_OFF:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -536,7 +536,6 @@ static int ml26124_set_bias_level(struct snd_soc_codec *codec,
|
|||
ML26124_VMID, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -641,8 +641,6 @@ static int pcm512x_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1012,7 +1012,6 @@ static int rt286_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1569,7 +1569,6 @@ static int rt5631_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1902,7 +1902,6 @@ static int rt5640_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1939,7 +1938,7 @@ static int rt5640_probe(struct snd_soc_codec *codec)
|
|||
|
||||
rt5640->codec = codec;
|
||||
|
||||
rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
snd_soc_update_bits(codec, RT5640_DUMMY1, 0x0301, 0x0301);
|
||||
snd_soc_update_bits(codec, RT5640_MICBIAS, 0x0030, 0x0030);
|
||||
|
|
@ -1991,7 +1990,7 @@ static int rt5640_suspend(struct snd_soc_codec *codec)
|
|||
{
|
||||
struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
rt5640_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
rt5640_reset(codec);
|
||||
regcache_cache_only(rt5640->regmap, true);
|
||||
regcache_mark_dirty(rt5640->regmap);
|
||||
|
|
|
|||
|
|
@ -2409,7 +2409,6 @@ static int rt5645_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2520,7 +2519,7 @@ static int rt5645_probe(struct snd_soc_codec *codec)
|
|||
break;
|
||||
}
|
||||
|
||||
rt5645_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
snd_soc_update_bits(codec, RT5645_CHARGE_PUMP, 0x0300, 0x0200);
|
||||
|
||||
|
|
|
|||
|
|
@ -1604,7 +1604,6 @@ static int rt5651_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1625,7 +1624,7 @@ static int rt5651_probe(struct snd_soc_codec *codec)
|
|||
RT5651_PWR_FV1 | RT5651_PWR_FV2,
|
||||
RT5651_PWR_FV1 | RT5651_PWR_FV2);
|
||||
|
||||
rt5651_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2647,7 +2647,6 @@ static int rt5670_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4392,7 +4392,6 @@ static int rt5677_set_bias_level(struct snd_soc_codec *codec,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4618,7 +4617,7 @@ static int rt5677_probe(struct snd_soc_codec *codec)
|
|||
ARRAY_SIZE(rt5677_dmic2_clk_1));
|
||||
}
|
||||
|
||||
rt5677_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
regmap_write(rt5677->regmap, RT5677_DIG_MISC, 0x0020);
|
||||
regmap_write(rt5677->regmap, RT5677_PWR_DSP2, 0x0c00);
|
||||
|
|
|
|||
|
|
@ -979,7 +979,6 @@ static int sgtl5000_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,6 @@ static int sn95031_set_vaud_bias(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -518,12 +518,7 @@ static int ssm2518_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ssm2518_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
|
||||
|
|
|
|||
|
|
@ -473,7 +473,6 @@ static int ssm2602_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -361,12 +361,7 @@ static int ssm4567_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops ssm4567_dai_ops = {
|
||||
|
|
|
|||
|
|
@ -854,7 +854,6 @@ static int sta32x_set_bias_level(struct snd_soc_codec *codec,
|
|||
sta32x->supplies);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -970,7 +969,7 @@ static int sta32x_probe(struct snd_soc_codec *codec)
|
|||
if (sta32x->pdata->needs_esd_watchdog)
|
||||
INIT_DELAYED_WORK(&sta32x->watchdog_work, sta32x_watchdog);
|
||||
|
||||
sta32x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
/* Bias level configuration will have done an extra enable */
|
||||
regulator_bulk_disable(ARRAY_SIZE(sta32x->supplies), sta32x->supplies);
|
||||
|
||||
|
|
|
|||
|
|
@ -890,7 +890,6 @@ static int sta350_set_bias_level(struct snd_soc_codec *codec,
|
|||
sta350->supplies);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1037,7 +1036,7 @@ static int sta350_probe(struct snd_soc_codec *codec)
|
|||
sta350->coef_shadow[60] = 0x400000;
|
||||
sta350->coef_shadow[61] = 0x400000;
|
||||
|
||||
sta350_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
/* Bias level configuration will have done an extra enable */
|
||||
regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies);
|
||||
|
||||
|
|
|
|||
|
|
@ -179,12 +179,6 @@ static int sta529_set_bias_level(struct snd_soc_codec *codec, enum
|
|||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* store the label for powers down audio subsystem for suspend.This is
|
||||
* used by soc core layer
|
||||
*/
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,6 @@ static int stac9766_set_bias_level(struct snd_soc_codec *codec,
|
|||
stac9766_ac97_write(codec, AC97_POWERDOWN, 0xffff);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -506,7 +506,6 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1053,7 +1053,6 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec,
|
|||
aic31xx_power_off(codec);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -564,7 +564,6 @@ static int aic32x4_set_bias_level(struct snd_soc_codec *codec,
|
|||
case SND_SOC_BIAS_OFF:
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1406,7 +1406,6 @@ static int aic3x_set_bias_level(struct snd_soc_codec *codec,
|
|||
aic3x_set_power(codec, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -651,7 +651,6 @@ static int dac33_set_bias_level(struct snd_soc_codec *codec,
|
|||
return ret;
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1595,7 +1595,6 @@ static int twl4030_set_bias_level(struct snd_soc_codec *codec,
|
|||
twl4030_codec_enable(codec, 0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -853,8 +853,6 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1130,7 +1128,7 @@ static int twl6040_probe(struct snd_soc_codec *codec)
|
|||
return ret;
|
||||
}
|
||||
|
||||
twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
twl6040_init_chip(codec);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -350,7 +350,6 @@ static int uda134x_set_bias_level(struct snd_soc_codec *codec,
|
|||
pd->power(0);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -623,7 +623,6 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec,
|
|||
for (reg = UDA1380_MVOL; reg < UDA1380_CACHEREGNUM; reg++)
|
||||
set_bit(reg - 0x10, &uda1380_cache_dirty);
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -767,8 +767,6 @@ static int wm0010_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@ static int wm1250_ev1_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1235,7 +1235,6 @@ static int wm8350_set_bias_level(struct snd_soc_codec *codec,
|
|||
priv->supplies);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1232,7 +1232,6 @@ static int wm8400_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -538,7 +538,6 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -344,7 +344,6 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec,
|
|||
wm8523->supplies);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -812,7 +812,6 @@ static int wm8580_set_bias_level(struct snd_soc_codec *codec,
|
|||
WM8580_PWRDN1_PWDN, WM8580_PWRDN1_PWDN);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -320,7 +320,6 @@ static int wm8711_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, WM8711_PWR, 0xffff);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ static int wm8728_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, WM8728_DACCTL, reg | 0x4);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -523,7 +523,6 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
|
|||
regcache_mark_dirty(wm8731->regmap);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -599,7 +598,7 @@ static int wm8731_probe(struct snd_soc_codec *codec)
|
|||
goto err_regulator_enable;
|
||||
}
|
||||
|
||||
wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* Latch the update bits */
|
||||
snd_soc_update_bits(codec, WM8731_LOUT1V, 0x100, 0);
|
||||
|
|
|
|||
|
|
@ -510,7 +510,6 @@ static int wm8737_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -560,7 +559,7 @@ static int wm8737_probe(struct snd_soc_codec *codec)
|
|||
snd_soc_update_bits(codec, WM8737_RIGHT_PGA_VOLUME, WM8737_RVU,
|
||||
WM8737_RVU);
|
||||
|
||||
wm8737_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* Bias level configuration will have done an extra enable */
|
||||
regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
|
||||
|
|
|
|||
|
|
@ -651,7 +651,6 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, WM8750_PWR1, 0x0001);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1367,7 +1367,6 @@ static int wm8753_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, WM8753_PWR1, 0x0001);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -534,7 +534,6 @@ static int wm8770_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,6 @@ static int wm8776_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1117,7 +1117,6 @@ static int wm8900_set_bias_level(struct snd_soc_codec *codec,
|
|||
WM8900_REG_POWER2_SYSCLK_ENA);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1138,7 +1137,7 @@ static int wm8900_suspend(struct snd_soc_codec *codec)
|
|||
wm8900->fll_out = fll_out;
|
||||
wm8900->fll_in = fll_in;
|
||||
|
||||
wm8900_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1156,7 +1155,7 @@ static int wm8900_resume(struct snd_soc_codec *codec)
|
|||
return ret;
|
||||
}
|
||||
|
||||
wm8900_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* Restart the FLL? */
|
||||
if (wm8900->fll_out) {
|
||||
|
|
@ -1189,7 +1188,7 @@ static int wm8900_probe(struct snd_soc_codec *codec)
|
|||
wm8900_reset(codec);
|
||||
|
||||
/* Turn the chip on */
|
||||
wm8900_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* Latch the volume update bits */
|
||||
snd_soc_update_bits(codec, WM8900_REG_LINVOL, 0x100, 0x100);
|
||||
|
|
|
|||
|
|
@ -1200,8 +1200,6 @@ static int wm8903_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1907,7 +1907,6 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec,
|
|||
clk_disable_unprepare(wm8904->mclk);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -510,8 +510,6 @@ static int wm8940_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -707,7 +705,7 @@ static int wm8940_probe(struct snd_soc_codec *codec)
|
|||
return ret;
|
||||
}
|
||||
|
||||
wm8940_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
ret = snd_soc_write(codec, WM8940_POWER1, 0x180);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
|
|
@ -838,7 +838,6 @@ static int wm8955_set_bias_level(struct snd_soc_codec *codec,
|
|||
wm8955->supplies);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -929,7 +928,7 @@ static int wm8955_probe(struct snd_soc_codec *codec)
|
|||
WM8955_DMEN, WM8955_DMEN);
|
||||
}
|
||||
|
||||
wm8955_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* Bias level configuration will have done an extra enable */
|
||||
regulator_bulk_disable(ARRAY_SIZE(wm8955->supplies), wm8955->supplies);
|
||||
|
|
|
|||
|
|
@ -691,8 +691,6 @@ static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -802,8 +800,6 @@ static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -795,8 +795,6 @@ static int wm8961_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2538,7 +2538,6 @@ static int wm8962_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -594,7 +594,6 @@ static int wm8971_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, WM8971_PWR1, 0x0001);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -533,7 +533,6 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -888,7 +888,6 @@ static int wm8978_set_bias_level(struct snd_soc_codec *codec,
|
|||
|
||||
dev_dbg(codec->dev, "%s: %d, %x\n", __func__, level, power1);
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -928,7 +927,7 @@ static int wm8978_suspend(struct snd_soc_codec *codec)
|
|||
{
|
||||
struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
wm8978_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
/* Also switch PLL off */
|
||||
snd_soc_write(codec, WM8978_POWER_MANAGEMENT_1, 0);
|
||||
|
||||
|
|
@ -944,7 +943,7 @@ static int wm8978_resume(struct snd_soc_codec *codec)
|
|||
/* Sync reg_cache with the hardware */
|
||||
regcache_sync(wm8978->regmap);
|
||||
|
||||
wm8978_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
if (wm8978->f_pllout)
|
||||
/* Switch PLL on */
|
||||
|
|
|
|||
|
|
@ -963,7 +963,6 @@ static int wm8983_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -957,7 +957,6 @@ static int wm8985_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -756,7 +756,6 @@ static int wm8988_set_bias_level(struct snd_soc_codec *codec,
|
|||
snd_soc_write(codec, WM8988_PWR1, 0x0000);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1227,7 +1227,6 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1281,7 +1280,7 @@ static int wm8990_probe(struct snd_soc_codec *codec)
|
|||
wm8990_reset(codec);
|
||||
|
||||
/* charge output caps */
|
||||
wm8990_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
snd_soc_update_bits(codec, WM8990_AUDIO_INTERFACE_4,
|
||||
WM8990_ALRCGPIO1, WM8990_ALRCGPIO1);
|
||||
|
|
|
|||
|
|
@ -1224,7 +1224,6 @@ static int wm8991_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1065,8 +1065,6 @@ static int wm8993_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1563,7 +1561,7 @@ static int wm8993_suspend(struct snd_soc_codec *codec)
|
|||
wm8993->fll_fout = fll_fout;
|
||||
wm8993->fll_fref = fll_fref;
|
||||
|
||||
wm8993_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1573,7 +1571,7 @@ static int wm8993_resume(struct snd_soc_codec *codec)
|
|||
struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
|
||||
int ret;
|
||||
|
||||
wm8993_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* Restart the FLL? */
|
||||
if (wm8993->fll_fout) {
|
||||
|
|
|
|||
|
|
@ -2546,8 +2546,6 @@ static int wm8994_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -3163,7 +3161,7 @@ static int wm8994_codec_suspend(struct snd_soc_codec *codec)
|
|||
i + 1, ret);
|
||||
}
|
||||
|
||||
wm8994_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_OFF);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1990,7 +1990,6 @@ static int wm8995_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1628,8 +1628,6 @@ static int wm8996_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -898,8 +898,6 @@ static int wm9081_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -515,8 +515,6 @@ static int wm9090_set_bias_level(struct snd_soc_codec *codec,
|
|||
break;
|
||||
}
|
||||
|
||||
codec->dapm.bias_level = level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -610,7 +610,6 @@ static int wm9712_set_bias_level(struct snd_soc_codec *codec,
|
|||
ac97_write(codec, AC97_POWERDOWN, 0xffff);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -646,7 +645,7 @@ static int wm9712_soc_resume(struct snd_soc_codec *codec)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
wm9712_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
if (ret == 0) {
|
||||
/* Sync reg_cache with the hardware after cold reset */
|
||||
|
|
|
|||
|
|
@ -1171,7 +1171,6 @@ static int wm9713_set_bias_level(struct snd_soc_codec *codec,
|
|||
ac97_write(codec, AC97_POWERDOWN, 0xffff);
|
||||
break;
|
||||
}
|
||||
codec->dapm.bias_level = level;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1201,7 +1200,7 @@ static int wm9713_soc_resume(struct snd_soc_codec *codec)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
wm9713_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
snd_soc_codec_force_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
||||
|
||||
/* do we need to re-start the PLL ? */
|
||||
if (wm9713->pll_in)
|
||||
|
|
|
|||
|
|
@ -525,6 +525,38 @@ static void soc_dapm_async_complete(struct snd_soc_dapm_context *dapm)
|
|||
snd_soc_component_async_complete(dapm->component);
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_force_bias_level() - Sets the DAPM bias level
|
||||
* @dapm: The DAPM context for which to set the level
|
||||
* @level: The level to set
|
||||
*
|
||||
* Forces the DAPM bias level to a specific state. It will call the bias level
|
||||
* callback of DAPM context with the specified level. This will even happen if
|
||||
* the context is already at the same level. Furthermore it will not go through
|
||||
* the normal bias level sequencing, meaning any intermediate states between the
|
||||
* current and the target state will not be entered.
|
||||
*
|
||||
* Note that the change in bias level is only temporary and the next time
|
||||
* snd_soc_dapm_sync() is called the state will be set to the level as
|
||||
* determined by the DAPM core. The function is mainly intended to be used to
|
||||
* used during probe or resume from suspend to power up the device so
|
||||
* initialization can be done, before the DAPM core takes over.
|
||||
*/
|
||||
int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm,
|
||||
enum snd_soc_bias_level level)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (dapm->set_bias_level)
|
||||
ret = dapm->set_bias_level(dapm, level);
|
||||
|
||||
if (ret == 0)
|
||||
dapm->bias_level = level;
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_dapm_force_bias_level);
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_set_bias_level - set the bias level for the system
|
||||
* @dapm: DAPM context
|
||||
|
|
@ -547,10 +579,8 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
|
|||
if (ret != 0)
|
||||
goto out;
|
||||
|
||||
if (dapm->set_bias_level)
|
||||
ret = dapm->set_bias_level(dapm, level);
|
||||
else if (!card || dapm != &card->dapm)
|
||||
dapm->bias_level = level;
|
||||
if (!card || dapm != &card->dapm)
|
||||
ret = snd_soc_dapm_force_bias_level(dapm, level);
|
||||
|
||||
if (ret != 0)
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user