All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: ALSA sound on beagleboard
@ 2008-10-23 17:39 Rick Bronson
  2008-10-23 17:48 ` Tony Lindgren
  0 siblings, 1 reply; 10+ messages in thread
From: Rick Bronson @ 2008-10-23 17:39 UTC (permalink / raw)
  To: linux-omap

Tony,

  I checked out some other ARM spurious interrupt handling and it
seems that they ack the interrupt but left the macro with the Z bit
set which means that asm_do_IRQ() does not get called.  Seems to me we
should do the same, see the patch below.  Although, ideally, we should
be logging these.  Is there a mechanism for doing this?

> Are these defines above still needed?

  Yes.

  BTW, I haven't checked this patch so don't do anything with it, just
comment on it ;-)

 Rick

--- linux-omap-2.6/arch/arm/plat-omap/include/mach/entry-macro.S.git	2008-10-22 20:01:33.000000000 -0700
+++ linux-omap-2.6/arch/arm/plat-omap/include/mach/entry-macro.S	2008-10-23 10:25:57.000000000 -0700
@@ -66,7 +66,11 @@
 #endif
 
 #define INTCPS_SIR_IRQ_OFFSET	0x0040		/* Active interrupt offset */
-#define	ACTIVEIRQ_MASK		0x7f		/* Active interrupt bits */
+#define INTCPS_CONTROL		0x0048		/* new interrupt agreement bits offset */
+#define INTCPS_CONTROL_NEWIRQAGR 0x0001		/* Reset IRQ output and enable new IRQ generation */
+#define INTCPS_PENDING_IRQ_1	0x0098		/* IRQ pending reg 1 */
+#define INTCPS_PENDING_IRQ_2	0x00b8		/* IRQ pending reg 2 */
+#define INTCPS_PENDING_IRQ_3	0x00d8		/* IRQ pending reg 3 */
 
 		.macro	disable_fiq
 		.endm
@@ -79,18 +83,18 @@
 
 		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 		ldr	\base, =OMAP2_VA_IC_BASE
-		ldr	\irqnr, [\base, #0x98] /* IRQ pending reg 1 */
-		cmp	\irqnr, #0x0
-		bne	2222f
-		ldr	\irqnr, [\base, #0xb8] /* IRQ pending reg 2 */
-		cmp	\irqnr, #0x0
-		bne	2222f
-		ldr	\irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
-		cmp	\irqnr, #0x0
-2222:
-		ldrne	\irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
-		and	\irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */
-
+		ldr	\irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
+		mvn	\tmp, \irqnr  /* flip MSBit */
+		bics	\tmp, #0x80000000  /* test MSBit */
+		moveq	\tmp, #INTCPS_CONTROL_NEWIRQAGR /* Ack the spurious irq */
+		streq	\tmp, [\base, #INTCPS_CONTROL]
+		beq	2223f  /* if we got a spurious interrupt, ignore it */
+		ldr	\irqstat, [\base, #INTCPS_PENDING_IRQ_1] /* IRQ pending reg 1 */
+		ldr	\tmp, [\base, #INTCPS_PENDING_IRQ_2] /* IRQ pending reg 2 */
+		orr	\irqstat, \irqstat, \tmp  /* or them all together */
+		ldr	\tmp, [\base, #INTCPS_PENDING_IRQ_3] /* IRQ pending reg 3 */
+		orrs	\irqstat, \irqstat, \tmp  /* clear condition code Z if interrupt */
+2223:
 		.endm
 
 		.macro	irq_prio_table

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: ALSA sound on beagleboard
@ 2008-10-23 14:27 Rick Bronson
  0 siblings, 0 replies; 10+ messages in thread
From: Rick Bronson @ 2008-10-23 14:27 UTC (permalink / raw)
  To: linux-omap

> I got a message from someone on the beagleboard mailinglist that
> asound.conf was the culprit, no idea what the exact fix was.

  I wonder if you could dig up this guy's contact info.  I tried lots
of different asound.conf's but none of them did anything.

  Here is what I get without a asound.conf:

> arecord -L                                                                    
default:CARD=omap3beagle                                                        
    omap3beagle,                                                                
    Default Audio Device                                                        
null                                                                            
    Discard all samples (playback) or generate zero samples (capture)           
> arecord -l                                                                    
**** List of CAPTURE Hardware Devices ****                                      
card 0: omap3beagle [omap3beagle], device 0: TWL4030 twl4030-I2S-0 []           
  Subdevices: 1/1                                                               
  Subdevice #0: subdevice #0     

  Seems like everything looks okay for the default device.

  Rick

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: ALSA sound on beagleboard
@ 2008-10-22 17:37 Rick Bronson
  2008-10-22 18:35 ` Koen Kooi
  0 siblings, 1 reply; 10+ messages in thread
From: Rick Bronson @ 2008-10-22 17:37 UTC (permalink / raw)
  To: linux-omap

Dave,

  Thanks for the info.  This patch did get sound output working.  But
input doesn't seem to work.  I checked that I really have audio at the
audio-in connector and that the mixer is set right:

> amixer                                                                        
Simple mixer control 'Master',0                                                 
  Capabilities: pvolume                                                         
  Playback channels: Front Left - Front Right                                   
  Limits: Playback 0 - 127                                                      
  Mono:                                                                         
  Front Left: Playback 75 [59%]                                                 
  Front Right: Playback 75 [59%]                                                
Simple mixer control 'Capture',0                                                
  Capabilities: cvolume                                                         
  Capture channels: Front Left - Front Right                                    
  Limits: Capture 0 - 127                                                       
  Front Left: Capture 84 [66%]                                                  
  Front Right: Capture 84 [66%]  

  Anyone else got it working?

  Thanks for any help.

  Rick

^ permalink raw reply	[flat|nested] 10+ messages in thread
* ALSA sound on beagleboard
@ 2008-10-22  4:57 Rick Bronson
  2008-10-22  5:15 ` David Brownell
  0 siblings, 1 reply; 10+ messages in thread
From: Rick Bronson @ 2008-10-22  4:57 UTC (permalink / raw)
  To: linux-omap

Hi,

  I'd like to get arecord working on the beagleboard.  I've enabled:

CONFIG_SND_OMAP_SOC=y
CONFIG_SND_OMAP_SOC_MCBSP=y
CONFIG_SND_SOC_TWL4030=y

  But I get this upon boot:

Advanced Linux Sound Architecture Driver Version 1.0.17.                        
ASoC version 0.13.2                                                             
ALSA device list:                                                               
  No soundcards found.                                                          

  Please give me a clue on where to start.

  Thanks much.

  Rick Bronson

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

end of thread, other threads:[~2008-10-23 17:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-23 17:39 ALSA sound on beagleboard Rick Bronson
2008-10-23 17:48 ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-10-23 14:27 Rick Bronson
2008-10-22 17:37 Rick Bronson
2008-10-22 18:35 ` Koen Kooi
2008-10-22 19:44   ` David Brownell
2008-10-22 19:57     ` Koen Kooi
2008-10-22  4:57 Rick Bronson
2008-10-22  5:15 ` David Brownell
2008-10-22 16:40   ` Felipe Contreras

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.