Skip to content

[BUG] unsupported widget type asrc when run build-tools.sh #2543

Closed

Description

@aiChaoSONG

The SND_SOC_TPLG_DAPM_ASRC is delete from upstream alsa-lib(src/topology/damp.c: line24~line48), so topologies contain ASRC component will be failed to build. we got :widget 'ASRC1.0': unsupported widget type asrc error when running build-tools.sh -T

alsa-lib commit which makes the change: alsa-project/alsa-lib@aa1bac2

[ 18%] Generating sof-hda-asrc-2ch.tplg (same error for sof-apl-asrc-wm8804.tplg, sof-apl-asrc-pcm512x.tplg)
cd sof/tools/build_tools/topology && alsatplg ${VERBOSE:+-v 1} -c sof-hda-asrc-2ch.conf -o sof-hda-asrc-2ch.tplg
ALSA lib dapm.c:547:(tplg_parse_dapm_widget) widget 'ASRC1.0': Unsupported widget type asrc
ALSA lib parser.c:213:(tplg_load_config) failed to parse topology
Unable to load configuration: Invalid argument
make[2]: *** [topology/CMakeFiles/topology_sof-hda-asrc-2ch.dir/build.make:61: topology/sof-hda-asrc-2ch.tplg] Error 1
make[2]: Leaving directory '/build/SOF/sof/tools/build_tools'
make[1]: *** [CMakeFiles/Makefile2:862: topology/CMakeFiles/topology_sof-hda-asrc-2ch.dir/all] Error 2
make[1]: Leaving directory '/build/SOF/sof/tools/build_tools'
make: *** [Makefile:130: all] Error 2

Activity

  1. added
    bugSomething isn't working as expected
    on Mar 13, 2020
  2. aiChaoSONG commented on Mar 13, 2020

    @aiChaoSONG
    CollaboratorAuthor

    @lgirdwood @plbossart What are we going to do with this?

  3. lgirdwood commented on Mar 13, 2020

    @lgirdwood
    Member

    @aiChaoSONG can you bisect to see when this was removed and who did it ?

  4. tlauda commented on Mar 13, 2020

    @tlauda
    Contributor

    @lgirdwood It's already in the bug:

    alsa-lib commit which makes the change: alsa-project/alsa-lib@aa1bac2

  5. plbossart commented on Mar 13, 2020

    @plbossart
    Member

    @aiChaoSONG Sorry I don't get what you meant by 'delete from upstream'. It was never added?

    @singalsu you've added those topologies with ASRC, did you face any issues with alsa-lib?

  6. singalsu commented on Mar 13, 2020

    @singalsu
    Collaborator

    I haven't got this issue. I've run tools build with various recent Ubuntu Linuxes. There has no more been need to use alsa tools git version to create SOF topologies.

    Why is ASRC being removed from ALSA?

  7. tlauda commented on Mar 13, 2020

    @tlauda
    Contributor

    I haven't got this issue. I've run tools build with various recent Ubuntu Linuxes. There has no more been need to use alsa tools git version to create SOF topologies.

    Why is ASRC being removed from ALSA?

    It looks like some kind of accidental removal?
    Maybe @perexg could elaborate.

  8. perexg commented on Mar 13, 2020

    @perexg

    Yep, it's accidental removal. Fixed in alsa-lib's master. Thanks for the note.

  9. marc-hb commented on Mar 25, 2020

    @marc-hb
    Collaborator

    FWIW reproduced with out-of-the-box alsa-lib 1.2.2-1.fc31

  10. marc-hb commented on May 13, 2020

    @marc-hb
    Collaborator

    While no release includes the v1.2.2-6-gcaf77a93cef5 fix yet, it has been cherry-picked in the alsa-git.patch of alsa-utils version 1.2.2 -2 .fc31 https://koji.fedoraproject.org/koji/rpminfo?rpmID=21111550

    On Ubuntu 20.04, alsa-utils libatopology2 1.2.2-1ubuntu1 does not have this fix.

  11. marc-hb commented on Jun 22, 2020

    @marc-hb
    Collaborator

    Here's a quick, dirty and lazy workaround for this situation:

    set -e
    
    # Remove asrc from ALG_MODE_TESTS list
    sed -i -e '/^ALG_.*MODE_TESTS=.*asrc/ s/asrc//' tools/test/topology/tplg-build.sh 
    
    # Comment out all lines with 'asrc' in all CMakeLists.txt files
    git grep asrc -- 'tools/*/CMakeLists.txt'
    sed -i -e '/asrc/ s/.*/# &/' tools/topology/CMakeLists.txt
    sed -i -e '/asrc/ s/.*/# &/' tools/topology/topology1/development/CMakeLists.txt
    
    git add  tools
    git commit -m  'HACK: disable ASRC1.0 https://github.com/thesofproject/sof/issues/2543' \
     tools/test/topology/tplg-build.sh  tools/topology/CMakeLists.txt tools/topology/development/CMakeLists.txt

    See PR scripts: build-tools.sh: Make tools individually buildable #3064 for more background

  12. marc-hb commented on Oct 1, 2020

    @marc-hb
    Collaborator

    Fix still not cherry-picked by Ubuntu 20.04 in libatopology2 1.2.2-2.1ubuntu2

    Fix still not cherry-picked by Ubuntu 20.04 in libatopology2 1.2.2-2.1ubuntu2.1

    2022 EDIT: this will likely never get fixed in Ubuntu 20.04 LTS. It's fixed in the ALSA version part of Ubuntu 22.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions