Re: [PATCH] Make top/rear speaker, mute and micmute leds work on HP x360 14-ea000 laptops that use Realtek 245 codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jonathan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tiwai-sound/for-next]
[cannot apply to v5.15-rc7 next-20211029]
[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/Jonathan-Clarke/Make-top-rear-speaker-mute-and-micmute-leds-work-on-HP-x360-14-ea000-laptops-that-use-Realtek-245-codec/20211029-234508
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/a4b221979b51a8d3256056869efc55d4dc80a4ad
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jonathan-Clarke/Make-top-rear-speaker-mute-and-micmute-leds-work-on-HP-x360-14-ea000-laptops-that-use-Realtek-245-codec/20211029-234508
        git checkout a4b221979b51a8d3256056869efc55d4dc80a4ad
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   sound/pci/hda/patch_realtek.c: In function 'alc245_fixup_hp_x360_amp':
>> sound/pci/hda/patch_realtek.c:4417:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
    4417 |   static const hda_nid_t conn1[] = { 0x02 };
         |   ^~~~~~
   cc1: all warnings being treated as errors


vim +4417 sound/pci/hda/patch_realtek.c

  4400	
  4401	/* HP Spectre x360 14 model needs a unique workaround for enabling the amp;
  4402	 * it needs to toggle the GPIO0 once on and off at each time (bko#210633)
  4403	 */
  4404	static void alc245_fixup_hp_x360_amp(struct hda_codec *codec,
  4405					     const struct hda_fixup *fix, int action)
  4406	{
  4407		struct alc_spec *spec = codec->spec;
  4408	
  4409		switch (action) {
  4410		case HDA_FIXUP_ACT_PRE_PROBE:
  4411			spec->gpio_mask |= 0x01;
  4412			spec->gpio_dir |= 0x01;
  4413	
  4414			/* use only amp at 0x02 for bottom(front) speaker,
  4415			 * otherwise it is set to use 0x02,0x03,0x06 and when used in conjunction
  4416			 * with top(rear) speaker 0x14, gets locked at full volume */
> 4417			static const hda_nid_t conn1[] = { 0x02 };
  4418			snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn1), conn1);
  4419	
  4420			break;
  4421		case HDA_FIXUP_ACT_INIT:
  4422			/* need to toggle GPIO to enable the amp */
  4423			alc_update_gpio_data(codec, 0x01, true);
  4424			msleep(100);
  4425			alc_update_gpio_data(codec, 0x01, false);
  4426			break;
  4427		}
  4428	}
  4429	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux