Debugging missing interrupts
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.
Hi Lexa,
Quoted 7 lines · lexa
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?
Quoted 3 lines
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)
Quoted 8 lines
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
Quoted 4 lines · Bo Shen
Hi Lexa,
Quoted 1 line · lexa
Quoted 8 lines
Quoted 6 lines
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
Quoted 2 lines
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.
Quoted 19 lines
Quoted 3 lines
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)
Quoted 8 lines
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
Quoted 14 lines · lexa
Quoted 4 lines · Bo Shen
Hi Lexa,
Quoted 1 line · lexa
Quoted 8 lines
Quoted 6 lines
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?
Quoted 15 lines
I use 3.2.38
Quoted 2 lines
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.
Quoted 6 lines
Quoted 3 lines
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?
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
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.
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
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
A message that is not in the archive (sent off-list or not yet received): 1361790127.4640.58.camel@localhost
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Bo Shen
Quoted 3 lines · lexa
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Which command do you use for recording? (it will give sample rate, format, and etc)
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
any information for this?
I tried:
arecord -r 8000 -fS16_LE
arecord -r 8000 -f U8
arecord -r 48000 -fS16_LE
arecord -r 48000 -f U8only 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.
Quoted 9 lines
Quoted 8 lines
Quoted 5 lines
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 ?
Quoted 6 lines
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_debugwhich 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.
Hi lexa,
Quoted 17 lines · lexa
Quoted 4 lines · Bo Shen
Quoted 3 lines · lexa
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Which command do you use for recording? (it will give sample rate, format, and etc)
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
any information for this?
I tried:
arecord -r 8000 -fS16_LE
arecord -r 8000 -f U8
arecord -r 48000 -fS16_LE
arecord -r 48000 -f U8only 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]
Quoted 72 lines
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
Quoted 1 line
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