[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140901163642.GG29327@sirena.org.uk>
Date: Mon, 1 Sep 2014 17:36:42 +0100
From: Mark Brown <broonie@...nel.org>
To: Jean-Francois Moine <moinejf@...e.fr>
Cc: Russell King - ARM Linux <linux@....linux.org.uk>,
Andrew Jackson <Andrew.Jackson@....com>,
alsa-devel@...a-project.org, devicetree@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 1/2] ASoC:codecs: Add a generic HDMI audio CODEC
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.
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists