Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2383332ybi; Thu, 20 Jun 2019 14:12:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8gv9s1Y0KI8HKmOovhv5X4PklMwHgd2dUhXHsEbGsjwWWpq2WdUbdXo7LfGWvpNu4foNq X-Received: by 2002:a63:2206:: with SMTP id i6mr14971888pgi.349.1561065157142; Thu, 20 Jun 2019 14:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561065157; cv=none; d=google.com; s=arc-20160816; b=U8aDA2QSaekKrfNchz73wxSjyBGNFAgCiclJFk6dy67n23kZt1/b93zxVhKXYRoOZQ mnzYG32+Kjv2HNvsWL2X+RNUPXtrBz65OojRsHjMfqfRkFMR0ZoSKdqjLYCgCJJ9J8mS kzEusA8d4rmSeqnqpVex4z5sJqlrHffxawaSxDqexbrO7tqmq+83esPEORoPWQqI1mno O3Zhb5SDZDeCemLE+/KW38f4YV8Ywbs99A4V8ZzprYU4pTg2XT8ZTlYSgoZgwTH2Z6Gk 5uBJ40isU8ONk5LZoaRR6gK6e2TOUt8NtnUBRRhJ4ObZnfNZJBrroezpfEnBBOuSBVvJ 2tlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=959ru36WY2J0Xrly1vs1MXuZnqXsrreyoL0xoecTXQA=; b=oljG7s8gMh160Gifrkqhqk1BDxUAnDhaE+Z2UGxyerUI+zNzF9o5SyxqVuQteps8Us 7/cEmiozgvnCwL4P23B8VAggnQNvhEIZ0uKUcQnUUbN30shTx1pVKeOsLbgN10NilOZ4 yEjzkznjdMEipHpiooshgAUC2OMmZVsdY101zof3QYknbgG4+XuYKMqfF8m0HJnxb7Wq onHcyJzgdwFyDIjTqOBLZ3ZgKxxDFJ0B/Fq8auyuI6ZJP+cQFEkh4aqZzRgTLe8+a3Oq PfbdwwWKz+JG4+mZjIzaaDma3bCakEPDL962qSM/Trmwc/B32dIbFiggGRsEbjZuEoP0 ciyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=ZyyEIWc8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m6si720626pjk.92.2019.06.20.14.12.21; Thu, 20 Jun 2019 14:12:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=ZyyEIWc8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbfFTVMN (ORCPT + 99 others); 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-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