Skip to content

Commit 889dd56

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-dapm: tidyup idle_bias handling - step1
Current soc-dapm is using "idle_bias_off", and its default settings came from snd_soc_component "idle_bias_on". It is complicated/confusable. Let's handling it as "idle_bias". Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/874itix06a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 3bc0a92 commit 889dd56

15 files changed

Lines changed: 27 additions & 28 deletions

File tree

include/sound/soc-dapm.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,7 @@ struct snd_soc_dapm_update {
583583
struct snd_soc_dapm_context {
584584
enum snd_soc_bias_level bias_level;
585585

586-
/* bit field */
587-
unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
586+
bool idle_bias; /* Use BIAS_OFF instead of STANDBY when false */
588587

589588
struct device *dev; /* from parent - for debug */ /* REMOVE ME */
590589
struct snd_soc_component *component; /* parent component */

sound/soc/codecs/wm8993.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ static int wm8993_probe(struct snd_soc_component *component)
15361536
* VMID as an output and can disable it.
15371537
*/
15381538
if (wm8993->pdata.lineout1_diff && wm8993->pdata.lineout2_diff)
1539-
dapm->idle_bias_off = 1;
1539+
dapm->idle_bias = false;
15401540

15411541
return 0;
15421542

sound/soc/codecs/wm8994.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4182,16 +4182,16 @@ static int wm8994_component_probe(struct snd_soc_component *component)
41824182

41834183
wm8994->micdet_irq = control->pdata.micdet_irq;
41844184

4185-
/* By default use idle_bias_off, will override for WM8994 */
4186-
dapm->idle_bias_off = 1;
4185+
/* By default use idle_bias false, will override for WM8994 */
4186+
dapm->idle_bias = false;
41874187

41884188
/* Set revision-specific configuration */
41894189
switch (control->type) {
41904190
case WM8994:
41914191
/* Single ended line outputs should have VMID on. */
41924192
if (!control->pdata.lineout1_diff ||
41934193
!control->pdata.lineout2_diff)
4194-
dapm->idle_bias_off = 0;
4194+
dapm->idle_bias = true;
41954195

41964196
switch (control->revision) {
41974197
case 2:

sound/soc/intel/avs/boards/es8336.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int avs_es8336_codec_init(struct snd_soc_pcm_runtime *runtime)
132132
snd_jack_set_key(data->jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
133133
snd_soc_component_set_jack(component, &data->jack, NULL);
134134

135-
card->dapm.idle_bias_off = true;
135+
card->dapm.idle_bias = false;
136136

137137
return 0;
138138
}

sound/soc/intel/avs/boards/rt274.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ static int avs_rt274_codec_init(struct snd_soc_pcm_runtime *runtime)
117117
return ret;
118118
}
119119

120-
card->dapm.idle_bias_off = true;
120+
card->dapm.idle_bias = false;
121121

122122
return 0;
123123
}

sound/soc/intel/avs/boards/rt5640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int avs_rt5640_codec_init(struct snd_soc_pcm_runtime *runtime)
6767
return ret;
6868

6969
snd_soc_component_set_jack(codec_dai->component, jack, NULL);
70-
card->dapm.idle_bias_off = true;
70+
card->dapm.idle_bias = false;
7171

7272
return 0;
7373
}

sound/soc/intel/boards/bytcht_cx2072x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int byt_cht_cx2072x_init(struct snd_soc_pcm_runtime *rtd)
7777
byt_cht_cx2072x_acpi_gpios))
7878
dev_warn(rtd->dev, "Unable to add GPIO mapping table\n");
7979

80-
card->dapm.idle_bias_off = true;
80+
card->dapm.idle_bias = false;
8181

8282
/* set the default PLL rate, the clock is handled by the codec driver */
8383
ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), CX2072X_MCLK_EXTERNAL_PLL,

sound/soc/intel/boards/bytcht_es8316.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static int byt_cht_es8316_init(struct snd_soc_pcm_runtime *runtime)
179179
int num_routes;
180180
int ret;
181181

182-
card->dapm.idle_bias_off = true;
182+
card->dapm.idle_bias = false;
183183

184184
switch (BYT_CHT_ES8316_MAP(quirk)) {
185185
case BYT_CHT_ES8316_INTMIC_IN1_MAP:

sound/soc/intel/boards/bytcr_rt5640.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
13241324
int num_routes = 0;
13251325
int ret;
13261326

1327-
card->dapm.idle_bias_off = true;
1327+
card->dapm.idle_bias = false;
13281328
jack_data->use_platform_clock = true;
13291329

13301330
/* Start with RC clk for jack-detect (we disable MCLK below) */

sound/soc/intel/boards/bytcr_rt5651.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime)
586586
int report;
587587
int ret;
588588

589-
card->dapm.idle_bias_off = true;
589+
card->dapm.idle_bias = false;
590590

591591
/* Start with RC clk for jack-detect (we disable MCLK below) */
592592
if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN)

0 commit comments

Comments
 (0)