Skip to contentSkip to conversation

ASoC: rt715: Add module parameter to fix dmic pop sound issue.

PATCH Superseded Pierre-Louis Bossart 2 participants 5 messages Sep 16, 2020 – Sep 17, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt715: Add module parameter to fix dmic pop sound issue.

From: Jack Yu <[email protected]>

Add module parameter "power_up_delay" to fix pop noise on capture. The power_up_delay value is set with a default value of 400ms, smaller values are not recommended.

---
 sound/soc/codecs/rt715.c | 5 +++++
 1 file changed, 5 insertions(+)
sound/soc/codecs/rt715.c +5 -0
index 099c8bd20006..0cf10dec1e3b 100644
@@ -37,6 +37,10 @@
 
 #include "rt715.h"
 
+static int power_up_delay = 400;
+module_param(power_up_delay, int, 0444);
+MODULE_PARM_DESC(power_up_delay, "RT715 power up delay time in ms");
+
 static int rt715_index_write(struct regmap *regmap, unsigned int reg,
 		unsigned int value)
 {
@@ -498,6 +502,7 @@ static int rt715_set_bias_level(struct snd_soc_component *component,
 			regmap_write(rt715->regmap,
 						RT715_SET_AUDIO_POWER_STATE,
 						AC_PWRST_D0);
+			msleep(power_up_delay);
 		}
 		break;
 
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 5 lines · Pierre-Louis Bossart

From: Jack Yu <[email protected]>

Add module parameter "power_up_delay" to fix pop noise on capture. The power_up_delay value is set with a default value of 400ms, smaller values are not recommended.

Normally we would just add a delay in the driver unconditionally, why make this a module paramter? If there are board variations then we should be getting them from board data, not forcing individual users to bodge things with a module parameter.

#2 lore raw
Quoted 11 lines · Mark Brown
Quoted 5 lines · Pierre-Louis Bossart

From: Jack Yu <[email protected]>

Add module parameter "power_up_delay" to fix pop noise on capture. The power_up_delay value is set with a default value of 400ms, smaller values are not recommended.

Normally we would just add a delay in the driver unconditionally, why make this a module paramter? If there are board variations then we should be getting them from board data, not forcing individual users to bodge things with a module parameter.

that wasn't the intent. 400ms is the recommended value, but the parameter provides a way to experiment without having to recompile during integration/debug stages.

It was my recommendation to add this parameter, I don't mind removing it if you prefer it that way. Or I can respin the commit message and comments to make it clearer what the intended use was.

maintainer
#3 lore raw
Quoted 7 lines · Pierre-Louis Bossart
Quoted 4 lines · Mark Brown

Normally we would just add a delay in the driver unconditionally, why make this a module paramter? If there are board variations then we should be getting them from board data, not forcing individual users to bodge things with a module parameter.

Quoted 7 lines

that wasn't the intent. 400ms is the recommended value, but the parameter provides a way to experiment without having to recompile during integration/debug stages.

It was my recommendation to add this parameter, I don't mind removing it if you prefer it that way. Or I can respin the commit message and comments to make it clearer what the intended use was.

It'd be better to just remove it. If you want a facility to experiment for testing debugfs is a better fit I think, unless this is a delay that only gets done once during probe of course in which case that wouldn't work.

#4 lore raw
Quoted 12 lines · Mark Brown
Quoted 10 lines · Pierre-Louis Bossart
Quoted 4 lines · Mark Brown

Normally we would just add a delay in the driver unconditionally, why make this a module paramter? If there are board variations then we should be getting them from board data, not forcing individual users to bodge things with a module parameter.

that wasn't the intent. 400ms is the recommended value, but the parameter provides a way to experiment without having to recompile during integration/debug stages.

Quoted 8 lines
Quoted 3 lines

It was my recommendation to add this parameter, I don't mind removing it if you prefer it that way. Or I can respin the commit message and comments to make it clearer what the intended use was.

It'd be better to just remove it. If you want a facility to experiment for testing debugfs is a better fit I think, unless this is a delay that only gets done once during probe of course in which case that wouldn't work.

ok, I'll send a v2.