[alsa-devel] [asoc:topic/ad1980 1/1] sound/soc/codecs/ad1980.c:243:9: error: implicit declaration of function 'snd_soc_new_ac97_component'; did you mean 'snd_soc_new_ac97_codec'?

kbuild test robot fengguang.wu at intel.com
Mon Feb 12 16:00:30 CET 2018


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git topic/ad1980
head:   db53c016644c0d33579c60cc10b5152bbf9706ff
commit: db53c016644c0d33579c60cc10b5152bbf9706ff [1/1] ASoC: ad1980: replace codec to component
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout db53c016644c0d33579c60cc10b5152bbf9706ff
        # save the attached .config to linux build tree
        make ARCH=i386 

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

   sound/soc/codecs/ad1980.c: In function 'ad1980_soc_probe':
>> sound/soc/codecs/ad1980.c:243:9: error: implicit declaration of function 'snd_soc_new_ac97_component'; did you mean 'snd_soc_new_ac97_codec'? [-Werror=implicit-function-declaration]
     ac97 = snd_soc_new_ac97_component(component, 0, 0);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
            snd_soc_new_ac97_codec
>> sound/soc/codecs/ad1980.c:243:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     ac97 = snd_soc_new_ac97_component(component, 0, 0);
          ^
>> sound/soc/codecs/ad1980.c:285:2: error: implicit declaration of function 'snd_soc_free_ac97_component'; did you mean 'snd_soc_free_ac97_codec'? [-Werror=implicit-function-declaration]
     snd_soc_free_ac97_component(ac97);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
     snd_soc_free_ac97_codec
   cc1: some warnings being treated as errors

vim +243 sound/soc/codecs/ad1980.c

   234	
   235	static int ad1980_soc_probe(struct snd_soc_component *component)
   236	{
   237		struct snd_ac97 *ac97;
   238		struct regmap *regmap;
   239		int ret;
   240		u16 vendor_id2;
   241		u16 ext_status;
   242	
 > 243		ac97 = snd_soc_new_ac97_component(component, 0, 0);
   244		if (IS_ERR(ac97)) {
   245			ret = PTR_ERR(ac97);
   246			dev_err(component->dev, "Failed to register AC97 component: %d\n", ret);
   247			return ret;
   248		}
   249	
   250		regmap = regmap_init_ac97(ac97, &ad1980_regmap_config);
   251		if (IS_ERR(regmap)) {
   252			ret = PTR_ERR(regmap);
   253			goto err_free_ac97;
   254		}
   255	
   256		snd_soc_component_init_regmap(component, regmap);
   257		snd_soc_component_set_drvdata(component, ac97);
   258	
   259		ret = ad1980_reset(component, 0);
   260		if (ret < 0)
   261			goto reset_err;
   262	
   263		vendor_id2 = snd_soc_component_read32(component, AC97_VENDOR_ID2);
   264		if (vendor_id2 == 0x5374) {
   265			dev_warn(component->dev,
   266				"Found AD1981 - only 2/2 IN/OUT Channels supported\n");
   267		}
   268	
   269		/* unmute captures and playbacks volume */
   270		snd_soc_component_write(component, AC97_MASTER, 0x0000);
   271		snd_soc_component_write(component, AC97_PCM, 0x0000);
   272		snd_soc_component_write(component, AC97_REC_GAIN, 0x0000);
   273		snd_soc_component_write(component, AC97_CENTER_LFE_MASTER, 0x0000);
   274		snd_soc_component_write(component, AC97_SURROUND_MASTER, 0x0000);
   275	
   276		/*power on LFE/CENTER/Surround DACs*/
   277		ext_status = snd_soc_component_read32(component, AC97_EXTENDED_STATUS);
   278		snd_soc_component_write(component, AC97_EXTENDED_STATUS, ext_status&~0x3800);
   279	
   280		return 0;
   281	
   282	reset_err:
   283		snd_soc_component_exit_regmap(component);
   284	err_free_ac97:
 > 285		snd_soc_free_ac97_component(ac97);
   286		return ret;
   287	}
   288	

---
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: 63077 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180212/9980cd75/attachment-0001.bin>


More information about the Alsa-devel mailing list