From: Takashi Iwai <tiwai@suse.de>
To: Rob Clark <robdclark@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Zanoni, Paulo R" <paulo.r.zanoni@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
daeinki <inki.dae@samsung.com>,
Thierry Reding <thierry.reding@gmail.com>,
"Barnes, Jesse" <jesse.barnes@intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Archit Taneja <archit@ti.com>,
Tomi Valkeinen <tomi.valkeinen@gmail.com>
Subject: Re: Need your advice: Add a new communication inteface between HD-Audio and Gfx drivers for hotplug notification/ELD update
Date: Wed, 22 Jan 2014 18:23:24 +0100 [thread overview]
Message-ID: <s5hbnz4j5gz.wl%tiwai@suse.de> (raw)
In-Reply-To: <CAF6AEGtNfqy1025p+pZYgCPRUORe-9Y0mu3nCs62q9fTVymp1g@mail.gmail.com>
At Wed, 22 Jan 2014 10:45:26 -0500,
Rob Clark wrote:
>
> On Wed, Jan 22, 2014 at 10:20 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Wed, Jan 22, 2014 at 10:04:14AM -0500, Rob Clark wrote:
> >> sorry to jump into this a bit late, so maybe this was covered already earlier..
> >
> > It just started, I've quoted everything when cc'ing dri-devel. But good to
> > have examples outside of x86 (where things are mostly standardized by the
> > Eye of Redmond).
>
> perhaps the arm/SoC stuff was standardized by the Eye of Cthulhu
>
> btw, added a few other SoC drm types who might be interested in the topic
>
> >> For drm/msm the hdmi code needs something along these lines from audio:
> >>
> >> int hdmi_audio_info_setup(struct platform_device *pdev, bool enabled,
> >> uint32_t num_of_channels, uint32_t channel_allocation,
> >> uint32_t level_shift, bool down_mix);
> >> void hdmi_audio_set_sample_rate(struct platform_device *pdev, int rate);
> >>
> >> (former is mainly to setup avi audio infoframe, latter for clks)
> >>
> >> in addition to hotplug and ELD stuff
> >
> > Can you elaborate a bit on what you need for msm? On intel (and I think
> > the other x86 platforms are similar) we have separate buffers in the hw
> > for avi infoframes and audio infoframes, so the drm and alsa driver can
> > bash the right stuff into the hardware on their own. I'm mostly confused
> > since you say _AVI_ infoframe here, which is purely generated by the drm
> > side of the code here. Or at least that's been my understanding.
>
> Sorry, typo, meant audio infoframe
>
> We could have the API such that the audio driver constructs the
> infoframe.. that probably makes more sense and simplifies things.
The HD-audio has a code for doing that, so if needed, it can be copied
from there. But, even AMD HD-audio codec doesn't use this scheme but
just sets up a few verbs for channel-allocations, etc, so the complete
audio infoframe isn't necessary in most cases, as it seems.
> But
> the drm driver is the one that needs to bash that constructed buffer
> into the hw. Or, well, either that or both drivers ioremap the same
> block of registers, but that seems somewhat lame.
>
> But I do need to know some basic things, like # of channels.. and
> would kinda prefer not to have to parse the audio infoframe to get
> that info.
Yes, it makes things complex. It's one of the reasons we'd like to
have a more straightforward interface.
> > The clocks are also funny really, but I'm not sure whether this fits. I'd
> > have expected some DT-based generic clock source which the audio driver
> > just grabs as part of his multi-device beast (maybe using Russell's new
> > driver core code) and used directly. What's the reason that this has to go
> > through the drm driverr?
>
> possibly it could be exposed to the audio driver as a 'struct clk'
> that is implemented/registered/exported by the drm driver, I guess?
Hrm, but I guess this is also purely optional?
I'd like to start rather from a minimum set.
> fwiw, if curious, what I have on msm so far is at:
>
> https://github.com/freedreno/kernel-msm/commit/6ffd278d39a3ff8712c70b5fd98dc135bd6c7b8a
>
> It works on downstream qcom android kernel.. the API exported by drm
> driver, called by audio driver, is basically just a clone of the hack
> that was already there between fbdev and alsa. I haven't tried to
> clean that up at all yet. It was enough work just untangling ION (!!)
> from alsa in that kernel :-/
Thanks for the pointer!
Takashi
>
> BR,
> -R
>
> > Cheers, Daniel
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > +41 (0) 79 365 57 48 - http://blog.ffwll.ch
>
next prev parent reply other threads:[~2014-01-22 17:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 12:35 Need your advice: Add a new communication inteface between HD-Audio and Gfx drivers for hotplug notification/ELD update Lin, Mengdong
2014-01-21 13:10 ` Daniel Vetter
2014-01-21 13:11 ` Daniel Vetter
2014-01-22 12:48 ` Lin, Mengdong
2014-01-22 14:18 ` Daniel Vetter
2014-01-22 15:04 ` [Intel-gfx] " Rob Clark
2014-01-22 15:20 ` Daniel Vetter
2014-01-22 15:45 ` Rob Clark
2014-01-22 17:23 ` Takashi Iwai [this message]
2014-01-22 18:15 ` [Intel-gfx] " Rob Clark
2014-01-22 17:19 ` Takashi Iwai
2014-01-23 6:35 ` Lin, Mengdong
2014-01-23 7:57 ` Takashi Iwai
2014-01-23 8:13 ` Jaroslav Kysela
2014-01-23 8:26 ` Daniel Vetter
2014-01-24 8:23 ` Raymond Yau
2014-01-24 17:38 ` [alsa-devel] " Alex Deucher
2014-02-18 13:58 ` Lin, Mengdong
2014-02-18 14:22 ` Ville Syrjälä
2014-02-19 9:08 ` Lin, Mengdong
2014-02-19 11:29 ` Ville Syrjälä
2014-02-20 5:15 ` Lin, Mengdong
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=s5hbnz4j5gz.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=archit@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=inki.dae@samsung.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jesse.barnes@intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=paulo.r.zanoni@intel.com \
--cc=robdclark@gmail.com \
--cc=thierry.reding@gmail.com \
--cc=tomi.valkeinen@gmail.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