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.

Problem with configure multiple serializer in RX mode in MCASP DM8148

Hi,

We are working on DM8148 base custom board. We are using kernel  "linux-2.6.37-psp04.04.00.01".

We did below changes to configure MCASP serializer in RX mode:

File : board-ti8148evm.c

static u8 ti8148_iis_serializer_direction_mcasp1[] = {
         RX_MODE,        RX_MODE,                     INACTIVE_MODE,  INACTIVE_MODE,
         INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,
         INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,
         INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,  INACTIVE_MODE,
};

static struct snd_platform_data ti8148_evm_snd_data[] = {

                .tx_dma_offset  = 0x46400000,
                 .rx_dma_offset  = 0x46400000,
                .op_mode        = DAVINCI_MCASP_IIS_MODE,
                .num_serializer = ARRAY_SIZE(ti8148_iis_serializer_direction_mcasp1),
                .tdm_slots      = 2,
                .serial_dir     = ti8148_iis_serializer_direction_mcasp1,
                .asp_chan_q     = EVENTQ_1,
               .version        = MCASP_VERSION_2,
               .txnumevt       = 0,
               .rxnumevt       = 2,
}


By configure multiple serializer we are getting below errors with arecord:

root@dm814x-evm:/home/cvic# arecord -f dat -c 4 audio.wav -D hw:0,1
Recording WAVE 'audio.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Channels 4
arecord: pcm_read:1785: read error: Input/output error


Please suggest.

Thanks,
Devang.

  • Devang,

    Devang panchal said:
    .txnumevt       = 0,
                   .rxnumevt       = 2,

    Can you try with .rxnumevt = 64, see the below patch for more info:

    Regards,
    Pavel

  • Hi Pavel,

    We tested with the patch suggested by you. But still we are facing this issue.

    Please suggest.

    Thanks,
    Devang.

  • Devang,

    What is the audio codec you are using?

    Check if the pinmux is correct.

    Check if your audio codec outputs 2 audio channels towards the DM814x McASP module.

    Regards,
    Pavel
  • Devang,

    Have also modify files davinci-evm.c and devices.c for changing McASP2 to McASP1?

    Can you try the below command, what is the result?

    root@dm814x-evm:~# arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: EVM [TI81XX EVM], device 0: AIC3X tlv320aic3x-hifi-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0

    Regards,
    Pavel

  • Hi Pavel,


    Yes, We modify files you suggested above.

    Please find below results of command arecord -l for your reference:

    **** List of CAPTURE Hardware Devices ****
    card 0: device 0: AD7611 ad7611-codec-dai-0 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0:  device 1: SDI SDI-DAI-CODEC-1 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0

    We checked all the configuration you suggested with codec, pinmux and data lines of codec. It's seems ok.

    Actually, We are using GS2971A SDI codec chip in our system. And we are trying to capture 4 channel audio using two I2S Data lines from codec. So that we configure the two serializer in RX_MODE in McASP of DM8148.

    Please find below block diagram for your reference:

    We tracked data lines of codec and we also getting data on both I2S lines from codec.

    Please suggest.

    Thanks,
    Devang.

  • Hi Pavel,

    Adding some information, We are facing this pcm_read I/o error if we configure both serializer in RX_MODE.

    Anyway we can able to capture channel 1/2 and 3/4 by Setting one of any serializer in RX_MODE individually.

    Thanks,
    Devang.

  • Devang,

    Can you check with:

    static u8 ti8148_iis_serializer_direction_mcasp1[] = {
    RX_MODE, RX_MODE, RX_MODE, RX_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    };

    And with:

    static u8 ti8148_iis_serializer_direction_mcasp1[] = {
    RX_MODE, INACTIVE_MODE, RX_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    };
  • TI814x use McASP2 (Serializer 0 for Tx and Serializer 1 for Rx) to communicate to the AIC3106 codec on the base EVM. Do you configure Serializer 0 for RX on your custom board?

    Can you also try with the audio capture/record application (not only with arecord tool)?

    See also the below e2e thread:


    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/229575

    BR
    Pavel

  • Hi Pavel,

    We tested with changes you suggested above. But we are still getting pcm_read I/O error.

    Yes, We configured Serializer 0 in RX mode for our custom board.
    We changed it as below:

    static u8 ti8148_iis_serializer_direction_mcasp1[] = {
    RX_MODE, RX_MODE, INACTIVE_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
    };

    We already tested with other audio capture application with the reference of below link:
    processors.wiki.ti.com/.../TI81XX_PSP_AUDIO_Driver_User_Guide
    But we also getting same pcm_read I/O error.

    Please note that we are able to capture 1/2 channel and 3/4 channel audio if we configure Serializer 0 & Serializer 1 in RX mode individually.

    Thanks,
    Devang.