Hi:
I'm trying to build an multichannel audio cape for beaglebone black using PCM3168... Finally i finished studing so i can get more time for this project.
My first question is about device tree; on it i've written:
&mcasp0 {
pinctrl-names = "default";
pinctrl-0 = <&mcasp0_pins>;
status = "okay";
op-mode = <0>; /* MCASP_TDM_MODE */
tdm-slots = <4>;
num-serializer = <4>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 1 2 2
>;
tx-num-evt = <1>;
rx-num-evt = <1>;
};
My intention is to use 4 channels out of each pin of the PCM3168 (left justified TDM mode), so i don't need to use both mcasp in the am335x, and that's why i use tdm-slots = <4>. But when i give the command:
arecord -D hw:0,0 -d 10 -f S24_LE -c 6 -r 96 -t wav test1.wav
i get the error:
Recording WAVE 'test1.wav' : Signed 24 bit Little Endian, Rate 96000 Hz, Channels 6
arecord: set_params:1239: Channels count non available
I supposed that the tdm-slots specified the number of slots per serializer... am i right?
If i use
arecord -D hw:0,0 -d 10 -f S24_LE -c 4 -r 96 -t wav test1.wav
it seems to be recording, indeed it creates the file test1.wav, but i get:
[ 32.600895] davinci-mcasp 48038000.mcasp: Sample-rate is off by -348958 PPM
overrun!!! (at least 859.940 ms long)
I located the Sample-rate message in davinci_mcasp_calc_clk_div in davinci-mcasp.c file, but i dont understand that error, nor why i'm getting overrun
Also, if after having "recorded" i try to play the file with aplay or record anotherone with arecord i get messages like this:
ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable
aplay: set_params:1204: Broken configuration for this PCM: no configurations available
Any suggestion? i can attach my files if needed