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-d... config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sh
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 'preempt_enable'? [-Werror=implicit-function-declaration]
ret = clk_prepare_enable(da7219_dai_clk); ^~~~~~~~~~~~~~~~~~ preempt_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
vim +70 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