@@ -1985,29 +1985,29 @@ static void dapm_widget_update(struct snd_soc_card *card, struct snd_soc_dapm_up
1985
1985
*/
1986
1986
static void dapm_pre_sequence_async (void * data , async_cookie_t cookie )
1987
1987
{
1988
- struct snd_soc_dapm_context * d = data ;
1988
+ struct snd_soc_dapm_context * dapm = data ;
1989
1989
int ret ;
1990
1990
1991
1991
/* If we're off and we're not supposed to go into STANDBY */
1992
- if (d -> bias_level == SND_SOC_BIAS_OFF &&
1993
- d -> target_bias_level != SND_SOC_BIAS_OFF ) {
1994
- if (d -> dev && cookie )
1995
- pm_runtime_get_sync (d -> dev );
1992
+ if (dapm -> bias_level == SND_SOC_BIAS_OFF &&
1993
+ dapm -> target_bias_level != SND_SOC_BIAS_OFF ) {
1994
+ if (dapm -> dev && cookie )
1995
+ pm_runtime_get_sync (dapm -> dev );
1996
1996
1997
- ret = snd_soc_dapm_set_bias_level (d , SND_SOC_BIAS_STANDBY );
1997
+ ret = snd_soc_dapm_set_bias_level (dapm , SND_SOC_BIAS_STANDBY );
1998
1998
if (ret != 0 )
1999
- dev_err (d -> dev ,
1999
+ dev_err (dapm -> dev ,
2000
2000
"ASoC: Failed to turn on bias: %d\n" , ret );
2001
2001
}
2002
2002
2003
2003
/* Prepare for a transition to ON or away from ON */
2004
- if ((d -> target_bias_level == SND_SOC_BIAS_ON &&
2005
- d -> bias_level != SND_SOC_BIAS_ON ) ||
2006
- (d -> target_bias_level != SND_SOC_BIAS_ON &&
2007
- d -> bias_level == SND_SOC_BIAS_ON )) {
2008
- ret = snd_soc_dapm_set_bias_level (d , SND_SOC_BIAS_PREPARE );
2004
+ if ((dapm -> target_bias_level == SND_SOC_BIAS_ON &&
2005
+ dapm -> bias_level != SND_SOC_BIAS_ON ) ||
2006
+ (dapm -> target_bias_level != SND_SOC_BIAS_ON &&
2007
+ dapm -> bias_level == SND_SOC_BIAS_ON )) {
2008
+ ret = snd_soc_dapm_set_bias_level (dapm , SND_SOC_BIAS_PREPARE );
2009
2009
if (ret != 0 )
2010
- dev_err (d -> dev ,
2010
+ dev_err (dapm -> dev ,
2011
2011
"ASoC: Failed to prepare bias: %d\n" , ret );
2012
2012
}
2013
2013
}
@@ -2017,37 +2017,37 @@ static void dapm_pre_sequence_async(void *data, async_cookie_t cookie)
2017
2017
*/
2018
2018
static void dapm_post_sequence_async (void * data , async_cookie_t cookie )
2019
2019
{
2020
- struct snd_soc_dapm_context * d = data ;
2020
+ struct snd_soc_dapm_context * dapm = data ;
2021
2021
int ret ;
2022
2022
2023
2023
/* If we just powered the last thing off drop to standby bias */
2024
- if (d -> bias_level == SND_SOC_BIAS_PREPARE &&
2025
- (d -> target_bias_level == SND_SOC_BIAS_STANDBY ||
2026
- d -> target_bias_level == SND_SOC_BIAS_OFF )) {
2027
- ret = snd_soc_dapm_set_bias_level (d , SND_SOC_BIAS_STANDBY );
2024
+ if (dapm -> bias_level == SND_SOC_BIAS_PREPARE &&
2025
+ (dapm -> target_bias_level == SND_SOC_BIAS_STANDBY ||
2026
+ dapm -> target_bias_level == SND_SOC_BIAS_OFF )) {
2027
+ ret = snd_soc_dapm_set_bias_level (dapm , SND_SOC_BIAS_STANDBY );
2028
2028
if (ret != 0 )
2029
- dev_err (d -> dev , "ASoC: Failed to apply standby bias: %d\n" ,
2029
+ dev_err (dapm -> dev , "ASoC: Failed to apply standby bias: %d\n" ,
2030
2030
ret );
2031
2031
}
2032
2032
2033
2033
/* If we're in standby and can support bias off then do that */
2034
- if (d -> bias_level == SND_SOC_BIAS_STANDBY &&
2035
- d -> target_bias_level == SND_SOC_BIAS_OFF ) {
2036
- ret = snd_soc_dapm_set_bias_level (d , SND_SOC_BIAS_OFF );
2034
+ if (dapm -> bias_level == SND_SOC_BIAS_STANDBY &&
2035
+ dapm -> target_bias_level == SND_SOC_BIAS_OFF ) {
2036
+ ret = snd_soc_dapm_set_bias_level (dapm , SND_SOC_BIAS_OFF );
2037
2037
if (ret != 0 )
2038
- dev_err (d -> dev , "ASoC: Failed to turn off bias: %d\n" ,
2038
+ dev_err (dapm -> dev , "ASoC: Failed to turn off bias: %d\n" ,
2039
2039
ret );
2040
2040
2041
- if (d -> dev && cookie )
2042
- pm_runtime_put (d -> dev );
2041
+ if (dapm -> dev && cookie )
2042
+ pm_runtime_put (dapm -> dev );
2043
2043
}
2044
2044
2045
2045
/* If we just powered up then move to active bias */
2046
- if (d -> bias_level == SND_SOC_BIAS_PREPARE &&
2047
- d -> target_bias_level == SND_SOC_BIAS_ON ) {
2048
- ret = snd_soc_dapm_set_bias_level (d , SND_SOC_BIAS_ON );
2046
+ if (dapm -> bias_level == SND_SOC_BIAS_PREPARE &&
2047
+ dapm -> target_bias_level == SND_SOC_BIAS_ON ) {
2048
+ ret = snd_soc_dapm_set_bias_level (dapm , SND_SOC_BIAS_ON );
2049
2049
if (ret != 0 )
2050
- dev_err (d -> dev , "ASoC: Failed to apply active bias: %d\n" ,
2050
+ dev_err (dapm -> dev , "ASoC: Failed to apply active bias: %d\n" ,
2051
2051
ret );
2052
2052
}
2053
2053
}
0 commit comments