]> git.alsa-project.org Git - alsa-lib.git/commit
topology: Fix parsing config with multiple hw_configs
authorKirill Marinushkin <k.marinushkin@gmail.com>
Wed, 21 Mar 2018 19:08:04 +0000 (20:08 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 21 Mar 2018 19:10:38 +0000 (20:10 +0100)
commit64b8927df3cec39f62d0081cbb1d7ce5f423e4e8
treeec55a757f8be08a5321376b75dd698ffef310e88
parent07a17bd5a50289e2fdb2714a4e39f38f41811558
topology: Fix parsing config with multiple hw_configs

Currently, if the config file includes several hw_configs sections,
parse_hw_config_refs() returns after parsing only the first section.

For example, the following config, based on
alsa-lib/src/conf/topology/broadwell/broadwell.conf, is parsed incorrectly:

~~~~
SectionHWConfig."CodecHWConfig" {
        id "1"
        format "I2S"            # physical audio format.
        bclk   "master"         # Platform is master of bit clock
        fsync  "master"         # platform is master of fsync
}

SectionHWConfig."CodecHWConfig2" {
        id "2"
        format "AC97"
}

SectionLink."Codec" {

        # used for binding to the physical link
        id "0"

        hw_configs [
                "CodecHWConfig"
                "CodecHWConfig2"
        ]

        default_hw_conf_id "2"
}
~~~~

Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/topology/pcm.c