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:
- First of all, you need to extract the Linux 3.1.10 kernel (see "Steps to install and build the Linux kernel for OMAP-L138 LCDK" from the LCDK Linux Software Developer Guide: http://processors.wiki.ti.com/index.php/OMAP-L138_LCDK_Linux_Software_Developer%27s_Guide#General_Linux_SDK_Related_Info_and_Activities)
- Before compiling the kernel, into the kernel directory, edit the file "arch/arm/mach-davinci/board-omapl138-hawk.c"
- At line 450:
- 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)