* [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes
@ 2021-11-16 11:46 ` Srinivas Kandagatla
0 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, perex, tiwai, pierre-louis.bossart, alsa-devel,
linux-kernel, Srinivas Kandagatla
Hi Mark,
We found few issues during runtime pm testing on this codecs.
These 3 patches for wcd938x, wcd934x and lpass-rx-macro should address them.
Thanks,
srini
Srinivas Kandagatla (3):
ASoC: codecs: wcd938x: fix volatile register range
ASoC: codecs: wcd934x: return error code correctly from hw_params
ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
sound/soc/codecs/lpass-rx-macro.c | 2 +-
sound/soc/codecs/wcd934x.c | 3 +--
sound/soc/codecs/wcd938x.c | 3 +++
3 files changed, 5 insertions(+), 3 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes
@ 2021-11-16 11:46 ` Srinivas Kandagatla
0 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, lgirdwood, linux-kernel, pierre-louis.bossart, tiwai
Hi Mark,
We found few issues during runtime pm testing on this codecs.
These 3 patches for wcd938x, wcd934x and lpass-rx-macro should address them.
Thanks,
srini
Srinivas Kandagatla (3):
ASoC: codecs: wcd938x: fix volatile register range
ASoC: codecs: wcd934x: return error code correctly from hw_params
ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
sound/soc/codecs/lpass-rx-macro.c | 2 +-
sound/soc/codecs/wcd934x.c | 3 +--
sound/soc/codecs/wcd938x.c | 3 +++
3 files changed, 5 insertions(+), 3 deletions(-)
--
2.21.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] ASoC: codecs: wcd938x: fix volatile register range
2021-11-16 11:46 ` Srinivas Kandagatla
@ 2021-11-16 11:46 ` Srinivas Kandagatla
-1 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, perex, tiwai, pierre-louis.bossart, alsa-devel,
linux-kernel, Srinivas Kandagatla
Interrupt Clear registers WCD938X_INTR_CLEAR_0 - WCD938X_INTR_CLEAR_2
are not marked as volatile. This has resulted in a missing interrupt bug
while performing runtime pm. regcache_sync() during runtime pm resume path
will write to Interrupt clear registers with previous values which basically
clears the pending interrupt and actual interrupt handler never sees this
interrupt.
This issue is more visible with headset plug-in plug-out case compared to
headset button.
Fix this by adding the Interrupt clear registers to volatile range
Fixes: 8d78602aa87a ("ASoC: codecs: wcd938x: add basic driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/codecs/wcd938x.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 52de7d14b139..67151c7770c6 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -1174,6 +1174,9 @@ static bool wcd938x_readonly_register(struct device *dev, unsigned int reg)
case WCD938X_DIGITAL_INTR_STATUS_0:
case WCD938X_DIGITAL_INTR_STATUS_1:
case WCD938X_DIGITAL_INTR_STATUS_2:
+ case WCD938X_DIGITAL_INTR_CLEAR_0:
+ case WCD938X_DIGITAL_INTR_CLEAR_1:
+ case WCD938X_DIGITAL_INTR_CLEAR_2:
case WCD938X_DIGITAL_SWR_HM_TEST_0:
case WCD938X_DIGITAL_SWR_HM_TEST_1:
case WCD938X_DIGITAL_EFUSE_T_DATA_0:
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/3] ASoC: codecs: wcd938x: fix volatile register range
@ 2021-11-16 11:46 ` Srinivas Kandagatla
0 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, lgirdwood, linux-kernel, pierre-louis.bossart, tiwai
Interrupt Clear registers WCD938X_INTR_CLEAR_0 - WCD938X_INTR_CLEAR_2
are not marked as volatile. This has resulted in a missing interrupt bug
while performing runtime pm. regcache_sync() during runtime pm resume path
will write to Interrupt clear registers with previous values which basically
clears the pending interrupt and actual interrupt handler never sees this
interrupt.
This issue is more visible with headset plug-in plug-out case compared to
headset button.
Fix this by adding the Interrupt clear registers to volatile range
Fixes: 8d78602aa87a ("ASoC: codecs: wcd938x: add basic driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/codecs/wcd938x.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 52de7d14b139..67151c7770c6 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -1174,6 +1174,9 @@ static bool wcd938x_readonly_register(struct device *dev, unsigned int reg)
case WCD938X_DIGITAL_INTR_STATUS_0:
case WCD938X_DIGITAL_INTR_STATUS_1:
case WCD938X_DIGITAL_INTR_STATUS_2:
+ case WCD938X_DIGITAL_INTR_CLEAR_0:
+ case WCD938X_DIGITAL_INTR_CLEAR_1:
+ case WCD938X_DIGITAL_INTR_CLEAR_2:
case WCD938X_DIGITAL_SWR_HM_TEST_0:
case WCD938X_DIGITAL_SWR_HM_TEST_1:
case WCD938X_DIGITAL_EFUSE_T_DATA_0:
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params
2021-11-16 11:46 ` Srinivas Kandagatla
@ 2021-11-16 11:46 ` Srinivas Kandagatla
-1 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, perex, tiwai, pierre-louis.bossart, alsa-devel,
linux-kernel, Srinivas Kandagatla
Error returned from wcd934x_slim_set_hw_params() are not passed to upper layer,
this could be misleading to the user which can start sending stream leading
to unnecessary errors.
Fix this by properly returning the errors.
Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/codecs/wcd934x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
index c496b359f2f4..4f568abd59e2 100644
--- a/sound/soc/codecs/wcd934x.c
+++ b/sound/soc/codecs/wcd934x.c
@@ -1896,9 +1896,8 @@ static int wcd934x_hw_params(struct snd_pcm_substream *substream,
}
wcd->dai[dai->id].sconfig.rate = params_rate(params);
- wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream);
- return 0;
+ return wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream);
}
static int wcd934x_hw_free(struct snd_pcm_substream *substream,
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params
@ 2021-11-16 11:46 ` Srinivas Kandagatla
0 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, lgirdwood, linux-kernel, pierre-louis.bossart, tiwai
Error returned from wcd934x_slim_set_hw_params() are not passed to upper layer,
this could be misleading to the user which can start sending stream leading
to unnecessary errors.
Fix this by properly returning the errors.
Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/codecs/wcd934x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wcd934x.c b/sound/soc/codecs/wcd934x.c
index c496b359f2f4..4f568abd59e2 100644
--- a/sound/soc/codecs/wcd934x.c
+++ b/sound/soc/codecs/wcd934x.c
@@ -1896,9 +1896,8 @@ static int wcd934x_hw_params(struct snd_pcm_substream *substream,
}
wcd->dai[dai->id].sconfig.rate = params_rate(params);
- wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream);
- return 0;
+ return wcd934x_slim_set_hw_params(wcd, &wcd->dai[dai->id], substream->stream);
}
static int wcd934x_hw_free(struct snd_pcm_substream *substream,
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
2021-11-16 11:46 ` Srinivas Kandagatla
@ 2021-11-16 11:46 ` Srinivas Kandagatla
-1 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, perex, tiwai, pierre-louis.bossart, alsa-devel,
linux-kernel, Srinivas Kandagatla
For some reason we ended up using snd_soc_component_write_field
for HPHL and snd_soc_component_update_bits for HPHR, so fix this.
Fixes: af3d54b99764 ("ASoC: codecs: lpass-rx-macro: add support for lpass rx macro")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/codecs/lpass-rx-macro.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 2bed5cf229be..aec5127260fd 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -2188,7 +2188,7 @@ static int rx_macro_config_classh(struct snd_soc_component *component,
snd_soc_component_update_bits(component,
CDC_RX_CLSH_DECAY_CTRL,
CDC_RX_CLSH_DECAY_RATE_MASK, 0x0);
- snd_soc_component_update_bits(component,
+ snd_soc_component_write_field(component,
CDC_RX_RX1_RX_PATH_CFG0,
CDC_RX_RXn_CLSH_EN_MASK, 0x1);
break;
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
@ 2021-11-16 11:46 ` Srinivas Kandagatla
0 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2021-11-16 11:46 UTC (permalink / raw)
To: broonie; +Cc: alsa-devel, lgirdwood, linux-kernel, pierre-louis.bossart, tiwai
For some reason we ended up using snd_soc_component_write_field
for HPHL and snd_soc_component_update_bits for HPHR, so fix this.
Fixes: af3d54b99764 ("ASoC: codecs: lpass-rx-macro: add support for lpass rx macro")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
sound/soc/codecs/lpass-rx-macro.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index 2bed5cf229be..aec5127260fd 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -2188,7 +2188,7 @@ static int rx_macro_config_classh(struct snd_soc_component *component,
snd_soc_component_update_bits(component,
CDC_RX_CLSH_DECAY_CTRL,
CDC_RX_CLSH_DECAY_RATE_MASK, 0x0);
- snd_soc_component_update_bits(component,
+ snd_soc_component_write_field(component,
CDC_RX_RX1_RX_PATH_CFG0,
CDC_RX_RXn_CLSH_EN_MASK, 0x1);
break;
--
2.21.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes
2021-11-16 11:46 ` Srinivas Kandagatla
@ 2021-11-16 17:48 ` Mark Brown
-1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2021-11-16 17:48 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: linux-kernel, tiwai, perex, pierre-louis.bossart, alsa-devel, lgirdwood
On Tue, 16 Nov 2021 11:46:20 +0000, Srinivas Kandagatla wrote:
> We found few issues during runtime pm testing on this codecs.
> These 3 patches for wcd938x, wcd934x and lpass-rx-macro should address them.
>
> Thanks,
> srini
>
> Srinivas Kandagatla (3):
> ASoC: codecs: wcd938x: fix volatile register range
> ASoC: codecs: wcd934x: return error code correctly from hw_params
> ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-linus
Thanks!
[1/3] ASoC: codecs: wcd938x: fix volatile register range
commit: ea157c2ba821dab789a544cd9fbe44dc07036ff8
[2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params
commit: 006ea27c4e7037369085755c7b5389effa508c04
[3/3] ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
commit: cb04d8cd0bb0b82acc34cc73cb33ae77cbfb020d
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] 10+ messages in thread
* Re: [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes
@ 2021-11-16 17:48 ` Mark Brown
0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2021-11-16 17:48 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: alsa-devel, lgirdwood, linux-kernel, tiwai, pierre-louis.bossart
On Tue, 16 Nov 2021 11:46:20 +0000, Srinivas Kandagatla wrote:
> We found few issues during runtime pm testing on this codecs.
> These 3 patches for wcd938x, wcd934x and lpass-rx-macro should address them.
>
> Thanks,
> srini
>
> Srinivas Kandagatla (3):
> ASoC: codecs: wcd938x: fix volatile register range
> ASoC: codecs: wcd934x: return error code correctly from hw_params
> ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-linus
Thanks!
[1/3] ASoC: codecs: wcd938x: fix volatile register range
commit: ea157c2ba821dab789a544cd9fbe44dc07036ff8
[2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params
commit: 006ea27c4e7037369085755c7b5389effa508c04
[3/3] ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask
commit: cb04d8cd0bb0b82acc34cc73cb33ae77cbfb020d
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] 10+ messages in thread
end of thread, other threads:[~2021-11-16 17:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 11:46 [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes Srinivas Kandagatla
2021-11-16 11:46 ` Srinivas Kandagatla
2021-11-16 11:46 ` [PATCH 1/3] ASoC: codecs: wcd938x: fix volatile register range Srinivas Kandagatla
2021-11-16 11:46 ` Srinivas Kandagatla
2021-11-16 11:46 ` [PATCH 2/3] ASoC: codecs: wcd934x: return error code correctly from hw_params Srinivas Kandagatla
2021-11-16 11:46 ` Srinivas Kandagatla
2021-11-16 11:46 ` [PATCH 3/3] ASoC: codecs: lpass-rx-macro: fix HPHR setting CLSH mask Srinivas Kandagatla
2021-11-16 11:46 ` Srinivas Kandagatla
2021-11-16 17:48 ` [PATCH 0/3] ASoC: codecs: Qualcomm codecs fixes Mark Brown
2021-11-16 17:48 ` 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.