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.

mcasp0 problem using Pin Mux configuration 12 with debian 3.15

My design uses IIS audio on BGA pins V16, U16, T16, and V17; configuration 12 in the Pin Mux application for mcasp0:

    bone_audio_cape_audio_pins: pinmux_bone_audio_cape_audio_pins {
        pinctrl-single,pins = <
        0x60 0x26 /* mcasp0_aclkx.mcasp0_aclkx, INPUT | MODE6 */
        0x64 0x26 /* mcasp0_fsx.mcasp0_fsx, INPUT | MODE6 */
        0x68 0x26 /* mcasp0_ahclkr.mcasp0_axr0, INPUT | MODE6 */
        0x6c 0x26 /* mcasp0_ahclkx.mcasp0_axr1, INPUT | MODE6 */
        >;

    pinctrl-names = "default";
    pinctrl-0 = <&bone_audio_cape_audio_pins>;

    status = "okay";

    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    num-serializer = <16>;
    serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
        0 0 0 0
        0 0 0 0
        0 0 0 0
        2 1 0 0
    >;
    tx-num-evt = <1>;
    rx-num-evt = <1>;

When I run speaker-test -c 2 -t wav I get clocks on V16, and appropriate sync (I think) on U16, but no data on V17.  Speaker-test also times out with an error message of :

Write error: -5,Input/output error
xrun_recovery failed: -5,Input/output error
Transfer failed: Operation not permitted

Is this configuration supposed to work and, if it is, any suggestions what I configured incorrectly?

  • Hi Roy,

    I think your problem is with your serial-dir defintion.  It should use only the first 4 slots.  For example:

       serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
            2 1 0 0
            0 0 0 0
            0 0 0 0
            0 0 0 0
        >;

    Regards,

    Josh

  • Thank you for the reply.  I left out all the things I have tried one of which was to start with 1200...0000, 2100...0000, through 0000...0021 with no data output and the error message each time.  I can see the TXSTATE in davinci-mcasp starting "ready" and going "not ready" when the fifo is enabled.  When the transfer is started I get the clock and sync but the TXSTATE never returns "ready".  I am a bit stuck as I cannot find information that ties the serializer to a particular pin or the fifo to the serializer for that matter.

  • Hi Roy,

    If you are using axr1 and axr0, then the first two entries in the serializer array are certainly what should be used.  Perhaps there is something else wrong here.

    Can you zip up sound/soc/davinci/davinci-evm.c and your dts file and post them in this thread so I can take a look?

    Furthermore, have you seen the Audio DAC Porting Example?  It covers all the basic steps needed to set up a new audio device.  You may want to check it out.  There is also the Sitara Linux Audio home page.  It sounds like you are using the community 3.8 kernel, but almost all of these wikis will still apply.

    Regards,

    Josh

  • Hello Josh,

    Thank you for providing the missing piece, following the Audio DAC Porting example has it (almost) working; hopefully I can adapt a volume control.  I am almost ashamed to admit I fell into the trap of "since it worked on an audio cape, previously, the driver should still work now".  I really do know better!  Thank you again.

  • Hi Roy,

    I'm glad to hear it was helpful to you.  In the future, I do plan on extending the tutorial to show how to add things like volume control to the driver.  When I get around to it, I'll update this thread with the new link just in case you are still working on this.

    Regards,

    Josh