[PATCH v3 5/8] ASoC: amd: acp: Add legacy sound card support for Chrome audio

kernel test robot lkp at intel.com
Thu Oct 14 16:16:43 CEST 2021


Hi Ajit,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on v5.15-rc5 next-20211013]
[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]

url:    https://github.com/0day-ci/linux/commits/Ajit-Kumar-Pandey/ASoC-Add-common-modules-support-for-ACP-hw-block/20211012-152408
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: x86_64-randconfig-m031-20211013 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

New smatch warnings:
sound/soc/amd/acp/acp-mach-common.c:153 acp_card_hs_startup() warn: unsigned 'ret' is never less than zero.

Old smatch warnings:
sound/soc/amd/acp/acp-mach-common.c:165 acp_card_hs_startup() warn: unsigned 'ret' is never less than zero.

vim +/ret +153 sound/soc/amd/acp/acp-mach-common.c

f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  141  
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  142  static int acp_card_hs_startup(struct snd_pcm_substream *substream)
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  143  {
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  144  	struct snd_pcm_runtime *runtime = substream->runtime;
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  145  	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  146  	struct snd_soc_card *card = rtd->card;
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  147  	struct acp_card_drvdata *drvdata = card->drvdata;
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  148  	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  149  	unsigned int ret = 0;
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  150  
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  151  	ret =  snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  152  				   | SND_SOC_DAIFMT_CBP_CFP);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12 @153  	if (ret < 0) {
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  154  		dev_err(rtd->card->dev, "Failed to set dai fmt: %d\n", ret);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  155  		return ret;
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  156  	}
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  157  
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  158  	runtime->hw.channels_max = DUAL_CHANNEL;
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  159  	snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  160  				      &constraints_channels);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  161  	snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  162  				      &constraints_rates);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  163  
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  164  	ret = acp_clk_enable(drvdata);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  165  	if (ret < 0)
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  166  		dev_err(rtd->card->dev, "Failed to enable HS clk: %d\n", ret);
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  167  
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  168  	return ret;
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  169  }
f6032c9a69e5dfb Ajit Kumar Pandey 2021-10-12  170  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35893 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20211014/327e2df0/attachment-0001.gz>


More information about the Alsa-devel mailing list