* Debugging missing interrupts
@ 2013-02-25 7:34 lexa
2013-02-25 8:03 ` Bo Shen
0 siblings, 1 reply; 6+ messages in thread
From: lexa @ 2013-02-25 7:34 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
I have a trouble with debugging SSC interface(or maybe with audio
codec). I have a board based on Atmel AT91 (at91sam9m10g45) and codec TI
tlv320aic3106(using driver tlv320aic3x) connected to SSC interface in
I2S mode.
Playback is works well, but the capture cause trouble.
The problem is that arecord don't capture any data, he just writes wav
header and nothing more.
Interrupt counter on ssc0 does not increased during capture.
Also i checked data and clock lines by oscilloscope, and clearly see
that clock and data transmitting from audio codec during capture.
It's seem to me, that cpu somewhat doesn't accept data from codec. But i
don't understand why, and how to debug this.
I know that provided information is insufficient, but i simply don't
know how to get more detailed information about this problem.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Debugging missing interrupts
2013-02-25 7:34 Debugging missing interrupts lexa
@ 2013-02-25 8:03 ` Bo Shen
2013-02-25 8:37 ` lexa
0 siblings, 1 reply; 6+ messages in thread
From: Bo Shen @ 2013-02-25 8:03 UTC (permalink / raw)
To: linux-arm-kernel
Hi Lexa,
On 2/25/2013 15:34, lexa wrote:
>
> Hello.
>
> I have a trouble with debugging SSC interface(or maybe with audio
> codec). I have a board based on Atmel AT91 (at91sam9m10g45) and codec TI
> tlv320aic3106(using driver tlv320aic3x) connected to SSC interface in
> I2S mode.
Which kernel version do you use?
SSC work as master or slave?
> Playback is works well, but the capture cause trouble.
> The problem is that arecord don't capture any data, he just writes wav
> header and nothing more.
Which command do you use for recording? (it will give sample rate,
format, and etc)
> Interrupt counter on ssc0 does not increased during capture.
> Also i checked data and clock lines by oscilloscope, and clearly see
> that clock and data transmitting from audio codec during capture.
> It's seem to me, that cpu somewhat doesn't accept data from codec. But i
> don't understand why, and how to debug this.
>
> I know that provided information is insufficient, but i simply don't
> know how to get more detailed information about this problem.
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Debugging missing interrupts
2013-02-25 8:03 ` Bo Shen
@ 2013-02-25 8:37 ` lexa
2013-02-25 9:21 ` Bo Shen
0 siblings, 1 reply; 6+ messages in thread
From: lexa @ 2013-02-25 8:37 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 2013-02-25 at 16:03 +0800, Bo Shen wrote:
> Hi Lexa,
>
> On 2/25/2013 15:34, lexa wrote:
> >
> > Hello.
> >
> > I have a trouble with debugging SSC interface(or maybe with audio
> > codec). I have a board based on Atmel AT91 (at91sam9m10g45) and codec TI
> > tlv320aic3106(using driver tlv320aic3x) connected to SSC interface in
> > I2S mode.
>
> Which kernel version do you use?
I use 3.2.38
> SSC work as master or slave?
>
SSC works as slave for playback and for capture(as far as i know there
no difference in configuration SSC controller). Audio codec is
generating bit clock and word clock, and ARM is receiving them.
> > Playback is works well, but the capture cause trouble.
> > The problem is that arecord don't capture any data, he just writes wav
> > header and nothing more.
>
> Which command do you use for recording? (it will give sample rate,
> format, and etc)
>
> > Interrupt counter on ssc0 does not increased during capture.
> > Also i checked data and clock lines by oscilloscope, and clearly see
> > that clock and data transmitting from audio codec during capture.
> > It's seem to me, that cpu somewhat doesn't accept data from codec. But i
> > don't understand why, and how to debug this.
> >
> > I know that provided information is insufficient, but i simply don't
> > know how to get more detailed information about this problem.
>
> Best Regards,
> Bo Shen
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Debugging missing interrupts
2013-02-25 8:37 ` lexa
@ 2013-02-25 9:21 ` Bo Shen
[not found] ` <1361790127.4640.58.camel@localhost>
0 siblings, 1 reply; 6+ messages in thread
From: Bo Shen @ 2013-02-25 9:21 UTC (permalink / raw)
To: linux-arm-kernel
On 2/25/2013 16:37, lexa wrote:
> On Mon, 2013-02-25 at 16:03 +0800, Bo Shen wrote:
>> Hi Lexa,
>>
>> On 2/25/2013 15:34, lexa wrote:
>>>
>>> Hello.
>>>
>>> I have a trouble with debugging SSC interface(or maybe with audio
>>> codec). I have a board based on Atmel AT91 (at91sam9m10g45) and codec TI
>>> tlv320aic3106(using driver tlv320aic3x) connected to SSC interface in
>>> I2S mode.
>>
>> Which kernel version do you use?
>
> I use 3.2.38
>
>> SSC work as master or slave?
>>
>
> SSC works as slave for playback and for capture(as far as i know there
> no difference in configuration SSC controller). Audio codec is
> generating bit clock and word clock, and ARM is receiving them.
>
>>> Playback is works well, but the capture cause trouble.
>>> The problem is that arecord don't capture any data, he just writes wav
>>> header and nothing more.
>>
>> Which command do you use for recording? (it will give sample rate,
>> format, and etc)
any information for this?
>>
>>> Interrupt counter on ssc0 does not increased during capture.
>>> Also i checked data and clock lines by oscilloscope, and clearly see
>>> that clock and data transmitting from audio codec during capture.
>>> It's seem to me, that cpu somewhat doesn't accept data from codec. But i
>>> don't understand why, and how to debug this.
Please enable the kernel debug information, this will give out necessary
register information for debugging. Please also provide it for analysis
your problem.
>>> I know that provided information is insufficient, but i simply don't
>>> know how to get more detailed information about this problem.
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Debugging missing interrupts
[not found] ` <512C118D.4060105@atmel.com>
@ 2013-03-04 10:24 ` lexa
2013-03-05 8:09 ` Bo Shen
0 siblings, 1 reply; 6+ messages in thread
From: lexa @ 2013-03-04 10:24 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 2013-02-26 at 09:36 +0800, Bo Shen wrote:
> On 2/25/2013 19:02, lexa wrote:
> >>>> Which command do you use for recording? (it will give sample rate,
> >>>> format, and etc)
> >>
> >> any information for this?
> > I tried:
> > arecord -r 8000 -f S16_LE
> > arecord -r 8000 -f U8
> > arecord -r 48000 -f S16_LE
> > arecord -r 48000 -f U8
>
> only these, without "-t wav record.wav" or anything else?
Only this commands, without any additional options. Recorded data
forwarded to my terminal and i don't see anything except wav header.
>
> >> Please enable the kernel debug information, this will give out necessary
> >> register information for debugging. Please also provide it for analysis
> >> your problem.
> >>
> >
> > Which registers should i watch ? I suppose all registers which configure
> > SSC controller, but maybe someone what else ?
>
> May be you misunderstanding. I mean you enable the kernel debug
> information, the driver will automatically print the register setting
> for each step operation.
>
> You can go through the driver, there are many pr_debug which give the
> necessary information.
I enable debugging in ssc driver and tried execute some commands:
# arecord -f dat -t wav record.wav
Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
[ 73.500000] atmel_ssc_startup: SSC_SR=0x12
[ 73.520000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TF MR=0000008f
[ 73.530000] atmel_ssc_dai: Starting clock
[ 73.540000] atmel_ssc_dai,hw_params: SSC initialized
[ 73.540000] receive enabled SSC_SR=0x0002040c
Aborted by signal Interrupt...
[ 79.650000] atmel_ssc_shutdown: receive disabled SSC_SR=0x0000040c
[ 79.650000] atmel_ssc_dau: Stopping clock signal Interrupt...
# aplay -f dat test.dat
[ 92.040000] atmel_ssc_startup: SSC_SR=0x12
Playing raw data 'test.dat' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
[ 92.060000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TFMR=0000008f
[ 92.070000] atmel_ssc_dai: Starting clock
[ 92.080000] atmel_ssc_dai,hw_params: SSC initialized
[ 92.080000] transmit enabled SSC_SR=0x0001040f
[ 92.210000] atmel_ssc_shutdown: transmit disabled SSC_SR=0x00010403
[ 92.210000] atmel_ssc_dau: Stopping clock
# arecord -r 8000 -f S16_LE -t wav record.wav
[ 139.770000] atmel_ssc_startup: SSC_SR=0x0
Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
[ 139.790000] atmel_ssc_hw_params: RCMR=00010421 RFMR=0000008f TCMR=00010402 TFMR=0000008f
[ 139.800000] atmel_ssc_dai: Starting clock
[ 139.800000] atmel_ssc_dai,hw_params: SSC initialized
[ 139.810000] receive enabled SSC_SR=0x000204c0
Aborted by signal Interrupt...
[ 141.260000] atmel_ssc_shutdown: receive disabled SSC_SR=0x00000400
[ 141.270000] atmel_ssc_dau: Stopping clock
# aplay -r 8000 -f S16_LE test.dat
[ 154.710000] atmel_ssc_startup: SSC_SR=0x0
Playing raw data 'test.dat' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
[ 154.730000] atmel_ssc_hw_params: RCMR=00010421 RFMR=0000008f TCMR=00010402 TFMR=0000008f
[ 154.740000] atmel_ssc_dai: Starting clock
[ 154.750000] atmel_ssc_dai,hw_params: SSC initialized
[ 154.750000] transmit enabled SSC_SR=0x0001040f
Aborted by signal Interrupt...
[ 155.580000] atmel_ssc_shutdown: transmit disabled SSC_SR=0x00000403
[ 155.580000] atmel_ssc_dau: Stopping clock
# arecord -r 8000 -f S16_LE -c 2 -t wav record.wav
[ 176.880000] atmel_ssc_startup: SSC_SR=0x0
Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
[ 176.900000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TFMR=0000008f
[ 176.900000] atmel_ssc_dai: Starting clock
[ 176.910000] atmel_ssc_dai,hw_params: SSC initialized
[ 176.920000] receive enabled SSC_SR=0x000204c0
Aborted by signal Interrupt...
[ 177.800000] atmel_ssc_shutdown: receive disabled SSC_SR=0x00000400
[ 177.810000] atmel_ssc_dau: Stopping clock
# aplay -r 8000 -f S16_LE -c 2 test.dat
[ 193.380000] atmel_ssc_startup: SSC_SR=0x0
Playing raw data 'test.dat' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
[ 193.400000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TFMR=0000008f
[ 193.410000] atmel_ssc_dai: Starting clock
[ 193.410000] atmel_ssc_dai,hw_params: SSC initialized
[ 193.420000] transmit enabled SSC_SR=0x0001040f
[ 193.920000] atmel_ssc_shutdown: transmit disabled SSC_SR=0x00010403
[ 193.930000] atmel_ssc_dau: Stopping clock
aplay works fine, but arecord writes nothing except wav header.
P.S. Sorry for my slow response.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Debugging missing interrupts
2013-03-04 10:24 ` lexa
@ 2013-03-05 8:09 ` Bo Shen
0 siblings, 0 replies; 6+ messages in thread
From: Bo Shen @ 2013-03-05 8:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi lexa,
On 3/4/2013 18:24, lexa wrote:
> On Tue, 2013-02-26 at 09:36 +0800, Bo Shen wrote:
>> On 2/25/2013 19:02, lexa wrote:
>>>>>> Which command do you use for recording? (it will give sample rate,
>>>>>> format, and etc)
>>>>
>>>> any information for this?
>>> I tried:
>>> arecord -r 8000 -f S16_LE
>>> arecord -r 8000 -f U8
>>> arecord -r 48000 -f S16_LE
>>> arecord -r 48000 -f U8
>>
>> only these, without "-t wav record.wav" or anything else?
>
> Only this commands, without any additional options. Recorded data
> forwarded to my terminal and i don't see anything except wav header.
>
[Snip]
>
> I enable debugging in ssc driver and tried execute some commands:
>
>
> # arecord -f dat -t wav record.wav
> Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
> [ 73.500000] atmel_ssc_startup: SSC_SR=0x12
> [ 73.520000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TF MR=0000008f
> [ 73.530000] atmel_ssc_dai: Starting clock
> [ 73.540000] atmel_ssc_dai,hw_params: SSC initialized
> [ 73.540000] receive enabled SSC_SR=0x0002040c
> Aborted by signal Interrupt...
> [ 79.650000] atmel_ssc_shutdown: receive disabled SSC_SR=0x0000040c
> [ 79.650000] atmel_ssc_dau: Stopping clock signal Interrupt...
>
>
> # aplay -f dat test.dat
> [ 92.040000] atmel_ssc_startup: SSC_SR=0x12
> Playing raw data 'test.dat' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
> [ 92.060000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TFMR=0000008f
> [ 92.070000] atmel_ssc_dai: Starting clock
> [ 92.080000] atmel_ssc_dai,hw_params: SSC initialized
> [ 92.080000] transmit enabled SSC_SR=0x0001040f
> [ 92.210000] atmel_ssc_shutdown: transmit disabled SSC_SR=0x00010403
> [ 92.210000] atmel_ssc_dau: Stopping clock
>
> # arecord -r 8000 -f S16_LE -t wav record.wav
> [ 139.770000] atmel_ssc_startup: SSC_SR=0x0
> Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
> [ 139.790000] atmel_ssc_hw_params: RCMR=00010421 RFMR=0000008f TCMR=00010402 TFMR=0000008f
> [ 139.800000] atmel_ssc_dai: Starting clock
> [ 139.800000] atmel_ssc_dai,hw_params: SSC initialized
> [ 139.810000] receive enabled SSC_SR=0x000204c0
> Aborted by signal Interrupt...
> [ 141.260000] atmel_ssc_shutdown: receive disabled SSC_SR=0x00000400
> [ 141.270000] atmel_ssc_dau: Stopping clock
>
> # aplay -r 8000 -f S16_LE test.dat
> [ 154.710000] atmel_ssc_startup: SSC_SR=0x0
> Playing raw data 'test.dat' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
> [ 154.730000] atmel_ssc_hw_params: RCMR=00010421 RFMR=0000008f TCMR=00010402 TFMR=0000008f
> [ 154.740000] atmel_ssc_dai: Starting clock
> [ 154.750000] atmel_ssc_dai,hw_params: SSC initialized
> [ 154.750000] transmit enabled SSC_SR=0x0001040f
> Aborted by signal Interrupt...
> [ 155.580000] atmel_ssc_shutdown: transmit disabled SSC_SR=0x00000403
> [ 155.580000] atmel_ssc_dau: Stopping clock
>
>
> # arecord -r 8000 -f S16_LE -c 2 -t wav record.wav
> [ 176.880000] atmel_ssc_startup: SSC_SR=0x0
> Recording WAVE 'record.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
> [ 176.900000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TFMR=0000008f
> [ 176.900000] atmel_ssc_dai: Starting clock
> [ 176.910000] atmel_ssc_dai,hw_params: SSC initialized
> [ 176.920000] receive enabled SSC_SR=0x000204c0
> Aborted by signal Interrupt...
> [ 177.800000] atmel_ssc_shutdown: receive disabled SSC_SR=0x00000400
> [ 177.810000] atmel_ssc_dau: Stopping clock
>
>
> # aplay -r 8000 -f S16_LE -c 2 test.dat
> [ 193.380000] atmel_ssc_startup: SSC_SR=0x0
> Playing raw data 'test.dat' : Signed 16 bit Little Endian, Rate 8000 Hz, Stereo
> [ 193.400000] atmel_ssc_hw_params: RCMR=00010721 RFMR=0000008f TCMR=00010702 TFMR=0000008f
> [ 193.410000] atmel_ssc_dai: Starting clock
> [ 193.410000] atmel_ssc_dai,hw_params: SSC initialized
> [ 193.420000] transmit enabled SSC_SR=0x0001040f
> [ 193.920000] atmel_ssc_shutdown: transmit disabled SSC_SR=0x00010403
> [ 193.930000] atmel_ssc_dau: Stopping clock
>
>
> aplay works fine, but arecord writes nothing except wav header.
From the log information for SSC configuration, it is OK.
I guess the routing may have problem. Please try to use alsa utils to
check or configure and then test again.
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-05 8:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-25 7:34 Debugging missing interrupts lexa
2013-02-25 8:03 ` Bo Shen
2013-02-25 8:37 ` lexa
2013-02-25 9:21 ` Bo Shen
[not found] ` <1361790127.4640.58.camel@localhost>
[not found] ` <512C118D.4060105@atmel.com>
2013-03-04 10:24 ` lexa
2013-03-05 8:09 ` Bo Shen
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).