ASoC: topology: create TLV data for dapm widgets
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 9 Mar 2018 19:11:17 +0000 (11:11 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:52 +0000 (16:17 +0200)
[ Upstream commit bde8b3887add8368ecf0ca71117baf2fd56a6fc9 ]

This patch adds the change required to create the TLV data
for dapm widget kcontrols from topology. This also fixes the following
TLV read error shown in amixer while showing the card control contents.
"amixer: Control hw:1 element TLV read error: No such device or address"

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/soc-topology.c

index 782c580b7aa32e53eda7a7a46db832f4c6b1d6a6..e5049fbfc4f1770db65f01d2eb6495d55413557a 100644 (file)
@@ -1276,6 +1276,9 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dmixer_create(
                        kfree(sm);
                        continue;
                }
+
+               /* create any TLV data */
+               soc_tplg_create_tlv(tplg, &kc[i], &mc->hdr);
        }
        return kc;