From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1D453DEAD2 for ; Fri, 8 May 2026 12:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778242754; cv=none; b=kdhwQVSgJ+W7oTATfrXSUXsyHK7fGC9SXT21R4Q/myCyWuEyVycnPJX1ARLVXCn4ID72QehmJ08XCAxnOBgCORsrK5EIMeLpDKpWleI/O/EjZL9i3eiePyLqhrRvZ7ssGUTmlQUYKwrtSCEK+nG3/iRyTRGVU9G2wmrSRZ9pyFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778242754; c=relaxed/simple; bh=2wNe8+c0sbKElQomHQXt/DZqAQ6jBqI0/AwxYXEIEgE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=klNBgQdRZZWTFzlZVEY5+geCW/3nbbITGRJndL7Tlci3wuk3k/NxjOC844zdZBwsMBg2Of1aFSS/mvND69t41fUzO+WxFeGzel2pbC4wxoww/XIz0zS86m2w8l+wzDvUBKElAjh6vROKN2zAsExG5qGdW5uCXJ0SumZi+Yc16L4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1wLKAZ-000000004pq-2DSr; Fri, 08 May 2026 12:19:03 +0000 Date: Fri, 8 May 2026 13:19:00 +0100 From: Daniel Golle To: Dmitry Baryshkov Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , Junzhi Zhao , Jie Qiu , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] drm/mediatek: hdmi: report jack plugged state from bridge enable/disable Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 08, 2026 at 03:14:34PM +0300, Dmitry Baryshkov wrote: > On Fri, May 08, 2026 at 12:44:23PM +0100, Daniel Golle wrote: > > On Fri, May 08, 2026 at 02:29:29PM +0300, Dmitry Baryshkov wrote: > > > On Thu, May 07, 2026 at 02:32:45PM +0100, Daniel Golle wrote: > > > > On Thu, May 07, 2026 at 12:51:56PM +0300, Dmitry Baryshkov wrote: > > > > > On Wed, Apr 15, 2026 at 04:04:16PM +0100, Daniel Golle wrote: > > > > > > Notify hdmi-codec of the current sink plugged state from > > > > > > mtk_hdmi_bridge_atomic_enable() and mtk_hdmi_bridge_atomic_disable() > > > > > > via mtk_hdmi_update_plugged_status(). This matches the pattern used > > > > > > by dw-hdmi, which invokes handle_plugged_change() from the bridge > > > > > > enable and disable paths so that ASoC jack state stays in sync with > > > > > > the actual sink presence across atomic commit cycles, and not only > > > > > > on CEC HPD transitions. > > > > > > > > > > > > Userspace audio daemons (e.g. pipewire) rely on the jack state to > > > > > > route streams, restore per-sink volume levels, and recover the last > > > > > > used device after a reconnect. Without this, those transitions are > > > > > > missed whenever the sink change is driven by a mode set rather than > > > > > > by a bare HPD event. > > > > > > > > > > I can only hope to see mtk_hdmi to migrate to DRM_BRIDGE_OP_HDMI and > > > > > DRM_BRIDGE_OP_HDMI_AUDIO... > > > > > > > > > > I think the correct timing was discussed several times and the overall > > > > > conclusion was that the correct time is when the actual HDMI cable is > > > > > being plugged / unplugged. See the discussion around [1] and the > > > > > captured response of Mark Brown. > > > > > > > > Thank you for bringing this to my attention. I'll follow up on it. > > > > Meanwhile, can (independent) patch 1/2 already be merged, or at least > > > > get reviewed? > > > > > > > > > The discussion that I pointed to suggests that the patch is incorrect. > > > > I understand that patch 2/2 is incorrect, but (the independent fix in) > > patch 1/2 as well? > > 1/2 moves plugged updates to the atomic_enable() / atomic_disable(), > which is not correct according to the discussion I pointed to. So enabling/disabling the clk there as suggested by CK Hu[1] is not acceptable? [1]: https://lore.kernel.org/all/effea6b19a05460371c9f6b639c5e08ab0fe1111.camel@mediatek.com/