From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Vinod Koul <vinod.koul@intel.com>
Cc: alsa-devel@alsa-project.org, tomi.valkeinen@ti.com,
Arnaud Pouliquen <arnaud.pouliquen@st.com>,
lgirdwood@gmail.com, dri-devel@lists.freedesktop.org,
peter.ujfalusi@ti.com, broonie@kernel.org,
Jyri Sarha <jsarha@ti.com>
Subject: Re: [alsa-devel] HDMI codec, way forward?
Date: Wed, 21 Oct 2015 10:27:44 +0100 [thread overview]
Message-ID: <20151021092744.GC32532@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20151020140148.GC27370@localhost>
On Tue, Oct 20, 2015 at 07:31:48PM +0530, Vinod Koul wrote:
> On Tue, Oct 20, 2015 at 09:08:00AM +0100, Russell King - ARM Linux wrote:
> > > > Currently i915/audio component works as you described. The audio is
> > > > optional and HDMI graphics works without audio, while HDMI HD-audio
> > > > mandates i915 graphics.
> > >
> > > Right, but we also add additional interface on top of this to allow
> > > things like ensuring display is on when audio wants to run and now
> > > notification for events.
> > >
> > > I don't see a reason why this can be used as single interface to bind as
> > > well as talk to display from various components, unless I missed obvious
> > > which prevent us from doing this in non i915 cases...
> >
> > Maybe I can comment more specifically if I saw the code. Right now all
> > I'm aware of is this idea without any code, and I don't like it.
>
> Ok, i will be post my patches tomorrow. FWIW uses interface in
> sound/hda/hdac_i915.c for display power up/down
This:
component_match_add(dev, &match, hdac_component_master_match, bus);
ret = component_master_add_with_match(dev, &hdac_component_master_ops,
match);
if (ret < 0)
goto out_err;
/*
* Atm, we don't support deferring the component binding, so make sure
* i915 is loaded and that the binding successfully completes.
*/
request_module("i915");
if (!acomp->ops) {
ret = -ENODEV;
goto out_master_del;
}
is really not nice.
The whole point of the component helper is that you don't care when the
slaves come along. The above code does care about that, because it
expects that the master and slaves will be bound either inside
component_master_add_with_match(), or via that request_module (which
may happen asynchronously) and ends up setting ->ops.
This won't work for systems in the presence of deferred probing, since
there's only a weak connection between loading a module and the driver
successfully probing its device.
If you arrange for the audio device to finish probing in the master's
bind callback, that would be _far_ better, and would be in line with
how the component helper is supposed to work. It also means that if
your slave (the video side) goes away, you'll know about it as the
unbind callback will be called (at which point you should tear down
the audio device.)
However, there's a lurking problem: you can't register the same struct
device as a slave more than once into the component helpers - that's
because it's designed to look for devices. There's intentionally no
linkage between the slave ops and master ops to allow for generic
slave drivers (like tda998x) to be used with different master drivers
(armada, tilcdc, etc). In theory, you can register the master device
of one componentised system as a slave device of another, but that
requires a much more complicated locking setup in component.c (I have
patches for that, but I've resisted sending them because it makes the
locking very messy.)
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-10-21 9:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 11:50 HDMI codec, way forward? Jyri Sarha
2015-10-16 12:31 ` Lars-Peter Clausen
2015-10-16 12:43 ` [alsa-devel] " Takashi Iwai
2015-10-16 13:37 ` Russell King - ARM Linux
2015-10-16 14:12 ` Mark Brown
2015-10-18 15:08 ` Vinod Koul
2015-10-18 15:20 ` Russell King - ARM Linux
2015-10-18 16:13 ` Vinod Koul
2015-10-18 16:22 ` Russell King - ARM Linux
2015-10-18 17:16 ` Russell King - ARM Linux
2015-10-19 13:20 ` [alsa-devel] " Takashi Iwai
2015-10-20 3:38 ` Vinod Koul
2015-10-20 8:08 ` [alsa-devel] " Russell King - ARM Linux
2015-10-20 14:01 ` Vinod Koul
2015-10-21 9:11 ` [alsa-devel] " Jani Nikula
2015-10-21 15:52 ` Vinod Koul
2015-10-21 9:27 ` Russell King - ARM Linux [this message]
2015-10-21 13:41 ` [alsa-devel] " Takashi Iwai
2015-10-21 14:03 ` Russell King - ARM Linux
2015-10-21 14:10 ` Takashi Iwai
2015-10-21 14:37 ` Takashi Iwai
2015-10-21 15:36 ` Daniel Vetter
2015-10-21 16:46 ` Takashi Iwai
2015-10-21 16:48 ` Takashi Iwai
2015-10-21 16:50 ` Takashi Iwai
2015-10-21 14:37 ` Russell King - ARM Linux
2015-10-21 16:19 ` Vinod Koul
2015-10-21 17:34 ` Russell King - ARM Linux
2015-10-21 17:59 ` [alsa-devel] " Takashi Iwai
2015-10-21 18:19 ` Russell King - ARM Linux
2015-10-21 20:37 ` Takashi Iwai
2015-10-21 21:04 ` Russell King - ARM Linux
2015-10-22 7:18 ` Daniel Vetter
2015-10-16 14:06 ` Mark Brown
2015-10-18 15:02 ` Vinod Koul
2015-10-19 20:14 ` Jyri Sarha
2015-10-16 13:51 ` Arnaud Pouliquen
2015-10-16 14:15 ` Mark Brown
2015-10-18 15:07 ` Vinod Koul
2015-10-19 13:10 ` Jyri Sarha
2015-10-19 13:31 ` 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=20151021092744.GC32532@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@st.com \
--cc=broonie@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=lgirdwood@gmail.com \
--cc=peter.ujfalusi@ti.com \
--cc=tomi.valkeinen@ti.com \
--cc=vinod.koul@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.