All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: ES8326: Reduce pop noise
@ 2024-10-31  6:02 Zhang Yi
  2024-11-05 16:38 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Zhang Yi @ 2024-10-31  6:02 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: tiwai, amadeuszx.slawinski, yangxiaohua, zhuning, zhangyi

We modify the value of ES8326_ANA_MICBIAS to reduce the pop noise

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
---
 sound/soc/codecs/es8326.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index aa3e364827c8..a5603b617688 100755
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -616,7 +616,7 @@ static int es8326_mute(struct snd_soc_dai *dai, int mute, int direction)
 					0x0F, 0x0F);
 			if (es8326->version > ES8326_VERSION_B) {
 				regmap_update_bits(es8326->regmap, ES8326_VMIDSEL, 0x40, 0x40);
-				regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x00);
+				regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x10);
 			}
 		}
 	} else {
@@ -1082,7 +1082,7 @@ static void es8326_init(struct snd_soc_component *component)
 	regmap_write(es8326->regmap, ES8326_ADC2_SRC, 0x66);
 	es8326_disable_micbias(es8326->component);
 	if (es8326->version > ES8326_VERSION_B) {
-		regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x73, 0x03);
+		regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x73, 0x13);
 		regmap_update_bits(es8326->regmap, ES8326_VMIDSEL, 0x40, 0x40);
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: codecs: ES8326: Reduce pop noise
  2024-10-31  6:02 Zhang Yi
@ 2024-11-05 16:38 ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-11-05 16:38 UTC (permalink / raw)
  To: alsa-devel, Zhang Yi; +Cc: tiwai, amadeuszx.slawinski, yangxiaohua, zhuning

On Thu, 31 Oct 2024 14:02:53 +0800, Zhang Yi wrote:
> We modify the value of ES8326_ANA_MICBIAS to reduce the pop noise
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: codecs: ES8326: Reduce pop noise
      commit: 8f5fab5329b7e966344d59fd1c17adbf9f025c52

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ASoC: codecs: ES8326: Reduce pop noise
@ 2024-12-20 10:43 Zhang Yi
  2024-12-29 16:09 ` kernel test robot
  2024-12-29 16:41 ` kernel test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Zhang Yi @ 2024-12-20 10:43 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: tiwai, amadeuszx.slawinski, yangxiaohua, zhuning, zhangyi

We modify the value of ES8326_ANA_MICBIAS to reduce the pop noise

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
---
 sound/soc/codecs/es8326.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c
index a5603b617688..27736c6933c5 100755
--- a/sound/soc/codecs/es8326.c
+++ b/sound/soc/codecs/es8326.c
@@ -616,7 +616,7 @@ static int es8326_mute(struct snd_soc_dai *dai, int mute, int direction)
 					0x0F, 0x0F);
 			if (es8326->version > ES8326_VERSION_B) {
 				regmap_update_bits(es8326->regmap, ES8326_VMIDSEL, 0x40, 0x40);
-				regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x10);
+				regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x30);
 			}
 		}
 	} else {
@@ -631,6 +631,8 @@ static int es8326_mute(struct snd_soc_dai *dai, int mute, int direction)
 			regmap_write(es8326->regmap, ES8326_HPR_OFFSET_INI, offset_r);
 			es8326->calibrated = true;
 		}
+		regmap_update_bits(es8326->regmap, ES8326_CLK_INV, 0xc0, 0x00);
+                regmap_update_bits(es8326->regmap, ES8326_CLK_MUX, 0x80, 0x00);
 		if (direction == SNDRV_PCM_STREAM_PLAYBACK) {
 			regmap_update_bits(es8326->regmap, ES8326_DAC_DSM, 0x01, 0x01);
 			usleep_range(1000, 5000);
@@ -645,7 +647,7 @@ static int es8326_mute(struct snd_soc_dai *dai, int mute, int direction)
 		} else {
 			msleep(300);
 			if (es8326->version > ES8326_VERSION_B) {
-				regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x50);
+				regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x70);
 				regmap_update_bits(es8326->regmap, ES8326_VMIDSEL, 0x40, 0x00);
 			}
 			regmap_update_bits(es8326->regmap,  ES8326_ADC_MUTE,
@@ -676,6 +678,10 @@ static int es8326_set_bias_level(struct snd_soc_component *codec,
 		regmap_write(es8326->regmap, ES8326_ANA_PDN, 0x00);
 		regmap_update_bits(es8326->regmap,  ES8326_CLK_CTL, 0x20, 0x20);
 		regmap_update_bits(es8326->regmap, ES8326_RESET, 0x02, 0x00);
+		if (es8326->version > ES8326_VERSION_B) {
+			regmap_update_bits(es8326->regmap, ES8326_VMIDSEL, 0x40, 0x40);
+			regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x30);
+		}
 		break;
 	case SND_SOC_BIAS_PREPARE:
 		break;
@@ -683,6 +689,12 @@ static int es8326_set_bias_level(struct snd_soc_component *codec,
 		regmap_write(es8326->regmap, ES8326_ANA_PDN, 0x3b);
 		regmap_update_bits(es8326->regmap, ES8326_CLK_CTL, 0x20, 0x00);
 		regmap_write(es8326->regmap, ES8326_SDINOUT1_IO, ES8326_IO_INPUT);
+		if (es8326->version > ES8326_VERSION_B) {
+			regmap_update_bits(es8326->regmap, ES8326_VMIDSEL, 0x40, 0x40);
+			regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x70, 0x10);
+		}
+		regmap_update_bits(es8326->regmap, ES8326_CLK_INV, 0xc0, 0xc0);
+		regmap_update_bits(es8326->regmap, ES8326_CLK_MUX, 0x80, 0x80);
 		break;
 	case SND_SOC_BIAS_OFF:
 		clk_disable_unprepare(es8326->mclk);
@@ -771,6 +783,10 @@ static void es8326_jack_button_handler(struct work_struct *work)
 		cur_button = SND_JACK_BTN_0;
 		break;
 	case 0x6f:
+		if (es8326->version > ES8326_VERSION_B) {
+			cur_button = SND_JACK_BTN_0;
+			break;
+		}
 	case 0x4b:
 		/* button volume up */
 		cur_button = SND_JACK_BTN_1;
@@ -1082,7 +1098,7 @@ static void es8326_init(struct snd_soc_component *component)
 	regmap_write(es8326->regmap, ES8326_ADC2_SRC, 0x66);
 	es8326_disable_micbias(es8326->component);
 	if (es8326->version > ES8326_VERSION_B) {
-		regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x73, 0x13);
+		regmap_update_bits(es8326->regmap, ES8326_ANA_MICBIAS, 0x73, 0x10);
 		regmap_update_bits(es8326->regmap, ES8326_VMIDSEL, 0x40, 0x40);
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: codecs: ES8326: Reduce pop noise
  2024-12-20 10:43 [PATCH] ASoC: codecs: ES8326: Reduce pop noise Zhang Yi
@ 2024-12-29 16:09 ` kernel test robot
  2024-12-29 16:41 ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-12-29 16:09 UTC (permalink / raw)
  To: Zhang Yi; +Cc: llvm, oe-kbuild-all

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: codecs: ES8326: Reduce pop noise
  2024-12-20 10:43 [PATCH] ASoC: codecs: ES8326: Reduce pop noise Zhang Yi
  2024-12-29 16:09 ` kernel test robot
@ 2024-12-29 16:41 ` kernel test robot
  1 sibling, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-12-29 16:41 UTC (permalink / raw)
  To: Zhang Yi; +Cc: oe-kbuild-all

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: arm64-randconfig-002-20241229 (https://download.01.org/0day-ci/archive/20241230/202412300023.AZpA3xBC-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241230/202412300023.AZpA3xBC-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/202412300023.AZpA3xBC-lkp@intel.com/

All warnings (new ones prefixed by >>):

   sound/soc/codecs/es8326.c: In function 'es8326_jack_button_handler':
>> sound/soc/codecs/es8326.c:786:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
     786 |                 if (es8326->version > ES8326_VERSION_B) {
         |                    ^
   sound/soc/codecs/es8326.c:790:9: note: here
     790 |         case 0x4b:
         |         ^~~~


vim +786 sound/soc/codecs/es8326.c

   759	
   760	/*
   761	 *	For button detection, set the following in soundcard
   762	 *	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
   763	 *	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
   764	 *	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
   765	 */
   766	static void es8326_jack_button_handler(struct work_struct *work)
   767	{
   768		struct es8326_priv *es8326 =
   769			container_of(work, struct es8326_priv, button_press_work.work);
   770		struct snd_soc_component *comp = es8326->component;
   771		unsigned int iface;
   772		static int button_to_report, press_count;
   773		static int prev_button, cur_button;
   774	
   775		if (!(es8326->jack->status & SND_JACK_HEADSET)) /* Jack unplugged */
   776			return;
   777	
   778		mutex_lock(&es8326->lock);
   779		iface = snd_soc_component_read(comp, ES8326_HPDET_STA);
   780		switch (iface) {
   781		case 0x93:
   782			/* pause button detected */
   783			cur_button = SND_JACK_BTN_0;
   784			break;
   785		case 0x6f:
 > 786			if (es8326->version > ES8326_VERSION_B) {
   787				cur_button = SND_JACK_BTN_0;
   788				break;
   789			}
   790		case 0x4b:
   791			/* button volume up */
   792			cur_button = SND_JACK_BTN_1;
   793			break;
   794		case 0x27:
   795			/* button volume down */
   796			cur_button = SND_JACK_BTN_2;
   797			break;
   798		case 0x1e:
   799		case 0xe2:
   800			/* button released or not pressed */
   801			cur_button = 0;
   802			break;
   803		default:
   804			break;
   805		}
   806	
   807		if ((prev_button == cur_button) && (cur_button != 0)) {
   808			press_count++;
   809			if (press_count > 3) {
   810				/* report a press every 120ms */
   811				snd_soc_jack_report(es8326->jack, cur_button,
   812						SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2);
   813				press_count = 0;
   814			}
   815			button_to_report = cur_button;
   816			queue_delayed_work(system_wq, &es8326->button_press_work,
   817					   msecs_to_jiffies(35));
   818		} else if (prev_button != cur_button) {
   819			/* mismatch, detect again */
   820			prev_button = cur_button;
   821			queue_delayed_work(system_wq, &es8326->button_press_work,
   822					   msecs_to_jiffies(35));
   823		} else {
   824			/* released or no pressed */
   825			if (button_to_report != 0) {
   826				snd_soc_jack_report(es8326->jack, button_to_report,
   827					    SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2);
   828				snd_soc_jack_report(es8326->jack, 0,
   829					    SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2);
   830				button_to_report = 0;
   831			}
   832			es8326_disable_micbias(es8326->component);
   833		}
   834		mutex_unlock(&es8326->lock);
   835	}
   836	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-12-29 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 10:43 [PATCH] ASoC: codecs: ES8326: Reduce pop noise Zhang Yi
2024-12-29 16:09 ` kernel test robot
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

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.