Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: core: move definition of enum snd_soc_bias_level

To fix compilation error:

- error: field 'XXX' has incomplete type

Moves definition of enum snd_soc_bias_level from soc.h to soc-dapm.h.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20200625153543.85039-2-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Tzung-Bi Shih and committed by
Mark Brown
10e83409 6f81e520

+18 -18
+18
include/sound/soc-dapm.h
··· 376 376 struct snd_soc_dapm_update; 377 377 enum snd_soc_dapm_direction; 378 378 379 + /* 380 + * Bias levels 381 + * 382 + * @ON: Bias is fully on for audio playback and capture operations. 383 + * @PREPARE: Prepare for audio operations. Called before DAPM switching for 384 + * stream start and stop operations. 385 + * @STANDBY: Low power standby state when no playback/capture operations are 386 + * in progress. NOTE: The transition time between STANDBY and ON 387 + * should be as fast as possible and no longer than 10ms. 388 + * @OFF: Power Off. No restrictions on transition times. 389 + */ 390 + enum snd_soc_bias_level { 391 + SND_SOC_BIAS_OFF = 0, 392 + SND_SOC_BIAS_STANDBY = 1, 393 + SND_SOC_BIAS_PREPARE = 2, 394 + SND_SOC_BIAS_ON = 3, 395 + }; 396 + 379 397 int dapm_regulator_event(struct snd_soc_dapm_widget *w, 380 398 struct snd_kcontrol *kcontrol, int event); 381 399 int dapm_clock_event(struct snd_soc_dapm_widget *w,
-18
include/sound/soc.h
··· 368 368 #define SOC_ENUM_SINGLE_VIRT_DECL(name, xtexts) \ 369 369 const struct soc_enum name = SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(xtexts), xtexts) 370 370 371 - /* 372 - * Bias levels 373 - * 374 - * @ON: Bias is fully on for audio playback and capture operations. 375 - * @PREPARE: Prepare for audio operations. Called before DAPM switching for 376 - * stream start and stop operations. 377 - * @STANDBY: Low power standby state when no playback/capture operations are 378 - * in progress. NOTE: The transition time between STANDBY and ON 379 - * should be as fast as possible and no longer than 10ms. 380 - * @OFF: Power Off. No restrictions on transition times. 381 - */ 382 - enum snd_soc_bias_level { 383 - SND_SOC_BIAS_OFF = 0, 384 - SND_SOC_BIAS_STANDBY = 1, 385 - SND_SOC_BIAS_PREPARE = 2, 386 - SND_SOC_BIAS_ON = 3, 387 - }; 388 - 389 371 struct device_node; 390 372 struct snd_jack; 391 373 struct snd_soc_card;