Skip to content

[BUG] topology sof-bdw-codec.m4 (sof-bdw-rt5640.conf) #2201

Closed

Description

@perexg

It seems that there are two merged compound blocks SectionGraph.SSP0 in sof-bdw-rt5640.conf:

SectionGraph."SSP0" {
        index "1"
        lines [
                "SSP0.OUT, , BUF1.3"  
        ]
}
SectionGraph."SSP0" {
        index "2"
        lines [
                "BUF2.0, , SSP0.IN"
        ]
}

The current configuration loader (alsatplg) parses this like:

SectionGraph.SSP0 {
        index '2'
        lines {
                0 'SSP0.OUT, , BUF1.3'
                0 'BUF2.0, , SSP0.IN'
        }
}

It's definitely wrong, because the compounds must have unique keys, so after I fixed that in alsa-lib, the result is like:

SectionGraph.SSP0 {
          index '2'
          lines {
                  0 'SSP0.OUT, , BUF1.3'
                  1 'BUF2.0, , SSP0.IN'
          }
}

But the index field is merged (the default parser mode), of course. It looks like an issue.

Activity

  1. added
    bugSomething isn't working as expected
    on Dec 12, 2019
  2. perexg commented on Dec 12, 2019

    @perexg
    Author
  3. kv2019i commented on Dec 13, 2019

    @kv2019i
    Collaborator

    @ranj063 @juimonen @xiulipan -- can you take a look at this BDW issue?

  4. juimonen commented on Dec 13, 2019

    @juimonen

    @kv2019i quickly checked yesterday, but was not able immediately to understand the issue... so is the parsing wrong in alsa-lib, but still this topology is working in bdw devices?

  5. perexg commented on Dec 13, 2019

    @perexg
    Author

    The problem is that first 'index' value is lost. It's not only a problem for bdw - it seems that you define SectionGraph.SSP0 mutliple times in many configuration files (thus 'index' entries are overwriten while [] array is merged). It may cause problems.

  6. perexg commented on Dec 13, 2019

    @perexg
    Author

    BTW: A quick question: Is the order of the defined structures important? Or it does not matter? This question is, because if I sort the compound identifiers, the conf file has the same size, but the binary topology file size differs.

  7. perexg commented on Dec 13, 2019

    @perexg
    Author

    The lines {} block is probably fine for old and new alsa-lib parser, because the index values used internally for the [] array are usually skipped. The problem is only that you lost the first index field initialization (index '1' line).

  8. ranj063 commented on Dec 13, 2019

    @ranj063
    Collaborator

    @perexg Could you please check if #2207 fixes the issue for you?

  9. perexg commented on Dec 13, 2019

    @perexg
    Author

    I found another issue in the topology library which explains the different output sizes for the binary files when the configuration is shuffled around. The fix is here: alsa-project/alsa-lib@2b50b59

  10. lgirdwood commented on Dec 16, 2019

    @lgirdwood
    Member

    @perexg IIUC, it looks like the "SSP0" identifier is used to create 2 compound graphs (one is used for playback and the other for capture) but the parser will try and merge this into a single graph (and drop the index). Looks like #2207 should fix this ?

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

    BDWBroadwellbugSomething 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