AnsweredAssumed Answered

SSI-AC97 with wm9713 makes double size record file

Question asked by gi hwa shin on Dec 18, 2018
Latest reply on Jan 16, 2019 by igorpadykov

I'm using a iMX6q processor and the SSI for interfacing a WM9713 codec on ac97-slave mode.
Playback works fine.
Record operation makes double size record file and It takes double seconds to play.
I guess this case following under should make around 1.8MB size file but the recorded file is almost double size.
48000bpsx2chx16bitsx10sec /8 = 1,920,000 bytes
I checked audio ADC sample rate register of wm9713
also checked BitClock and FrameSync. I get 12,288 MHz and 48Khz when it records.

Does anyone know what make this situation?
thanks in advance.

this is debugging message
-----------------------------------------------------------------------
sabresd_6dq:/data/local/tmp # tinypcminfo -d /dev/snd/pcmC0D0c
Info for card 0, device 0:
[soc_pcm_open]

PCM out:
Access: 0x000009
Format[0]: 0x000004
Format[1]: 00000000
Format Name: S16_LE
Subformat: 0x000001
ASoC: min ch 1 max ch 2
Rate: min=8000Hz max=48000Hz
Channels: min=1 max=2
Sample bits: min=16 max=16
Period size: min=32 max=16384
Period count: min=2 max=255

PCM in:
Access: 0x000009
Format[0]: 0x000004
Format[1]: 00000000
Format Name: S16_LE
Subformat: 0x000001
Rate: min=48000Hz max=48000Hz
Channels: min=1 max=2
Sample bits: min=16 max=16
Period size: min=32 max=16384
Period count: min=2 max=255

 

sabresd_6dq:/data/local/tmp # tinycap test.wav -r 48000 -c 2 -b 16 -T 10
[soc_pcm_open]
ASoC: wm9713-hifi <-> 2028000.ssi info:
ASoC: rate mask 0x80
ASoC: min ch 1 max ch 2
ASoC: min rate 48000 max rate 48000
[soc_pcm_hw_params]
[soc_pcm_hw_params]codec_dai, rate:48000, ch:2, bit:16
[fsl_ssi_hw_params] ch:2, rate:48000
[soc_pcm_hw_params]cpu_dai, rate:48000, ch:2, bit:16
[ac97_hifi_prepare] ADC rate:48000
Captured 962560 frames

 

sabresd_6dq:/data/local/tmp # time tinyplay test.wav
[soc_pcm_open]
ASoC: wm9713-hifi <-> 2028000.ssi info:
ASoC: rate mask 0xd6
ASoC: min ch 1 max ch 2
ASoC: min rate 8000 max rate 48000
[soc_pcm_open]
ASoC: wm9713-hifi <-> 2028000.ssi info:
ASoC: rate mask 0xd6
ASoC: min ch 1 max ch 2
ASoC: min rate 8000 max rate 48000
[soc_pcm_hw_params]
[soc_pcm_hw_params]codec_dai, rate:48000, ch:2, bit:16
[fsl_ssi_hw_params] ch:2, rate:48000
[soc_pcm_hw_params]cpu_dai, rate:48000, ch:2, bit:16
[ac97_hifi_prepare] ADC rate:48000
Playing sample: 2 ch, 48000 hz, 16 bit, 4096 buf
play buff count:235, total frm:962560
0m20.04s real 0m00.02s user 0m00.11s system

 

sabresd_6dq:/data/local/tmp # ls -al
total 3772
drwxrwx--x 2 shell shell 4096 1970-01-01 00:05 .
drwxr-x--x 3 root root 4096 1970-01-01 00:00 ..
-rw------- 1 root root 3850284 1970-01-01 00:28 test.wav

Outcomes