Stephan Gerhold 2a0435df96
ASoC: hdmi-codec: Fix return value in hdmi_codec_set_jack()
Sound is broken on the DragonBoard 410c (apq8016_sbc) since 5.10:

  hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.1.auto: -95
  qcom-apq8016-sbc 7702000.sound: Failed to set jack: -95
  ADV7533: ASoC: error at snd_soc_link_init on ADV7533: -95
  hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error at snd_soc_component_set_jack on hdmi-audio-codec.1.auto: -95
  qcom-apq8016-sbc: probe of 7702000.sound failed with error -95

This happens because apq8016_sbc calls snd_soc_component_set_jack() on
all codec DAIs and attempts to ignore failures with return code -ENOTSUPP.
-ENOTSUPP is also excluded from error logging in soc_component_ret().

However, hdmi_codec_set_jack() returns -E*OP*NOTSUPP if jack detection
is not supported, which is not handled in apq8016_sbc and soc_component_ret().
Make it return -ENOTSUPP instead to fix sound and silence the errors.

Cc: Cheng-Yi Chiang <cychiang@chromium.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 55c5cc63ab32 ("ASoC: hdmi-codec: Use set_jack ops to set jack")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20210107165131.2535-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-08 14:00:42 +00:00
..
2020-12-15 13:43:47 -08:00
2020-12-28 14:16:53 +00:00
2020-12-15 15:34:38 -08:00
2018-04-26 12:44:15 +01:00
2020-03-23 18:17:22 +00:00
2019-06-12 13:52:26 +01:00
2020-10-15 11:07:44 -07:00
2020-01-10 13:31:49 +00:00
2020-11-12 15:15:53 +00:00
2020-01-09 21:22:36 +00:00
2020-10-15 11:07:44 -07:00
2020-12-02 15:18:22 +00:00
2020-05-07 13:18:04 +01:00
2020-05-07 13:18:04 +01:00
2019-07-26 13:10:09 +01:00
2020-12-09 17:00:33 +00:00
2018-05-18 11:20:11 +01:00
2018-06-01 12:05:30 +01:00
2020-07-20 15:34:29 +01:00
2020-10-26 15:27:13 +01:00
2020-10-26 15:27:13 +01:00
2020-10-02 21:05:29 +01:00
2020-05-04 19:23:59 +01:00
2020-10-28 21:36:35 +00:00
2020-05-26 10:55:37 +01:00