arec and aplay on AR7554

To be honest I was not sure in which sub-forum should I ask this question, but the question might also be general. I am using AR7554 module and struggling with making aplay and arec work. We have an external codec attached to the I2S interface of the AR7554. The codec is configured using a shell script and it works. We proved that by making a phone call. The problem is how to make arec record something from the I2S, as well as playing some .wav file back.
When running arec in the following way:

root@swi-mdm9x15:~# arec -D hw:0,5 -V ./test.wav
arec: 1 ch, 48000 hz, 16 bit, PCM
access = 0000000000000008
format = 0000000000000004
subformat = 0000000000000001
sample_bits = (16,16) omin=0 omax=0 int=1 empty=0
frame_bits = (16,16) omin=0 omax=0 int=1 empty=0
channels = (1,1) omin=0 omax=0 int=1 empty=0
rate = (48000,48000) omin=0 omax=0 int=1 empty=0
period_time = (10666,10667) omin=1 omax=1 int=0 empty=0
period_size = (512,512) omin=0 omax=0 int=1 empty=0
period_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
periods = (96,96) omin=0 omax=0 int=1 empty=0
buffer_time = (1024000,1024000) omin=0 omax=0 int=1 empty=0
buffer_size = (49152,49152) omin=0 omax=0 int=1 empty=0
buffer_bytes = (98304,98304) omin=0 omax=0 int=1 empty=0
tick_time = (0,0) omin=0 omax=0 int=1 empty=0
info = 00010103
msbits = 16
rate = 48000/1
fifo = 0
buffer_bytes = (98304,98304) omin=0 omax=0 int=1 empty=0
period_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
period_size (1024) buffer_size (98304) period_cnt  (96)
avail_min (512)
start_threshold (1)
stop_threshold (2147483647)
xfer_align (512)

^C

The file produced contains only zeros. On the other hand, I tried recording a wav file using the AT command and everything works fine. It is also possible to reproduce the same file with the AT command.
However, when running aplay in the following way:

root@swi-mdm9x15:~# aplay -D hw:0,4 0-to-9.wav 
aplay: Playing '0-to-9.wav':Signed 16 bit Little Endian
buffer_bytes = (98304,98304) omin=0 omax=0 int=1 empty=0
period_bytes = (1024,1024) omin=0 omax=0 int=1 empty=0
Aplay:[  228.928673] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.933374] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.938989] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.944605] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.950251] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.955898] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.961544] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.967190] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.972836] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.978483] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.984098] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.989745] afe_callback: cmd = 0x100e2 returned error = 0x1
[  228.995391] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.001037] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.006683] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.012330] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.017976] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.023622] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.029238] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.034884] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.040531] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.046177] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.051823] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.057469] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.063116] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.068731] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.074378] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.080024] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.085670] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.091316] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.096963] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.102609] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.108255] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.113871] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.119517] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.125164] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.130810] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.136456] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.142102] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.147749] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.153395] afe_callback: cmd = 0x100e2 returned error = 0x1
[  229.159011] afe_callback: cmd = 0x2001 returned error = 0x1
 Done playing

How can I find out which device should I use and what is available. I basically tried many possible combinations and the combination 0,4 produced at least some output. We are using 3.4.91 Kernel. Additionally I ould like to ask what is the meaning of the output of the amix command?

Thanx in advance

Hi,

This problem needs a detailed technical analysis. Please contact your Technical support in SWI to provide you the solution.

Thanks & Regards,
Moderator