]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: codecs: wcd938x: fix mux error handling
authorJohan Hovold <johan+linaro@kernel.org>
Tue, 15 Apr 2025 07:41:44 +0000 (09:41 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 24 Apr 2025 11:53:22 +0000 (12:53 +0100)
commitd1407c934f523c8742ab006e7782f6eae780a7d1
treed0cff14a9e3cc8dcf26254e1d7d674ea9cb32498
parent076f3227255ccbbe7eb7c0424a9d20c4278dfb0c
ASoC: codecs: wcd938x: fix mux error handling

A recent change added support for looking up an optional mux control
before falling back to gpio control for us-euro plug selection.

The mux framework does however not yet support optional muxes and an
error message is now incorrectly logged on machines like the Lenovo
ThinkPad X13s which do not have one:

    wcd938x_codec audio-codec: /audio-codec: failed to get mux-control (0)

Suppress the bogus error and add the missing mux error handling by
making sure that the 'mux-controls' DT property is present before
looking up the mux control.

Fixes: eec611d26f84 ("ASoC: codecs: wcd938x: add mux control support for hp audio mux")
Link: https://lore.kernel.org/lkml/Z-z_ZAyVBK5ui50k@hovoldconsulting.com/
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://patch.msgid.link/20250415074145.7202-2-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wcd938x.c