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.

LCDK OMAP L138 - ALSA driver problem

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Hi all,

I recently bought an OMAP L138 LCDK to check if I have an hardware problem on a custom board, based on an OMAP L138 SOM, to capture audio using Linux and ALSA driver: http://e2e.ti.com/support/embedded/linux/f/354/t/232299.aspx

So, I follow the LCDK OMAP L138 Quick Start Guide given with the board. Linux boots, as usual my SATA drive was not detected at all (well know issue for me, I have to disable the SATA Port Multiplier into the kernel config, compile the kernel and the SATA drive will be detect) and I get the prompt. Then my first try was to do an audio loopback from Line In to Line Out using "arecord" and "aplay" using the above command:

arecord -f dat -v | aplay -f dat -vv

Unfortunately, I  get an error from the alsa driver telling me that it was not able to correctly set "hw_params" and so on...

You can find below what was causing the issue:

  • Replace:

static const short omapl138_hawk_mcasp_pins[] __initconst = {
    DA850_AHCLKX, DA850_ACLKX, DA850_AFSX,
    DA850_AHCLKR, DA850_ACLKR, DA850_AFSR, DA850_AMUTE,
    DA850_AXR_11, DA850_AXR_12,
    -1
};

  • By:

static const short omapl138_hawk_mcasp_pins[] __initconst = {
    DA850_AHCLKX, DA850_ACLKX, DA850_AFSX,
    DA850_AHCLKR, DA850_ACLKR, DA850_AFSR, DA850_AMUTE,
    DA850_AXR_13, DA850_AXR_14,
    -1
};

As in fact on LCDK used serializers are 13 and 14 (not 11 and 12 like on Experimenter Kit)

  • Into the kernel directory, edit the file "sound/soc/davinci/davinci-evm.c"
  • At line 56:
  • Replace:

else if (machine_is_davinci_da830_evm() || machine_is_davinci_da850_evm())
        sysclk = 24576000;

  • By:

else if (machine_is_davinci_da830_evm() || machine_is_davinci_da850_evm() || machine_is_omapl138_hawkboard())
        sysclk = 24576000;

  • Save all edited files
  • Now compile the kernel (make uImage)
  • Copy the new uImage to the SD card. That's it!

Hope this will help ;o)