linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Cheng-yi Chiang <cychiang@chromium.org>
To: Cheng-yi Chiang <cychiang@chromium.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	 Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Philipp Zabel <p.zabel@pengutronix.de>,
	Mark Brown <broonie@kernel.org>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
	 Russell King <rmk+kernel@armlinux.org.uk>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	David Airlie <airlied@linux.ie>,
	 Rob Herring <robh+dt@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	 Doug Anderson <dianders@chromium.org>,
	Dylan Reid <dgreid@chromium.org>,
	tzungbi@chromium.org, linux-media@vger.kernel.org,
	 "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER
	MANAGEM..." <alsa-devel@alsa-project.org>,
	dri-devel@lists.freedesktop.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,  devicetree@vger.kernel.org,
	Dariusz Marcinkiewicz <darekm@google.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH 1/7] video: add HDMI state notifier support
Date: Fri, 21 Jun 2019 17:39:43 +0800	[thread overview]
Message-ID: <CAFv8Nw+m-+pshD_cxKe4Nc_4wP3ttpAfDU7EFb-e+ZBcYNA51Q@mail.gmail.com> (raw)
In-Reply-To: <20190620211204.GW12905@phenom.ffwll.local>

On Fri, Jun 21, 2019 at 5:12 AM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> Massively cutting this thread, since halfway through in my previous reply
> I realized that maybe hdmi_codec is a much better starting point.
>
ACK
> 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 <daniel@ffwll.ch> 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.
>
Yes you are right. They are different codec drivers.
Sorry for the confusion. What I meant was that my use case on RK3288
was using dw-hdmi-audio.c codec driver,
which was later replaced by a more general version hdmi-codec.c.

> > 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
> ...
>
Again you are right. Sorry for the confusion. What I meant is that
this callback mechanism should work on hdmi-codec.c driver as well.

> > 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?
>
I think extending current interface will work.
There is a struct hdmi_codec_pdata to let ALSA codec driver access
some ops through platform data.
And after this patch

https://lore.kernel.org/patchwork/patch/692324/

ALSA codec driver can get access to the struct on DRM side.
Based on this I can add a new ops to register callback function for jack status.
It will be similar to Doug's chromium patch above.
I think that is quite a feasible way, and can benefit all boards using
hdmi-codec.c.

Thanks a lot!!

> 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

  reply	other threads:[~2019-06-21 10:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03  4:32 [PATCH 0/7] Add HDMI audio support on RK3288 veyron board Cheng-Yi Chiang
2019-06-03  4:32 ` [PATCH 1/7] video: add HDMI state notifier support Cheng-Yi Chiang
2019-06-03  7:45   ` Hans Verkuil
2019-06-03  8:09     ` Daniel Vetter
2019-06-03  9:05       ` Hans Verkuil
2019-06-04  7:19         ` Daniel Vetter
2019-06-04  2:32       ` Cheng-yi Chiang
2019-06-04  7:24         ` Daniel Vetter
2019-06-11 12:10           ` Cheng-yi Chiang
2019-06-11 12:34             ` Daniel Vetter
2019-06-18 11:48               ` Cheng-yi Chiang
2019-06-18 12:12                 ` Daniel Vetter
2019-06-19 11:48                   ` Cheng-yi Chiang
2019-06-20  9:25                     ` Daniel Vetter
2019-06-20 13:23                       ` Cheng-yi Chiang
2019-06-20 21:12                         ` Daniel Vetter
2019-06-21  9:39                           ` Cheng-yi Chiang [this message]
2019-06-11 13:10             ` Hans Verkuil
2019-06-18 11:54               ` Cheng-yi Chiang
2019-06-04  1:48     ` Cheng-yi Chiang
2019-06-03  4:32 ` [PATCH 2/7] ASoC: hdmi-codec: use HDMI state notifier to add jack support Cheng-Yi Chiang
2019-06-03  8:03   ` [alsa-devel] " Amadeusz Sławiński
2019-06-03  8:53     ` Cheng-yi Chiang
2019-06-03  4:32 ` [PATCH 3/7] drm/bridge/synopsys: dw-hdmi: Add HDMI notifier support Cheng-Yi Chiang
2019-06-03  4:32 ` [PATCH 4/7] ASoC: rockchip_max98090: Add dai_link for HDMI Cheng-Yi Chiang
2019-06-03  4:32 ` [PATCH 5/7] ASoC: rockchip: rockchip-max98090: Add node " Cheng-Yi Chiang
2019-07-09 20:01   ` Rob Herring
2019-07-10  4:11     ` Cheng-yi Chiang
2019-06-03  4:32 ` [PATCH 6/7] ASoC: rockchip_max98090: Add HDMI jack support Cheng-Yi Chiang
2019-06-03  4:32 ` [PATCH 7/7] ARM: dts: rockchip: Specify HDMI node to sound card node Cheng-Yi Chiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFv8Nw+m-+pshD_cxKe4Nc_4wP3ttpAfDU7EFb-e+ZBcYNA51Q@mail.gmail.com \
    --to=cychiang@chromium.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=daniel@ffwll.ch \
    --cc=darekm@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dgreid@chromium.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=hverkuil@xs4all.nl \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    --cc=perex@perex.cz \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    --cc=tzungbi@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).