From: kernel test robot <lkp@intel.com>
To: Zhang Yi <zhangyi@everest-semi.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH] ASoC: codecs: ES8326: Reduce pop noise
Date: Mon, 30 Dec 2024 00:09:12 +0800 [thread overview]
Message-ID: <202412292344.POE1YKPC-lkp@intel.com> (raw)
In-Reply-To: <20241220104322.31867-1-zhangyi@everest-semi.com>
Hi Zhang,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-sound/for-next]
[also build test WARNING on tiwai-sound/for-next tiwai-sound/for-linus linus/master v6.13-rc4 next-20241220]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Zhang-Yi/ASoC-codecs-ES8326-Reduce-pop-noise/20241229-205825
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
patch link: https://lore.kernel.org/r/20241220104322.31867-1-zhangyi%40everest-semi.com
patch subject: [PATCH] ASoC: codecs: ES8326: Reduce pop noise
config: arm-randconfig-001-20241229 (https://download.01.org/0day-ci/archive/20241229/202412292344.POE1YKPC-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241229/202412292344.POE1YKPC-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412292344.POE1YKPC-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/soc/codecs/es8326.c:790:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
case 0x4b:
^
sound/soc/codecs/es8326.c:790:2: note: insert '__attribute__((fallthrough));' to silence this warning
case 0x4b:
^
__attribute__((fallthrough));
sound/soc/codecs/es8326.c:790:2: note: insert 'break;' to avoid fall-through
case 0x4b:
^
break;
1 warning generated.
vim +790 sound/soc/codecs/es8326.c
5c439937775d77 Zhu Ning 2022-08-16 759
5c439937775d77 Zhu Ning 2022-08-16 760 /*
5c439937775d77 Zhu Ning 2022-08-16 761 * For button detection, set the following in soundcard
5c439937775d77 Zhu Ning 2022-08-16 762 * snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
5c439937775d77 Zhu Ning 2022-08-16 763 * snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
5c439937775d77 Zhu Ning 2022-08-16 764 * snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
5c439937775d77 Zhu Ning 2022-08-16 765 */
5c439937775d77 Zhu Ning 2022-08-16 766 static void es8326_jack_button_handler(struct work_struct *work)
5c439937775d77 Zhu Ning 2022-08-16 767 {
5c439937775d77 Zhu Ning 2022-08-16 768 struct es8326_priv *es8326 =
5c439937775d77 Zhu Ning 2022-08-16 769 container_of(work, struct es8326_priv, button_press_work.work);
5c439937775d77 Zhu Ning 2022-08-16 770 struct snd_soc_component *comp = es8326->component;
5c439937775d77 Zhu Ning 2022-08-16 771 unsigned int iface;
5c439937775d77 Zhu Ning 2022-08-16 772 static int button_to_report, press_count;
5c439937775d77 Zhu Ning 2022-08-16 773 static int prev_button, cur_button;
5c439937775d77 Zhu Ning 2022-08-16 774
5c439937775d77 Zhu Ning 2022-08-16 775 if (!(es8326->jack->status & SND_JACK_HEADSET)) /* Jack unplugged */
5c439937775d77 Zhu Ning 2022-08-16 776 return;
5c439937775d77 Zhu Ning 2022-08-16 777
5c439937775d77 Zhu Ning 2022-08-16 778 mutex_lock(&es8326->lock);
4ddad00c609bdc Zhu Ning 2023-07-17 779 iface = snd_soc_component_read(comp, ES8326_HPDET_STA);
5c439937775d77 Zhu Ning 2022-08-16 780 switch (iface) {
5c439937775d77 Zhu Ning 2022-08-16 781 case 0x93:
5c439937775d77 Zhu Ning 2022-08-16 782 /* pause button detected */
5c439937775d77 Zhu Ning 2022-08-16 783 cur_button = SND_JACK_BTN_0;
5c439937775d77 Zhu Ning 2022-08-16 784 break;
5c439937775d77 Zhu Ning 2022-08-16 785 case 0x6f:
3ed48ef7e14cc4 Zhang Yi 2024-12-20 786 if (es8326->version > ES8326_VERSION_B) {
3ed48ef7e14cc4 Zhang Yi 2024-12-20 787 cur_button = SND_JACK_BTN_0;
3ed48ef7e14cc4 Zhang Yi 2024-12-20 788 break;
3ed48ef7e14cc4 Zhang Yi 2024-12-20 789 }
04f96c9340463a Zhu Ning 2023-07-17 @790 case 0x4b:
5c439937775d77 Zhu Ning 2022-08-16 791 /* button volume up */
5c439937775d77 Zhu Ning 2022-08-16 792 cur_button = SND_JACK_BTN_1;
5c439937775d77 Zhu Ning 2022-08-16 793 break;
5c439937775d77 Zhu Ning 2022-08-16 794 case 0x27:
5c439937775d77 Zhu Ning 2022-08-16 795 /* button volume down */
5c439937775d77 Zhu Ning 2022-08-16 796 cur_button = SND_JACK_BTN_2;
5c439937775d77 Zhu Ning 2022-08-16 797 break;
5c439937775d77 Zhu Ning 2022-08-16 798 case 0x1e:
04f96c9340463a Zhu Ning 2023-07-17 799 case 0xe2:
5c439937775d77 Zhu Ning 2022-08-16 800 /* button released or not pressed */
5c439937775d77 Zhu Ning 2022-08-16 801 cur_button = 0;
5c439937775d77 Zhu Ning 2022-08-16 802 break;
5c439937775d77 Zhu Ning 2022-08-16 803 default:
5c439937775d77 Zhu Ning 2022-08-16 804 break;
5c439937775d77 Zhu Ning 2022-08-16 805 }
5c439937775d77 Zhu Ning 2022-08-16 806
5c439937775d77 Zhu Ning 2022-08-16 807 if ((prev_button == cur_button) && (cur_button != 0)) {
5c439937775d77 Zhu Ning 2022-08-16 808 press_count++;
04f96c9340463a Zhu Ning 2023-07-17 809 if (press_count > 3) {
04f96c9340463a Zhu Ning 2023-07-17 810 /* report a press every 120ms */
5c439937775d77 Zhu Ning 2022-08-16 811 snd_soc_jack_report(es8326->jack, cur_button,
5c439937775d77 Zhu Ning 2022-08-16 812 SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2);
5c439937775d77 Zhu Ning 2022-08-16 813 press_count = 0;
5c439937775d77 Zhu Ning 2022-08-16 814 }
5c439937775d77 Zhu Ning 2022-08-16 815 button_to_report = cur_button;
5c439937775d77 Zhu Ning 2022-08-16 816 queue_delayed_work(system_wq, &es8326->button_press_work,
04f96c9340463a Zhu Ning 2023-07-17 817 msecs_to_jiffies(35));
5c439937775d77 Zhu Ning 2022-08-16 818 } else if (prev_button != cur_button) {
5c439937775d77 Zhu Ning 2022-08-16 819 /* mismatch, detect again */
5c439937775d77 Zhu Ning 2022-08-16 820 prev_button = cur_button;
5c439937775d77 Zhu Ning 2022-08-16 821 queue_delayed_work(system_wq, &es8326->button_press_work,
04f96c9340463a Zhu Ning 2023-07-17 822 msecs_to_jiffies(35));
5c439937775d77 Zhu Ning 2022-08-16 823 } else {
5c439937775d77 Zhu Ning 2022-08-16 824 /* released or no pressed */
5c439937775d77 Zhu Ning 2022-08-16 825 if (button_to_report != 0) {
5c439937775d77 Zhu Ning 2022-08-16 826 snd_soc_jack_report(es8326->jack, button_to_report,
5c439937775d77 Zhu Ning 2022-08-16 827 SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2);
5c439937775d77 Zhu Ning 2022-08-16 828 snd_soc_jack_report(es8326->jack, 0,
5c439937775d77 Zhu Ning 2022-08-16 829 SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2);
5c439937775d77 Zhu Ning 2022-08-16 830 button_to_report = 0;
5c439937775d77 Zhu Ning 2022-08-16 831 }
6024f3429fd1ac Zhang Yi 2024-07-26 832 es8326_disable_micbias(es8326->component);
5c439937775d77 Zhu Ning 2022-08-16 833 }
5c439937775d77 Zhu Ning 2022-08-16 834 mutex_unlock(&es8326->lock);
5c439937775d77 Zhu Ning 2022-08-16 835 }
5c439937775d77 Zhu Ning 2022-08-16 836
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-29 16:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 10:43 [PATCH] ASoC: codecs: ES8326: Reduce pop noise Zhang Yi
2024-12-29 16:09 ` kernel test robot [this message]
2024-12-29 16:41 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-10-31 6:02 Zhang Yi
2024-11-05 16:38 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202412292344.POE1YKPC-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=zhangyi@everest-semi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.