tree: https://github.com/ammarfaizi2/linux-block stable/linux-stable-rc/queue/4.19 head: 33d36daaa2310f4dcab3e5e03f0b269e85ec5008 commit: 25c97654c3cb12fb81b08ad4b2216d2d6e25fe33 [22/42] ALSA: hda/tegra: correct number of SDO lines for Tegra194 config: arm-defconfig compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/ammarfaizi2/linux-block/commit/25c97654c3cb12fb81b08ad4b2216d2d6e25fe33 git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block git fetch --no-tags ammarfaizi2-block stable/linux-stable-rc/queue/4.19 git checkout 25c97654c3cb12fb81b08ad4b2216d2d6e25fe33 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash sound/pci/hda/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): sound/pci/hda/hda_tegra.c: In function 'hda_tegra_first_init': >> sound/pci/hda/hda_tegra.c:441:37: error: 'np' undeclared (first use in this function); did you mean 'up'? 441 | if (of_device_is_compatible(np, "nvidia,tegra194-hda")) { | ^~ | up sound/pci/hda/hda_tegra.c:441:37: note: each undeclared identifier is reported only once for each function it appears in vim +441 sound/pci/hda/hda_tegra.c 403 404 static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev) 405 { 406 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); 407 struct hdac_bus *bus = azx_bus(chip); 408 struct snd_card *card = chip->card; 409 int err; 410 unsigned short gcap; 411 int irq_id = platform_get_irq(pdev, 0); 412 413 if (irq_id < 0) 414 return irq_id; 415 416 err = hda_tegra_init_chip(chip, pdev); 417 if (err) 418 return err; 419 420 err = devm_request_irq(chip->card->dev, irq_id, azx_interrupt, 421 IRQF_SHARED, KBUILD_MODNAME, chip); 422 if (err) { 423 dev_err(chip->card->dev, 424 "unable to request IRQ %d, disabling device\n", 425 irq_id); 426 return err; 427 } 428 bus->irq = irq_id; 429 430 synchronize_irq(bus->irq); 431 432 /* 433 * Tegra194 has 4 SDO lines and the STRIPE can be used to 434 * indicate how many of the SDO lines the stream should be 435 * striped. But GCAP register does not reflect the true 436 * capability of HW. Below workaround helps to fix this. 437 * 438 * GCAP_NSDO is bits 19:18 in T_AZA_DBG_CFG_2, 439 * 0 for 1 SDO, 1 for 2 SDO, 2 for 4 SDO lines. 440 */ > 441 if (of_device_is_compatible(np, "nvidia,tegra194-hda")) { 442 u32 val; 443 444 dev_info(card->dev, "Override SDO lines to %u\n", 445 TEGRA194_NUM_SDO_LINES); 446 447 val = readl(hda->regs + FPCI_DBG_CFG_2) & ~FPCI_GCAP_NSDO_MASK; 448 val |= (TEGRA194_NUM_SDO_LINES >> 1) << FPCI_GCAP_NSDO_SHIFT; 449 writel(val, hda->regs + FPCI_DBG_CFG_2); 450 } 451 452 gcap = azx_readw(chip, GCAP); 453 dev_dbg(card->dev, "chipset global capabilities = 0x%x\n", gcap); 454 455 /* read number of streams from GCAP register instead of using 456 * hardcoded value 457 */ 458 chip->capture_streams = (gcap >> 8) & 0x0f; 459 chip->playback_streams = (gcap >> 12) & 0x0f; 460 if (!chip->playback_streams && !chip->capture_streams) { 461 /* gcap didn't give any info, switching to old method */ 462 chip->playback_streams = NUM_PLAYBACK_SD; 463 chip->capture_streams = NUM_CAPTURE_SD; 464 } 465 chip->capture_index_offset = 0; 466 chip->playback_index_offset = chip->capture_streams; 467 chip->num_streams = chip->playback_streams + chip->capture_streams; 468 469 /* initialize streams */ 470 err = azx_init_streams(chip); 471 if (err < 0) { 472 dev_err(card->dev, "failed to initialize streams: %d\n", err); 473 return err; 474 } 475 476 err = azx_alloc_stream_pages(chip); 477 if (err < 0) { 478 dev_err(card->dev, "failed to allocate stream pages: %d\n", 479 err); 480 return err; 481 } 482 483 /* initialize chip */ 484 azx_init_chip(chip, 1); 485 486 /* codec detection */ 487 if (!bus->codec_mask) { 488 dev_err(card->dev, "no codecs found!\n"); 489 return -ENODEV; 490 } 491 492 strcpy(card->driver, "tegra-hda"); 493 strcpy(card->shortname, "tegra-hda"); 494 snprintf(card->longname, sizeof(card->longname), 495 "%s at 0x%lx irq %i", 496 card->shortname, bus->addr, bus->irq); 497 498 return 0; 499 } 500 -- 0-DAY CI Kernel Test Service https://01.org/lkp