I just found the main issue: Why 3 TDM Rx line is not working
The driver for McASP in davinci-mcasp.c is not supported for multi-line TDM
Rx. If having more than 1 serial line, all the slot of TDM are inactive.
(all the bit in "Receive TDM Time Slot Register":"RTDM" is ZERO)
I do the correction inside function:
static int mcasp_i2s_hw_param(struct davinci_mcasp *mcasp, int stream,
      int channels)
[image: correct_multi_serial_line.png]

And It is working now!!



On Fri, Nov 9, 2018 at 1:25 PM Leson Phan <[email protected]> wrote:

> Hello,
>
> I need your help!!!
>
> I am trying to send 30 channel microphones from DSP board to Beaglebone
> black. I design with 3 TDM lines, each line 10 slot.
>
> I could check the correct signal sending from DSP by oscilloscope (DSP
> generate bit clock, frame clock )
>
> When I do the record with 30 channels, it notices 'Division by zero in
> kernel'
>
> debian@beaglebone:~$ arecord -f S24_LE -d3 -r 48000 -c30 test.wav
> Recording WAVE 'test.wav' : [65667.290731] Division by zero in kernel.
> Signed 24 bit Little Endian, Rate 48000 Hz, Channels 30
>
> dmesg said the bclk from 'snd_soc_params_to_bclk(params)' is 34560000. How
> the kernel get this number? It sould be 15360000=48000*32*10
>
>
>
>
>
>
>
>
> *[65667.290633] bclk (from params): 34560000[65667.290660] fs:
> 48000[65667.290667] sysclk: 24576000[65667.290672] bclk:
> 15360000[65667.290684] evm_dsp56725_hw_params: Starting
> operations.[65667.290690] sysclk=24576000[65667.290696]
> bclk_freq=15360000[65667.290731] Division by zero in kernel.*
>
> This is my modification in dts:
>
> /* dsp56725 cape */
> mcasp0_pins_dsp56725: mcasp0_pins_dsp56725 {
> pinctrl-single,pins = <
> AM33XX_IOPAD(0x9a4, 0x20) /* mcasp0_fsr, MODE0 | INPUT P9_27 GPIO3_19 */
> AM33XX_IOPAD(0x878, 0x26) /* mcasp0_aclkr_mux3, MODE6 | INPUT P9_12
> gpio1_28 */
> AM33XX_IOPAD(0x998, 0x20) /* mcasp0_axr0, MODE0 | INPUT P9_30 GPIO3_16 */
> AM33XX_IOPAD(0x99c, 0x22) /* mcasp0_axr2 MODE2 | INPUT P9_28 GPIO3_17 */
> AM33XX_IOPAD(0x9ac, 0x22) /* mcasp0_axr3, MODE2 | INPUT P9_25 GPIO3_21*/
> /*OFFSET DIR|MODE */
>
> >;
> };
>
> &mcasp0 {
> pinctrl-names = "default";
> pinctrl-0 = <&mcasp0_pins_dsp56725>;
>
> status = "okay";
>
> op-mode = <0>; /* MCASP_IIS_MODE */
> tdm-slots = <10>;
> num-serializer = <4>;
> serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
> 2 0 2 2
> >;
> tx-num-evt = <0>;
> rx-num-evt = <1>;
> };
>
> / {
> dsp56725: dsp56725 {
> compatible = "ti,dsp56725";
> };
>
> sound {
> compatible = "ti,beaglebone-black-dsp56725";
> ti,model = "DSP56725";
> ti,audio-codec = <&dsp56725>;
> ti,mcasp-controller = <&mcasp0>;
> ti,codec-clock-rate = <24576000>;
> };
> };
>
> During testing, I try to record with less than 15 channels it could record
> but it seems it only read data on the line mcasp0_axr0. How could I config
> to read 3 lines TDM simultaneously.
>
> debian@beaglebone:~$ arecord -f S24_LE -d3 -r 48000 -c14 test.wav
> Recording WAVE 'test.wav' : Signed 24 bit Little Endian, Rate 48000 Hz,
> Channels 14
> debian@beaglebone:~$
>
>
>
>
>
>
>
> *[66387.103351] bclk (from params): 11520000[66387.103378] fs:
> 48000[66387.103385] sysclk: 24576000[66387.103390] bclk:
> 15360000[66387.103401] evm_dsp56725_hw_params: Starting
> operations.[66387.103407] sysclk=24576000[66387.103413] bclk_freq=15360000*
>
> Thank You!
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/hLC1f_vnQ7k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/714b6ec4-9459-414d-bd2f-be0924a45ed7%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/714b6ec4-9459-414d-bd2f-be0924a45ed7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALj%3DxqoGTJgOw1pMM8xW45sTSwk1Fx8XJvE6%3D9FPc55mSfqxpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to