[alsa-devel] [asoc:topic/sgtl5000 2/2] sound/soc//codecs/sgtl5000.c:1246:22: error: 'codec' undeclared; did you mean 'node'?

kbuild test robot fengguang.wu at intel.com
Wed Feb 14 17:03:55 CET 2018


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git topic/sgtl5000
head:   c7c9a1f60b0aa367ec49eed3589d6dd98dd74e75
commit: c7c9a1f60b0aa367ec49eed3589d6dd98dd74e75 [2/2] Merge branch 'fix/sgtl5000' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sgtl5000
config: x86_64-randconfig-x008-201806 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout c7c9a1f60b0aa367ec49eed3589d6dd98dd74e75
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   sound/soc//codecs/sgtl5000.c: In function 'sgtl5000_probe':
>> sound/soc//codecs/sgtl5000.c:1246:22: error: 'codec' undeclared (first use in this function); did you mean 'node'?
     snd_soc_update_bits(codec, SGTL5000_CHIP_ADCDAC_CTRL,
                         ^~~~~
                         node
   sound/soc//codecs/sgtl5000.c:1246:22: note: each undeclared identifier is reported only once for each function it appears in

vim +1246 sound/soc//codecs/sgtl5000.c

9b34e6cc3 Zeng Zhaoming        2011-02-24  1190  
2f8b31880 Kuninori Morimoto    2018-01-29  1191  static int sgtl5000_probe(struct snd_soc_component *component)
9b34e6cc3 Zeng Zhaoming        2011-02-24  1192  {
9b34e6cc3 Zeng Zhaoming        2011-02-24  1193  	int ret;
570c70a60 Fabio Estevam        2017-04-05  1194  	u16 reg;
2f8b31880 Kuninori Morimoto    2018-01-29  1195  	struct sgtl5000_priv *sgtl5000 = snd_soc_component_get_drvdata(component);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1196  
9b34e6cc3 Zeng Zhaoming        2011-02-24  1197  	/* power up sgtl5000 */
2f8b31880 Kuninori Morimoto    2018-01-29  1198  	ret = sgtl5000_set_power_regs(component);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1199  	if (ret)
9b34e6cc3 Zeng Zhaoming        2011-02-24  1200  		goto err;
9b34e6cc3 Zeng Zhaoming        2011-02-24  1201  
9b34e6cc3 Zeng Zhaoming        2011-02-24  1202  	/* enable small pop, introduce 400ms delay in turning off */
2f8b31880 Kuninori Morimoto    2018-01-29  1203  	snd_soc_component_update_bits(component, SGTL5000_CHIP_REF_CTRL,
c251ea7bd Fabio Estevam        2014-11-14  1204  				SGTL5000_SMALL_POP, 1);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1205  
9b34e6cc3 Zeng Zhaoming        2011-02-24  1206  	/* disable short cut detector */
2f8b31880 Kuninori Morimoto    2018-01-29  1207  	snd_soc_component_write(component, SGTL5000_CHIP_SHORT_CTRL, 0);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1208  
9b34e6cc3 Zeng Zhaoming        2011-02-24  1209  	/*
9b34e6cc3 Zeng Zhaoming        2011-02-24  1210  	 * set i2s as default input of sound switch
9b34e6cc3 Zeng Zhaoming        2011-02-24  1211  	 * TODO: add sound switch to control and dapm widge.
9b34e6cc3 Zeng Zhaoming        2011-02-24  1212  	 */
2f8b31880 Kuninori Morimoto    2018-01-29  1213  	snd_soc_component_write(component, SGTL5000_CHIP_SSS_CTRL,
9b34e6cc3 Zeng Zhaoming        2011-02-24  1214  			SGTL5000_DAC_SEL_I2S_IN << SGTL5000_DAC_SEL_SHIFT);
2f8b31880 Kuninori Morimoto    2018-01-29  1215  	snd_soc_component_write(component, SGTL5000_CHIP_DIG_POWER,
9b34e6cc3 Zeng Zhaoming        2011-02-24  1216  			SGTL5000_ADC_EN | SGTL5000_DAC_EN);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1217  
9b34e6cc3 Zeng Zhaoming        2011-02-24  1218  	/* enable dac volume ramp by default */
2f8b31880 Kuninori Morimoto    2018-01-29  1219  	snd_soc_component_write(component, SGTL5000_CHIP_ADCDAC_CTRL,
9b34e6cc3 Zeng Zhaoming        2011-02-24  1220  			SGTL5000_DAC_VOL_RAMP_EN |
9b34e6cc3 Zeng Zhaoming        2011-02-24  1221  			SGTL5000_DAC_MUTE_RIGHT |
9b34e6cc3 Zeng Zhaoming        2011-02-24  1222  			SGTL5000_DAC_MUTE_LEFT);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1223  
570c70a60 Fabio Estevam        2017-04-05  1224  	reg = ((sgtl5000->lrclk_strength) << SGTL5000_PAD_I2S_LRCLK_SHIFT | 0x5f);
2f8b31880 Kuninori Morimoto    2018-01-29  1225  	snd_soc_component_write(component, SGTL5000_CHIP_PAD_STRENGTH, reg);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1226  
2f8b31880 Kuninori Morimoto    2018-01-29  1227  	snd_soc_component_write(component, SGTL5000_CHIP_ANA_CTRL,
9b34e6cc3 Zeng Zhaoming        2011-02-24  1228  			SGTL5000_HP_ZCD_EN |
9b34e6cc3 Zeng Zhaoming        2011-02-24  1229  			SGTL5000_ADC_ZCD_EN);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1230  
2f8b31880 Kuninori Morimoto    2018-01-29  1231  	snd_soc_component_update_bits(component, SGTL5000_CHIP_MIC_CTRL,
bd0593f5f Jean-Michel Hautbois 2014-10-14  1232  			SGTL5000_BIAS_R_MASK,
bd0593f5f Jean-Michel Hautbois 2014-10-14  1233  			sgtl5000->micbias_resistor << SGTL5000_BIAS_R_SHIFT);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1234  
2f8b31880 Kuninori Morimoto    2018-01-29  1235  	snd_soc_component_update_bits(component, SGTL5000_CHIP_MIC_CTRL,
e256da84a Gianluca Renzi       2015-09-25  1236  			SGTL5000_BIAS_VOLT_MASK,
e256da84a Gianluca Renzi       2015-09-25  1237  			sgtl5000->micbias_voltage << SGTL5000_BIAS_VOLT_SHIFT);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1238  	/*
9b34e6cc3 Zeng Zhaoming        2011-02-24  1239  	 * disable DAP
9b34e6cc3 Zeng Zhaoming        2011-02-24  1240  	 * TODO:
9b34e6cc3 Zeng Zhaoming        2011-02-24  1241  	 * Enable DAP in kcontrol and dapm.
9b34e6cc3 Zeng Zhaoming        2011-02-24  1242  	 */
2f8b31880 Kuninori Morimoto    2018-01-29  1243  	snd_soc_component_write(component, SGTL5000_DAP_CTRL, 0);
9b34e6cc3 Zeng Zhaoming        2011-02-24  1244  
c5489f9fc Michal Oleszczyk     2018-02-02  1245  	/* Unmute DAC after start */
c5489f9fc Michal Oleszczyk     2018-02-02 @1246  	snd_soc_update_bits(codec, SGTL5000_CHIP_ADCDAC_CTRL,
c5489f9fc Michal Oleszczyk     2018-02-02  1247  		SGTL5000_DAC_MUTE_LEFT | SGTL5000_DAC_MUTE_RIGHT, 0);
c5489f9fc Michal Oleszczyk     2018-02-02  1248  
9b34e6cc3 Zeng Zhaoming        2011-02-24  1249  	return 0;
9b34e6cc3 Zeng Zhaoming        2011-02-24  1250  
9b34e6cc3 Zeng Zhaoming        2011-02-24  1251  err:
9b34e6cc3 Zeng Zhaoming        2011-02-24  1252  	return ret;
9b34e6cc3 Zeng Zhaoming        2011-02-24  1253  }
9b34e6cc3 Zeng Zhaoming        2011-02-24  1254  

:::::: The code at line 1246 was first introduced by commit
:::::: c5489f9fc053c744c609f34b32efca395cc2fdad sgtl5000: change digital_mute policy

:::::: TO: Michal Oleszczyk <oleszczyk.m at gmail.com>
:::::: CC: Mark Brown <broonie at kernel.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 38139 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180215/38830d61/attachment-0001.bin>


More information about the Alsa-devel mailing list