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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_MUTT autolearn=unavailable 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 8DD2CC43613 for ; Thu, 20 Jun 2019 21:12:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 593B32070B for ; Thu, 20 Jun 2019 21:12:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="ZyyEIWc8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726256AbfFTVMN (ORCPT ); Thu, 20 Jun 2019 17:12:13 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:34248 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725921AbfFTVMN (ORCPT ); Thu, 20 Jun 2019 17:12:13 -0400 Received: by mail-ed1-f66.google.com with SMTP id s49so6721692edb.1 for ; Thu, 20 Jun 2019 14:12:11 -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:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=959ru36WY2J0Xrly1vs1MXuZnqXsrreyoL0xoecTXQA=; b=ZyyEIWc8g9qNg4ofLToKGhgAmro8fi/qsiplRDzzYnsQzgUBFe4c86Ee/wR4SebDjt d63ZPlgcJxB1wYNf1eIPn3M3bB13fdEww4NsSF+uA3/ahauLDZUM1S12sFjWLoIzrkEq HMbsASyI+4J0m7OfyVxoUW085H+KZiQlel8eY= 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=959ru36WY2J0Xrly1vs1MXuZnqXsrreyoL0xoecTXQA=; b=URh/gwvwsoY2BNopFro0qh4euMmoGsJ4WnfowCRDhEsmBChDdBj+3HCS4RxPZaTN30 Tz0E+xrCw5xWVooqNXOzDFKrYeiHt0N+AGpLjxcPjoriN4WL9trC88tCqidlzBaznGe2 SfxKSxUVDX3JJIuv92pvTavOSe++NIXpqZle79svoKSN1wMDOVn74wbfWr8owtkm5t2R SD1dPKhkXELHBXGOz+Wl0+ybxUViz1+uUbDn4UvzaBgMZMK3t3sYR5E8UbpgwBSW+BZA p4etMDt2XC4HgE9IdGUqTuz/ff/tG3hi3pAhAt8WC2Rlh3oc2OyZhI2RWAJ1n1LL7P90 disQ== X-Gm-Message-State: APjAAAW35sOgxM+Z+mdlAiqdE/WmhFvSOPzP7lIn6uayrnK50YPp+M6Z wyGufnB5RfoNom1IcH3YCtMBBw== X-Google-Smtp-Source: APXvYqx3EnsHuhcIFTP2RIslvwoM3AQZ6N+bN+bCoN37PG+nA2hCPhd0nIWscWNoh843HbyPEoTJjw== X-Received: by 2002:a17:906:2510:: with SMTP id i16mr98153366ejb.130.1561065130725; Thu, 20 Jun 2019 14:12:10 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id p18sm76849ejr.61.2019.06.20.14.12.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 20 Jun 2019 14:12:09 -0700 (PDT) Date: Thu, 20 Jun 2019 23:12:04 +0200 From: Daniel Vetter To: Cheng-yi Chiang Cc: Hans Verkuil , linux-kernel , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Philipp Zabel , Mark Brown , Liam Girdwood , Takashi Iwai , Jaroslav Kysela , Russell King , Andrzej Hajda , Laurent Pinchart , David Airlie , Rob Herring , Heiko Stuebner , Doug Anderson , Dylan Reid , tzungbi@chromium.org, linux-media@vger.kernel.org, "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Dariusz Marcinkiewicz , Daniel Vetter Subject: Re: [PATCH 1/7] video: add HDMI state notifier support Message-ID: <20190620211204.GW12905@phenom.ffwll.local> Mail-Followup-To: Cheng-yi Chiang , Hans Verkuil , linux-kernel , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Philipp Zabel , Mark Brown , Liam Girdwood , Takashi Iwai , Jaroslav Kysela , Russell King , Andrzej Hajda , Laurent Pinchart , David Airlie , Rob Herring , Heiko Stuebner , Doug Anderson , Dylan Reid , tzungbi@chromium.org, linux-media@vger.kernel.org, "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Dariusz Marcinkiewicz References: <20190603080931.GG21222@phenom.ffwll.local> <20190604072411.GP21222@phenom.ffwll.local> <20190611123455.GD2458@phenom.ffwll.local> <20190618121220.GU12905@phenom.ffwll.local> <20190620092506.GP12905@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.19.0-5-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Massively cutting this thread, since halfway through in my previous reply I realized that maybe hdmi_codec is a much better starting point. On Thu, Jun 20, 2019 at 09:23:23PM +0800, Cheng-yi Chiang wrote: > On Thu, Jun 20, 2019 at 5:25 PM Daniel Vetter wrote: > > Yeah fully agreeing that hdmi_audio_code is probably a better starting > > point. Problem is that becuase hdmi_codec is built on top of platform > > device it's quite a bit harder to extend with callbacks and things like > > that, without breaking the driver model. > > > > I need to think about this more, but if all we need to look at is > > hdmi_codec, then I think this becomes a lot easier. And we can ignore > > drm_audio_component.h completely. > > > It is surprising that you think this way. > Maybe the original patch before hdmi-notifier was introduced is the > better way to solve this issue, if we only need to look at hdmi_codec. > > The history of hdmi_codec driver is in this patch series: > > https://lore.kernel.org/patchwork/patch/539656/ Hm, this doesn't seem to be the hdmi_codec driver I meant, but another, new one. I was talking about SND_SOC_HDMI_CODEC. > There was a callback mechanism implemented between dw-hdmi and hdmi > codec driver. > It was later consolidated by Doug in this patch for better jack status > reporting: > > https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/303573/ Hm that still seems entirely separate hdmi-codec specific to dw-hdmi only ... > I am not sure why the original patch series did not get fully accepted > in the upstream. > It was quite long time ago. > > But if you think this might be the right way to do, then it is even > better for us because the patch series and Doug's patch had been quite > stable > on our RK3288 products for about four years with plenty of users, so > we have much higher confidence in them. > I can rebase and clean up them and post another patch for review. > > Please let me know what approach you feel is better. > Thanks again! Not sure we're talking about the same. What I had in mind is to add jack status to the hdmi-codec.c stuff, which is used by multiple soc drm display drivers already. Looking at git grep output, there seems to be already some support for dw-hdmi synopsys drm_bridge driver. I thought of extending that. Does that not work for you? Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/7] video: add HDMI state notifier support Date: Thu, 20 Jun 2019 23:12:04 +0200 Message-ID: <20190620211204.GW12905@phenom.ffwll.local> References: <20190603080931.GG21222@phenom.ffwll.local> <20190604072411.GP21222@phenom.ffwll.local> <20190611123455.GD2458@phenom.ffwll.local> <20190618121220.GU12905@phenom.ffwll.local> <20190620092506.GP12905@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Cheng-yi Chiang Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Liam Girdwood , David Airlie , dri-devel@lists.freedesktop.org, Takashi Iwai , Hans Verkuil , Laurent Pinchart , linux-rockchip@lists.infradead.org, Dylan Reid , linux-media@vger.kernel.org, devicetree@vger.kernel.org, tzungbi@chromium.org, Bartlomiej Zolnierkiewicz , Russell King , Rob Herring , Jaroslav Kysela , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Doug Anderson , linux-kernel , Mark Brown , Dariusz Marcinkiewicz List-Id: devicetree@vger.kernel.org TWFzc2l2ZWx5IGN1dHRpbmcgdGhpcyB0aHJlYWQsIHNpbmNlIGhhbGZ3YXkgdGhyb3VnaCBpbiBt eSBwcmV2aW91cyByZXBseQpJIHJlYWxpemVkIHRoYXQgbWF5YmUgaGRtaV9jb2RlYyBpcyBhIG11 Y2ggYmV0dGVyIHN0YXJ0aW5nIHBvaW50LgoKT24gVGh1LCBKdW4gMjAsIDIwMTkgYXQgMDk6MjM6 MjNQTSArMDgwMCwgQ2hlbmcteWkgQ2hpYW5nIHdyb3RlOgo+IE9uIFRodSwgSnVuIDIwLCAyMDE5 IGF0IDU6MjUgUE0gRGFuaWVsIFZldHRlciA8ZGFuaWVsQGZmd2xsLmNoPiB3cm90ZToKPiA+IFll YWggZnVsbHkgYWdyZWVpbmcgdGhhdCBoZG1pX2F1ZGlvX2NvZGUgaXMgcHJvYmFibHkgYSBiZXR0 ZXIgc3RhcnRpbmcKPiA+IHBvaW50LiBQcm9ibGVtIGlzIHRoYXQgYmVjdWFzZSBoZG1pX2NvZGVj IGl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BQbGVhc2UgbGV0IG1lIGtub3cgd2hhdCBh cHByb2FjaCB5b3UgZmVlbCBpcyBiZXR0ZXIuCj4gVGhhbmtzIGFnYWluIQoKTm90IHN1cmUgd2Un cmUgdGFsa2luZyBhYm91dCB0aGUgc2FtZS4gV2hhdCBJIGhhZCBpbiBtaW5kIGlzIHRvIGFkZCBq YWNrCnN0YXR1cyB0byB0aGUgaGRtaS1jb2RlYy5jIHN0dWZmLCB3aGljaCBpcyB1c2VkIGJ5IG11 bHRpcGxlIHNvYyBkcm0KZGlzcGxheSBkcml2ZXJzIGFscmVhZHkuIExvb2tpbmcgYXQgZ2l0IGdy ZXAgb3V0cHV0LCB0aGVyZSBzZWVtcyB0byBiZQphbHJlYWR5IHNvbWUgc3VwcG9ydCBmb3IgZHct aGRtaSBzeW5vcHN5cyBkcm1fYnJpZGdlIGRyaXZlci4gSSB0aG91Z2h0IG9mCmV4dGVuZGluZyB0 aGF0LiBEb2VzIHRoYXQgbm90IHdvcmsgZm9yIHlvdT8KClRoYW5rcywgRGFuaWVsCi0tIApEYW5p ZWwgVmV0dGVyClNvZnR3YXJlIEVuZ2luZWVyLCBJbnRlbCBDb3Jwb3JhdGlvbgpodHRwOi8vYmxv Zy5mZndsbC5jaApfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f XwpkcmktZGV2ZWwgbWFpbGluZyBsaXN0CmRyaS1kZXZlbEBsaXN0cy5mcmVlZGVza3RvcC5vcmcK aHR0cHM6Ly9saXN0cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWw= 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=-2.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable 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 E0C88C43613 for ; Thu, 20 Jun 2019 21:12:26 +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 AFE8120656 for ; Thu, 20 Jun 2019 21:12:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i3KqixFN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="ZyyEIWc8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFE8120656 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=Tfs1yw6wEjCwEmh8eL7zj8YEBoSX7oEzha8fUh+6wZU=; b=i3KqixFNkwSyI2 sMUmgsTJXa1kGQqjfDhLAKtBIMAVtxk9EHqoZ6+rocE9viWETZTxrniTxmrJAaOTJb3lWxssYbBzp 3LCO2JWf+XHsfv5ER7FikwcVrH3V6abQ96G1LW2qUT8hGAw8wN4hvQOG/gqhD1qHPBYhKTJZ5Wtxc yF3T+eYeUHjYeIDYKlNRr0WS0cftammnmRaLG8WWwP+0F+ZucVZ2LzjKdgkfY5Ojpvp8j92ilJ/C7 7QR9/4WVSM8w5t22J2PO4YlNFCg0ylXUllQAqVHWoLvrEMelinHZSzZ0olSK++5o/9oli3IJeiWio o1E1VffFN7g5CgrzwxKA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1he4Lz-0001Vg-52; Thu, 20 Jun 2019 21:12:19 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1he4Ls-0001UC-L1 for linux-arm-kernel@lists.infradead.org; Thu, 20 Jun 2019 21:12:14 +0000 Received: by mail-ed1-x541.google.com with SMTP id k21so6717066edq.3 for ; Thu, 20 Jun 2019 14:12:11 -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:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=959ru36WY2J0Xrly1vs1MXuZnqXsrreyoL0xoecTXQA=; b=ZyyEIWc8g9qNg4ofLToKGhgAmro8fi/qsiplRDzzYnsQzgUBFe4c86Ee/wR4SebDjt d63ZPlgcJxB1wYNf1eIPn3M3bB13fdEww4NsSF+uA3/ahauLDZUM1S12sFjWLoIzrkEq HMbsASyI+4J0m7OfyVxoUW085H+KZiQlel8eY= 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 :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=959ru36WY2J0Xrly1vs1MXuZnqXsrreyoL0xoecTXQA=; b=MiwrpHMsyHzFbNTrtztxr9RwW0QXJwjbKkdKY1CGmtanusEujuXNCmmxoLTcKZl5po c95pk3mK8yM8fcD8hm09tC/6b8cDez6J0nDD3wGXLhx01wpNxikTKZCAawfA444KoTeW kqm0gsAGSJlJJPd3V5BB/pJfGwlNY/X2V6F7s6yXwR+HJkqkCq3ot87XINkZy0WN0phG SIN4Vz0aYhFxtZu62XDvo9z319KuXsIJ1j6hvGUsAjmRbw88tI9HGEilOx6/EQ4TxPq8 KzGlDfufIm5y5BClhOf3OXVGfme7Fhex0ZArQnd3qIv+QR4TJzOcCzQ7sUPL68o5wCTN Fh3w== X-Gm-Message-State: APjAAAXNc3NJGyjxyYMpLI6zb0znUlqTnHdG031NqFnvosfAxqE0Df0g NYvz4YxTAJHbNPlYeLzA6AJeQg== X-Google-Smtp-Source: APXvYqx3EnsHuhcIFTP2RIslvwoM3AQZ6N+bN+bCoN37PG+nA2hCPhd0nIWscWNoh843HbyPEoTJjw== X-Received: by 2002:a17:906:2510:: with SMTP id i16mr98153366ejb.130.1561065130725; Thu, 20 Jun 2019 14:12:10 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id p18sm76849ejr.61.2019.06.20.14.12.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 20 Jun 2019 14:12:09 -0700 (PDT) Date: Thu, 20 Jun 2019 23:12:04 +0200 From: Daniel Vetter To: Cheng-yi Chiang Subject: Re: [PATCH 1/7] video: add HDMI state notifier support Message-ID: <20190620211204.GW12905@phenom.ffwll.local> Mail-Followup-To: Cheng-yi Chiang , Hans Verkuil , linux-kernel , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Philipp Zabel , Mark Brown , Liam Girdwood , Takashi Iwai , Jaroslav Kysela , Russell King , Andrzej Hajda , Laurent Pinchart , David Airlie , Rob Herring , Heiko Stuebner , Doug Anderson , Dylan Reid , tzungbi@chromium.org, linux-media@vger.kernel.org, "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Dariusz Marcinkiewicz References: <20190603080931.GG21222@phenom.ffwll.local> <20190604072411.GP21222@phenom.ffwll.local> <20190611123455.GD2458@phenom.ffwll.local> <20190618121220.GU12905@phenom.ffwll.local> <20190620092506.GP12905@phenom.ffwll.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 4.19.0-5-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-20190620_141212_760654_B7BBC355 X-CRM114-Status: GOOD ( 24.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Heiko Stuebner , Liam Girdwood , David Airlie , dri-devel@lists.freedesktop.org, Takashi Iwai , Hans Verkuil , Andrzej Hajda , Laurent Pinchart , linux-rockchip@lists.infradead.org, Dylan Reid , linux-media@vger.kernel.org, devicetree@vger.kernel.org, tzungbi@chromium.org, Daniel Vetter , Bartlomiej Zolnierkiewicz , Russell King , Rob Herring , Jaroslav Kysela , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , Doug Anderson , linux-kernel , Mark Brown , Philipp Zabel , Dariusz Marcinkiewicz 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 Massively cutting this thread, since halfway through in my previous reply I realized that maybe hdmi_codec is a much better starting point. On Thu, Jun 20, 2019 at 09:23:23PM +0800, Cheng-yi Chiang wrote: > On Thu, Jun 20, 2019 at 5:25 PM Daniel Vetter wrote: > > Yeah fully agreeing that hdmi_audio_code is probably a better starting > > point. Problem is that becuase hdmi_codec is built on top of platform > > device it's quite a bit harder to extend with callbacks and things like > > that, without breaking the driver model. > > > > I need to think about this more, but if all we need to look at is > > hdmi_codec, then I think this becomes a lot easier. And we can ignore > > drm_audio_component.h completely. > > > It is surprising that you think this way. > Maybe the original patch before hdmi-notifier was introduced is the > better way to solve this issue, if we only need to look at hdmi_codec. > > The history of hdmi_codec driver is in this patch series: > > https://lore.kernel.org/patchwork/patch/539656/ Hm, this doesn't seem to be the hdmi_codec driver I meant, but another, new one. I was talking about SND_SOC_HDMI_CODEC. > There was a callback mechanism implemented between dw-hdmi and hdmi > codec driver. > It was later consolidated by Doug in this patch for better jack status > reporting: > > https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/303573/ Hm that still seems entirely separate hdmi-codec specific to dw-hdmi only ... > I am not sure why the original patch series did not get fully accepted > in the upstream. > It was quite long time ago. > > But if you think this might be the right way to do, then it is even > better for us because the patch series and Doug's patch had been quite > stable > on our RK3288 products for about four years with plenty of users, so > we have much higher confidence in them. > I can rebase and clean up them and post another patch for review. > > Please let me know what approach you feel is better. > Thanks again! Not sure we're talking about the same. What I had in mind is to add jack status to the hdmi-codec.c stuff, which is used by multiple soc drm display drivers already. Looking at git grep output, there seems to be already some support for dw-hdmi synopsys drm_bridge driver. I thought of extending that. Does that not work for you? Thanks, 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