ASoC: qcom: Add compatible names in va,wsa,rx,tx codec drivers for sc7280
Subsystems (5)
A message that is not in the archive (sent off-list or not yet received): [email protected]; [email protected]; [email protected]; [email protected];[email protected]; [email protected]; [email protected]; [email protected]; [email protected];[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected];
v2 cover Update Lpass digital codec macro drivers
This patch set is to add support for lpass sc7280 based targets. Upadate compatible name and change of bulk clock voting to optional clock voting in digital codecs va, rx, tx macro drivers. Chnages Since V1:
-- Removed individual clock voting and used bulk clock optional.
-- Removed volatile changes and fixed default values. -- Typo errors.
Srinivasa Rao Mandadapu (5):
ASoC: qcom: Add compatible names in va,wsa,rx,tx codec drivers for
sc7280
ASoC: qcom: dt-bindings: Add compatible names for lpass sc7280 digital
codecs
ASoC: codecs: tx-macro: Enable tx top soundwire mic clock
ASoC: codecs: tx-macro: Update tx default values
ASoC: codecs: Change bulk clock voting to optional voting in digital
codecs
.../devicetree/bindings/sound/qcom,lpass-rx-macro.yaml | 4 +++- .../devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 4 +++- .../devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 4 +++- .../devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml | 4 +++- sound/soc/codecs/lpass-rx-macro.c | 3 ++- sound/soc/codecs/lpass-tx-macro.c | 11 +++++++---- sound/soc/codecs/lpass-va-macro.c | 3 ++- sound/soc/codecs/lpass-wsa-macro.c | 1 + 8 files changed, 24 insertions(+), 10 deletions(-)
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v2 1/5 ASoC: qcom: Add compatible names in va,wsa,rx,tx codec drivers for sc7280
Add compatible names for sc7280 based targets in digital codec drivers va,wsa,rx and tx.
--- sound/soc/codecs/lpass-rx-macro.c | 1 + sound/soc/codecs/lpass-tx-macro.c | 1 + sound/soc/codecs/lpass-va-macro.c | 1 + sound/soc/codecs/lpass-wsa-macro.c | 1 + 4 files changed, 4 insertions(+)
sound/soc/codecs/lpass-rx-macro.c +1 -0
@@ -3577,6 +3577,7 @@ static int rx_macro_remove(struct platform_device *pdev) }static const struct of_device_id rx_macro_dt_match[] = { + { .compatible ="qcom,sc7280-lpass-rx-macro" }, { .compatible ="qcom,sm8250-lpass-rx-macro" }, { } };
sound/soc/codecs/lpass-tx-macro.c +1 -0
@@ -1843,6 +1843,7 @@ static int tx_macro_remove(struct platform_device *pdev) }static const struct of_device_id tx_macro_dt_match[] = { + { .compatible ="qcom,sc7280-lpass-tx-macro" }, { .compatible ="qcom,sm8250-lpass-tx-macro" }, { } };
sound/soc/codecs/lpass-va-macro.c +1 -0
@@ -1472,6 +1472,7 @@ static int va_macro_remove(struct platform_device *pdev) }static const struct of_device_id va_macro_dt_match[] = { + { .compatible ="qcom,sc7280-lpass-va-macro" }, { .compatible ="qcom,sm8250-lpass-va-macro" }, {} };
sound/soc/codecs/lpass-wsa-macro.c +1 -0
@@ -2445,6 +2445,7 @@ static int wsa_macro_remove(struct platform_device *pdev) }static const struct of_device_id wsa_macro_dt_match[] = { + {.compatible ="qcom,sc7280-lpass-wsa-macro" }, {.compatible ="qcom,sm8250-lpass-wsa-macro" }, {} };
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v2 2/5 ASoC: qcom: dt-bindings: Add compatible names for lpass sc7280 digital codecs
In reply to Srinivasa Rao MandadapuUpdate compatible names in va, wsa, rx and tx macro codes for lpass sc7280
--- Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml | 4 +++- Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 4 +++- Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 4 +++- Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml +3 -1
@@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: qcom,sm8250-lpass-rx-macro + enum: + - qcom,sc7280-lpass-rx-macro + - qcom,sm8250-lpass-rx-macro reg: maxItems: 1
Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml +3 -1
@@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: qcom,sm8250-lpass-tx-macro + enum: + - qcom,sc7280-lpass-tx-macro + - qcom,sm8250-lpass-tx-macro reg: maxItems: 1
Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml +3 -1
@@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: qcom,sm8250-lpass-va-macro + enum: + - qcom,sc7280-lpass-va-macro + - qcom,sm8250-lpass-va-macro reg: maxItems: 1
Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml +3 -1
@@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: qcom,sm8250-lpass-wsa-macro + enum: + - qcom,sc7280-lpass-wsa-macro + - qcom,sm8250-lpass-wsa-macro reg: maxItems: 1
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 2/5] ASoC: qcom: dt-bindings: Add compatible names for lpass sc7280 digital codecs
Quoted 11 lines · Srinivasa Rao Mandadapu
Update compatible names in va, wsa, rx and tx macro codes for lpass sc7280
Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>--- Documentation/devicetree/bindings/sound/qcom,lpass-rx-macro.yaml | 4 +++- Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 4 +++- Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml | 4 +++- Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-)
PATCH v2 3/5 ASoC: codecs: tx-macro: Enable tx top soundwire mic clock
In reply to Srinivasa Rao MandadapuEnable tx path soundwire mic0 and mic1 clock.
--- sound/soc/codecs/lpass-tx-macro.c | 2 ++ 1 file changed, 2 insertions(+)
sound/soc/codecs/lpass-tx-macro.c +2 -0
@@ -1674,6 +1674,8 @@ static int tx_macro_component_probe(struct snd_soc_component *comp)snd_soc_component_update_bits (comp,CDC_TX0_TX_PATH_SEC7 ,0x3F ,0x0A ); +snd_soc_component_update_bits (comp,CDC_TX_TOP_CSR_SWR_AMIC0_CTL ,0xFF ,0x00 ); +snd_soc_component_update_bits (comp,CDC_TX_TOP_CSR_SWR_AMIC1_CTL ,0xFF ,0x00 );return 0 ; }
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 3/5] ASoC: codecs: tx-macro: Enable tx top soundwire mic clock
Quoted 13 lines · Srinivasa Rao Mandadapu
Enable tx path soundwire mic0 and mic1 clock.
Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>--- sound/soc/codecs/lpass-tx-macro.c | 2 ++ 1 file changed, 2 insertions(+)sound/soc/codecs/lpass-tx-macro.c +0
-0
sound/soc/codecs/lpass-tx-macro.c static int tx_macro_component_probe(struct snd_soc_component *comp) · line 1678
Quoted 5 lines
sound/soc/codecs/lpass-tx-macro.c +2
-0@@ -1674,6 +1674,8 @@ static int tx_macro_component_probe(struct snd_soc_component *comp)snd_soc_component_update_bits (comp,CDC_TX0_TX_PATH_SEC7 ,0x3F ,0x0A ); +snd_soc_component_update_bits (comp,CDC_TX_TOP_CSR_SWR_AMIC0_CTL ,0xFF ,0x00 ); +snd_soc_component_update_bits (comp,CDC_TX_TOP_CSR_SWR_AMIC1_CTL ,0xFF ,0x00 );
This needs a comment for more clarity to readers.
--srini
Quoted 4 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0return 0 ; }
Re: [PATCH v2 3/5] ASoC: codecs: tx-macro: Enable tx top soundwire mic clock
Quoted 2 lines · Srinivas Kandagatla
Thanks Srini for You time!!!
Quoted 28 lines · Srinivasa Rao Mandadapu
Quoted 13 lines
Enable tx path soundwire mic0 and mic1 clock.
Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---
sound/soc/codecs/lpass-tx-macro.c| 2 ++1 file changed, 2 insertions(+)sound/soc/codecs/lpass-tx-macro.c +0
-0sound/soc/codecs/lpass-tx-macro.c static int tx_macro_component_probe(struct · line 1680
Quoted 7 lines
sound/soc/codecs/lpass-tx-macro.c +2
-0@@ -1674,6 +1674,8 @@ static int tx_macro_component_probe(struct snd_soc_component *comp) snd_soc_component_update_bits(comp, CDC_TX0_TX_PATH_SEC7, 0x3F, 0x0A); + snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0xFF, 0x00); + snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0xFF, 0x00);This needs a comment for more clarity to readers.
--srini
Quoted 3 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0return 0;}
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 3/5] ASoC: codecs: tx-macro: Enable tx top soundwire mic clock
In reply to Srinivas KandagatlaQuoted 2 lines · Srinivas Kandagatla
Thanks for your time Srini!!!
Quoted 9 lines · Srinivasa Rao Mandadapu
Quoted 8 lines
Enable tx path soundwire mic0 and mic1 clock.
Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---
sound/soc/codecs/lpass-tx-macro.c| 2 ++1 file changed, 2 insertions(+)
Quoted 14 lines
sound/soc/codecs/lpass-tx-macro.c static int tx_macro_component_probe(struct · line 1680
Quoted 12 lines
sound/soc/codecs/lpass-tx-macro.c +2
-0@@ -1674,6 +1674,8 @@ static int tx_macro_component_probe(struct snd_soc_component *comp) snd_soc_component_update_bits(comp, CDC_TX0_TX_PATH_SEC7, 0x3F, 0x0A); + snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0xFF, 0x00); + snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0xFF, 0x00);This needs a comment for more clarity to readers.
Okay! Will add comment and resend it.
Quoted 5 lines
--srini
Quoted 3 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0return 0;}
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 3/5] ASoC: codecs: tx-macro: Enable tx top soundwire mic clock
In reply to Srinivas KandagatlaQuoted 11 lines · Srinivas Kandagatla
Quoted 8 lines · Srinivasa Rao Mandadapu
Enable tx path soundwire mic0 and mic1 clock.
Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---
sound/soc/codecs/lpass-tx-macro.c| 2 ++1 file changed, 2 insertions(+)
Quoted 14 lines
sound/soc/codecs/lpass-tx-macro.c static int tx_macro_component_probe(struct · line 1680
Quoted 12 lines
sound/soc/codecs/lpass-tx-macro.c +2
-0@@ -1674,6 +1674,8 @@ static int tx_macro_component_probe(struct snd_soc_component *comp) snd_soc_component_update_bits(comp, CDC_TX0_TX_PATH_SEC7, 0x3F, 0x0A); + snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0xFF, 0x00); + snd_soc_component_update_bits(comp, CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0xFF, 0x00);This needs a comment for more clarity to readers.
Okay. will add comment.
Quoted 5 lines
--srini
Quoted 3 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0return 0;}
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v2 4/5 ASoC: codecs: tx-macro: Update tx default values
In reply to Srinivasa Rao MandadapuUpdate mic control register default values to hardware reset values
--- sound/soc/codecs/lpass-tx-macro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/lpass-tx-macro.c +3 -3
@@ -279,7 +279,7 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_CLK_RST_CTRL_SWR_CONTROL, 0x00}, { CDC_TX_TOP_CSR_TOP_CFG0, 0x00}, { CDC_TX_TOP_CSR_ANC_CFG, 0x00}, - { CDC_TX_TOP_CSR_SWR_CTRL, 0x00}, + { CDC_TX_TOP_CSR_SWR_CTRL, 0x60}, { CDC_TX_TOP_CSR_FREQ_MCLK, 0x00}, { CDC_TX_TOP_CSR_DEBUG_BUS, 0x00}, { CDC_TX_TOP_CSR_DEBUG_EN, 0x00},
@@ -290,8 +290,8 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_TOP_CSR_SWR_DMIC1_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC2_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC3_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x00}, + { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x0E}, + { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x0E}, { CDC_TX_INP_MUX_ADC_MUX0_CFG0, 0x00}, { CDC_TX_INP_MUX_ADC_MUX0_CFG1, 0x00}, { CDC_TX_INP_MUX_ADC_MUX1_CFG0, 0x00},
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 4/5] ASoC: codecs: tx-macro: Update tx default values
Quoted 15 lines · Srinivasa Rao Mandadapu
Update mic control register default values to hardware reset values
Fixes c39667ddcfc5 (ASoC: codecs: lpass-tx-macro: add support for lpass tx macro)Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>--- sound/soc/codecs/lpass-tx-macro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)sound/soc/codecs/lpass-tx-macro.c +0
-0
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 282
Quoted 5 lines
sound/soc/codecs/lpass-tx-macro.c +1
-1@@ -279,7 +279,7 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_CLK_RST_CTRL_SWR_CONTROL, 0x00}, { CDC_TX_TOP_CSR_TOP_CFG0, 0x00}, { CDC_TX_TOP_CSR_ANC_CFG, 0x00}, - { CDC_TX_TOP_CSR_SWR_CTRL, 0x00}, + { CDC_TX_TOP_CSR_SWR_CTRL, 0x60},
This does not make sense as this register only has one bit to control.
Why do we even need to change this, can you please explain what happens if we do not change this?
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 294
Quoted 11 lines
sound/soc/codecs/lpass-tx-macro.c +2
-2{ CDC_TX_TOP_CSR_FREQ_MCLK, 0x00}, { CDC_TX_TOP_CSR_DEBUG_BUS, 0x00}, { CDC_TX_TOP_CSR_DEBUG_EN, 0x00},@@ -290,8 +290,8 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_TOP_CSR_SWR_DMIC1_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC2_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC3_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x00}, + { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x0E}, + { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x0E},
These two registers should have default value of 0x06 as this has only one clk selection field with bits 2:1.
-srini
Quoted 4 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0{ CDC_TX_INP_MUX_ADC_MUX0_CFG0, 0x00}, { CDC_TX_INP_MUX_ADC_MUX0_CFG1, 0x00}, { CDC_TX_INP_MUX_ADC_MUX1_CFG0, 0x00},
Re: [PATCH v2 4/5] ASoC: codecs: tx-macro: Update tx default values
On 9/27/2021 4:12 PM, Srinivas Kandagatla wrote:
Thanks for your time Srini!!
Quoted 12 lines · Srinivasa Rao Mandadapu
Quoted 10 lines
Update mic control register default values to hardware reset values
Fixes c39667ddcfc5 (ASoC: codecs: lpass-tx-macro: add support for lpass tx macro)Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---
sound/soc/codecs/lpass-tx-macro.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 13 lines
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 282
Quoted 10 lines
sound/soc/codecs/lpass-tx-macro.c +1
-1@@ -279,7 +279,7 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_CLK_RST_CTRL_SWR_CONTROL, 0x00}, { CDC_TX_TOP_CSR_TOP_CFG0, 0x00}, { CDC_TX_TOP_CSR_ANC_CFG, 0x00}, - { CDC_TX_TOP_CSR_SWR_CTRL, 0x00}, + { CDC_TX_TOP_CSR_SWR_CTRL, 0x60},This does not make sense as this register only has one bit to control.
Why do we even need to change this, can you please explain what happens if we do not change this?
This register change is not making any impact. But when verified , reset state of this register is 0x60. so is the reason for change.
Will revert it and post again.
Quoted 14 lines
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 294
Quoted 12 lines
sound/soc/codecs/lpass-tx-macro.c +2
-2{ CDC_TX_TOP_CSR_FREQ_MCLK, 0x00}, { CDC_TX_TOP_CSR_DEBUG_BUS, 0x00}, { CDC_TX_TOP_CSR_DEBUG_EN, 0x00},@@ -290,8 +290,8 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_TOP_CSR_SWR_DMIC1_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC2_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC3_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x00}, + { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x0E}, + { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x0E},These two registers should have default value of
0x06as this has only one clk selection field with bits 2:1.
In Kodiak document reset state 0x0E and clk selection field is with bits 3:1
*LPASS_TX_TX_TOP_CSR_SWR_MIC1_CTL*|0x32200D4
Offset: 0x54 Reset State: 0x0000000E <https://ipcatalog.qualcomm.com/swi/chip/379/version/9247/module/11382675#>
Quoted 8 lines
-srini
Quoted 4 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0{ CDC_TX_INP_MUX_ADC_MUX0_CFG0, 0x00}, { CDC_TX_INP_MUX_ADC_MUX0_CFG1, 0x00}, { CDC_TX_INP_MUX_ADC_MUX1_CFG0, 0x00},
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 4/5] ASoC: codecs: tx-macro: Update tx default values
Quoted 48 lines · Srinivasa Rao Mandadapu
On 9/27/2021 4:12 PM, Srinivas Kandagatla wrote:
Thanks for your time Srini!!Quoted 12 lines · Srinivasa Rao Mandadapu
Quoted 10 lines
Update mic control register default values to hardware reset values
Fixes c39667ddcfc5 (ASoC: codecs: lpass-tx-macro: add support for lpass tx macro)Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---
sound/soc/codecs/lpass-tx-macro.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)Quoted 13 lines
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 282
Quoted 10 lines
sound/soc/codecs/lpass-tx-macro.c +1
-1@@ -279,7 +279,7 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_CLK_RST_CTRL_SWR_CONTROL, 0x00}, { CDC_TX_TOP_CSR_TOP_CFG0, 0x00}, { CDC_TX_TOP_CSR_ANC_CFG, 0x00}, - { CDC_TX_TOP_CSR_SWR_CTRL, 0x00}, + { CDC_TX_TOP_CSR_SWR_CTRL, 0x60},This does not make sense as this register only has one bit to control.
Why do we even need to change this, can you please explain what happens if we do not change this?This register change is not making any impact. But when verified , reset state of this register is
0x60. so is the reason for change.Will revert it and post again.
Quoted 14 lines
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 294
Quoted 12 lines
sound/soc/codecs/lpass-tx-macro.c +2
-2{ CDC_TX_TOP_CSR_FREQ_MCLK, 0x00}, { CDC_TX_TOP_CSR_DEBUG_BUS, 0x00}, { CDC_TX_TOP_CSR_DEBUG_EN, 0x00},@@ -290,8 +290,8 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_TOP_CSR_SWR_DMIC1_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC2_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC3_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x00}, + { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x0E}, + { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x0E},These two registers should have default value of
0x06as this has only one clk selection field with bits 2:1.
Quoted 4 lines
In Kodiak document reset state
0x0Eand clk selection field is with bits 3:1*LPASS_TX_TX_TOP_CSR_SWR_MIC1_CTL*|0x32200D4
Offset:0x54Reset State:0x0000000E
In that case you should probably consider using regmap_register_patch() for corrections to the default registers in sm8250 case.
--srini
Quoted 13 lines
Quoted 9 lines
-srini
Quoted 4 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0{ CDC_TX_INP_MUX_ADC_MUX0_CFG0, 0x00}, { CDC_TX_INP_MUX_ADC_MUX0_CFG1, 0x00}, { CDC_TX_INP_MUX_ADC_MUX1_CFG0, 0x00},Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 4/5] ASoC: codecs: tx-macro: Update tx default values
Quoted 51 lines · Srinivas Kandagatla
Quoted 48 lines · Srinivasa Rao Mandadapu
On 9/27/2021 4:12 PM, Srinivas Kandagatla wrote:
Thanks for your time Srini!!Quoted 12 lines · Srinivasa Rao Mandadapu
Quoted 10 lines
Update mic control register default values to hardware reset values
Fixes c39667ddcfc5 (ASoC: codecs: lpass-tx-macro: add support for lpass tx macro)Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---
sound/soc/codecs/lpass-tx-macro.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)Quoted 13 lines
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 282
Quoted 10 lines
sound/soc/codecs/lpass-tx-macro.c +1
-1@@ -279,7 +279,7 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_CLK_RST_CTRL_SWR_CONTROL, 0x00}, { CDC_TX_TOP_CSR_TOP_CFG0, 0x00}, { CDC_TX_TOP_CSR_ANC_CFG, 0x00}, - { CDC_TX_TOP_CSR_SWR_CTRL, 0x00}, + { CDC_TX_TOP_CSR_SWR_CTRL, 0x60},This does not make sense as this register only has one bit to control.
Why do we even need to change this, can you please explain what happens if we do not change this?This register change is not making any impact. But when verified , reset state of this register is
0x60. so is the reason for change.Will revert it and post again.
Quoted 14 lines
sound/soc/codecs/lpass-tx-macro.c static const struct reg_default tx_defaults[] = { · line 294
Quoted 12 lines
sound/soc/codecs/lpass-tx-macro.c +2
-2{ CDC_TX_TOP_CSR_FREQ_MCLK, 0x00}, { CDC_TX_TOP_CSR_DEBUG_BUS, 0x00}, { CDC_TX_TOP_CSR_DEBUG_EN, 0x00},@@ -290,8 +290,8 @@ static const struct reg_default tx_defaults[] = { { CDC_TX_TOP_CSR_SWR_DMIC1_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC2_CTL, 0x00}, { CDC_TX_TOP_CSR_SWR_DMIC3_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x00}, - { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x00}, + { CDC_TX_TOP_CSR_SWR_AMIC0_CTL, 0x0E}, + { CDC_TX_TOP_CSR_SWR_AMIC1_CTL, 0x0E},These two registers should have default value of
0x06as this has only one clk selection field with bits 2:1.
Quoted 6 lines
Quoted 4 lines
In Kodiak document reset state
0x0Eand clk selection field is with bits 3:1*LPASS_TX_TX_TOP_CSR_SWR_MIC1_CTL*|0x32200D4
Offset: 0x54 Reset State:0x0000000EIn that case you should probably consider using
regmap_register_patch()for corrections to the default registers in sm8250 case.
As regmap_register_patch() not working in this use case, updating defaults in probe for sc7280 specific differences.
Quoted 16 lines
--srini
Quoted 13 lines
Quoted 9 lines
-srini
Quoted 4 lines
sound/soc/codecs/lpass-tx-macro.c +0
-0{ CDC_TX_INP_MUX_ADC_MUX0_CFG0, 0x00}, { CDC_TX_INP_MUX_ADC_MUX0_CFG1, 0x00}, { CDC_TX_INP_MUX_ADC_MUX1_CFG0, 0x00},Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Mark Brown
maintainerRe: [PATCH v2 4/5] ASoC: codecs: tx-macro: Update tx default values
Quoted 7 lines · Srinivasa Rao Mandadapu
Quoted 2 lines · Srinivas Kandagatla
In that case you should probably consider using
regmap_register_patch()for corrections to the default registers in sm8250 case.As
regmap_register_patch()not working in this use case, updating defaults in probe for sc7280 specific differences.
In what way is regmap_register_patch() not working?
PATCH v2 5/5 ASoC: codecs: Change bulk clock voting to optional voting in digital codecs
In reply to Srinivasa Rao MandadapuChange bulk clock frequency voting to optional bulk voting in va, rx and tx macros to accommodate both ADSP and ADSP bypass based lpass architectures.
--- sound/soc/codecs/lpass-rx-macro.c | 2 +- sound/soc/codecs/lpass-tx-macro.c | 2 +- sound/soc/codecs/lpass-va-macro.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/lpass-rx-macro.c +1 -1
@@ -3531,7 +3531,7 @@ static int rx_macro_probe(struct platform_device *pdev) rx->clks[3 ].id ="npl" ; rx->clks[4 ].id ="fsgen" ; - ret =devm_clk_bulk_get (dev,RX_NUM_CLKS_MAX , rx->clks); + ret =devm_clk_bulk_get_optional (dev,RX_NUM_CLKS_MAX , rx->clks);if (ret) {dev_err (dev,"Error getting RX Clocks (%d)\n" , ret);return ret;
sound/soc/codecs/lpass-tx-macro.c +1 -1
@@ -1794,7 +1794,7 @@ static int tx_macro_probe(struct platform_device *pdev) tx->clks[3 ].id ="npl" ; tx->clks[4 ].id ="fsgen" ; - ret =devm_clk_bulk_get (dev,TX_NUM_CLKS_MAX , tx->clks); + ret =devm_clk_bulk_get_optional (dev,TX_NUM_CLKS_MAX , tx->clks);if (ret) {dev_err (dev,"Error getting RX Clocks (%d)\n" , ret);return ret;
sound/soc/codecs/lpass-va-macro.c +1 -1
@@ -1408,7 +1408,7 @@ static int va_macro_probe(struct platform_device *pdev) va->clks[1 ].id ="dcodec" ; va->clks[2 ].id ="mclk" ; - ret =devm_clk_bulk_get (dev,VA_NUM_CLKS_MAX , va->clks); + ret =devm_clk_bulk_get_optional (dev,VA_NUM_CLKS_MAX , va->clks);if (ret) {dev_err (dev,"Error getting VA Clocks (%d)\n" , ret);return ret;
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v2 5/5] ASoC: codecs: Change bulk clock voting to optional voting in digital codecs
Quoted 6 lines · Srinivasa Rao Mandadapu
Change bulk clock frequency voting to optional bulk voting in va, rx and tx macros to accommodate both ADSP and ADSP bypass based lpass architectures.
Signed-off-by Venkata Prasad Potturu <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---
Quoted 45 lines
sound/soc/codecs/lpass-rx-macro.c | 2 +- sound/soc/codecs/lpass-tx-macro.c | 2 +- sound/soc/codecs/lpass-va-macro.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)sound/soc/codecs/lpass-rx-macro.c +1
-1@@ -3531,7 +3531,7 @@ static int rx_macro_probe(struct platform_device *pdev) rx->clks[3 ].id ="npl" ; rx->clks[4 ].id ="fsgen" ; - ret =devm_clk_bulk_get (dev,RX_NUM_CLKS_MAX , rx->clks); + ret =devm_clk_bulk_get_optional (dev,RX_NUM_CLKS_MAX , rx->clks);if (ret) {dev_err (dev,"Error getting RX Clocks (%d)\n" , ret);return ret;sound/soc/codecs/lpass-tx-macro.c +1
-1@@ -1794,7 +1794,7 @@ static int tx_macro_probe(struct platform_device *pdev) tx->clks[3 ].id ="npl" ; tx->clks[4 ].id ="fsgen" ; - ret =devm_clk_bulk_get (dev,TX_NUM_CLKS_MAX , tx->clks); + ret =devm_clk_bulk_get_optional (dev,TX_NUM_CLKS_MAX , tx->clks);if (ret) {dev_err (dev,"Error getting RX Clocks (%d)\n" , ret);return ret;sound/soc/codecs/lpass-va-macro.c +1
-1@@ -1408,7 +1408,7 @@ static int va_macro_probe(struct platform_device *pdev) va->clks[1 ].id ="dcodec" ; va->clks[2 ].id ="mclk" ; - ret =devm_clk_bulk_get (dev,VA_NUM_CLKS_MAX , va->clks); + ret =devm_clk_bulk_get_optional (dev,VA_NUM_CLKS_MAX , va->clks);if (ret) {dev_err (dev,"Error getting VA Clocks (%d)\n" , ret);return ret;