[alsa-devel] [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework

kbuild test robot lkp at intel.com
Tue Mar 13 05:37:39 CET 2018


Hi Akshu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180309]
[cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Akshu-Agrawal/ASoC-AMD-Use-single-dai-for-da7219-playback-and-capture/20180313-035239
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_init':
   sound/soc/amd/acp-da7219-max98357a.c:70:19: error: implicit declaration of function 'clk_get'; did you mean 'key_get'? [-Werror=implicit-function-declaration]
     da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
                      ^~~~~~~
                      key_get
   sound/soc/amd/acp-da7219-max98357a.c:70:27: error: 'codec' undeclared (first use in this function); did you mean 'cdev'?
     da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
                              ^~~~~
                              cdev
   sound/soc/amd/acp-da7219-max98357a.c:70:27: note: each undeclared identifier is reported only once for each function it appears in
   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_hw_params':
>> sound/soc/amd/acp-da7219-max98357a.c:93:8: error: implicit declaration of function 'clk_prepare_enable'; did you mean 'acpi_pci_irq_enable'? [-Werror=implicit-function-declaration]
     ret = clk_prepare_enable(da7219_dai_clk);
           ^~~~~~~~~~~~~~~~~~
           acpi_pci_irq_enable
   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_hw_free':
   sound/soc/amd/acp-da7219-max98357a.c:106:2: error: implicit declaration of function 'clk_disable_unprepare'; did you mean 'acpi_disable_gpe'? [-Werror=implicit-function-declaration]
     clk_disable_unprepare(da7219_dai_clk);
     ^~~~~~~~~~~~~~~~~~~~~
     acpi_disable_gpe
   cc1: some warnings being treated as errors

coccinelle warnings: (new ones prefixed by >>)

>> sound/soc/amd/acp-da7219-max98357a.c:104:5-8: Unneeded variable: "ret". Return "0" on line 108

Please review and possibly fold the followup patch.

vim +93 sound/soc/amd/acp-da7219-max98357a.c

    46	
    47	static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
    48	{
    49		int ret;
    50		struct snd_soc_card *card = rtd->card;
    51		struct snd_soc_dai *codec_dai = rtd->codec_dai;
    52		struct snd_soc_component *component = codec_dai->component;
    53	
    54		dev_info(rtd->dev, "codec dai name = %s\n", codec_dai->name);
    55	
    56		ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK,
    57					     CZ_PLAT_CLK, SND_SOC_CLOCK_IN);
    58		if (ret < 0) {
    59			dev_err(rtd->dev, "can't set codec sysclk: %d\n", ret);
    60			return ret;
    61		}
    62	
    63		ret = snd_soc_dai_set_pll(codec_dai, 0, DA7219_SYSCLK_PLL,
    64					  CZ_PLAT_CLK, MCLK_RATE);
    65		if (ret < 0) {
    66			dev_err(rtd->dev, "can't set codec pll: %d\n", ret);
    67			return ret;
    68		}
    69	
  > 70		da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
    71	
    72		ret = snd_soc_card_jack_new(card, "Headset Jack",
    73					SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
    74					SND_JACK_BTN_0 | SND_JACK_BTN_1 |
    75					SND_JACK_BTN_2 | SND_JACK_BTN_3,
    76					&cz_jack, NULL, 0);
    77		if (ret) {
    78			dev_err(card->dev, "HP jack creation failed %d\n", ret);
    79			return ret;
    80		}
    81	
    82		da7219_aad_jack_det(component, &cz_jack);
    83	
    84		return 0;
    85	}
    86	
    87	static int cz_da7219_hw_params(struct snd_pcm_substream *substream,
    88				     struct snd_pcm_hw_params *params)
    89	{
    90		int ret = 0;
    91		struct snd_soc_pcm_runtime *rtd = substream->private_data;
    92	
  > 93		ret = clk_prepare_enable(da7219_dai_clk);
    94		if (ret < 0) {
    95			dev_err(rtd->dev, "can't enable master clock %d\n", ret);
    96			return ret;
    97		}
    98	
    99		return ret;
   100	}
   101	
   102	static int cz_da7219_hw_free(struct snd_pcm_substream *substream)
   103	{
 > 104		int ret = 0;
   105	
   106		clk_disable_unprepare(da7219_dai_clk);
   107	
 > 108		return ret;
   109	}
   110	

---
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: 62927 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20180313/a4bd2a4b/attachment-0001.bin>


More information about the Alsa-devel mailing list