alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED
@ 2019-11-28 22:38 Michael Walle
  2019-11-29 21:57 ` Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Michael Walle @ 2019-11-28 22:38 UTC (permalink / raw)
  To: alsa-devel, linuxppc-dev, linux-kernel
  Cc: Timur Tabi, Xiubo Li, Takashi Iwai, Liam Girdwood, Nicolin Chen,
	Michael Walle, Mark Brown, Fabio Estevam

The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use
IRQF_SHARED to be able to use these SAIs simultaneously.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 sound/soc/fsl/fsl_sai.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index b517e4bc1b87..8c3ea7300972 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -958,7 +958,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 
-	ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
+	ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, IRQF_SHARED,
+			       np->name, sai);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to claim irq %u\n", irq);
 		return ret;
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED
  2019-11-28 22:38 [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED Michael Walle
@ 2019-11-29 21:57 ` Fabio Estevam
  2019-12-05  2:17 ` Nicolin Chen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2019-11-29 21:57 UTC (permalink / raw)
  To: Michael Walle
  Cc: Linux-ALSA, Timur Tabi, Xiubo Li, Takashi Iwai, linux-kernel,
	Liam Girdwood, Nicolin Chen, Mark Brown, linuxppc-dev

Hi Michael,

On Thu, Nov 28, 2019 at 7:38 PM Michael Walle <michael@walle.cc> wrote:
>
> The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use
> IRQF_SHARED to be able to use these SAIs simultaneously.

On i.MX8M SAI5 and SAI6 share the same interrupt number too:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

Thanks
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED
  2019-11-28 22:38 [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED Michael Walle
  2019-11-29 21:57 ` Fabio Estevam
@ 2019-12-05  2:17 ` Nicolin Chen
  2019-12-05  8:43 ` Daniel Baluta
  2019-12-09 18:59 ` [alsa-devel] Applied "ASoC: fsl_sai: add IRQF_SHARED" to the asoc tree Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Nicolin Chen @ 2019-12-05  2:17 UTC (permalink / raw)
  To: Michael Walle
  Cc: alsa-devel, Timur Tabi, Xiubo Li, linuxppc-dev, Takashi Iwai,
	linux-kernel, Liam Girdwood, Mark Brown, Fabio Estevam

On Thu, Nov 28, 2019 at 11:38:02PM +0100, Michael Walle wrote:
> The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use
> IRQF_SHARED to be able to use these SAIs simultaneously.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

Thanks

> ---
>  sound/soc/fsl/fsl_sai.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index b517e4bc1b87..8c3ea7300972 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -958,7 +958,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
>  	if (irq < 0)
>  		return irq;
>  
> -	ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
> +	ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, IRQF_SHARED,
> +			       np->name, sai);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed to claim irq %u\n", irq);
>  		return ret;
> -- 
> 2.20.1
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED
  2019-11-28 22:38 [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED Michael Walle
  2019-11-29 21:57 ` Fabio Estevam
  2019-12-05  2:17 ` Nicolin Chen
@ 2019-12-05  8:43 ` Daniel Baluta
  2019-12-05  9:18   ` Michael Walle
  2019-12-09 18:59 ` [alsa-devel] Applied "ASoC: fsl_sai: add IRQF_SHARED" to the asoc tree Mark Brown
  3 siblings, 1 reply; 7+ messages in thread
From: Daniel Baluta @ 2019-12-05  8:43 UTC (permalink / raw)
  To: Michael Walle
  Cc: Linux-ALSA, Timur Tabi, Xiubo Li, Fabio Estevam, Takashi Iwai,
	Linux Kernel Mailing List, Liam Girdwood, Nicolin Chen,
	Mark Brown, linuxppc-dev

On Fri, Nov 29, 2019 at 12:40 AM Michael Walle <michael@walle.cc> wrote:
>
> The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use
> IRQF_SHARED to be able to use these SAIs simultaneously.

Hi Michael,

Thanks for the patch. We have a similar change inside our internal tree
(it is on my long TODO list to upstream :D).

We add the shared flag conditionally on a dts property.

Do you think it is a good idea to always add shared flag? I'm thinking
on SAI IP integrations where the interrupt is edge triggered.

AFAIK edge triggered interrupts do not get along very well
with sharing an interrupt line.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED
  2019-12-05  8:43 ` Daniel Baluta
@ 2019-12-05  9:18   ` Michael Walle
  2019-12-05  9:45     ` Daniel Baluta
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Walle @ 2019-12-05  9:18 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: Linux-ALSA, Timur Tabi, Xiubo Li, Fabio Estevam, Takashi Iwai,
	Linux Kernel Mailing List, Liam Girdwood, Nicolin Chen,
	Mark Brown, linuxppc-dev

Hi Daniel,

Am 2019-12-05 09:43, schrieb Daniel Baluta:
> On Fri, Nov 29, 2019 at 12:40 AM Michael Walle <michael@walle.cc> 
> wrote:
>> 
>> The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use
>> IRQF_SHARED to be able to use these SAIs simultaneously.
> 
> Hi Michael,
> 
> Thanks for the patch. We have a similar change inside our internal tree
> (it is on my long TODO list to upstream :D).
> 
> We add the shared flag conditionally on a dts property.
> 
> Do you think it is a good idea to always add shared flag? I'm thinking
> on SAI IP integrations where the interrupt is edge triggered.

Mhh, I don't really get the point to make the flag conditionally. If
there is only one user, the flag won't hurt, correct?

If there are two users, we need the flag anyway.

> AFAIK edge triggered interrupts do not get along very well
> with sharing an interrupt line.

So in that case you shouldn't use shared edge triggered interrupts in 
the
SoC in the first place, I guess.

-michael
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED
  2019-12-05  9:18   ` Michael Walle
@ 2019-12-05  9:45     ` Daniel Baluta
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Baluta @ 2019-12-05  9:45 UTC (permalink / raw)
  To: Michael Walle
  Cc: Linux-ALSA, Timur Tabi, Xiubo Li, Fabio Estevam, Takashi Iwai,
	Linux Kernel Mailing List, Liam Girdwood, Nicolin Chen,
	Mark Brown, linuxppc-dev

On Thu, Dec 5, 2019 at 11:18 AM Michael Walle <michael@walle.cc> wrote:
>
> Hi Daniel,
>
> Am 2019-12-05 09:43, schrieb Daniel Baluta:
> > On Fri, Nov 29, 2019 at 12:40 AM Michael Walle <michael@walle.cc>
> > wrote:
> >>
> >> The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use
> >> IRQF_SHARED to be able to use these SAIs simultaneously.
> >
> > Hi Michael,
> >
> > Thanks for the patch. We have a similar change inside our internal tree
> > (it is on my long TODO list to upstream :D).
> >
> > We add the shared flag conditionally on a dts property.
> >
> > Do you think it is a good idea to always add shared flag? I'm thinking
> > on SAI IP integrations where the interrupt is edge triggered.
>
> Mhh, I don't really get the point to make the flag conditionally. If
> there is only one user, the flag won't hurt, correct?
>
> If there are two users, we need the flag anyway.
>
> > AFAIK edge triggered interrupts do not get along very well
> > with sharing an interrupt line.
>
> So in that case you shouldn't use shared edge triggered interrupts in
> the
> SoC in the first place, I guess.

I think you make a good point. I was thinking that it would hurt the single
user case. But it is fine.

Thanks for the patch.

Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* [alsa-devel] Applied "ASoC: fsl_sai: add IRQF_SHARED" to the asoc tree
  2019-11-28 22:38 [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED Michael Walle
                   ` (2 preceding siblings ...)
  2019-12-05  8:43 ` Daniel Baluta
@ 2019-12-09 18:59 ` Mark Brown
  3 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2019-12-09 18:59 UTC (permalink / raw)
  To: Michael Walle
  Cc: alsa-devel, Timur Tabi, Xiubo Li, Daniel Baluta, linuxppc-dev,
	Liam Girdwood, linux-kernel, Nicolin Chen, Mark Brown,
	Takashi Iwai, Fabio Estevam

The patch

   ASoC: fsl_sai: add IRQF_SHARED

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.6

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

From 2eb2d314a80eb8bb1a6faf2a74321d4497e1687d Mon Sep 17 00:00:00 2001
From: Michael Walle <michael@walle.cc>
Date: Thu, 28 Nov 2019 23:38:02 +0100
Subject: [PATCH] ASoC: fsl_sai: add IRQF_SHARED

The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use
IRQF_SHARED to be able to use these SAIs simultaneously.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20191128223802.18228-1-michael@walle.cc
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/fsl/fsl_sai.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index b517e4bc1b87..8c3ea7300972 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -958,7 +958,8 @@ static int fsl_sai_probe(struct platform_device *pdev)
 	if (irq < 0)
 		return irq;
 
-	ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
+	ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, IRQF_SHARED,
+			       np->name, sai);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to claim irq %u\n", irq);
 		return ret;
-- 
2.20.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2019-12-09 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 22:38 [alsa-devel] [PATCH] ASoC: fsl_sai: add IRQF_SHARED Michael Walle
2019-11-29 21:57 ` Fabio Estevam
2019-12-05  2:17 ` Nicolin Chen
2019-12-05  8:43 ` Daniel Baluta
2019-12-05  9:18   ` Michael Walle
2019-12-05  9:45     ` Daniel Baluta
2019-12-09 18:59 ` [alsa-devel] Applied "ASoC: fsl_sai: add IRQF_SHARED" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).