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.

Add pcm1864 support into arago?

Other Parts Discussed in Thread: PCM1864, PCM1681, PCM1792A

Hi,

     I'm working on testing a PCM1864 codec with Beaglebone black. I found PCM1864 driver in git://git.ti.com/ti-analog-linux-kernel/adannenb-analog.git release. I generated a patch and wanted to add it into arago project. I created a custom layer and put all the necessary file in place. bitbake took my patch file in do_patch. However, the patch is always removed during do_create_srcipk. In create_srcipk, it always reset the kernel src which reset all patched files. Is there any better way to patch the kernel without breaking anything else? 

     Is there any other way to add pcm1864 support into Arago project?

Thank you,

M Ho

  • Hi,

    I will ask the software team to look at this. They will respond directly here.
  • Hi,

    You have the pcm1864 code, you could enable it in your kernel build (add it to Kconfig & defconfig), and refer to the following guide to make your device use pcm:
    processors.wiki.ti.com/.../Sitara_Linux_Audio_DAC_Example

    Best Regards,
    Yordan

  • Then you can put your patches to <tisdk>/sources/meta-processor-sdk/recipes-kernel/linux/linux-ti-staging-4.4/ and append their names to <tisdk>/sources/meta-processor-sdk/recipes-kernel/linux/linux-ti-staging-4.4/linux-ti-staging_4.4.bbappend Also don't forget to do a do_clean and do_cleansstate, to protect the image form an old non-patched cached objects. This is for the latest processor SDK.

  • Hi Kemal,

       This doesn't help. The patches are still reset in the middle of the build. Actually, I need to add those files into recipes-kernel/linux/linux-processor-sdk_4.4.bb. The bitbake command I used is MACHINE=am335x-evm bitbake linux-processor-sdk (-v -DDD). I can see the patch was taken. I can even see pcm186x.c is there in do_compile stage. But, it never generates the object and the files are removed in between. 

    --------bitbake log-------------

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + git commit -F TISDK-README

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: [processor-sdk-linux-03.00.00 eb747cf] Create local branch
    9 files changed, 7287 insertions(+), 174 deletions(-)
    create mode 100644 TISDK-README
    rewrite arch/arm/boot/dts/am335x-boneblack.dts (73%)
    create mode 100644 arch/arm/configs/tisdk_am335x-evm_defconfig
    create mode 100644 sound/soc/codecs/pcm186x-i2c.c
    create mode 100644 sound/soc/codecs/pcm186x-spi.c
    create mode 100644 sound/soc/codecs/pcm186x.c
    create mode 100644 sound/soc/codecs/pcm186x.h

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + git checkout -b processor-sdk-local

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: Switched to a new branch 'processor-sdk-local'

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + git config --unset user.email

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + git config --unset user.name

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + rm -f .git/objects/info/alternates

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + cd /home/build/tmp/tisdk/build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/linux-processor-sdk/4.4.12+gitAUTOINC+3639bea54a-r22d-custom3/build

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + tar -C /home/build/tmp/tisdk/build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/linux-processor-sdk/4.4.12+gitAUTOINC+3639bea54a-r22d-custom3/sourceipk-tmp --owner=0 --group=0 -czf /home/build/tmp/tisdk/build/arago-tmp-external-linaro-toolchain/work/am335x_evm-linux-gnueabi/linux-processor-sdk/4.4.12+gitAUTOINC+3639bea54a-r22d-custom3/sourceipk-data/data.tar.gz .

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_compile: + echo 2.0

     ----------------------------------------

    The other part I notice is in do_configure stage, it does not take the configuration in the patch. 

    -----------------------------------------

    linux-processor-sdk-4.4.12+gitAUTOINC+3639bea54a-r22d-custom3 do_configure:
    *
    * Allwinner SoC Audio support
    *
    Allwinner A10 Codec Support (SND_SUN4I_CODEC) [N/m/y/?] n
    XTFPGA I2S master (SND_SOC_XTFPGA_I2S) [N/m/y/?] n
    *
    * CODEC drivers
    *
    Build generic ASoC AC97 CODEC driver (SND_SOC_AC97_CODEC) [N/m/y] n
    Analog Devices ADAU1701 CODEC (SND_SOC_ADAU1701) [N/m/y] n
    .........skip........
    GTM601 UMTS modem audio codec (SND_SOC_GTM601) [N/m/y] n
    Texas Instruments PCM1681 CODEC (SND_SOC_PCM1681) [N/m/y] n
    Texas Instruments PCM1792A CODEC (SND_SOC_PCM1792A) [N/m/y] n
    Texas Instruments PCM186x CODECs - I2C (SND_SOC_PCM186X_I2C) [N/m/y] n
    Texas Instruments PCM186x CODECs - SPI (SND_SOC_PCM186X_SPI) [N/m/y] n
    Texas Instruments PCM512x CODECs - I2C (SND_SOC_PCM512x_I2C) [N/m/y] n
    Texas Instruments PCM512x CODECs - SPI (SND_SOC_PCM512x_SPI) [N/m/y] n
    Realtek ALC5631/RT5631 CODEC (SND_SOC_RT5631) [N/m/y] n
    Freescale SGTL5000 CODEC (SND_SOC_SGTL5000) [N/m/y] n
    SiRF SoC internal audio codec (SND_SOC_SIRF_AUDIO_CODEC) [N/m/y] n

    ---------------------------------------------

    I think I can try do_menuconfig to enable it. But, I really want to make the whole build process right. Eventually, I will need to make it work on a build server. Please advise. 

    Thank you,

    M Ho

  • Could you check these configuration fragments, you may need to add a fragment to your pcm1864 too.

  • Hi Kemal,
    I found the problem. I had my defconfig in meta-custom overwrites the setting. Thank you for point me out the direction.

    M Ho