From: Takashi Iwai <tiwai@suse.de>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Jean-Francois Moine <moinejf@free.fr>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
Andrew Jackson <Andrew.Jackson@arm.com>,
Jyri Sarha <jsarha@ti.com>, Mark Brown <broonie@kernel.org>,
Dave Airlie <airlied@gmail.com>
Subject: Re: [PATCH v13 3/3] ASoC: tda998x: add a codec to the HDMI transmitter
Date: Tue, 28 Jul 2015 15:59:45 +0200 [thread overview]
Message-ID: <s5hio94tmb2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20150728135358.GK7557@n2100.arm.linux.org.uk>
On Tue, 28 Jul 2015 15:53:58 +0200,
Russell King - ARM Linux wrote:
>
> On Tue, Jul 28, 2015 at 03:23:29PM +0200, Jean-Francois Moine wrote:
> > The EDID arrives in the DRM connector when video starts. The built ELD
> > may be stored either in the connector itself (default), in the encoder
> > (TDA998x device) or in some DRM/encoder/connector private data.
>
> The ELD is stored in the DRM connector, and there _should_ be a system
> of locking which ensures that you can get at that information safely.
>
> The ELD is only updated when the connector's get_modes() method is called,
> and the driver itself calls drm_edid_to_eld(). This all happens under
> the drm_device's struct_mutex.
>
> So, to safely read the ELD from outside DRM, you need to take the top-level
> drm_device's struct_mutex. That could be fraught, as that's quite a big
> lock, so an alternative would be to introduce an 'eld' lock to the driver,
> which protects the call to drm_edid_to_eld() and the reading of the ELD.
>
> However, that doesn't solve the problem of passing the data to an audio
> driver. What's needed there is a notification system which allows a video
> driver to broadcast HDMI events such as:
>
> * connected
> * new EDID available
> * new ELD available
> * disconnected
>
> With such a system, different components driving the facilities of a HDMI
> connector can make decisions on what to do - which not only includes things
> like the audio driver, but also a driver for the CEC interface (which also
> needs to see the EDID to get at its "address".) This can be done in a safe
> manner as the HDMI video driver would have control over the generation of
> these messages.
>
> The point that Mark is trying to get you to see is that this problem is
> not specific to TDA998x. The same problem exists for many other HDMI
> interfaces (except maybe Intel's i9x5/HDA stuff which has a hardware
> mechanism of passing the ELD data from the video driver, through the
> hardware to the audio driver.)
FWIW, we're currently discussing about extending the i915/hda
component binding so that the audio driver gets a notification and
queries the ELD via callbacks instead of the flaky hardware access.
It'd be best if we have a common infrastructure for that, of course.
But currently it's a start, just a bit step forward there.
Takashi
next prev parent reply other threads:[~2015-07-28 13:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 13:01 [PATCH v13 0/3] ASoC: tda998x: add a codec to the HDMI transmitter Jean-Francois Moine
[not found] ` <cover.1437397270.git.moinejf-GANU6spQydw@public.gmane.org>
2015-05-08 8:18 ` [PATCH v13 1/3] drm/i2c: tda998x: Add support of a DT graph of ports Jean-Francois Moine
2015-05-08 8:23 ` [PATCH v13 2/3] drm/i2c: tda998x: Change drvdata for audio extension Jean-Francois Moine
2015-05-08 8:41 ` [PATCH v13 3/3] ASoC: tda998x: add a codec to the HDMI transmitter Jean-Francois Moine
[not found] ` <e036c88aa945e72b40ec965c9358dacf564e79f2.1437397272.git.moinejf-GANU6spQydw@public.gmane.org>
2015-07-20 18:06 ` Mark Brown
[not found] ` <20150720180606.GL11162-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-07-28 10:19 ` Jean-Francois Moine
2015-07-28 10:24 ` Mark Brown
2015-07-28 13:23 ` Jean-Francois Moine
2015-07-28 13:53 ` Russell King - ARM Linux
2015-07-28 13:59 ` Takashi Iwai [this message]
[not found] ` <s5hio94tmb2.wl-tiwai-l3A5Bk7waGM@public.gmane.org>
2015-07-28 14:18 ` Russell King - ARM Linux
[not found] ` <20150728135358.GK7557-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-07-28 14:39 ` Jean-Francois Moine
2015-07-28 15:06 ` Russell King - ARM Linux
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=s5hio94tmb2.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=Andrew.Jackson@arm.com \
--cc=airlied@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jsarha@ti.com \
--cc=linux@arm.linux.org.uk \
--cc=moinejf@free.fr \
/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