Skip to content

Commit c3456a4

Browse files
jbrun3tbroonie
authored andcommitted
ASoC: dapm: allow muxes to force a disconnect
Let soc_dapm_mux_update_power() accept NULL as 'e' enum. It makes the code a bit more robust and, more importantly, let the calling mux force a disconnect of the output path if necessary. This is useful if the dapm elements following the mux must be off while updating the mux, to avoid glitches or force a (re)configuration. Signed-off-by: Jerome Brunet <[email protected]> Tested-by: Neil Armstrong <[email protected]> Tested-by: Kevin Hilman <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 1b74211 commit c3456a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/soc-dapm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,7 @@ static int soc_dapm_mux_update_power(struct snd_soc_card *card,
22452245
dapm_kcontrol_for_each_path(path, kcontrol) {
22462246
found = 1;
22472247
/* we now need to match the string in the enum to the path */
2248-
if (!(strcmp(path->name, e->texts[mux])))
2248+
if (e && !(strcmp(path->name, e->texts[mux])))
22492249
connect = true;
22502250
else
22512251
connect = false;

0 commit comments

Comments
 (0)