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.

TAS2780: DTS setting and audio support with IMX8MP soc

Part Number: TAS2780

HI, 

I'm trying to enable a TAS2780 on a carrier board coupled with  an IMX8M P SOC. 

I have included the kernel patch for 5.10.Xxx found on the internet and would like to know how I can declare the device in the DTS. 

If you can provide support.

B.Regards

  • Hi, Olivier,

    Glad to see you again via e2e. I wonder whether the OS is Linux or Android.

    As to the DTS setting, here is the guideline on BBB, hope this can help you.

    Guideline for Audio Driver on Linux (ti.com)

  • Hi Shenghao,

    Thanks for your reply and for the document. 

    I'll try it. Asap 

    I'm running Linux from an Yocto Hardknot build. 

    Regards

    Is it possible to provide the source of the driver again. I'm not sure about my version (tas27xx patch) ?

  • Here are two different codes for tas2780.

    One has been already upstream to the Linux community, and has become a part of the kernel

    tas2780.c « codecs « soc « sound - kernel/git/torvalds/linux.git - Linux kernel source tree

    The other is:

    lpaa-android-drivers/tasdevice-linux-driver - Unnamed repository; edit this file 'description' to name the repository.

    In this copy, all the register-settings are in the bin file.

  • Hi Shenghao , 

    I tried to include lpaa-android-drivers/tasdriver-linux-driver into my Yocto project as an external module but it fails at compilation : error: 'FW_ACTION_UEVENT' undeclared 

    See bellow: 

    Log data follows:
    | DEBUG: Executing shell function do_compile
    | NOTE: make -j 8 KERNEL_SRC=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-source KERNEL_PATH=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-source KERNEL_VERSION=5.10.72-lts-5.10.y+ge1553135bba4 CC=ccache aarch64-poky-linux-gcc   -fuse-ld=bfd -fmacro-prefix-map=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0=/usr/src/debug/tasdevice-mod/0.1-r0                      -fdebug-prefix-map=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0=/usr/src/debug/tasdevice-mod/0.1-r0                      -fdebug-prefix-map=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/recipe-sysroot=                      -fdebug-prefix-map=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/recipe-sysroot-native=  -fdebug-prefix-map=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-source=/usr/src/kernel LD=ccache aarch64-poky-linux-ld.bfd   AR=ccache aarch64-poky-linux-ar  O=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-build-artifacts KBUILD_EXTRA_SYMBOLS=
    | make -C /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-source M=/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0
    | make[1]: Entering directory '/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-source'
    | make[2]: Entering directory '/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-build-artifacts'
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-regbin.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-node.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-rw.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tas2780-irq.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tas2770-irq.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tas2564-irq.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tas2560-irq.o
    |   CC [M]  /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/pcm9211-irq.o
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.c: In function 'tasdevice_codec_probe':
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.c:395:45: error: 'FW_ACTION_UEVENT' undeclared (first use in this function)
    |   395 |  ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_UEVENT,
    |       |                                             ^~~~~~~~~~~~~~~~
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.c:395:45: note: each undeclared identifier is reported only once for each function it appears in
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.c: At top level:
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.c:549:4: error: 'struct snd_soc_dai_driver' has no member named 'symmetric_rate'; did you mean 'symmetric_rates'?
    |   549 |   .symmetric_rate = 1,
    |       |    ^~~~~~~~~~~~~~
    |       |    symmetric_rates
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.c:549:21: warning: initialization of 'const struct snd_soc_cdai_ops *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    |   549 |   .symmetric_rate = 1,
    |       |                     ^
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.c:549:21: note: (near initialization for 'tasdevice_dai_driver[0].cops')
    | make[3]: *** [/data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work-shared/lec-imx8mp/kernel-source/scripts/Makefile.build:280: /data/build/adlink-yocto-bsp_1v5/dls01build/tmp/work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-core.o] Error 1
    | make[3]: *** Waiting for unfinished jobs....
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-node.c: In function 'tas_fwload_store':
    | ../../../work/lec_imx8mp-poky-linux/tasdevice-mod/0.1-r0/tasdevice-node.c:554:46: error: 'FW_ACTION_UEVENT' undeclared (first use in this function)
    |   554 |   ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_UEVENT,
    |       |                                              ^~~~~~~~~~~~~~~~
    

    How to generate the bin (firmware) file ? 

    Do i need these steps if i use tas2780.c  in my build ,and do i need the firmware too ? 

  • As the firmware, kind download regbin tool and its guideline.

    tool - lpaa-android-drivers/pcmdevice-linux-driver - Unnamed repository; edit this file 'description' to name the repository.

    FW_ACTION_UEVENT is introduced after 5.18, kindly change to FW_ACTION_HOTPLUG.

    In the tasdeivce git branch, if you check the submission history records, you will find one year ago our code use FW_ACTION_HOTPLUG.