alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: Thierry Reding <thierry.reding@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>
Cc: "Yang, Libin" <libin.yang@intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"Nikkanen, Kimmo" <kimmo.nikkanen@intel.com>,
	"Koul, Vinod" <vinod.koul@intel.com>,
	"Lin, Mengdong" <mengdong.lin@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Babu, Ramesh" <ramesh.babu@intel.com>,
	"Shankar, Uma" <uma.shankar@intel.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	"Girdwood, Liam R" <liam.r.girdwood@intel.com>,
	Greg KH <greg@kroah.com>,
	"Vetter, Daniel" <daniel.vetter@intel.com>,
	linux-media@vger.kernel.org
Subject: Re: [Intel-gfx] [RFC] set up an sync channel between audio and display driver (i.e. ALSA and DRM)
Date: Tue, 20 May 2014 15:40:56 +0200	[thread overview]
Message-ID: <537B5B68.40505@perex.cz> (raw)
In-Reply-To: <20140520124325.GA6240@ulmo>

Date 20.5.2014 14:43, Thierry Reding wrote:
> On Tue, May 20, 2014 at 12:04:38PM +0200, Daniel Vetter wrote:
>> Also adding dri-devel and linux-media. Please don't forget these lists for
>> the next round.
>> -Daniel
>>
>> On Tue, May 20, 2014 at 12:02:04PM +0200, Daniel Vetter wrote:
>>> Adding Greg just as an fyi since we've chatted briefly about the avsink
>>> bus. Comments below.
>>> -Daniel
>>>
>>> On Tue, May 20, 2014 at 02:52:19AM +0000, Lin, Mengdong wrote:
>>>> This RFC is based on previous discussion to set up a generic communication channel between display and audio driver and
>>>> an internal design of Intel MCG/VPG HDMI audio driver. It's still an initial draft and your advice would be appreciated
>>>> to improve the design.
>>>>
>>>> The basic idea is to create a new avsink module and let both drm and alsa depend on it.
>>>> This new module provides a framework and APIs for synchronization between the display and audio driver.
>>>>
>>>> 1. Display/Audio Client
>>>>
>>>> The avsink core provides APIs to create, register and lookup a display/audio client.
>>>> A specific display driver (eg. i915) or audio driver (eg. HD-Audio driver) can create a client, add some resources
>>>> objects (shared power wells, display outputs, and audio inputs, register ops) to the client, and then register this
>>>> client to avisink core. The peer driver can look up a registered client by a name or type, or both. If a client gives
>>>> a valid peer client name on registration, avsink core will bind the two clients as peer for each other. And we
>>>> expect a display client and an audio client to be peers for each other in a system.
>>>>
>>>> int avsink_new_client ( const char *name,
>>>>                             int type,   /* client type, display or audio */
>>>>                             struct module *module,
>>>>                             void *context,
>>>>                             const char *peer_name,
>>>>                             struct avsink_client **client_ret);
>>>>
>>>> int avsink_free_client (struct avsink_client *client);
>>>
>>>
>>> Hm, my idea was to create a new avsink bus and let vga drivers register
>>> devices on that thing and audio drivers register as drivers. There's a bit
>>> more work involved in creating a full-blown bus, but it has a lot of
>>> upsides:
>>> - Established infrastructure for matching drivers (i.e. audio drivers)
>>>   against devices (i.e. avsinks exported by gfx drivers).
>>> - Module refcounting.
>>> - power domain handling and well-integrated into runtime pm.
>>> - Allows integration into componentized device framework since we're
>>>   dealing with a real struct device.
>>> - Better decoupling between gfx and audio side since registration is done
>>>   at runtime.
>>> - We can attach drv private date which the audio driver needs.
> 
> I think this would be another case where the interface framework[0]
> could potentially be used. It doesn't give you all of the above, but
> there's no reason it couldn't be extended. Then again, adding too much
> would end up duplicating more of the driver core, so if something really
> heavy-weight is required here, then the interface framework is not the
> best option.
> 
> [0]: https://lkml.org/lkml/2014/5/13/525

This looks like the right direction. I would go in this way rather than
create specific A/V grouping mechanisms. This seems to be applicable to
more use cases.

				Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project; Red Hat, Inc.

  reply	other threads:[~2014-05-20 13:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-20  2:52 [RFC] set up an sync channel between audio and display driver (i.e. ALSA and DRM) Lin, Mengdong
2014-05-20  8:10 ` Takashi Iwai
2014-05-20 10:37   ` Vinod Koul
2014-05-22  2:46   ` [alsa-devel] " Raymond Yau
2014-05-20 10:02 ` Daniel Vetter
2014-05-20 10:04   ` Daniel Vetter
2014-05-20 12:43     ` Thierry Reding
2014-05-20 13:40       ` Jaroslav Kysela [this message]
2014-05-20 14:29 ` Imre Deak
2014-05-20 14:35   ` Vinod Koul
2014-05-20 15:02     ` Imre Deak
2014-05-21 15:56     ` Babu, Ramesh
2014-05-21 16:05       ` Daniel Vetter
2014-05-21 17:07         ` Imre Deak
2014-05-22 14:29           ` Lin, Mengdong
2014-05-20 14:45   ` Daniel Vetter
2014-05-20 14:57     ` [alsa-devel] " Thierry Reding
2014-05-20 15:07       ` Daniel Vetter
2014-05-20 15:15         ` Thierry Reding
2014-05-20 15:22           ` Daniel Vetter
2014-05-22 14:59         ` Lin, Mengdong
2014-05-22 19:58           ` Daniel Vetter
2014-06-03  1:42             ` Lin, Mengdong
2014-06-03  7:44               ` Daniel Vetter

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=537B5B68.40505@perex.cz \
    --to=perex@perex.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=greg@kroah.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kimmo.nikkanen@intel.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=libin.yang@intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mengdong.lin@intel.com \
    --cc=ramesh.babu@intel.com \
    --cc=thierry.reding@gmail.com \
    --cc=uma.shankar@intel.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 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).