From: Thierry Reding <thierry.reding@gmail.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: linux-tegra@vger.kernel.org, Sameer Pujar <spujar@nvidia.com>,
dri-devel@lists.freedesktop.org,
Jon Hunter <jonathanh@nvidia.com>
Subject: Re: [PATCH] drm/tegra: sor: Support for audio over HDMI
Date: Tue, 4 Dec 2018 09:42:40 +0100 [thread overview]
Message-ID: <20181204084240.GA25962@ulmo> (raw)
In-Reply-To: <875zwa8uks.fsf@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2272 bytes --]
On Mon, Dec 03, 2018 at 06:05:07PM +0200, Jani Nikula wrote:
> On Mon, 03 Dec 2018, Thierry Reding <thierry.reding@gmail.com> wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > This code is very similar to the audio over HDMI support on older chips.
> > Interoperation with the audio codec is done via a pair of codec scratch
> > registers and an interrupt that is raised at the SOR when the codec has
> > written those registers.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > drivers/gpu/drm/tegra/sor.c | 229 ++++++++++++++++++++++++++++++++++++
> > drivers/gpu/drm/tegra/sor.h | 68 +++++++++++
> > 2 files changed, 297 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
> > index b129da2e5afd..22a54434a757 100644
> > --- a/drivers/gpu/drm/tegra/sor.c
> > +++ b/drivers/gpu/drm/tegra/sor.c
> > @@ -19,6 +19,8 @@
> >
> > #include <soc/tegra/pmc.h>
> >
> > +#include <sound/hda_verbs.h>
> > +
> > #include <drm/drm_atomic_helper.h>
> > #include <drm/drm_dp_helper.h>
> > #include <drm/drm_panel.h>
> > @@ -407,6 +409,7 @@ struct tegra_sor {
> > const struct tegra_sor_soc *soc;
> > void __iomem *regs;
> > unsigned int index;
> > + unsigned int irq;
> >
> > struct reset_control *rst;
> > struct clk *clk_parent;
> > @@ -433,6 +436,11 @@ struct tegra_sor {
> >
> > struct delayed_work scdc;
> > bool scdc_enabled;
> > +
> > + struct {
> > + unsigned int sample_rate;
> > + unsigned int channels;
> > + } audio;
> > };
> >
> > struct tegra_sor_state {
> > @@ -2139,6 +2147,144 @@ tegra_sor_hdmi_setup_avi_infoframe(struct tegra_sor *sor,
> > return 0;
> > }
> >
> > +static void tegra_sor_write_eld(struct tegra_sor *sor)
> > +{
> > + size_t length = drm_eld_size(sor->output.connector.eld), i;
>
> This caught my eye, can't be right?
Why do you think it's wrong? The length is the number of bytes that are
to be written to the HDA ELD buffer. This is pretty much the same across
all drivers that support HDMI audio (i915 and nouveau).
Also, audio is definitely working with this patch, and the HDMI codecs
are showing the correct information in procfs.
Can you elaborate?
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-12-04 8:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 15:36 [PATCH] drm/tegra: sor: Support for audio over HDMI Thierry Reding
2018-12-03 16:05 ` Jani Nikula
2018-12-04 8:42 ` Thierry Reding [this message]
2018-12-04 9:33 ` Jani Nikula
2018-12-04 10:09 ` Thierry Reding
2018-12-04 11:09 ` Dmitry Osipenko
2018-12-04 13:08 ` Thierry Reding
2018-12-04 13:50 ` Dmitry Osipenko
2018-12-04 14:40 ` Thierry Reding
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=20181204084240.GA25962@ulmo \
--to=thierry.reding@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=jonathanh@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=spujar@nvidia.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