AM3354 Android - McASP1 interface to AK4951

Hi Guys,


Hope you can help.

We have a custom board with an AK4951 codec IC connected to McASP1 on an AM3354

The connections are as follows:

static struct pinmux_config mcasp1_pin_mux[] =
{
   { "mii1_crs.mcasp1_aclkx",    OMAP_MUX_MODE4 | AM33XX_PIN_OUTPUT },
   { "mii1_rxerr.mcasp1_fsx",    OMAP_MUX_MODE4 | AM33XX_PIN_OUTPUT },
   { "mii1_col.mcasp1_axr2",     OMAP_MUX_MODE4 | AM33XX_PIN_OUTPUT },
   { "rmii1_refclk.mcasp1_axr3", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLUP },
   { NULL, 0 },
};

static u8 am335x_iis_serializer_direction1[] = {
   INACTIVE_MODE, INACTIVE_MODE, TX_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
};

static struct snd_platform_data am335x_evm_snd_data1 = {
   .tx_dma_offset = 0x46400000, /* McASP1 */
   .rx_dma_offset = 0x46400000,
   .op_mode = DAVINCI_MCASP_IIS_MODE,
   .num_serializer = ARRAY_SIZE(am335x_iis_serializer_direction1),
   .tdm_slots = 2,
   .serial_dir = am335x_iis_serializer_direction1,
   .asp_chan_q = EVENTQ_2,
   .version = MCASP_VERSION_3,
   .txnumevt = 1,
   .rxnumevt = 1,
   .sync_mode = 0,
};

I've compiled the AK4951 codec driver from the chip manufacturer and it seems to get detected just fine (from dmesg):

asoc: ak4951-AIF1 <-> davinci-mcasp.1 mapping ok

ALSA device list:

  #0: AM335X EVM

The issue I'm struggling with is that I don't see the BICK and LRCK clock pulses being generated when I play music.

I do see data on the SDOUT line, but no clocks on the 2 clock lines?

Are my output pins configured wrong?

The idea is that the AK4951 is configured as a slave device and will only ever play music; no recording.

I tested the electrical connection by configuring the clock lines as GPIO and manually pulsed them - I could see the manual pulses.


davinci-evm.c:

static struct snd_soc_dai_link am335x_evm_dai[] = {
        {
                .name = "AK4951",
                .stream_name = "Playback",
                .cpu_dai_name = "davinci-mcasp.1",
                .codec_dai_name = "ak4951-AIF1",
                .codec_name = "ak4951.2-0024",
                .platform_name = "davinci-pcm-audio",
                .init = evm_aic3x_init,
                .ops = &evm_ops,
                .dai_fmt = ( SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_NB_NF )
        },
};

tinymix and tinyplay from the Android build; as well as android audio classes see the audio device; and I do see data on the data line, just the clocks aremissing...

Thank you

Louis

4 Replies

  • Hello,

    Since this hardware is not supported by TI, this would be outside the scope of support provided in this forum.
    I would recommend to contact the manufacturer. Sorry for the inconvenience.

    Regards,

    Adeneo Embedded Support team
    Contact us at sales@adeneo-embedded.com

  • In reply to Adeneo Embedded support team:

    Good day,

    Thank you for your reply.

    I believe my question is within the bounds of this forum.

    We are running the McASP1 in master mode; with the codec being the slave.
    We disconnected the codec from the McASP1 lines and left them floating for debugging.

    The main question is: Why is the AM3354 not generating the clock pulses on mcasp1_aclkx and mcsp1_fsx? (pins H17 and J15)

    We've gone through the data sheet and all related tutorials and can't really see where we've gone wrong.

    We see data on the mcasp1_axr2 (H16) pin, but no clocks.

    How is it possible that the data can be generated without a clock signal?

    I think we have a VERY small pin configuration issue and would appreciate guidance in tracking the issue down - it might help other forum members in the process.

    Once we have the clocks and data working from the AM3354 will we go back to the codec manufacturer.

    Any guidance will be appreciated.

    PS. the audio we are testing is generated by pico tts in Android


    Thank you

    Kind Regards

    Louis
  • In reply to Louis Putter:

    Update.

    The clocks were missing due to a damaged PCB.

    The clocks are fine whilst playing sound; but before and after Tx the mcasp1_aclkx line is running a 24MHz signal?

    We disabled Rx but this has no effect.

    Has anybody seen this before?

  • In reply to Louis Putter:

    Hello,

    Can you reproduce this problem on a TI's reference board?
    It will help to see if it comes from a hardware or software problem.

    Regards,

    Adeneo Embedded Support team
    Contact us at sales@adeneo-embedded.com