All of lore.kernel.org
 help / color / mirror / Atom feed
* AIC23 codec ADC problem
@ 2008-09-28 21:15 Troy Kisky
  2008-09-30  0:46 ` Troy Kisky
  0 siblings, 1 reply; 2+ messages in thread
From: Troy Kisky @ 2008-09-28 21:15 UTC (permalink / raw)
  To: alsa-devel

Hi All


I'm using the TLV320AIC23 to record sound from a mic. It sounds fine
when I play it back, but when I look at the data, the value
in one channel is always exactly double the value in the other.
Since the mic gives the same input to both ADC's I was expecting
to have the same value in the left & right channels. Has
anyone seen this before? Any guesses to what I might be doing
wrong? Can someone using an AIC23 check their data for me?
I'm using a davinci DM644x platform and spi interface to the codec
in dsp_a mode.



sample data
00ec40 fffeffff 00040002 00040002 00000000
00ec50 fffeffff fffeffff 00000000 fffafffd
00ec60 fffeffff 00020001 00040002 00080004
00ec70 000a0005 0016000b 0014000a 001a000d
00ec80 001c000e 001e000f 00200010 00260013
00ec90 001e000f 001e000f 001e000f 001c000e
00eca0 001c000e 0018000c 0014000a 0014000a
00ecb0 0014000a 000e0007 00120009 0014000a
          ^        ^        ^        ^
          Always even


After swapping the left & right channels
at the codec

011af0 fffcfffe fffeffff 00060003 00060003
011b00 000a0005 000c0006 000e0007 000c0006
011b10 00080004 00080004 00060003 00060003
011b20 00080004 00060003 00060003 00040002
011b30 00020001 00020001 00000000 00020001
011b40 fffeffff 00000000 00040002 00060003
011b50 000c0006 000e0007 00100008 0014000a
011b60 00120009 000e0007 00100008 00100008
011b70 000e0007 00080004 00080004 00060003
011b80 00060003 00060003 00060003 000a0005


No change, so the ADC's both do convert to
the same value. But there appears to be a 1 bit
delay between the two channels.

My McBsp is reading 1 32 bit element, so I don't
think it can shift only half of the element.



After switching to dsp_b mode (an extra bit
delay before data starts)

00b130 fff8fff8 fff5fff5 fffafffa fffcfffc
00b140 fffefffe 00010001 00000000 00010001
00b150 00020002 00010001 00010001 00010001
00b160 00000000 ffffffff 00020002 00000000
00b170 00000000 00000000 fffefffe fffefffe
00b180 fffdfffd fffdfffd 00000000 ffffffff
00b190 00020002 00010001 00020002 00030003
00b1a0 00030003 00030003 00050005 00030003
00b1b0 00050005 00030003 00010001 00000000

When I play this back in dsp_b mode I hear
random soft popping from the speaker, but it is loud.

Playing it in dsp_a mode is quiet with no popping.

So, I conclude that recording with the codec is buggy
in dsp_a mode and playback is buggy in dsp_b mode.
I hope someone will tell me I'm wrong.

Thanks
Troy

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

* Re: AIC23 codec ADC problem
  2008-09-28 21:15 AIC23 codec ADC problem Troy Kisky
@ 2008-09-30  0:46 ` Troy Kisky
  0 siblings, 0 replies; 2+ messages in thread
From: Troy Kisky @ 2008-09-30  0:46 UTC (permalink / raw)
  To: alsa-devel

Troy Kisky wrote:
> Hi All
> 
> 
> I'm using the TLV320AIC23 to record sound from a mic. It sounds fine
> when I play it back, but when I look at the data, the value
> in one channel is always exactly double the value in the other.
> Since the mic gives the same input to both ADC's I was expecting
> to have the same value in the left & right channels. Has
> anyone seen this before? Any guesses to what I might be doing
> wrong? Can someone using an AIC23 check their data for me?
> I'm using a davinci DM644x platform and spi interface to the codec
> in dsp_a mode.
> 
> 
> 
> sample data
> 00ec40 fffeffff 00040002 00040002 00000000
> 00ec50 fffeffff fffeffff 00000000 fffafffd
> 00ec60 fffeffff 00020001 00040002 00080004
> 00ec70 000a0005 0016000b 0014000a 001a000d
> 00ec80 001c000e 001e000f 00200010 00260013
> 00ec90 001e000f 001e000f 001e000f 001c000e
> 00eca0 001c000e 0018000c 0014000a 0014000a
> 00ecb0 0014000a 000e0007 00120009 0014000a
>           ^        ^        ^        ^
>           Always even
> 
> 
> After swapping the left & right channels
> at the codec
> 
> 011af0 fffcfffe fffeffff 00060003 00060003
> 011b00 000a0005 000c0006 000e0007 000c0006
> 011b10 00080004 00080004 00060003 00060003
> 011b20 00080004 00060003 00060003 00040002
> 011b30 00020001 00020001 00000000 00020001
> 011b40 fffeffff 00000000 00040002 00060003
> 011b50 000c0006 000e0007 00100008 0014000a
> 011b60 00120009 000e0007 00100008 00100008
> 011b70 000e0007 00080004 00080004 00060003
> 011b80 00060003 00060003 00060003 000a0005
> 
> 
> No change, so the ADC's both do convert to
> the same value. But there appears to be a 1 bit
> delay between the two channels.
> 
> My McBsp is reading 1 32 bit element, so I don't
> think it can shift only half of the element.
> 
> 
> 
> After switching to dsp_b mode (an extra bit
> delay before data starts)
> 
> 00b130 fff8fff8 fff5fff5 fffafffa fffcfffc
> 00b140 fffefffe 00010001 00000000 00010001
> 00b150 00020002 00010001 00010001 00010001
> 00b160 00000000 ffffffff 00020002 00000000
> 00b170 00000000 00000000 fffefffe fffefffe
> 00b180 fffdfffd fffdfffd 00000000 ffffffff
> 00b190 00020002 00010001 00020002 00030003
> 00b1a0 00030003 00030003 00050005 00030003
> 00b1b0 00050005 00030003 00010001 00000000
> 
> When I play this back in dsp_b mode I hear
> random soft popping from the speaker, but it is loud.
> 
> Playing it in dsp_a mode is quiet with no popping.
> 
> So, I conclude that recording with the codec is buggy
> in dsp_a mode and playback is buggy in dsp_b mode.
> I hope someone will tell me I'm wrong.
> 
> Thanks
> Troy


I just tried the same code on a different board
of the same type, and it is working fine.

So, please excuse the noise.


Troy

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

end of thread, other threads:[~2008-09-30  0:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 21:15 AIC23 codec ADC problem Troy Kisky
2008-09-30  0:46 ` Troy Kisky

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.