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.

SK-AM62: Missing Echo-cancellation module in PulseAudio 13.0

Part Number: SK-AM62

Hello, I am using SK-AM62 and have installed the SDK 08_06_00_42. Seems like the eco cancellation module is missing from the pulse audio package. 

Would it be possible to rebuild the Pulse Audio 13.0 and update us u[dated ipk package? 

pulseaudio_13.0-r0.0_aarch64.ipk

Thanks

  • I have tried to build pulseaudio but having issues from the download package: 

    http://freedesktop.org/software/pulseaudio/releases/pulseaudio-13.0.tar.xz 

  • Hi Mitesh,

    I'm not familiar with this package, but searching through the Yocto build output resulting from building the tisdk-default-image for am62xx-evm there are some traces of what could be what you are looking for:

    a0797059@dasso:~/tisdk/am62xx-evm (master)
    $ find . -iname 'pulseaudio*' | grep -i echo
    ./build/arago-tmp-external-arm-glibc/pkgdata/am62xx-evm/shlibs2/pulseaudio-module-echo-cancel.list
    ./build/arago-tmp-external-arm-glibc/pkgdata/am62xx-evm/runtime/pulseaudio-module-echo-cancel.packaged
    ./build/arago-tmp-external-arm-glibc/pkgdata/am62xx-evm/runtime/pulseaudio-module-echo-cancel
    ./build/arago-tmp-external-arm-glibc/pkgdata/am62xx-evm/runtime-reverse/pulseaudio-module-echo-cancel
    ./build/arago-tmp-external-arm-glibc/deploy/ipk/aarch64/pulseaudio-module-echo-cancel_13.0-r0.0_aarch64.ipk
    ./build/arago-tmp-external-arm-glibc/work/aarch64-linux/pulseaudio/13.0-r0/deploy-ipks/aarch64/pulseaudio-module-echo-cancel_13.0-r0.0_aarch64.ipk
    ./build/arago-tmp-external-arm-glibc/work/aarch64-linux/pulseaudio/13.0-r0/pkgdata-pdata-input/shlibs2/pulseaudio-module-echo-cancel.list
    ./build/arago-tmp-external-arm-glibc/work/aarch64-linux/pulseaudio/13.0-r0/pkgdata-pdata-input/runtime/pulseaudio-module-echo-cancel.packaged
    ./build/arago-tmp-external-arm-glibc/work/aarch64-linux/pulseaudio/13.0-r0/pkgdata-pdata-input/runtime/pulseaudio-module-echo-cancel
    ./build/arago-tmp-external-arm-glibc/work/aarch64-linux/pulseaudio/13.0-r0/pkgdata-pdata-input/runtime-reverse/pulseaudio-module-echo-cancel
    ./build/arago-tmp-external-arm-glibc/work/am62xx_evm-linux/tisdk-default-image/1.0-r0.tisdk3/oe-rootfs-repo/aarch64/pulseaudio-module-echo-cancel_13.0-r0.0_aarch64.ipk
    ./build/buildhistory/packages/aarch64-linux/pulseaudio/pulseaudio-module-echo-cancel
    
    a0797059@dasso:~/tisdk/am62xx-evm (master)
    $ cat ./build/arago-tmp-external-arm-glibc/work/aarch64-linux/pulseaudio/13.0-r0/pkgdata-pdata-input/shlibs2/pulseaudio-module-echo-cancel.list
    module-echo-cancel.so:/usr/lib/pulse-13.0/modules:13.0

    If the module-echo-cancel.so module is what you need you should be able to install it from the pulseaudio-module-echo-cancel_13.0-r0.0_aarch64.ipk package that is also generated by the build.

    Regards, Andreas

  • Hi Andreas, thanks for your reply.

    Yes, module-eco-cancel.so is what we are looking for and seemed to have missed the SDK version of Linux. Would you be able to provide the pulseaudio-module-echo-cancel_13.0-r0.0_aarch64.ipk ?

    Thanks

  • Would you be able to provide the pulseaudio-module-echo-cancel_13.0-r0.0_aarch64.ipk ?

    You can get this package by simply building the default Yocto target for that platform, as per steps outlined here: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/linux/Overview_Building_the_SDK.html

    Note that we cannot provide ipk archives through the forum here but since I've already build mine I'm going to make an exception - see attached. Hope this works for you.

    However I strongly recommend you get your build setup such you can create this (and other) packages yourself, otherwise this approach will not scale.

    Regards, Andreas

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/pulseaudio_2D00_module_2D00_echo_2D00_cancel_5F00_13.0_2D00_r0.0_5F00_aarch64.ipk

  • Amazing!

    Thanks a lot for this. 

  • I tried to build this in past and failed at the following step:

    $>MACHINE=am62xx-evm bitbake -k tisdk-default-image

    I left it overnight to build but was stuck in some stage forever.

    Trying to rebuild this now.
    Thanks.
  • Hi Mitesh,

    I left it overnight to build but was stuck in some stage forever.

    This can happen if you don't have enough physical memory and/or swap space allocated. Please try to build on a machine that has at least 16GB of RAM, and 16GB of swap space available, this is a combination I never had any issues with for any of our builds. Alternatively, you can configure Bitbake to reduce the number of parallel make operations / threads being used, see local.conf.

    Regards, Andreas

  • Hi Andreas, this is what I get at the end of the make.

    Summary: 4 tasks failed:
    /home/miteshhiran/tisdk/sources/meta-ti/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb:do_fetch
    /home/miteshhiran/tisdk/sources/meta-qt5/recipes-qt/qt5/qtwebkit_git.bb:do_compile
    /home/miteshhiran/tisdk/sources/meta-processor-sdk/recipes-core/onnxruntime/onnxruntime.bb:do_compile
    /home/miteshhiran/tisdk/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_12.22.12.bb:do_compile
    Summary: There were 54 WARNING messages shown.
    Summary: There were 6 ERROR messages shown, returning a non-zero exit code.

  • Hi Andreas, sorry for multiple questions.

    Would you be able to share steps on how to build ipk package for pulseaudio but of different version and not pulseaudio13 ?

    Thanks

  • Hi Andreas, this is what I get at the end of the make.

    Summary: 4 tasks failed:
    /home/miteshhiran/tisdk/sources/meta-ti/recipes-ti/ti-rtos-bin/ti-rtos-firmware.bb:do_fetch
    /home/miteshhiran/tisdk/sources/meta-qt5/recipes-qt/qt5/qtwebkit_git.bb:do_compile
    /home/miteshhiran/tisdk/sources/meta-processor-sdk/recipes-core/onnxruntime/onnxruntime.bb:do_compile
    /home/miteshhiran/tisdk/sources/meta-openembedded/meta-oe/recipes-devtools/nodejs/nodejs_12.22.12.bb:do_compile
    Summary: There were 54 WARNING messages shown.
    Summary: There were 6 ERROR messages shown, returning a non-zero exit code.

    Except ti-rtos-firmware you list there those are rather large packages that are failing, hence no image is generated. What machine are you building this on? Can you try one that meets the requirements I listed earlier? And have you experimented with reducing the number of parallel make operations / threads being used, see local.conf, as suggested earlier?

    Regards, Andreas

  • Would you be able to share steps on how to build ipk package for pulseaudio but of different version and not pulseaudio13 ?

    At a minimum you'd need to do two things:

    1. Update the filename of the recipe oe-core/meta/recipes-multimedia/pulseaudio/pulseaudio_13.0.bb to change the 13.0 version number embedded there to something else (that needs to be valid!) by checking what's available on the server. The recipe derives which source package to download from the version number in the filename
    2. Update the source package hashes inside oe-core/meta/recipes-multimedia/pulseaudio/pulseaudio_XX.Y.bb to reflect the updated source packages you are using

    Then, the patches in the recipe folder may or may need to get updated or dropped, depending which version you are using. You can also try to simply grab and drop in/replace the entire oe-core/meta/recipes-multimedia/pulseaudio/* folder from a different Yocto branch (like Kirkstone?), assuming the package version there is different and what you want.

    Andreas

  • Hi Andreas, I got a new virtual machine sorted with Linux 18.04 and 16Gb of RAW and swappable memory and rebuilding these. I also changed the local conf as per your suggestions and running this again to see if I can build the lot. 

    In terms of pulseaudio, in the end I managed to do the similar changes as you mentioned. So thanks for the confirmation (at least I know, I am on the right track). Changed the recipe file and changed related patch and local files and managed to get the IPK files built, and now started building latest ALSA as there was dependence on it. 

    However, I would like to understand the 'Kirkstone' approach.  

    When I try to access Kirkstone repo using https://git.yoctoproject.org/kirkstone/plain/

    I get error to say no repo found. COuld you please let me know how to access the repo so that I can take the the entire multimedia package. Thanks 

  • Sorry, just noticed Yocto branch (like Kirkstone?) in your reply.

    Will try to switch branch. Thanks. 

  • Hi Andreas, not sure if you would have any time to look at this:

    I managed to build and install PulseAudio 16.1

    root@diverComms:~# pulseaudio --version
    pulseaudio 16.1

    But till same issue as before:

    # pulseaudio -F /etc/pulse/default.pa
    W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
    E: [pulseaudio] module-rescue-streams.c: module-rescue-stream is obsolete and should no longer be loaded. Please remove it from your configuration.
    E: [pulseaudio] module-echo-cancel.c: Failed to parse module arguments.
    E: [pulseaudio] module.c: Failed to load module "module-echo-cancel" (argument: "user_master_format=1 rate=48000 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1\ noise_suppression=1" source_name=echoCancel_source sink_name=echoCancel_sink"): initialization failed.
    E: [pulseaudio] module.c: Module "module-device-restore" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-stream-restore" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-card-restore" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-augment-properties" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-switch-on-port-available" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-switch-on-connect" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-udev-detect" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-bluetooth-policy" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-bluetooth-discover" should be loaded once at most. Refusing to load.
    E: [pulseaudio] socket-server.c: bind(): Address already in use
    E: [pulseaudio] module.c: Failed to load module "module-native-protocol-unix" (argument: ""): initialization failed.
    E: [pulseaudio] module.c: Module "module-default-device-restore" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-rescue-streams" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-always-sink" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-intended-roles" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-suspend-on-idle" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-console-kit" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-systemd-login" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-position-event-sounds" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-role-cork" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-filter-heuristics" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module.c: Module "module-filter-apply" should be loaded once at most. Refusing to load.
    E: [pulseaudio] module-echo-cancel.c: Failed to parse module arguments.
    E: [pulseaudio] module.c: Failed to load module "module-echo-cancel" (argument: "user_master_format=1 rate=48000 aec_method=webrtc aec_args="analog_gain_control=0\ digital_gain_control=1\ noise_suppression=1" source_name=echoCancel_source sink_name=echoCancel_sink"): initialization failed.
    E: [pulseaudio] main.c: Source echoCancel_source does not exist.
    E: [pulseaudio] main.c: Sink echoCancel_sink does not exist.
    E: [pulseaudio] main.c: Source echoCancel_source does not exist.
    E: [pulseaudio] main.c: Sink echoCancel_sink does not exist.
    W: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
    W: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
    root@diverComms:~#

  • looks like the webrtc recipe is needed but can't find in the yocto master branch as well (under multimedia)

  • Hi Mitesh,

    the issues you are facing are very userspace-specific and not something we can support through the forum here, which is mostly concerned with enabling/using TI devices in the context of Linux. As for your specific issue I suggest you do an internet search for the keywords you see, and/or check in with the pulseaudio community (that's what I would do if I were in your shoes). If you do find however that there's something "TI specific" getting into your way preventing this from working, let me know.

    Regards, Andreas

  • Thanks Andreas, for all your support. I understand. 

    Cheers.