From: Mark Brown <broonie@kernel.org>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Andrew Jackson <Andrew.Jackson@arm.com>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] ASoC:codecs: Add a generic HDMI audio CODEC
Date: Mon, 1 Sep 2014 17:36:42 +0100 [thread overview]
Message-ID: <20140901163642.GG29327@sirena.org.uk> (raw)
In-Reply-To: <080616c48997c53a14910f05a0fcf3f995412315.1409490122.git.moinejf@free.fr>
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
On Sun, Aug 31, 2014 at 12:45:39PM +0200, Jean-Francois Moine wrote:
> Documentation/devicetree/bindings/sound/hdmi2.txt | 32 ++++
> include/sound/hdmi2.h | 24 +++
> sound/soc/codecs/Kconfig | 3 +
> sound/soc/codecs/Makefile | 2 +
> sound/soc/codecs/hdmi2.c | 204 ++++++++++++++++++++++
> 5 files changed, 265 insertions(+)
This is clearly not a good name and it's not clear what the difference
between this and the existing HDMI stub CODEC is intended to be.
> +Required properties:
> +
> + - audio-ports: must contain one or two HDMI transmitter dependant
> + values identifying the audio sources.
> + The source type is given by the corresponding entry in
> + the audio-port-names property.
> +
> + - audio-port-names: must contain entries matching the entries in
> + the audio-ports property.
> + Each value may be "i2s" or "spdif", giving the type of
> + the associated audio port.
It seems hard to see this binding as really generic - I'd expect to see
other devices which are just able to have fixed audio ports for example.
> +static int hdmi2_probe(struct snd_soc_codec *codec)
> +{
> + struct i2c_client *i2c_client = to_i2c_client(codec->dev);
> + struct hdmi2_codec *audio = i2c_get_clientdata(i2c_client);
> + struct device_node *np = codec->dev->of_node;
> + int i, j, ret;
> + const char *p;
> +
> + if (!audio)
> + return -ENODEV;
> + snd_soc_codec_set_drvdata(codec, audio);
The code also seems pretty device specific. I think it's probably
better to leave the binding device specific for now and concentrate on
sharing inside the kernel, making any generic binding additions be about
how the devices interface rather than what's going on inside a specific
device.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-09-01 16:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-31 13:02 [PATCH v4 0/2] ASoC: tda998x: add a codec to the HDMI transmitter Jean-Francois Moine
2014-08-31 10:45 ` [PATCH v4 1/2] ASoC:codecs: Add a generic HDMI audio CODEC Jean-Francois Moine
2014-09-01 16:36 ` Mark Brown [this message]
2014-08-31 12:35 ` [PATCH v4 2/2] drm/i2c:tda998x: Use the HDMI2 " Jean-Francois Moine
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=20140901163642.GG29327@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Andrew.Jackson@arm.com \
--cc=alsa-devel@alsa-project.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=moinejf@free.fr \
/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