Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup
@ 2026-11-30 13:02 Sreeraj S Kurup
  2026-11-30 13:07 ` sashiko-bot
  2026-11-30 13:13 ` [PATCH v2] " Sreeraj S Kurup
  0 siblings, 2 replies; 3+ messages in thread
From: Sreeraj S Kurup @ 2026-11-30 13:02 UTC (permalink / raw)
  To: johannes, perex, tiwai
  Cc: linux-kernel, linux-sound, linuxppc-dev, Sreeraj S Kurup

The feature GPIO implementation checks gpio_private when
cleaning up the line-in and line-out notification IRQs.

However, ftr_set_notify() registers these IRQs using request_irq()
and tracks the registered callbacks through the notify field.

Check notify consistently for all notification IRQs so that
registered line-in and line-out IRQs are released during teardown.

Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
 sound/aoa/core/gpio-feature.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/aoa/core/gpio-feature.c b/sound/aoa/core/gpio-feature.c
index 19ed0e6907da..2549b660caa4 100644
--- a/sound/aoa/core/gpio-feature.c
+++ b/sound/aoa/core/gpio-feature.c
@@ -285,9 +285,9 @@ static void ftr_gpio_exit(struct gpio_runtime *rt)
 	rt->implementation_private = 0;
 	if (rt->headphone_notify.notify)
 		free_irq(headphone_detect_irq, &rt->headphone_notify);
-	if (rt->line_in_notify.gpio_private)
+	if (rt->line_in_notify.notify)
 		free_irq(linein_detect_irq, &rt->line_in_notify);
-	if (rt->line_out_notify.gpio_private)
+	if (rt->line_out_notify.notify)
 		free_irq(lineout_detect_irq, &rt->line_out_notify);
 	cancel_delayed_work_sync(&rt->headphone_notify.work);
 	cancel_delayed_work_sync(&rt->line_in_notify.work);
-- 
2.55.0


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

* Re: [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup
  2026-11-30 13:02 [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup Sreeraj S Kurup
@ 2026-11-30 13:07 ` sashiko-bot
  2026-11-30 13:13 ` [PATCH v2] " Sreeraj S Kurup
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-30 13:07 UTC (permalink / raw)
  To: Sreeraj S Kurup; +Cc: linux-sound

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ALSA: aoa: missing Fixes trailer for ftr_gpio_exit() IRQ cleanup
  fix
--

commit 9f709f56656cba3f95f376bcac2ddeb15a825400
Author: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

> ALSA: aoa: Fix GPIO notification IRQ cleanup
>
> The feature GPIO implementation checks gpio_private when
> cleaning up the line-in and line-out notification IRQs.
>
> However, ftr_set_notify() registers these IRQs using request_irq()
> and tracks the registered callbacks through the notify field.
>
> Check notify consistently for all notification IRQs so that
> registered line-in and line-out IRQs are released during teardown.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

[Severity: Low]
This fixes a bug present since ftr_gpio_exit() was added.  Should this
include:

  Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261130130232.2813-1-sreekuttan2156239@gmail.com?part=1

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

* [PATCH v2] ALSA: aoa: Fix GPIO notification IRQ cleanup
  2026-11-30 13:02 [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup Sreeraj S Kurup
  2026-11-30 13:07 ` sashiko-bot
@ 2026-11-30 13:13 ` Sreeraj S Kurup
  1 sibling, 0 replies; 3+ messages in thread
From: Sreeraj S Kurup @ 2026-11-30 13:13 UTC (permalink / raw)
  To: sreekuttan2156239, johannes, perex, tiwai
  Cc: linux-kernel, linux-sound, linuxppc-dev

The feature GPIO implementation checks gpio_private when
cleaning up the line-in and line-out notification IRQs.

However, ftr_set_notify() registers these IRQs using request_irq()
and tracks the registered callbacks through the notify field.

Check notify consistently for all notification IRQs so that
registered line-in and line-out IRQs are released during teardown.

Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")
Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
v2:
 - Add Fixes trailer.

 sound/aoa/core/gpio-feature.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/aoa/core/gpio-feature.c b/sound/aoa/core/gpio-feature.c
index 19ed0e6907da..2549b660caa4 100644
--- a/sound/aoa/core/gpio-feature.c
+++ b/sound/aoa/core/gpio-feature.c
@@ -285,9 +285,9 @@ static void ftr_gpio_exit(struct gpio_runtime *rt)
 	rt->implementation_private = 0;
 	if (rt->headphone_notify.notify)
 		free_irq(headphone_detect_irq, &rt->headphone_notify);
-	if (rt->line_in_notify.gpio_private)
+	if (rt->line_in_notify.notify)
 		free_irq(linein_detect_irq, &rt->line_in_notify);
-	if (rt->line_out_notify.gpio_private)
+	if (rt->line_out_notify.notify)
 		free_irq(lineout_detect_irq, &rt->line_out_notify);
 	cancel_delayed_work_sync(&rt->headphone_notify.work);
 	cancel_delayed_work_sync(&rt->line_in_notify.work);
-- 
2.55.0


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

end of thread, other threads:[~2026-11-30 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:02 [PATCH] ALSA: aoa: Fix GPIO notification IRQ cleanup Sreeraj S Kurup
2026-11-30 13:07 ` sashiko-bot
2026-11-30 13:13 ` [PATCH v2] " Sreeraj S Kurup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox