ASoC: rt1015: fix compilation errors and warnings
Subsystems (3)
v2 cover ASoC: rt1015: fix compilation errors and warnings
The series fixes compilation errors and warnings discovered in the thread
https://patchwork.kernel.org/patch/11622319/.
The original patch:
(1) adds acpi.h for fixing implicit declaration of function 'ACPI_PTR'
(2) sorts header inclusions in alphabetical
The compilation errors and warnings are likely introduced by (2).
The 1st and 2nd patches fix the newly discovered errors and warnings. The 3rd patch is the same as the original patch.
Tzung-Bi Shih (3):
ASoC: core: move definition of enum snd_soc_bias_level
ASoC: dapm: declare missing structure prototypes
ASoC: rt1015: add missing header inclusion
include/sound/soc-dapm.h | 20 ++++++++++++++++++++ include/sound/soc.h | 18 ------------------ sound/soc/codecs/rt1015.c | 17 +++++++++-------- 3 files changed, 29 insertions(+), 26 deletions(-)
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
PATCH v2 1/3 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.
--- include/sound/soc-dapm.h | 18 ++++++++++++++++++ include/sound/soc.h | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-)
include/sound/soc-dapm.h +18 -0
@@ -376,6 +376,24 @@ struct snd_soc_dapm_widget_list;struct snd_soc_dapm_update ;enum snd_soc_dapm_direction ; +/* +* Bias levels +* +* @ON: Bias is fully on for audio playback and capture operations. +* @PREPARE: Prepare for audio operations. Called before DAPM switching for +* stream start and stop operations. +* @STANDBY: Low power standby state when no playback/capture operations are +* in progress. NOTE: The transition time between STANDBY and ON +* should be as fast as possible and no longer than 10ms. +* @OFF: Power Off. No restrictions on transition times. +*/ +enum snd_soc_bias_level { +SND_SOC_BIAS_OFF =0 , +SND_SOC_BIAS_STANDBY =1 , +SND_SOC_BIAS_PREPARE =2 , +SND_SOC_BIAS_ON =3 , +}; +int dapm_regulator_event (struct snd_soc_dapm_widget *w,struct snd_kcontrol *kcontrol,int event); int dapm_clock_event(struct snd_soc_dapm_widget *w,
include/sound/soc.h +0 -18
@@ -368,24 +368,6 @@#define SOC_ENUM_SINGLE_VIRT_DECL (name, xtexts) \ const struct soc_enum name = SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(xtexts), xtexts) -/* -* Bias levels -* -* @ON: Bias is fully on for audio playback and capture operations. -* @PREPARE: Prepare for audio operations. Called before DAPM switching for -* stream start and stop operations. -* @STANDBY: Low power standby state when no playback/capture operations are -* in progress. NOTE: The transition time between STANDBY and ON -* should be as fast as possible and no longer than 10ms. -* @OFF: Power Off. No restrictions on transition times. -*/ -enum snd_soc_bias_level { -SND_SOC_BIAS_OFF =0 , -SND_SOC_BIAS_STANDBY =1 , -SND_SOC_BIAS_PREPARE =2 , -SND_SOC_BIAS_ON =3 , -}; -struct device_node ;struct snd_jack ;struct snd_soc_card ;
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
PATCH v2 2/3 ASoC: dapm: declare missing structure prototypes
In reply to Tzung-Bi ShihTo fix compilation warnings:
- struct 'snd_soc_pcm_runtime' declared inside parameter list will not be visible outside of this definition or declaration
- struct 'soc_enum' declared inside parameter list will not be visible outside of this definition or declaration
Declares the missing structure prototypes.
--- include/sound/soc-dapm.h | 2 ++ 1 file changed, 2 insertions(+)
include/sound/soc-dapm.h +2 -0
@@ -16,6 +16,8 @@#include <sound/asoc.h> struct device ; +struct snd_soc_pcm_runtime ; +struct soc_enum ;/* widget has no PM register bit */ #define SND_SOC_NOPM -1
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
PATCH v2 3/3 ASoC: rt1015: add missing header inclusion
In reply to Tzung-Bi ShihTo fix compilation error:
error: implicit declaration of function 'ACPI_PTR' [-Werror,-Wimplicit-function-declaration]
.acpi_match_table = ACPI_PTR(rt1015_acpi_match), ^
Adds the missing header "acpi.h" inclusion and sorts in alphabetical.
--- sound/soc/codecs/rt1015.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
sound/soc/codecs/rt1015.c +9 -8
@@ -8,23 +8,24 @@// // +#include <linux/acpi.h> +#include <linux/delay.h> +#include <linux/firmware.h> #include <linux/fs.h> +#include <linux/gpio.h> +#include <linux/i2c.h> +#include <linux/init.h> #include <linux/module.h> #include <linux/moduleparam.h> -#include <linux/init.h> -#include <linux/delay.h> +#include <linux/platform_device.h> #include <linux/pm.h> #include <linux/regmap.h> -#include <linux/i2c.h> -#include <linux/platform_device.h> -#include <linux/firmware.h> -#include <linux/gpio.h> #include <sound/core.h> +#include <sound/initval.h> #include <sound/pcm.h> #include <sound/pcm_params.h> -#include <sound/soc.h> #include <sound/soc-dapm.h> -#include <sound/initval.h> +#include <sound/soc.h> #include <sound/tlv.h> #include "rl6231.h"
Signature · 1 line
2.27.0.212.ge8ba1cc988-goog
Mark Brown
maintainerQuoted 8 lines · Tzung-Bi Shih
The series fixes compilation errors and warnings discovered in the thread
https://patchwork.kernel.org/patch/11622319/.The original patch:
(1) addsacpi.hfor fixing implicit declaration of function 'ACPI_PTR'
(2) sorts header inclusions in alphabetical[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: core: move definition of enum snd_soc_bias_level
commit: 10e834099d38dd2c02bf2bd5feaa3997cfcf139f
[2/3] ASoC: dapm: declare missing structure prototypes
commit: 3d62ef4280a377bb2ccaee4e8f6c5093f5b8f9d4
[3/3] ASoC: rt1015: add missing header inclusion
commit: 72ac4a4bef48e67bb26bc5a01d68c8163def013dAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 8 lines · Mark Brown
Quoted 6 lines · Tzung-Bi Shih
The series fixes compilation errors and warnings discovered in the thread
https://patchwork.kernel.org/patch/11622319/.The original patch:
(1) addsacpi.hfor fixing implicit declaration of function 'ACPI_PTR'
(2) sorts header inclusions in alphabetical
I am wondering if it is a better practice (next time) to separate the original patch into 2 patches.
Mark Brown
maintainerQuoted 8 lines · Tzung-Bi Shih
Quoted 3 lines · Mark Brown
Quoted 3 lines
The original patch:
(1) addsacpi.hfor fixing implicit declaration of function 'ACPI_PTR'
(2) sorts header inclusions in alphabeticalI am wondering if it is a better practice (next time) to separate the original patch into 2 patches.
Yes.