Re: [PATCH v4 1/2] ASoC:codecs: Add a generic HDMI audio CODEC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: Digital signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux