ASoC: topology: Fix usage of SND_SOC_TPLG_INDEX_ALL during load
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>
Thu, 29 Jun 2017 13:22:25 +0000 (14:22 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 30 Jun 2017 10:53:59 +0000 (11:53 +0100)
SND_SOC_TPLG_INDEX_ALL is used by drivers to tell the core to load
all topology component indexes, not just the index in the header.
Fix this so that SND_SOC_TPLG_INDEX_ALL will load all components no matter
their index.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c

index 12e1897019240daa7bc3d3ee16533dece4444a34..6070e35455aa3743ec64c669c3287e5bfb2aaac0 100644 (file)
@@ -2381,7 +2381,7 @@ static int soc_tplg_load_header(struct soc_tplg *tplg,
 
        /* check for matching ID */
        if (hdr->index != tplg->req_index &&
-               hdr->index != SND_SOC_TPLG_INDEX_ALL)
+               tplg->req_index != SND_SOC_TPLG_INDEX_ALL)
                return 0;
 
        tplg->index = hdr->index;