This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA750: Jacinto 7, audio interface mcasp1, mcasp2 issue

Part Number: DRA750


Tool/software: Linux

Hi expert,

1. My environment as below:

* Adapter Board with I2S master (3.02.00.03) -------- (digital to digital connect) -------- Carrier Board with I2S slave (GLSDK 3.02.00.03)

 

 

2. Both Adapter Board and Carrier Board use mcasp1, mcasp2, mcasp3, mcasp4, and mcasp8.

* mcasp3, mcasp4, mcasp8 work well

  --> Adapter Board use aplay         Carrier Board use arecord (OK)

  --> Adapter Board use arecord     Carrier Board use aplay (OK)

* mcasp1, mcasp2 cannot work well in digital to digital connect case

  --> Adapter Board use aplay          Carrier Board use arecord (Failed)

  --> Adapter Board use arecord      Carrier Board use aplay (Failed)

  --> Adapter Board can do loopback test, that is, short tx, rx to do aplay / arecord (OK)

  --> I think the issue might in CB...

note: In Carrier Board, I use GPIO5_1 to be mcasp1 frame sync clock, refer to data sheet, it can only be mcasp1_fsr, cannot be mcasp1_fsx

 

 

3. The attachment is my DTS configuration to both AB and CB, could you please help this issue, or provide some debug tools.

* I use simple-card to be ASoC machine driver, bt-sco to be ASoC dummy codec, CPU DAI driver should be davinci-mcasp.c

AB's DTS

AB_dra7-evm-030003.dts.txt

CB's DTS

CB_dra7-evm.dts.txt

 

 

Thank you very much.

BRs

Louis

  • Hi Louis,

    I have forwarded your question to McASP expert.

    Regards,
    Yordan
  • Louis,

    I believe the problem with McASP1 is related to pin (FSR) that the FSYNC is routed to in your carrier board. The kernel driver configures the McASP peripheral in synchronous mode, so the FSR pin is not used for RX. The signal on FSX is used for both, TX and RX. So, basically, McASP1 isn't receiving any FSYNC signal.

    The BCLK signal seems to have the same problem. Only ACLKR is connected (as per McASP1 pinmux settings in CB_dra7-evm.dts) and it won't be used in synchronous mode either.

    Is McASP1 used only for RX? If so, you may want to try switching to asynchronous mode.

    Re "Adapter Board use arecord Carrier Board use aplay (Failed)", this tells me that McASP1 is also meant to be used for TX. If so, why aren't FSX/ACLKX pins connected? Even if you switch to asynchronous mode, the FSX/ACLKX pins are needed for TX.
  • Hi Misael,

    1. To MCASP1: 

    Clock PINs in AB: 

          ---------------------------------------

          Ball Number: C14

          Ball Name: mcasp1_aclkx

          Signal Name: mcasp1_aclkx

          ---------------------------------------

          Ball Number: D14

          Ball Name: mcasp1_fsx

          Signal Name: mcasp1_fsx

          ---------------------------------------

    Clock PINs in CB: 

          ---------------------------------------

          Ball Number: B14

          Ball Name: mcasp1_aclkr

          Signal Name: mcasp1_aclkr (cannot be mcasp1_aclkx)

          ---------------------------------------

          Ball Number: J14

          Ball Name: mcasp1_fsr

          Signal Name: mcasp1_fsr (cannot be mcasp1_fsx)

          ---------------------------------------

    It seems that I must use asynchronous mode, how do I config  mcasp1 to asynchronous mode?

     

     

    2. To MCASP2: 

    Clock PINs in AB: 

          ---------------------------------------

          Ball Number: E15

          Ball Name: mcasp2_aclkr

          Signal Name: mcasp2_aclkr (cannot be mcasp2_aclkx)

          ---------------------------------------

          Ball Number: A20

          Ball Name: mcasp2_fsr

          Signal Name: mcasp2_fsr (cannot be mcasp2_fsx)

          ---------------------------------------

    Clock PINs in CB: 

          ---------------------------------------

          Ball Number: A19

          Ball Name: mcasp2_aclkx

          Signal Name: mcasp2_aclkx

          ---------------------------------------

          Ball Number: A18

          Ball Name: mcasp2_fsx

          Signal Name: mcasp2_fsx

          ---------------------------------------

    It seems mcasp2 has the same issue with mcasp1, how do I config this interface to asynchronous mode?

    BRs

    Louis

  • Louis,

    The McASP driver in kernel-4.4 seems to be taking care of proper handling of the sync mode, and it's just a matter of forcing the driver to use one mode or the other.

    Please try the attached patch which allows specifying a sync mode via device-tree. You will need to add the "async" property to the corresponding McASP nodes in the AB (mcasp2) and CB boards (mcasp1).

    0001-ASoC-davinci-mcasp-Set-sync-mode-via-devicetree.patch.zip

  • Hi Misael,

    Thank you very much. Patch file really help.

    BRs
    Louis