On 05/29/2015 03:50 PM, Fabio Estevam wrote:
Now we need to record some sounds as soon as the SGTL5000 has the SAIF1 line used for caputure (line in / mic in).
Does recording work on mx28evk with 4.0.4?
Well, is that linux kernel version so important? I can surely say it works with 3.12.1.
Porting to 4.0.4 means a (partial) rewrite of some device-tree files. I can do in a couple of days if you want. But I think I can check out what is really happened in our board. Something related to dma / irq??
In IMX28EVK it works out-of-the-box, in EK340 it does not.
Regarding at the last mail I can clearly see:
When recording from IMX28EVK boards here is the SAIF1_STAT register (0x80046010): 0x80000001 (BIT31 PRESENT and BIT0 BUSY) ... 0x80010001 (BIT31 PRESENT, BIT16 DMA_PREQ and BIT0 BUSY) ... 0x80000001 (BIT31 PRESENT and BIT0 BUSY) ... 0x80010001 (BIT31 PRESENT, BIT16 DMA_PREQ and BIT0 BUSY)
and when finishing recording:
0x80010010 (BIT31 PRESENT, BIT16 DMA_PREQ and BIT4 FIFO_SERVICE_IRQ)
in the EK340 while recording (0x80046010): 0x80000000 (BIT31 PRESENT) ... ... ... 0x80000000 (BIT31 PRESENT)
and finally:
# arecord: pcm_read:1801: read error: Input/output error
# devmem2 0x80046010 /dev/mem opened. Memory mapped at address 0xb6f07000. Value at address 0x80046010 (0xb6f07010): 0x80000000
It seems no IRQ or DMA actions are involved in EK340 for recording. May be I have some DMA Clash or IRQ bad handling? In the device tree I cannot see anything wrong... Some other driver is using the same DMA Channel for SAIF1 ?????
Anyway here is the cat /proc/interrupts for IMX28EVK:
# cat /proc/interrupts CPU0 16: 32790 - 48 MXS Timer Tick 17: 5327 - 82 mxs-dma 18: 0 - 83 mxs-dma 25: 6 - 96 mxs-mmc 26: 0 - 97 mxs-mmc 195: 0 - 80 mxs-dma 196: 141 - 81 mxs-dma 197: 73 - 68 mxs-dma 213: 0 - 59 mxs-saif 214: 2 - 58 mxs-saif 215: 0 - 10 mxs-lradc-touchscreen 216: 0 - 14 mxs-lradc-thresh0 217: 0 - 15 mxs-lradc-thresh1 218: 0 - 16 mxs-lradc-channel0 219: 0 - 17 mxs-lradc-channel1 220: 0 - 18 mxs-lradc-channel2 221: 0 - 19 mxs-lradc-channel3 222: 0 - 20 mxs-lradc-channel4 223: 0 - 21 mxs-lradc-channel5 224: 0 - 22 mxs-lradc-channel6 225: 0 - 23 mxs-lradc-channel7 226: 0 - 24 mxs-lradc-button0 227: 0 - 25 mxs-lradc-button1 228: 0 - 29 RTC alarm 229: 79 - 111 80058000.i2c 233: 0 - 112 8006a000.serial 234: 0 - 115 80070000.serial 235: 1759 - 47 uart-pl011 236: 0 - 93 ci_hdrc_imx 237: 0 - 92 ci_hdrc_imx 238: 64 - 101 800f0000.ethernet 239: 0 - 102 800f4000.ethernet Err: 0
I suppose IRQ 196 and 197 are used for SAIF core because I can see them changing when recording...
and here the same for EK340:
# cat /proc/interrupts CPU0 16: 28189 - 48 MXS Timer Tick 17: 6735 - 82 mxs-dma 18: 0 - 83 mxs-dma 20: 989 - 85 mxs-dma 25: 11 - 96 mxs-mmc 26: 0 - 97 mxs-mmc 27: 24 - 99 mxs-sdio 48: 0 gpio-mxs 19 80064000.pwm 196: 0 - 80 mxs-dma 197: 0 - 81 mxs-dma 198: 76 - 68 mxs-dma 199: 0 - 69 mxs-dma 213: 0 - 59 mxs-saif 214: 3 - 58 mxs-saif 215: 1 - 10 mxs-lradc-touchscreen 216: 0 - 14 mxs-lradc-thresh0 217: 0 - 15 mxs-lradc-thresh1 218: 0 - 16 mxs-lradc-channel0 219: 0 - 17 mxs-lradc-channel1 220: 0 - 18 mxs-lradc-channel2 221: 0 - 19 mxs-lradc-channel3 222: 0 - 20 mxs-lradc-channel4 223: 0 - 21 mxs-lradc-channel5 224: 0 - 22 mxs-lradc-channel6 225: 0 - 23 mxs-lradc-channel7 226: 0 - 24 mxs-lradc-button0 227: 0 - 25 mxs-lradc-button1 228: 0 - 29 RTC alarm 229: 84 - 111 80058000.i2c 230: 0 - 110 8005a000.i2c 234: 0 - 113 8006c000.serial 235: 0 - 114 8006e000.serial 236: 2062 - 47 uart-pl011 237: 0 - 93 ci_hdrc_imx 238: 0 - 92 ci_hdrc_imx 239: 64 - 101 800f0000.ethernet Err: 0
When recording in EK340, the only IRQ is changing between recording sessions is the 198, but it is not present in the IMX28EVK...
Some device-tree clash???
On the EK340 I have 3 sdconnector and I use the SDIO3 for wifi. On the IMX28EVK I still have only two sd-card connector. Is it something related to it?
the IRQs number 198 and 199 what do they mean?? How can I check where they are claimed??
Regards,