ASoC: hdmi-codec: Fix return value in hdmi_codec_set_jack()
Subsystems (4)
PATCH v2 1/1 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.
---
Changes in v2:
- Replace -EOPNOTSUPP check with -ENOTSUPP in imx-hdmi.c
--- sound/soc/codecs/hdmi-codec.c | 2 +- sound/soc/fsl/imx-hdmi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/hdmi-codec.c +1 -1
@@ -717,7 +717,7 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component, void *data) {struct hdmi_codec_priv *hcp =snd_soc_component_get_drvdata (component); -int ret = -EOPNOTSUPP ; +int ret = -ENOTSUPP ;if (hcp->hcd.ops->hook_plugged_cb) { hcp->jack = jack;
sound/soc/fsl/imx-hdmi.c +1 -1
@@ -90,7 +90,7 @@ static int imx_hdmi_init(struct snd_soc_pcm_runtime *rtd) } ret =snd_soc_component_set_jack (component, &data->hdmi_jack,NULL ); -if (ret && ret != -EOPNOTSUPP ) { +if (ret && ret != -ENOTSUPP ) {dev_err (card->dev,"Can't set HDMI Jack %d\n" , ret);return ret; }
Signature · 1 line
2.30.0
Quoted 12 lines · Stephan Gerhold
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_jackon hdmi-audio-codec.1.auto: -95 qcom-apq8016-sbc 7702000.sound: Failed to set jack: -95
ADV7533: ASoC: error atsnd_soc_link_initon ADV7533: -95
hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error atsnd_soc_component_set_jackon hdmi-audio-codec.1.auto: -95
qcom-apq8016-sbc: probe of 7702000.sound failed with error -95This happens because
apq8016_sbccallssnd_soc_component_set_jack()on all codec DAIs and attempts to ignore failures with return code-ENOTSUPP.-ENOTSUPPis also excluded from error logging insoc_component_ret().
Quoted 8 lines
However,
hdmi_codec_set_jack()returns -E*OP*NOTSUPP if jack detection is not supported, which is not handled inapq8016_sbcandsoc_component_ret(). Make it return-ENOTSUPPinstead to fix sound and silence the errors.Cc Cheng-Yi Chiang <[email protected]>Cc Srinivas Kandagatla <[email protected]>Fixes 55c5cc63ab32 ("ASoC: hdmi-codec: Use set_jack ops to set jack")Signed-off-by Stephan Gerhold <[email protected]>
For imx-hdmi:
Mark Brown
maintainerQuoted 9 lines · Stephan Gerhold
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_jackon hdmi-audio-codec.1.auto: -95 qcom-apq8016-sbc 7702000.sound: Failed to set jack: -95
ADV7533: ASoC: error atsnd_soc_link_initon ADV7533: -95
hdmi-audio-codec hdmi-audio-codec.1.auto: ASoC: error atsnd_soc_component_set_jackon hdmi-audio-codec.1.auto: -95
qcom-apq8016-sbc: probe of 7702000.sound failed with error -95[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: hdmi-codec: Fix return value in hdmi_codec_set_jack()
commit: 2a0435df963f996ca870a2ef1cbf1773dc0ea25a
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark