From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Jean-Francois Moine <moinejf@free.fr>,
alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
kernel@pengutronix.de, Arnaud Pouliquen <arnaud.pouliquen@st.com>,
Koro Chen <koro.chen@mediatek.com>, Jyri Sarha <jsarha@ti.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-mediatek@lists.infradead.org,
Daniel Kurtz <djkurtz@chromium.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
PC Liao <pc.liao@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Cawa Cheng <cawa.cheng@mediatek.com>
Subject: Re: Applied "ASoC: hdmi-codec: Add ELD control" to the asoc tree
Date: Wed, 27 Apr 2016 10:42:19 +0100 [thread overview]
Message-ID: <20160427094219.GL19428@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <E1atHJ9-0003ey-9b@debutante>
It would have been good to have this as a generic ALSA control rather than
an ASoC control. The dw-hdmi driver is an ALSA driver, and now we have to
re-invent this for ALSA...
On Thu, Apr 21, 2016 at 05:18:23PM +0100, Mark Brown wrote:
> The patch
>
> ASoC: hdmi-codec: Add ELD control
>
> has been applied to the asoc tree at
>
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
>
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.
>
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
>
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
>
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
>
> Thanks,
> Mark
>
> >From 81151cfb6bfe69f1c5a52b795eb005226a322c9e Mon Sep 17 00:00:00 2001
> From: Philipp Zabel <p.zabel@pengutronix.de>
> Date: Wed, 20 Apr 2016 10:59:58 +0200
> Subject: [PATCH] ASoC: hdmi-codec: Add ELD control
>
> ALSA doesn't know about all the different compressed audio formats,
> so there is no interface to let userspace enumerate the formats that
> are supported by the connected sink. Exporting the raw ELD bytes to
> userspace allows an application to select the appropriate audio format
> depending on the current capabilities of the connected HDMI sink device.
> Usually userspace then just pretends to ALSA that the data is in one of
> the raw 16-bit PCM audio formats and relies on the IEC controls to tell
> the sink how to interpret the data.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Reviewed-by: Jyri Sarha <jsarha@ti.com>
> Tested-by: Jyri Sarha <jsarha@ti.com>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> sound/soc/codecs/hdmi-codec.c | 38 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
> index b46b8edb9319..c78333b4311d 100644
> --- a/sound/soc/codecs/hdmi-codec.c
> +++ b/sound/soc/codecs/hdmi-codec.c
> @@ -47,6 +47,42 @@ enum {
> DAI_ID_SPDIF,
> };
>
> +static int hdmi_eld_ctl_info(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_info *uinfo)
> +{
> + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
> + struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
> +
> + uinfo->type = SNDRV_CTL_ELEM_TYPE_BYTES;
> + uinfo->count = sizeof(hcp->eld);
> +
> + return 0;
> +}
> +
> +static int hdmi_eld_ctl_get(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
> + struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
> +
> + mutex_lock(&hcp->eld_lock);
> + memcpy(ucontrol->value.bytes.data, hcp->eld, sizeof(hcp->eld));
> + mutex_unlock(&hcp->eld_lock);
> +
> + return 0;
> +}
> +
> +static const struct snd_kcontrol_new hdmi_controls[] = {
> + {
> + .access = SNDRV_CTL_ELEM_ACCESS_READ |
> + SNDRV_CTL_ELEM_ACCESS_VOLATILE,
> + .iface = SNDRV_CTL_ELEM_IFACE_PCM,
> + .name = "ELD",
> + .info = hdmi_eld_ctl_info,
> + .get = hdmi_eld_ctl_get,
> + },
> +};
> +
> static int hdmi_codec_new_stream(struct snd_pcm_substream *substream,
> struct snd_soc_dai *dai)
> {
> @@ -312,6 +348,8 @@ static const struct snd_soc_dai_driver hdmi_spdif_dai = {
> };
>
> static struct snd_soc_codec_driver hdmi_codec = {
> + .controls = hdmi_controls,
> + .num_controls = ARRAY_SIZE(hdmi_controls),
> .dapm_widgets = hdmi_widgets,
> .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),
> .dapm_routes = hdmi_routes,
> --
> 2.8.0.rc3
>
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-04-27 9:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 8:59 [PATCH v7 0/9] ASoC: MT8173 HDMI codec support Philipp Zabel
2016-04-20 8:59 ` [PATCH v7 1/9] ASoC: mediatek: Add HDMI dai-links in the mt8173-rt5650-rt5676 machine driver Philipp Zabel
[not found] ` <1461142804-26728-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-04-20 8:59 ` [PATCH v7 2/9] ASoC: mediatek: Add HDMI dai-links to the mt8173-rt5650 " Philipp Zabel
[not found] ` <1461142804-26728-3-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-04-21 16:15 ` Mark Brown
2016-04-20 8:59 ` [PATCH v7 3/9] ASoC: hdmi-codec: Add ELD control Philipp Zabel
2016-04-21 16:18 ` Applied "ASoC: hdmi-codec: Add ELD control" to the asoc tree Mark Brown
2016-04-27 9:42 ` Russell King - ARM Linux [this message]
2016-04-27 10:14 ` Mark Brown
2016-04-20 8:59 ` [PATCH v7 4/9] video: rmk's HDMI notification prototype Philipp Zabel
2016-04-20 9:00 ` [PATCH v7 5/9] ASoC: hdmi-codec: Use HDMI notifications to add jack support Philipp Zabel
2016-04-20 9:00 ` [PATCH v7 6/9] ASoC: mediatek: Add jack detection support to mt8173-rt5650-rt5676 machine driver Philipp Zabel
2016-04-20 9:00 ` [PATCH v7 7/9] ASoC: mediatek: Add jack detection support to the mt8173-rt5650 " Philipp Zabel
2016-04-20 9:00 ` [PATCH v7 8/9] drm/mediatek: hdmi: issue notifications Philipp Zabel
2016-04-20 9:00 ` [PATCH v7 9/9] drm/mediatek: hdmi: use helper function for N and CTS calculation Philipp Zabel
2016-04-20 9:34 ` Arnaud Pouliquen
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=20160427094219.GL19428@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=cawa.cheng@mediatek.com \
--cc=djkurtz@chromium.org \
--cc=jsarha@ti.com \
--cc=kernel@pengutronix.de \
--cc=koro.chen@mediatek.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=moinejf@free.fr \
--cc=p.zabel@pengutronix.de \
--cc=pc.liao@mediatek.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).