Sorry if I've overlooked the answer to this already, but a truck-load of Googles (general and here at E2E) have netted me nothing.
I'm trying to sort out a receive problem on McBSP2 of an AM3517 running Linux 3.2. I get nothing but 0s (silence) coming up to the file. To see where my code breakage is at, I simply want to be able to see a few samples as they come in. So far, I've not been able to track down where in the kernel I could do this safely. My guess is somewhere in omap-pcm, but so far I can't find a good place or call to make.
The only spot I have found that I think shows me a glimmer of this is in the debugging register dumps. Again, I'm doing some guessing based on what I've been able to track through the Linux code, but I believe DRR1 & DRR2 represent the low- and high-order blocks (16-bits each) of the McBSP's DRR register. (I'm not sure of the order.) Likewise would be true for the DXRs.
During repeated PLAYS (aplay) of various WAV files, DRR2 stays constant at something big (negative?), and DRR1, DXR1, and DXR2 are all 0.
[ 34.707092] omap-mcbsp omap-mcbsp.2: DRR2: 0xc4c060
[ 34.712310] omap-mcbsp omap-mcbsp.2: DRR1: 0x0000
[ 34.717315] omap-mcbsp omap-mcbsp.2: DXR2: 0x0000
[ 34.722351] omap-mcbsp omap-mcbsp.2: DXR1: 0x0000
[ 34.727355] omap-mcbsp omap-mcbsp.2: SPCR2: 0x0235
[ 34.732391] omap-mcbsp omap-mcbsp.2: SPCR1: 0x4030
[ 34.737426] omap-mcbsp omap-mcbsp.2: RCR2: 0x0040
[ 34.742431] omap-mcbsp omap-mcbsp.2: RCR1: 0x0040
[ 34.747467] omap-mcbsp omap-mcbsp.2: XCR2: 0x0040
[ 34.752471] omap-mcbsp omap-mcbsp.2: XCR1: 0x0040
[ 34.757507] omap-mcbsp omap-mcbsp.2: SRGR2: 0x001f
[ 34.762512] omap-mcbsp omap-mcbsp.2: SRGR1: 0x0f00
[ 34.767547] omap-mcbsp omap-mcbsp.2: PCR0: 0x0000
As soon as I record (arecord), DRR2 changes to something else, but the others remain at 0.
[ 188.790069] omap-mcbsp omap-mcbsp.2: DRR2: 0xa0b7ffb1
[ 188.795440] omap-mcbsp omap-mcbsp.2: DRR1: 0x0000
[ 188.800476] omap-mcbsp omap-mcbsp.2: DXR2: 0x0000
[ 188.805480] omap-mcbsp omap-mcbsp.2: DXR1: 0x0000
If I keep repeating this, I keeping getting the same results.
First off, DRR2 seems odd to me since it almost always exceeds the 4-byte size its "%04x" print should allow. I assume this is sign extension, meaning it's always negative? Is that a correct interpretation?
Likewise, I can't make sense of why the other registers are always 0. Since this dump prints only once per play/record run, I presume the values there are simply leftovers from the previous. Why then would the other 3 lines never be anything but 0? I played lots of different files. And, I'm confident they don't all end in silence.
My Googles showed lots of others with similar dumps. So, I'm forced to assume this right, though I don't know why.
Could someone please explain this to me?
Thanks!