[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202504052206.HFqFRXUk-lkp@intel.com>
Date: Sat, 5 Apr 2025 22:21:51 +0800
From: kernel test robot <lkp@...el.com>
To: cy_huang@...htek.com, Mark Brown <broonie@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, Rob Herring <robh@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
ChiYuan Huang <cy_huang@...htek.com>,
Otto lin <otto_lin@...htek.com>, Allen Lin <allen_lin@...htek.com>,
devicetree@...r.kernel.org, linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] ASoC: codecs: Add support for Richtek rt9123
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on a2cc6ff5ec8f91bc463fd3b0c26b61166a07eb11]
url: https://github.com/intel-lab-lkp/linux/commits/cy_huang-richtek-com/ASoC-dt-bindings-Add-bindings-for-Richtek-rt9123/20250404-223054
base: a2cc6ff5ec8f91bc463fd3b0c26b61166a07eb11
patch link: https://lore.kernel.org/r/cff65757c4665a81397ef5f559b277f96d4236c3.1743774849.git.cy_huang%40richtek.com
patch subject: [PATCH 2/4] ASoC: codecs: Add support for Richtek rt9123
config: loongarch-randconfig-001-20250405 (https://download.01.org/0day-ci/archive/20250405/202504052206.HFqFRXUk-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250405/202504052206.HFqFRXUk-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504052206.HFqFRXUk-lkp@intel.com/
All errors (new ones prefixed by >>):
sound/soc/codecs/rt9123.c: In function 'rt9123_dai_hw_params':
>> sound/soc/codecs/rt9123.c:233:18: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
233 | fmtval = FIELD_GET(SND_SOC_DAIFMT_FORMAT_MASK, rt9123->dai_fmt);
| ^~~~~~~~~
In file included from include/linux/cpumask.h:11,
from arch/loongarch/include/asm/processor.h:9,
from arch/loongarch/include/asm/thread_info.h:15,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/loongarch/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from include/linux/resource_ext.h:11,
from include/linux/acpi.h:13,
from sound/soc/codecs/rt9123.c:7:
sound/soc/codecs/rt9123.c: At top level:
>> sound/soc/codecs/rt9123.c:476:31: error: 'rt9123_dev_pm_ops' undeclared here (not in a function); did you mean 'rt9123_dai_ops'?
476 | .pm = pm_ptr(&rt9123_dev_pm_ops),
| ^~~~~~~~~~~~~~~~~
include/linux/kernel.h:48:44: note: in definition of macro 'PTR_IF'
48 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^~~
sound/soc/codecs/rt9123.c:476:23: note: in expansion of macro 'pm_ptr'
476 | .pm = pm_ptr(&rt9123_dev_pm_ops),
| ^~~~~~
vim +/FIELD_GET +233 sound/soc/codecs/rt9123.c
223
224 static int rt9123_dai_hw_params(struct snd_pcm_substream *substream,
225 struct snd_pcm_hw_params *param, struct snd_soc_dai *dai)
226 {
227 struct rt9123_priv *rt9123 = snd_soc_dai_get_drvdata(dai);
228 struct snd_soc_component *comp = dai->component;
229 unsigned int fmtval, width, slot_width;
230 struct device *dev = dai->dev;
231 unsigned int audfmt, audbit;
232
> 233 fmtval = FIELD_GET(SND_SOC_DAIFMT_FORMAT_MASK, rt9123->dai_fmt);
234 if (rt9123->tdm_slots && fmtval != SND_SOC_DAIFMT_DSP_A && fmtval != SND_SOC_DAIFMT_DSP_B) {
235 dev_err(dev, "TDM only can support DSP_A or DSP_B format\n");
236 return -EINVAL;
237 }
238
239 switch (fmtval) {
240 case SND_SOC_DAIFMT_I2S:
241 audfmt = 0;
242 break;
243 case SND_SOC_DAIFMT_LEFT_J:
244 audfmt = 1;
245 break;
246 case SND_SOC_DAIFMT_RIGHT_J:
247 audfmt = 2;
248 break;
249 case SND_SOC_DAIFMT_DSP_B:
250 audfmt = rt9123->tdm_slots ? 4 : 3;
251 break;
252 case SND_SOC_DAIFMT_DSP_A:
253 audfmt = rt9123->tdm_slots ? 12 : 11;
254 break;
255 default:
256 dev_err(dev, "Unsupported format %d\n", fmtval);
257 return -EINVAL;
258 }
259
260 switch (width = params_width(param)) {
261 case 16:
262 audbit = 0;
263 break;
264 case 20:
265 audbit = 1;
266 break;
267 case 24:
268 audbit = 2;
269 break;
270 case 32:
271 audbit = 3;
272 break;
273 case 8:
274 audbit = 4;
275 break;
276 default:
277 dev_err(dev, "Unsupported width %d\n", width);
278 return -EINVAL;
279 }
280
281 slot_width = params_physical_width(param);
282 if (rt9123->tdm_slots && slot_width > rt9123->tdm_slot_width) {
283 dev_err(dev, "Slot width is larger than TDM slot width\n");
284 return -EINVAL;
285 }
286
287 snd_soc_component_write_field(comp, RT9123_REG_I2SOPT, RT9123_MASK_AUDFMT, audfmt);
288 snd_soc_component_write_field(comp, RT9123_REG_I2SOPT, RT9123_MASK_AUDBIT, audbit);
289
290 return 0;
291 }
292
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists