diff mbox series

ASoC: rt1015: add missing header inclusion

Message ID 20200624053627.65179-1-tzungbi@google.com (mailing list archive)
State New, archived
Headers show
Series ASoC: rt1015: add missing header inclusion | expand

Commit Message

Tzung-Bi Shih June 24, 2020, 5:36 a.m. UTC
To fix compile error:

error: implicit declaration of function 'ACPI_PTR'
[-Werror,-Wimplicit-function-declaration]
                .acpi_match_table = ACPI_PTR(rt1015_acpi_match),
		                    ^

Adds the missing header inclusion and sorts in alphabetical.

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
---
 sound/soc/codecs/rt1015.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

Comments

Mark Brown June 24, 2020, 3:41 p.m. UTC | #1
On Wed, Jun 24, 2020 at 01:36:27PM +0800, Tzung-Bi Shih wrote:
> To fix compile error:
> 
> error: implicit declaration of function 'ACPI_PTR'
> [-Werror,-Wimplicit-function-declaration]
>                 .acpi_match_table = ACPI_PTR(rt1015_acpi_match),
> 		                    ^
> 
> Adds the missing header inclusion and sorts in alphabetical.

This breaks the build for an x86 allmodconfig:

In file included from /mnt/kernel/sound/soc/codecs/rt1015.c:27:
/mnt/kernel/include/sound/soc-dapm.h:435:39: warning: 'struct snd_soc_pcm_runtime' declared inside parameter list will not be visible outside of this definition or declaration
 void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
                                       ^~~~~~~~~~~~~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h:437:38: warning: 'struct snd_soc_pcm_runtime' declared inside parameter list will not be visible outside of this definition or declaration
 void snd_soc_dapm_stream_stop(struct snd_soc_pcm_runtime *rtd, int stream);
                                      ^~~~~~~~~~~~~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h:445:50: warning: 'struct soc_enum' declared inside parameter list will not be visible outside of this definition or declaration
   struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e,
                                                  ^~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h:494:7: warning: 'enum snd_soc_bias_level' declared inside parameter list will not be visible outside of this definition or declaration
  enum snd_soc_bias_level level);
       ^~~~~~~~~~~~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h:668:26: error: field 'bias_level' has incomplete type
  enum snd_soc_bias_level bias_level;
                          ^~~~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h:678:26: error: field 'target_bias_level' has incomplete type
  enum snd_soc_bias_level target_bias_level;
                          ^~~~~~~~~~~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h:725:61: error: parameter 2 ('level') has incomplete type
  struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level)
                                     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/mnt/kernel/include/sound/soc-dapm.h:724:20: error: function declaration isn't a prototype [-Werror=strict-prototypes]
 static inline void snd_soc_dapm_init_bias_level(
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h:736:39: error: return type is an incomplete type
 static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level(
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/kernel/include/sound/soc-dapm.h: In function 'snd_soc_dapm_get_bias_level':
/mnt/kernel/include/sound/soc-dapm.h:739:9: warning: 'return' with a value, in function returning void
  return dapm->bias_level;
         ^~~~
/mnt/kernel/include/sound/soc-dapm.h:736:39: note: declared here
 static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level(
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /mnt/kernel/include/sound/soc.h:1424,
                 from /mnt/kernel/sound/soc/codecs/rt1015.c:28:
/mnt/kernel/include/sound/soc-component.h: In function 'snd_soc_component_get_bias_level':
/mnt/kernel/include/sound/soc-component.h:281:9: error: void value not ignored as it ought to be
  return snd_soc_dapm_get_bias_level(
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   snd_soc_component_get_dapm(component));
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/kernel/include/sound/soc-component.h: In function 'snd_soc_component_force_bias_level':
/mnt/kernel/include/sound/soc-component.h:299:3: error: type of formal parameter 2 is incomplete
   level);
   ^~~~~
cc1: some warnings being treated as errors
kernel test robot June 24, 2020, 11 p.m. UTC | #2
Hi Tzung-Bi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on asoc/for-next]
[also build test ERROR on v5.8-rc2 next-20200624]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Tzung-Bi-Shih/ASoC-rt1015-add-missing-header-inclusion/20200624-134308
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 1d4c87335d5236ea1f35937e1014980ba961ae34)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from sound/soc/codecs/rt1015.c:27:
>> include/sound/soc-dapm.h:435:39: warning: declaration of 'struct snd_soc_pcm_runtime' will not be visible outside of this function [-Wvisibility]
   void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
                                         ^
   include/sound/soc-dapm.h:437:38: warning: declaration of 'struct snd_soc_pcm_runtime' will not be visible outside of this function [-Wvisibility]
   void snd_soc_dapm_stream_stop(struct snd_soc_pcm_runtime *rtd, int stream);
                                        ^
>> include/sound/soc-dapm.h:445:50: warning: declaration of 'struct soc_enum' will not be visible outside of this function [-Wvisibility]
                   struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e,
                                                                  ^
>> include/sound/soc-dapm.h:494:7: warning: declaration of 'enum snd_soc_bias_level' will not be visible outside of this function [-Wvisibility]
           enum snd_soc_bias_level level);
                ^
>> include/sound/soc-dapm.h:668:26: error: field has incomplete type 'enum snd_soc_bias_level'
           enum snd_soc_bias_level bias_level;
                                   ^
   include/sound/soc-dapm.h:668:7: note: forward declaration of 'enum snd_soc_bias_level'
           enum snd_soc_bias_level bias_level;
                ^
   include/sound/soc-dapm.h:678:26: error: field has incomplete type 'enum snd_soc_bias_level'
           enum snd_soc_bias_level target_bias_level;
                                   ^
   include/sound/soc-dapm.h:668:7: note: forward declaration of 'enum snd_soc_bias_level'
           enum snd_soc_bias_level bias_level;
                ^
>> include/sound/soc-dapm.h:725:61: error: variable has incomplete type 'enum snd_soc_bias_level'
           struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level)
                                                                      ^
   include/sound/soc-dapm.h:668:7: note: forward declaration of 'enum snd_soc_bias_level'
           enum snd_soc_bias_level bias_level;
                ^
>> include/sound/soc-dapm.h:736:39: error: incomplete result type 'enum snd_soc_bias_level' in function definition
   static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level(
                                         ^
   include/sound/soc-dapm.h:668:7: note: forward declaration of 'enum snd_soc_bias_level'
           enum snd_soc_bias_level bias_level;
                ^
   In file included from sound/soc/codecs/rt1015.c:28:
   In file included from include/sound/soc.h:1424:
>> include/sound/soc-component.h:299:3: error: argument type 'enum snd_soc_bias_level' is incomplete
                   level);
                   ^~~~~
   include/sound/soc-dapm.h:494:7: note: forward declaration of 'enum snd_soc_bias_level'
           enum snd_soc_bias_level level);
                ^
   4 warnings and 5 errors generated.

vim +668 include/sound/soc-dapm.h

ec2e3031b65f23 Liam Girdwood        2012-04-18  486  
ce0fc93ae56e2b Lars-Peter Clausen   2014-06-16  487  struct snd_soc_dapm_context *snd_soc_dapm_kcontrol_dapm(
ce0fc93ae56e2b Lars-Peter Clausen   2014-06-16  488  	struct snd_kcontrol *kcontrol);
eee5d7f99ae950 Lars-Peter Clausen   2013-07-29  489  
93e39a11520c00 Mythri P K           2015-10-20  490  struct snd_soc_dapm_widget *snd_soc_dapm_kcontrol_widget(
93e39a11520c00 Mythri P K           2015-10-20  491  		struct snd_kcontrol *kcontrol);
93e39a11520c00 Mythri P K           2015-10-20  492  
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  493  int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm,
fa880775ab0d5a Lars-Peter Clausen   2015-04-27 @494  	enum snd_soc_bias_level level);
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  495  
808db4a4512bed Richard Purdie       2006-10-06  496  /* dapm widget types */
808db4a4512bed Richard Purdie       2006-10-06  497  enum snd_soc_dapm_type {
808db4a4512bed Richard Purdie       2006-10-06  498  	snd_soc_dapm_input = 0,		/* input pin */
808db4a4512bed Richard Purdie       2006-10-06  499  	snd_soc_dapm_output,		/* output pin */
808db4a4512bed Richard Purdie       2006-10-06  500  	snd_soc_dapm_mux,			/* selects 1 analog signal from many inputs */
d714f97c5b8c4c Lars-Peter Clausen   2015-05-01  501  	snd_soc_dapm_demux,			/* connects the input to one of multiple outputs */
808db4a4512bed Richard Purdie       2006-10-06  502  	snd_soc_dapm_mixer,			/* mixes several analog signals together */
ca9c1aaec4187f Ian Molton           2009-01-06  503  	snd_soc_dapm_mixer_named_ctl,		/* mixer with named controls */
808db4a4512bed Richard Purdie       2006-10-06  504  	snd_soc_dapm_pga,			/* programmable gain/attenuation (volume) */
d88429a695a4a9 Olaya, Margarita     2010-12-10  505  	snd_soc_dapm_out_drv,			/* output driver */
808db4a4512bed Richard Purdie       2006-10-06  506  	snd_soc_dapm_adc,			/* analog to digital converter */
808db4a4512bed Richard Purdie       2006-10-06  507  	snd_soc_dapm_dac,			/* digital to analog converter */
32902177f7f6ae John Keeping         2016-05-12  508  	snd_soc_dapm_micbias,		/* microphone bias (power) - DEPRECATED: use snd_soc_dapm_supply */
808db4a4512bed Richard Purdie       2006-10-06  509  	snd_soc_dapm_mic,			/* microphone */
808db4a4512bed Richard Purdie       2006-10-06  510  	snd_soc_dapm_hp,			/* headphones */
808db4a4512bed Richard Purdie       2006-10-06  511  	snd_soc_dapm_spk,			/* speaker */
808db4a4512bed Richard Purdie       2006-10-06  512  	snd_soc_dapm_line,			/* line input/output */
808db4a4512bed Richard Purdie       2006-10-06  513  	snd_soc_dapm_switch,		/* analog switch */
808db4a4512bed Richard Purdie       2006-10-06  514  	snd_soc_dapm_vmid,			/* codec bias/vmid - to minimise pops */
808db4a4512bed Richard Purdie       2006-10-06  515  	snd_soc_dapm_pre,			/* machine specific pre widget - exec first */
808db4a4512bed Richard Purdie       2006-10-06  516  	snd_soc_dapm_post,			/* machine specific post widget - exec last */
246d0a17f5e09a Mark Brown           2009-04-22  517  	snd_soc_dapm_supply,		/* power/clock supply */
5b2d15bbd1eeb3 Srinivas Kandagatla  2018-03-10  518  	snd_soc_dapm_pinctrl,		/* pinctrl */
62ea874abc11f0 Mark Brown           2012-01-21  519  	snd_soc_dapm_regulator_supply,	/* external regulator */
d7e7eb91551ad9 Ola Lilja            2012-05-24  520  	snd_soc_dapm_clock_supply,	/* external clock */
010ff262269c6a Mark Brown           2009-08-17  521  	snd_soc_dapm_aif_in,		/* audio interface input */
010ff262269c6a Mark Brown           2009-08-17  522  	snd_soc_dapm_aif_out,		/* audio interface output */
1ab97c8cad98de Mark Brown           2011-11-27  523  	snd_soc_dapm_siggen,		/* signal generator */
56b4437f15ed20 Vinod Koul           2015-11-23  524  	snd_soc_dapm_sink,
4616274d3382fa Mark Brown           2013-06-05  525  	snd_soc_dapm_dai_in,		/* link to DAI structure */
4616274d3382fa Mark Brown           2013-06-05  526  	snd_soc_dapm_dai_out,
c74184ed30ecce Mark Brown           2012-04-04  527  	snd_soc_dapm_dai_link,		/* link between two DAI structures */
57295073b6acfd Lars-Peter Clausen   2013-08-05  528  	snd_soc_dapm_kcontrol,		/* Auto-disabled kcontrol */
8a70b4544ef4f0 Liam Girdwood        2017-06-29  529  	snd_soc_dapm_buffer,		/* DSP/CODEC internal buffer */
8a70b4544ef4f0 Liam Girdwood        2017-06-29  530  	snd_soc_dapm_scheduler,		/* DSP/CODEC internal scheduler */
8a70b4544ef4f0 Liam Girdwood        2017-06-29  531  	snd_soc_dapm_effect,		/* DSP/CODEC effect component */
8a70b4544ef4f0 Liam Girdwood        2017-06-29  532  	snd_soc_dapm_src,		/* DSP/CODEC SRC component */
8a70b4544ef4f0 Liam Girdwood        2017-06-29  533  	snd_soc_dapm_asrc,		/* DSP/CODEC ASRC component */
8a70b4544ef4f0 Liam Girdwood        2017-06-29  534  	snd_soc_dapm_encoder,		/* FW/SW audio encoder component */
8a70b4544ef4f0 Liam Girdwood        2017-06-29  535  	snd_soc_dapm_decoder,		/* FW/SW audio decoder component */
f13d4b5f85e1c4 Pierre-Louis Bossart 2019-02-05  536  
f13d4b5f85e1c4 Pierre-Louis Bossart 2019-02-05  537  	/* Don't edit below this line */
f13d4b5f85e1c4 Pierre-Louis Bossart 2019-02-05  538  	SND_SOC_DAPM_TYPE_COUNT
808db4a4512bed Richard Purdie       2006-10-06  539  };
808db4a4512bed Richard Purdie       2006-10-06  540  
a73fb2df01866b Liam Girdwood        2012-03-07  541  enum snd_soc_dapm_subclass {
a73fb2df01866b Liam Girdwood        2012-03-07  542  	SND_SOC_DAPM_CLASS_INIT		= 0,
3cd043436c2d5d Liam Girdwood        2012-03-09  543  	SND_SOC_DAPM_CLASS_RUNTIME	= 1,
a73fb2df01866b Liam Girdwood        2012-03-07  544  };
a73fb2df01866b Liam Girdwood        2012-03-07  545  
105f1c28442301 Mark Brown           2008-05-13  546  /*
105f1c28442301 Mark Brown           2008-05-13  547   * DAPM audio route definition.
105f1c28442301 Mark Brown           2008-05-13  548   *
105f1c28442301 Mark Brown           2008-05-13  549   * Defines an audio route originating at source via control and finishing
105f1c28442301 Mark Brown           2008-05-13  550   * at sink.
105f1c28442301 Mark Brown           2008-05-13  551   */
105f1c28442301 Mark Brown           2008-05-13  552  struct snd_soc_dapm_route {
105f1c28442301 Mark Brown           2008-05-13  553  	const char *sink;
105f1c28442301 Mark Brown           2008-05-13  554  	const char *control;
105f1c28442301 Mark Brown           2008-05-13  555  	const char *source;
215edda3adf502 Mark Brown           2009-09-08  556  
215edda3adf502 Mark Brown           2009-09-08  557  	/* Note: currently only supported for links where source is a supply */
215edda3adf502 Mark Brown           2009-09-08  558  	int (*connected)(struct snd_soc_dapm_widget *source,
215edda3adf502 Mark Brown           2009-09-08  559  			 struct snd_soc_dapm_widget *sink);
5c30f43f0625a7 Ranjani Sridharan    2019-01-25  560  
5c30f43f0625a7 Ranjani Sridharan    2019-01-25  561  	struct snd_soc_dobj dobj;
105f1c28442301 Mark Brown           2008-05-13  562  };
105f1c28442301 Mark Brown           2008-05-13  563  
808db4a4512bed Richard Purdie       2006-10-06  564  /* dapm audio path between two widgets */
808db4a4512bed Richard Purdie       2006-10-06  565  struct snd_soc_dapm_path {
3056557f3b2387 Mark Brown           2012-02-16  566  	const char *name;
808db4a4512bed Richard Purdie       2006-10-06  567  
a3423b02cf745c Lars-Peter Clausen   2015-08-11  568  	/*
a3423b02cf745c Lars-Peter Clausen   2015-08-11  569  	 * source (input) and sink (output) widgets
a3423b02cf745c Lars-Peter Clausen   2015-08-11  570  	 * The union is for convience, since it is a lot nicer to type
a3423b02cf745c Lars-Peter Clausen   2015-08-11  571  	 * p->source, rather than p->node[SND_SOC_DAPM_DIR_IN]
a3423b02cf745c Lars-Peter Clausen   2015-08-11  572  	 */
a3423b02cf745c Lars-Peter Clausen   2015-08-11  573  	union {
a3423b02cf745c Lars-Peter Clausen   2015-08-11  574  		struct {
808db4a4512bed Richard Purdie       2006-10-06  575  			struct snd_soc_dapm_widget *source;
808db4a4512bed Richard Purdie       2006-10-06  576  			struct snd_soc_dapm_widget *sink;
a3423b02cf745c Lars-Peter Clausen   2015-08-11  577  		};
a3423b02cf745c Lars-Peter Clausen   2015-08-11  578  		struct snd_soc_dapm_widget *node[2];
a3423b02cf745c Lars-Peter Clausen   2015-08-11  579  	};
808db4a4512bed Richard Purdie       2006-10-06  580  
808db4a4512bed Richard Purdie       2006-10-06  581  	/* status */
808db4a4512bed Richard Purdie       2006-10-06  582  	u32 connect:1;	/* source and sink widgets are connected */
8af294b472067e Mark Brown           2013-02-22  583  	u32 walking:1;  /* path is in the process of being walked */
169d5a83f687c3 Mark Brown           2011-06-14  584  	u32 weak:1;	/* path ignored for power management */
c1862c8bae520a Lars-Peter Clausen   2014-10-25  585  	u32 is_supply:1;	/* At least one of the connected widgets is a supply */
808db4a4512bed Richard Purdie       2006-10-06  586  
215edda3adf502 Mark Brown           2009-09-08  587  	int (*connected)(struct snd_soc_dapm_widget *source,
215edda3adf502 Mark Brown           2009-09-08  588  			 struct snd_soc_dapm_widget *sink);
215edda3adf502 Mark Brown           2009-09-08  589  
a3423b02cf745c Lars-Peter Clausen   2015-08-11  590  	struct list_head list_node[2];
5106b92f80a2cd Lars-Peter Clausen   2013-07-29  591  	struct list_head list_kcontrol;
808db4a4512bed Richard Purdie       2006-10-06  592  	struct list_head list;
808db4a4512bed Richard Purdie       2006-10-06  593  };
808db4a4512bed Richard Purdie       2006-10-06  594  
808db4a4512bed Richard Purdie       2006-10-06  595  /* dapm widget */
808db4a4512bed Richard Purdie       2006-10-06  596  struct snd_soc_dapm_widget {
808db4a4512bed Richard Purdie       2006-10-06  597  	enum snd_soc_dapm_type id;
3056557f3b2387 Mark Brown           2012-02-16  598  	const char *name;		/* widget name */
3056557f3b2387 Mark Brown           2012-02-16  599  	const char *sname;	/* stream name */
808db4a4512bed Richard Purdie       2006-10-06  600  	struct list_head list;
ce6120cca2589e Liam Girdwood        2010-11-05  601  	struct snd_soc_dapm_context *dapm;
808db4a4512bed Richard Purdie       2006-10-06  602  
62ea874abc11f0 Mark Brown           2012-01-21  603  	void *priv;				/* widget specific data */
a3cc056b64065e Liam Girdwood        2012-03-09  604  	struct regulator *regulator;		/* attached regulator */
5b2d15bbd1eeb3 Srinivas Kandagatla  2018-03-10  605  	struct pinctrl *pinctrl;		/* attached pinctrl */
62ea874abc11f0 Mark Brown           2012-01-21  606  
808db4a4512bed Richard Purdie       2006-10-06  607  	/* dapm control */
41b5b3bd5b7c9d Mark Brown           2012-03-08  608  	int reg;				/* negative reg = no direct dapm */
808db4a4512bed Richard Purdie       2006-10-06  609  	unsigned char shift;			/* bits to shift */
e2be2ccf9416bb Jarkko Nikula        2008-06-25  610  	unsigned int mask;			/* non-shifted mask */
e2be2ccf9416bb Jarkko Nikula        2008-06-25  611  	unsigned int on_val;			/* on state value */
e2be2ccf9416bb Jarkko Nikula        2008-06-25  612  	unsigned int off_val;			/* off state value */
808db4a4512bed Richard Purdie       2006-10-06  613  	unsigned char power:1;			/* block power status */
808db4a4512bed Richard Purdie       2006-10-06  614  	unsigned char active:1;			/* active stream on DAC, ADC's */
808db4a4512bed Richard Purdie       2006-10-06  615  	unsigned char connected:1;		/* connected codec pin */
808db4a4512bed Richard Purdie       2006-10-06  616  	unsigned char new:1;			/* cnew complete */
da34183e640ed3 Mark Brown           2010-03-15  617  	unsigned char force:1;			/* force state */
1547aba993c990 Mark Brown           2010-05-07  618  	unsigned char ignore_suspend:1;         /* kept enabled over suspend */
9b8a83b205bd07 Mark Brown           2011-10-04  619  	unsigned char new_power:1;		/* power from this run */
9b8a83b205bd07 Mark Brown           2011-10-04  620  	unsigned char power_checked:1;		/* power checked this run */
6dd98b0a3e58b7 Lars-Peter Clausen   2014-10-25  621  	unsigned char is_supply:1;		/* Widget is a supply type widget */
a3423b02cf745c Lars-Peter Clausen   2015-08-11  622  	unsigned char is_ep:2;			/* Widget is a endpoint type widget */
20e4859dedfc7e Mark Brown           2011-01-15  623  	int subseq;				/* sort within widget type */
808db4a4512bed Richard Purdie       2006-10-06  624  
b75576d76d4be5 Mark Brown           2009-04-20  625  	int (*power_check)(struct snd_soc_dapm_widget *w);
b75576d76d4be5 Mark Brown           2009-04-20  626  
808db4a4512bed Richard Purdie       2006-10-06  627  	/* external events */
808db4a4512bed Richard Purdie       2006-10-06  628  	unsigned short event_flags;		/* flags to specify event types */
9af6d956241456 Laim Girdwood        2008-01-10  629  	int (*event)(struct snd_soc_dapm_widget*, struct snd_kcontrol *, int);
808db4a4512bed Richard Purdie       2006-10-06  630  
808db4a4512bed Richard Purdie       2006-10-06  631  	/* kcontrols that relate to this widget */
808db4a4512bed Richard Purdie       2006-10-06  632  	int num_kcontrols;
82cfecdc03499b Stephen Warren       2011-04-28  633  	const struct snd_kcontrol_new *kcontrol_news;
fad598887dc0d8 Stephen Warren       2011-04-28  634  	struct snd_kcontrol **kcontrols;
8a9782346dccd8 Liam Girdwood        2015-05-29  635  	struct snd_soc_dobj dobj;
808db4a4512bed Richard Purdie       2006-10-06  636  
a3423b02cf745c Lars-Peter Clausen   2015-08-11  637  	/* widget input and output edges */
a3423b02cf745c Lars-Peter Clausen   2015-08-11  638  	struct list_head edges[2];
6d3ddc81f5762d Mark Brown           2009-05-16  639  
6d3ddc81f5762d Mark Brown           2009-05-16  640  	/* used during DAPM updates */
92a99ea439c4e2 Lars-Peter Clausen   2014-10-25  641  	struct list_head work_list;
6d3ddc81f5762d Mark Brown           2009-05-16  642  	struct list_head power_list;
db432b414e20b7 Mark Brown           2011-10-03  643  	struct list_head dirty;
a3423b02cf745c Lars-Peter Clausen   2015-08-11  644  	int endpoints[2];
d7e7eb91551ad9 Ola Lilja            2012-05-24  645  
d7e7eb91551ad9 Ola Lilja            2012-05-24  646  	struct clk *clk;
078a85f2806f0f Charles Keepax       2019-01-31  647  
078a85f2806f0f Charles Keepax       2019-01-31  648  	int channel;
808db4a4512bed Richard Purdie       2006-10-06  649  };
808db4a4512bed Richard Purdie       2006-10-06  650  
97404f2e0386ac Mark Brown           2010-12-14  651  struct snd_soc_dapm_update {
97404f2e0386ac Mark Brown           2010-12-14  652  	struct snd_kcontrol *kcontrol;
97404f2e0386ac Mark Brown           2010-12-14  653  	int reg;
97404f2e0386ac Mark Brown           2010-12-14  654  	int mask;
97404f2e0386ac Mark Brown           2010-12-14  655  	int val;
e411b0b5eb9b65 Chen-Yu Tsai         2016-11-02  656  	int reg2;
e411b0b5eb9b65 Chen-Yu Tsai         2016-11-02  657  	int mask2;
e411b0b5eb9b65 Chen-Yu Tsai         2016-11-02  658  	int val2;
e411b0b5eb9b65 Chen-Yu Tsai         2016-11-02  659  	bool has_second_set;
97404f2e0386ac Mark Brown           2010-12-14  660  };
97404f2e0386ac Mark Brown           2010-12-14  661  
45a110a1377d9f Charles Keepax       2015-05-11  662  struct snd_soc_dapm_wcache {
45a110a1377d9f Charles Keepax       2015-05-11  663  	struct snd_soc_dapm_widget *widget;
45a110a1377d9f Charles Keepax       2015-05-11  664  };
45a110a1377d9f Charles Keepax       2015-05-11  665  
ce6120cca2589e Liam Girdwood        2010-11-05  666  /* DAPM context */
ce6120cca2589e Liam Girdwood        2010-11-05  667  struct snd_soc_dapm_context {
ce6120cca2589e Liam Girdwood        2010-11-05 @668  	enum snd_soc_bias_level bias_level;
ce6120cca2589e Liam Girdwood        2010-11-05  669  	unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */
86dbf2ac6fcb2d Lars-Peter Clausen   2014-09-04  670  	/* Go to BIAS_OFF in suspend if the DAPM context is idle */
86dbf2ac6fcb2d Lars-Peter Clausen   2014-09-04  671  	unsigned int suspend_bias_off:1;
474b62d6eee733 Mark Brown           2011-01-18  672  
ce6120cca2589e Liam Girdwood        2010-11-05  673  	struct device *dev; /* from parent - for debug */
e2c330b9b56650 Lars-Peter Clausen   2014-04-22  674  	struct snd_soc_component *component; /* parent component */
3a45b8672d3f85 Jarkko Nikula        2010-11-05  675  	struct snd_soc_card *card; /* parent card */
7be31be880ee00 Jarkko Nikula        2010-12-14  676  
7be31be880ee00 Jarkko Nikula        2010-12-14  677  	/* used during DAPM updates */
56fba41f8f6444 Mark Brown           2011-06-04  678  	enum snd_soc_bias_level target_bias_level;
7be31be880ee00 Jarkko Nikula        2010-12-14  679  	struct list_head list;
7be31be880ee00 Jarkko Nikula        2010-12-14  680  
45a110a1377d9f Charles Keepax       2015-05-11  681  	struct snd_soc_dapm_wcache path_sink_cache;
45a110a1377d9f Charles Keepax       2015-05-11  682  	struct snd_soc_dapm_wcache path_source_cache;
45a110a1377d9f Charles Keepax       2015-05-11  683  
ce6120cca2589e Liam Girdwood        2010-11-05  684  #ifdef CONFIG_DEBUG_FS
ce6120cca2589e Liam Girdwood        2010-11-05  685  	struct dentry *debugfs_dapm;
ce6120cca2589e Liam Girdwood        2010-11-05  686  #endif
ce6120cca2589e Liam Girdwood        2010-11-05  687  };
ce6120cca2589e Liam Girdwood        2010-11-05  688  
fafd2176f72148 Stephen Warren       2011-04-28  689  /* A list of widgets associated with an object, typically a snd_kcontrol */
fafd2176f72148 Stephen Warren       2011-04-28  690  struct snd_soc_dapm_widget_list {
fafd2176f72148 Stephen Warren       2011-04-28  691  	int num_widgets;
2d6201ee112332 Gustavo A. R. Silva  2020-05-07  692  	struct snd_soc_dapm_widget *widgets[];
fafd2176f72148 Stephen Warren       2011-04-28  693  };
fafd2176f72148 Stephen Warren       2011-04-28  694  
09e88f8a5c56ac Kuninori Morimoto    2020-02-10  695  #define for_each_dapm_widgets(list, i, widget)				\
09e88f8a5c56ac Kuninori Morimoto    2020-02-10  696  	for ((i) = 0;							\
09e88f8a5c56ac Kuninori Morimoto    2020-02-10  697  	     (i) < list->num_widgets && (widget = list->widgets[i]);	\
09e88f8a5c56ac Kuninori Morimoto    2020-02-10  698  	     (i)++)
09e88f8a5c56ac Kuninori Morimoto    2020-02-10  699  
de02d0786d4075 Mark Brown           2011-09-20  700  struct snd_soc_dapm_stats {
de02d0786d4075 Mark Brown           2011-09-20  701  	int power_checks;
de02d0786d4075 Mark Brown           2011-09-20  702  	int path_checks;
e56235e099d729 Mark Brown           2011-09-21  703  	int neighbour_checks;
de02d0786d4075 Mark Brown           2011-09-20  704  };
de02d0786d4075 Mark Brown           2011-09-20  705  
5b2d15bbd1eeb3 Srinivas Kandagatla  2018-03-10  706  struct snd_soc_dapm_pinctrl_priv {
5b2d15bbd1eeb3 Srinivas Kandagatla  2018-03-10  707  	const char *active_state;
5b2d15bbd1eeb3 Srinivas Kandagatla  2018-03-10  708  	const char *sleep_state;
5b2d15bbd1eeb3 Srinivas Kandagatla  2018-03-10  709  };
5b2d15bbd1eeb3 Srinivas Kandagatla  2018-03-10  710  
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  711  /**
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  712   * snd_soc_dapm_init_bias_level() - Initialize DAPM bias level
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  713   * @dapm: The DAPM context to initialize
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  714   * @level: The DAPM level to initialize to
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  715   *
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  716   * This function only sets the driver internal state of the DAPM level and will
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  717   * not modify the state of the device. Hence it should not be used during normal
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  718   * operation, but only to synchronize the internal state to the device state.
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  719   * E.g. during driver probe to set the DAPM level to the one corresponding with
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  720   * the power-on reset state of the device.
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  721   *
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  722   * To change the DAPM state of the device use snd_soc_dapm_set_bias_level().
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  723   */
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  724  static inline void snd_soc_dapm_init_bias_level(
fa880775ab0d5a Lars-Peter Clausen   2015-04-27 @725  	struct snd_soc_dapm_context *dapm, enum snd_soc_bias_level level)
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  726  {
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  727  	dapm->bias_level = level;
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  728  }
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  729  
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  730  /**
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  731   * snd_soc_dapm_get_bias_level() - Get current DAPM bias level
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  732   * @dapm: The context for which to get the bias level
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  733   *
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  734   * Returns: The current bias level of the passed DAPM context.
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  735   */
fa880775ab0d5a Lars-Peter Clausen   2015-04-27 @736  static inline enum snd_soc_bias_level snd_soc_dapm_get_bias_level(
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  737  	struct snd_soc_dapm_context *dapm)
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  738  {
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  739  	return dapm->bias_level;
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  740  }
fa880775ab0d5a Lars-Peter Clausen   2015-04-27  741  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/sound/soc/codecs/rt1015.c b/sound/soc/codecs/rt1015.c
index 1f61b4aa4353..548f68649064 100644
--- a/sound/soc/codecs/rt1015.c
+++ b/sound/soc/codecs/rt1015.c
@@ -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"