From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 2/7] drm/edid: Allow to ignore the audio EDID data Date: Mon, 04 Mar 2019 11:53:39 -0800 Message-ID: <87wole76ws.fsf@anholt.net> References: <4914bea9fc3ef3deaffa39ab691dbd9a76461e97.1551711042.git-series.maxime.ripard@bootlin.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0381335936==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id E23A089D87 for ; Mon, 4 Mar 2019 19:53:44 +0000 (UTC) In-Reply-To: <4914bea9fc3ef3deaffa39ab691dbd9a76461e97.1551711042.git-series.maxime.ripard@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Maxime Ripard , Maarten Lankhorst , Sean Paul Maxime Ripard , Daniel Vetter , David Airlie Cc: Paul Kocialkowski , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Thomas Petazzoni , eben@raspberrypi.org List-Id: dri-devel@lists.freedesktop.org --===============0381335936== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Maxime Ripard writes: > In some cases, in order to accomodate with displays with poor EDIDs, we > need to ignore that the monitor alledgedly supports audio output and > disable the audio output. > > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/drm_edid.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 990b1909f9d7..c0258b011bb2 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -4190,6 +4190,11 @@ bool drm_detect_hdmi_monitor(struct edid *edid) > } > EXPORT_SYMBOL(drm_detect_hdmi_monitor); >=20=20 > +static bool ignore_edid_audio =3D false; > +module_param(ignore_edid_audio, bool, 0644); > +MODULE_PARM_DESC(ignore_edid_audio, > + "Ignore the EDID and always consider that a monitor doesn't have audi= o capabilities"); > + > /** > * drm_detect_monitor_audio - check monitor audio capability > * @edid: EDID block to scan > @@ -4209,6 +4214,9 @@ bool drm_detect_monitor_audio(struct edid *edid) > bool has_audio =3D false; > int start_offset, end_offset; >=20=20 > + if (ignore_edid_audio) > + goto end; > + > edid_ext =3D drm_find_cea_extension(edid); > if (!edid_ext) > goto end; It looks like the motivation for the original flag on Raspberry Pi was "I've got a non-audio monitor, but the system comes up trying to play audio to HDMI instead of the analog jack". Do we have some way for DRM to communicate to ALSA that this is not the right place to try to play audio by default? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlx9gkMACgkQtdYpNtH8 nugcqxAAp22ZWbsBXmwA2P2091hw33bUJwEhVDFC2ORD+gwmnG4DJqdbmg6IAMXN AQw0yvAzGi2InZAGaVmUTmFPozY5aAF+RNpw9gHTj7iJO2Me+oXYeh+OhiNS+wVq mCQEJwTjI1kpNNHqrJ/FdIey365Uv/OfJ1eDHklWPVRwkDn4kNJ1o8S3ZH6nM+Vk jGp2UWVEEbTF06uiPM5Aw7U+kP1nEM7Suj1gITZ95ske5ArNibTS86PoJvoROldk LhguynIruYSd1Uz+W/Fyw2UWNktT0ECH9ZWVw6KPxbjLXKC1hw8xJOdnT7FfOLW+ upJ3asO55KjN2CJSP8fa636BulSdRBdNDd2WHcAejjR4NQq/r9Ft3PCAsZOTFIM0 V46DnRAdAS2fhuRa2DRIf3v0hc1QvFbDU/DlgbX2G9m4Is4NHHmiYAbA1bA5LVUZ q6Xg7ZpNlXrQ3OltGMC3acQtV2B9rXgubPFEnBVGJN+iQk7mT4J6ujaIoElGatlJ f9e/t3l42zxOnDGNAz14gBPjt0RA84bBJMZeRTNxQMttYh2MCncD0vzE5SpzU4rJ xIHyQcKPdbOSdJd2Zls/fQHHyDWO6ak5Bu08FJzcGGQg+ZEs6Ww0Cof3k2pkBwhE vRN4y/VHxg+cGeJx0LHeXrk8+aogq2BmxisRPCUIrm4Zp5/0S0A= =PYfc -----END PGP SIGNATURE----- --=-=-=-- --===============0381335936== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0381335936==--