alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4
@ 2012-03-07  9:17 Peter Ujfalusi
  2012-03-07  9:48 ` Paul Menzel
  2012-03-07 11:40 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2012-03-07  9:17 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: alsa-devel, Jarkko Nikula

On OMAP4 we have one interrupt line per McBSP port.
At proble time tx, and rx irq value will be -ENXIO,
and only the tx irq will get corrected.
In omap_mcbsp_request if the rx_irq is not 0 we proceed,
and try to request the interrupt, which will fail on
OMAP4 (rx_irq == -6).
To avoid this error, clear the rx_irq at probe time
on OMAP4.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/omap/mcbsp.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 21dbb05..c3e31de 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -958,8 +958,10 @@ int __devinit omap_mcbsp_init(struct platform_device *pdev)
 	mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
 
 	/* From OMAP4 there will be a single irq line */
-	if (mcbsp->tx_irq == -ENXIO)
+	if (mcbsp->tx_irq == -ENXIO) {
 		mcbsp->tx_irq = platform_get_irq(pdev, 0);
+		mcbsp->rx_irq = 0;
+	}
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
 	if (!res) {
-- 
1.7.8.5

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

* Re: [PATCH] ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4
  2012-03-07  9:17 [PATCH] ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4 Peter Ujfalusi
@ 2012-03-07  9:48 ` Paul Menzel
  2012-03-08  7:00   ` Jarkko Nikula
  2012-03-07 11:40 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Menzel @ 2012-03-07  9:48 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: Jarkko, alsa-devel, Mark Brown, Liam Girdwood, Nikula


[-- Attachment #1.1: Type: text/plain, Size: 1319 bytes --]

Dear Peter,


Am Mittwoch, den 07.03.2012, 11:17 +0200 schrieb Peter Ujfalusi:
> On OMAP4 we have one interrupt line per McBSP port.
> At proble time tx, and rx irq value will be -ENXIO,

s/proble/probe/

> and only the tx irq will get corrected.
> In omap_mcbsp_request if the rx_irq is not 0 we proceed,
> and try to request the interrupt, which will fail on
> OMAP4 (rx_irq == -6).
> To avoid this error, clear the rx_irq at probe time
> on OMAP4.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  sound/soc/omap/mcbsp.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> index 21dbb05..c3e31de 100644
> --- a/sound/soc/omap/mcbsp.c
> +++ b/sound/soc/omap/mcbsp.c
> @@ -958,8 +958,10 @@ int __devinit omap_mcbsp_init(struct platform_device *pdev)
>  	mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
>  
>  	/* From OMAP4 there will be a single irq line */
> -	if (mcbsp->tx_irq == -ENXIO)
> +	if (mcbsp->tx_irq == -ENXIO) {
>  		mcbsp->tx_irq = platform_get_irq(pdev, 0);
> +		mcbsp->rx_irq = 0;
> +	}
>  
>  	res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx");
>  	if (!res) {

Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>


Thanks,

Paul

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4
  2012-03-07  9:17 [PATCH] ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4 Peter Ujfalusi
  2012-03-07  9:48 ` Paul Menzel
@ 2012-03-07 11:40 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2012-03-07 11:40 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Liam Girdwood, Jarkko Nikula


[-- Attachment #1.1: Type: text/plain, Size: 274 bytes --]

On Wed, Mar 07, 2012 at 11:17:19AM +0200, Peter Ujfalusi wrote:
> On OMAP4 we have one interrupt line per McBSP port.
> At proble time tx, and rx irq value will be -ENXIO,
> and only the tx irq will get corrected.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4
  2012-03-07  9:48 ` Paul Menzel
@ 2012-03-08  7:00   ` Jarkko Nikula
  0 siblings, 0 replies; 4+ messages in thread
From: Jarkko Nikula @ 2012-03-08  7:00 UTC (permalink / raw)
  To: Paul Menzel; +Cc: Peter Ujfalusi, alsa-devel, Mark Brown, Liam Girdwood

On 03/07/2012 11:48 AM, Paul Menzel wrote:
> Dear Peter,
> 
> 
> Am Mittwoch, den 07.03.2012, 11:17 +0200 schrieb Peter Ujfalusi:
>> On OMAP4 we have one interrupt line per McBSP port.
>> At proble time tx, and rx irq value will be -ENXIO,
> 
> s/proble/probe/
> 
I think I have acked this earlier to plat-omap/mcbsp.c. You could add my
ack here

Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>

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

end of thread, other threads:[~2012-03-08  7:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07  9:17 [PATCH] ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4 Peter Ujfalusi
2012-03-07  9:48 ` Paul Menzel
2012-03-08  7:00   ` Jarkko Nikula
2012-03-07 11:40 ` 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).