From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FD2AC43381 for ; Mon, 11 Mar 2019 13:07:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC8F32075C for ; Mon, 11 Mar 2019 13:07:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ev5/TG59"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="TloXtgyR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC8F32075C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wdrLlO7iIQ8UjGrbBGWxpAKMavq7tr0bYgAfzVFAObk=; b=ev5/TG59lD/Nzl yhqOS8U2B7Oz6xf1q3RwbUiypSQ1QROo3wL/XGknvQ3LtduPSyYCzplZWW+O0p/1zHUbd15N8Elma +A+mkaG38OZlB0Qfbkh8IpGNienpSMS2VWcE+lEtz4OnqpJkYslyO2M/XJ+4DMtpnUc5bwfNCWGYv 8Eo3XGbBEUZT/t9abxtzyp7boiOque6JfbSG56HNKK5v7IilZaK6FAah6GuhHsuw3OXmT+olxJZTv aoBIj9ShCEwPfQ8KXNCDq4fLobiDt3tEIZDUD6V1RveFwaDdBMOXBlNeL9WGn5mrJmmufZMBUOySa r0fjhGlKGMhk7s1oC2Tg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3Kek-0001JS-BF; Mon, 11 Mar 2019 13:07:50 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3Keh-0001J7-5J for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 13:07:48 +0000 Received: by mail-ed1-x541.google.com with SMTP id a16so3954897edn.1 for ; Mon, 11 Mar 2019 06:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oXwnENCbS1BReIYgtYgqLiPvvhT2BiO8ceqeCi91Nn0=; b=TloXtgyR67v2g7u24KRFwgKGDvPEvyl4/Me1sLo/NNFk10I5Jo+Uzvaqu3ptZ6V8d2 SBY0bkGnWkI4KGMThuOjDccuc0PqdFvZafxXbL9FM2n+vbC6weAsCczmyACJCardQJyb RmNNO2OctHjjt8w/EnTW/YHzP+Dh1WHMDo2QY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=oXwnENCbS1BReIYgtYgqLiPvvhT2BiO8ceqeCi91Nn0=; b=sFBhpiPIz4YC84tILx6PHl0pDxGlBWH9jEtQ2rxFDYEnuMKMoQcklAeaLeqofx+0Xj uBk4Ll8teRhhe/nzPJSpFyaSWlyvTqgtohc58DoUvDiXL5W4ylhEQyy4jUZiqvp1j+JR wYWQXBD0z+sQkJ9Xt3LlQ709JJMdzhaBI1MCn7ZC6OFXo53Lr/Ov9dj7v0VjQnB/A0dl kEMAEcl7Av5i7kji+RtmxLBQabaNwCRrCyOdjdr3pd7mPCQ54ZAOXD3RxPxNhIXAHIn0 z6d/18HHPdlcP/wWxnw8aqjJJ8HUCf+4tRUt4+vnOiIrKZmBskA+zzKMiGNORo2sQ7l2 RHyQ== X-Gm-Message-State: APjAAAWlJgZNzpWBElZs4WFdR51hOf53BYxciXbVxExSIPUARnsx6KSk XD6zbuKsoWvd7UtvH1Zs543DIjbGiKXzYA== X-Google-Smtp-Source: APXvYqywjb5wdFIwv29ToiResgHkafPMphmBo6Du3769PGdOwZJAS6SVvDDT/mNxJaf7PPFW6U5Hcg== X-Received: by 2002:a05:6402:1205:: with SMTP id c5mr45616254edw.19.1552309664753; Mon, 11 Mar 2019 06:07:44 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id bs21sm3044987ejb.11.2019.03.11.06.07.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Mar 2019 06:07:43 -0700 (PDT) Date: Mon, 11 Mar 2019 14:07:41 +0100 From: Daniel Vetter To: Eric Anholt Subject: Re: [PATCH 2/7] drm/edid: Allow to ignore the audio EDID data Message-ID: <20190311130741.GD2665@phenom.ffwll.local> References: <4914bea9fc3ef3deaffa39ab691dbd9a76461e97.1551711042.git-series.maxime.ripard@bootlin.com> <87wole76ws.fsf@anholt.net> <20190305091240.sbkvdwosocaytx22@flea> <877eddtcm0.fsf@anholt.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <877eddtcm0.fsf@anholt.net> X-Operating-System: Linux phenom 4.19.0-1-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_060747_204713_C8120904 X-CRM114-Status: GOOD ( 29.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eben@raspberrypi.org, Maxime Ripard , Maling list - DRI developers , Paul Kocialkowski , David Airlie , Sean Paul , Thomas Petazzoni , Alex Deucher , Daniel Vetter , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 05, 2019 at 10:11:51AM -0800, Eric Anholt wrote: > Maxime Ripard writes: > > > [ Unknown signature status ] > > On Mon, Mar 04, 2019 at 03:05:31PM -0500, Alex Deucher wrote: > >> On Mon, Mar 4, 2019 at 2:53 PM Eric Anholt wrote: > >> > > >> > 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); > >> > > > >> > > +static bool ignore_edid_audio = 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 audio 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 = false; > >> > > int start_offset, end_offset; > >> > > > >> > > + if (ignore_edid_audio) > >> > > + goto end; > >> > > + > >> > > edid_ext = 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? > >> > >> Apparently not. We have users using debug knobs in our drivers to > >> disable display audio because ALSA defaults to that rather than other > >> audio. > > > > I guess one way to do this would be to register the card only when an > > audio-capable monitor is connected instead of doing this at probe > > time. I'm not sure how convenient it is for userspace though. > > Yeah, I have no idea how this is supposed to work, but pulseaudio keeps > doing reasonable things on my intel desktop so I'm wondering if we're > just missing some bit of the HDMI driver communicating to ALSA about the > state of the audio sink. We transport (either through the i915/snd-hda component or hw backdoors) both the "can this sink do audio" and the current eld describing the sinks audio capability to the alsa side. Afaiui the "can this sink do audio" even reflects whether the crtc is running or not (so the audio doesn't disappear into silence if you've dpms off'ed the screen). I think it's reflected into some alsa output sense/hotplug flag, that pulseaudio should take into account by default. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel