Re: [PATCH] ASoC: codecs: es8326: Fix power-up sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Zhu,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on tiwai-sound/for-next tiwai-sound/for-linus linus/master v6.4 next-20230630]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Zhu-Ning/ASoC-codecs-es8326-Fix-power-up-sequence/20230630-152707
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link:    https://lore.kernel.org/r/20230630072515.49382-1-zhuning0077%40gmail.com
patch subject: [PATCH] ASoC: codecs: es8326: Fix power-up sequence
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230701/202307010058.iE2OHDes-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230701/202307010058.iE2OHDes-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307010058.iE2OHDes-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   sound/soc/codecs/es8326.c: In function 'es8326_resume':
>> sound/soc/codecs/es8326.c:713:61: error: 'ES8326_MUTE_MASK' undeclared (first use in this function); did you mean 'ES8326_MIC_SEL_MASK'?
     713 |         regmap_update_bits(es8326->regmap, ES8326_DAC_MUTE, ES8326_MUTE_MASK,
         |                                                             ^~~~~~~~~~~~~~~~
         |                                                             ES8326_MIC_SEL_MASK
   sound/soc/codecs/es8326.c:713:61: note: each undeclared identifier is reported only once for each function it appears in
>> sound/soc/codecs/es8326.c:714:28: error: 'ES8326_MUTE' undeclared (first use in this function); did you mean 'ES8326_FMT'?
     714 |                            ES8326_MUTE);
         |                            ^~~~~~~~~~~
         |                            ES8326_FMT
>> sound/soc/codecs/es8326.c:719:15: error: 'struct es8326_priv' has no member named 'version'
     719 |         es8326->version = reg;
         |               ^~


vim +713 sound/soc/codecs/es8326.c

   644	
   645	static int es8326_resume(struct snd_soc_component *component)
   646	{
   647		struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component);
   648		unsigned int reg;
   649	
   650		regcache_cache_only(es8326->regmap, false);
   651		regcache_sync(es8326->regmap);
   652	
   653		/* reset register value to default */
   654		regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x01);
   655		usleep_range(1000, 3000);
   656		regmap_write(es8326->regmap, ES8326_CSM_I2C_STA, 0x00);
   657		/* reset internal state */
   658		regmap_write(es8326->regmap, ES8326_RESET, 0x1f);
   659		regmap_write(es8326->regmap, ES8326_VMIDSEL, 0x0E);
   660		regmap_write(es8326->regmap, ES8326_HPJACK_TIMER, 0x88);
   661		/* set headphone default type and detect pin */
   662		regmap_write(es8326->regmap, ES8326_HPDET_TYPE, 0x81 |
   663			     ES8326_HP_DET_SRC_PIN9);
   664		regmap_write(es8326->regmap, ES8326_CLK_RESAMPLE, 0x05);
   665	
   666		/* set internal oscillator as clock source of headpone cp */
   667		regmap_write(es8326->regmap, ES8326_CLK_DIV_CPC, 0x84);
   668		regmap_write(es8326->regmap, ES8326_CLK_CTL, ES8326_CLK_ON);
   669		/* clock manager reset release */
   670		regmap_write(es8326->regmap, ES8326_RESET, 0x17);
   671		/* set headphone detection as half scan mode */
   672		regmap_write(es8326->regmap, ES8326_HP_MISC, 0x08);
   673		regmap_write(es8326->regmap, ES8326_PULLUP_CTL, 0x02);
   674	
   675		/* enable headphone driver */
   676		regmap_write(es8326->regmap, ES8326_HP_DRIVER, 0xa7);
   677		regmap_write(es8326->regmap, ES8326_HP_DRIVER_REF, 0xa3);
   678		regmap_write(es8326->regmap, ES8326_HP_DRIVER_REF, 0xb3);
   679		regmap_write(es8326->regmap, ES8326_HP_DRIVER, 0xa1);
   680	
   681		regmap_write(es8326->regmap, ES8326_CLK_INV, 0x00);
   682		regmap_write(es8326->regmap, ES8326_CLK_VMIDS1, 0xc4);
   683		regmap_write(es8326->regmap, ES8326_CLK_VMIDS2, 0x81);
   684		regmap_write(es8326->regmap, ES8326_CLK_CAL_TIME, 0x00);
   685	
   686		/* turn off headphone out */
   687		regmap_write(es8326->regmap, ES8326_HP_CAL, 0x00);
   688		/* set ADC and DAC in low power mode */
   689		regmap_write(es8326->regmap, ES8326_ANA_LP, 0xf0);
   690	
   691		/* force micbias on */
   692		regmap_write(es8326->regmap, ES8326_ANA_MICBIAS, 0x4f);
   693		regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x08);
   694		regmap_write(es8326->regmap, ES8326_ANA_VSEL, 0x7F);
   695		/* select vdda as micbias source */
   696		regmap_write(es8326->regmap, ES8326_VMIDLOW, 0x23);
   697		/* set dac dsmclip = 1 */
   698		regmap_write(es8326->regmap, ES8326_DAC_DSM, 0x08);
   699		regmap_write(es8326->regmap, ES8326_DAC_VPPSCALE, 0x15);
   700	
   701		regmap_write(es8326->regmap, ES8326_INT_SOURCE, 0x0c);
   702		regmap_write(es8326->regmap, ES8326_INTOUT_IO,
   703			     es8326->interrupt_clk);
   704		regmap_write(es8326->regmap, ES8326_SDINOUT1_IO,
   705			    (ES8326_IO_DMIC_CLK << ES8326_SDINOUT1_SHIFT));
   706		regmap_write(es8326->regmap, ES8326_SDINOUT23_IO, ES8326_IO_INPUT);
   707	
   708		regmap_write(es8326->regmap, ES8326_ANA_PDN, 0x3b);
   709		regmap_write(es8326->regmap, ES8326_RESET, ES8326_CSM_ON);
   710		regmap_update_bits(es8326->regmap, ES8326_PGAGAIN, ES8326_MIC_SEL_MASK,
   711				   ES8326_MIC1_SEL);
   712	
 > 713		regmap_update_bits(es8326->regmap, ES8326_DAC_MUTE, ES8326_MUTE_MASK,
 > 714				   ES8326_MUTE);
   715	
   716		regmap_write(es8326->regmap, ES8326_HPDET_TYPE, 0x80 |
   717			     ES8326_HP_DET_SRC_PIN9 | es8326->jack_pol);
   718		regmap_read(es8326->regmap, ES8326_CHIP_VERSION, &reg);
 > 719		es8326->version = reg;
   720		es8326_irq(es8326->irq, es8326);
   721		return 0;
   722	}
   723	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux