Skip to contentSkip to conversation

ASoC: qcom: lpass-platform: Reset irq clear reg post handling interrupts

PATCH Superseded Srinivasa Rao Mandadapu 2 participants 4 messages Sep 3, 2021 – Sep 7, 2021

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: qcom: lpass-platform: Reset irq clear reg post handling interrupts

Update interrupt clear register with reset value after addressing all interrupts. This is to fix playback or capture hanging issue in simultaneous playback and capture usecase.

---
 sound/soc/qcom/lpass-platform.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/qcom/lpass-platform.c +6 -0
index f9df76d37858..1a0a4b0b1a03 100644
@@ -749,6 +749,12 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data)
 		}
 	}
 
+	rv = regmap_write(drvdata->lpaif_map, LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST), 0x0);
+	if (rv) {
+		pr_err("error writing to irqstat reg: %d\n", rv);
+		return IRQ_NONE;
+	}
+
 	return IRQ_HANDLED;
 }
 
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.
#1 lore raw

Quoting Srinivasa Rao Mandadapu (2021-09-03 03:01:53)

Quoted 6 lines

Update interrupt clear register with reset value after addressing all interrupts. This is to fix playback or capture hanging issue in simultaneous playback and capture usecase.

---

Any Fixes tag?

Quoted 8 lines
 sound/soc/qcom/lpass-platform.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/qcom/lpass-platform.c +0 -0
index f9df76d37858..1a0a4b0b1a03 100644

sound/soc/qcom/lpass-platform.c static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) · line 755

Quoted 7 lines
sound/soc/qcom/lpass-platform.c +4 -0
@@ -749,6 +749,12 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data)
                }
        }
 
+       rv = regmap_write(drvdata->lpaif_map, LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST), 0x0);
+       if (rv) {
+               pr_err("error writing to irqstat reg: %d\n", rv);
+               return IRQ_NONE;

I was thinking we should return IRQ_HANDLED still, but then I guess failing to clear the irq be treated as a spurious irq so that if we fail enough times we'll shut off the irq at the irqchip. Things are going bad if the write fails.

Quoted 5 lines
sound/soc/qcom/lpass-platform.c +2 -0
+       }
+
        return IRQ_HANDLED;
 }
 
#2 lore raw

Thanks for Your time Stephen!!

Quoted 8 lines · Stephen Boyd

Quoting Srinivasa Rao Mandadapu (2021-09-03 03:01:53)

Quoted 6 lines

Update interrupt clear register with reset value after addressing all interrupts. This is to fix playback or capture hanging issue in simultaneous playback and capture usecase.

---

Any Fixes tag?

Actually it's incremental change. I will add base commit of this function.

Quoted 12 lines
Quoted 12 lines
  sound/soc/qcom/lpass-platform.c | 6 ++++++
  1 file changed, 6 insertions(+)
sound/soc/qcom/lpass-platform.c +0 -0
index f9df76d37858..1a0a4b0b1a03 100644
@@ -749,6 +749,12 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data)
                 }
         }
 
Quoted 8 lines

sound/soc/qcom/lpass-platform.c static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) · line 755

Quoted 4 lines
sound/soc/qcom/lpass-platform.c +4 -0
+       rv = regmap_write(drvdata->lpaif_map, LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST), 0x0);
+       if (rv) {
+               pr_err("error writing to irqstat reg: %d\n", rv);
+               return IRQ_NONE;

I was thinking we should return IRQ_HANDLED still, but then I guess failing to clear the irq be treated as a spurious irq so that if we fail enough times we'll shut off the irq at the irqchip. Things are going bad if the write fails.

Here bit confusing. Could You please suggest How to go ahead on this?

Quoted 6 lines
Quoted 6 lines
sound/soc/qcom/lpass-platform.c +2 -0
+       }
+
         return IRQ_HANDLED;
  }
 
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.
#3 lore raw

Quoting Srinivasa Rao Mandadapu (2021-09-06 06:35:46)

Quoted 4 lines

Thanks for Your time Stephen!!

Quoted 1 line · Stephen Boyd

Quoting Srinivasa Rao Mandadapu (2021-09-03 03:01:53)

Quoted 8 lines
Quoted 7 lines
Quoted 6 lines

Update interrupt clear register with reset value after addressing all interrupts. This is to fix playback or capture hanging issue in simultaneous playback and capture usecase.

---

Any Fixes tag?

Actually it's incremental change. I will add base commit of this function.

Ok.

Quoted 20 lines
Quoted 12 lines
Quoted 12 lines
  sound/soc/qcom/lpass-platform.c | 6 ++++++
  1 file changed, 6 insertions(+)
sound/soc/qcom/lpass-platform.c +0 -0
index f9df76d37858..1a0a4b0b1a03 100644
@@ -749,6 +749,12 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data)
                 }
         }
 
Quoted 8 lines

sound/soc/qcom/lpass-platform.c static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data) · line 755

Quoted 4 lines
sound/soc/qcom/lpass-platform.c +4 -0
+       rv = regmap_write(drvdata->lpaif_map, LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST), 0x0);
+       if (rv) {
+               pr_err("error writing to irqstat reg: %d\n", rv);
+               return IRQ_NONE;

I was thinking we should return IRQ_HANDLED still, but then I guess failing to clear the irq be treated as a spurious irq so that if we fail enough times we'll shut off the irq at the irqchip. Things are going bad if the write fails.

Quoted 1 line

Here bit confusing. Could You please suggest How to go ahead on this?

Sorry. I think it is fine as is.