lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140127204203.GX11841@sirena.org.uk>
Date:	Mon, 27 Jan 2014 20:42:03 +0000
From:	Mark Brown <broonie@...nel.org>
To:	Jean-Francois Moine <moinejf@...e.fr>
Cc:	alsa-devel@...a-project.org, Dave Airlie <airlied@...il.com>,
	dri-devel@...ts.freedesktop.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Rob Clark <robdclark@...il.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>
Subject: Re: [PATCH 2/4] ASoC: tda998x: add a codec driver for TDA998x

On Sun, Jan 26, 2014 at 07:45:36PM +0100, Jean-Francois Moine wrote:

>  	select SND_SOC_STAC9766 if SND_SOC_AC97_BUS
>  	select SND_SOC_TAS5086 if I2C
> +	select SND_SOC_TDA998X if I2C

> +config SND_SOC_TDA998X
> +	tristate
> +	depends on OF
> +	default y if DRM_I2C_NXP_TDA998X=y
> +	default m if DRM_I2C_NXP_TDA998X=m
> +

These two things don't seem to agree with each other, and I expect this
breaks the build for ALL_CODECS.

> +static void tda_get_encoder(struct tda_priv *priv)
> +{
> +	struct snd_soc_codec *codec = priv->codec;
> +	struct device_node *np;
> +	struct i2c_client *i2c_client;
> +	static const struct of_device_id tda_dt[] = {
> +		{ .compatible = "nxp,tda998x" },
> +		{ },
> +	};
> +
> +	/* search the tda998x device */
> +	np = of_find_matching_node_and_match(NULL, tda_dt, NULL);
> +	if (!np || !of_device_is_available(np)) {
> +		dev_err(codec->dev, "No tda998x in DT\n");
> +		return;
> +	}
> +	i2c_client = of_find_i2c_device_by_node(np);
> +	of_node_put(np);
> +	if (!i2c_client) {
> +		dev_err(codec->dev, "no tda998x i2c client\n");
> +		return;
> +	}
> +	if (!i2c_get_clientdata(i2c_client)) {
> +		dev_err(codec->dev, "tda998x not initialized\n");
> +		return;
> +	}
> +
> +	priv->i2c_client = i2c_client;
> +}

The normal way of doing this would be to make the device a MFD - that
way the frameworks make sure probe ordering and so on are sorted out.
Other than that this looks basically OK, a few small comments below.

> +	/* give the audio input type and ports to the HDMI encoder */
> +	format = start ? priv->dai_id : 0;

It's not clear to me what the above is doing (I think I know but it
requires thinking about rather than being clear).

> +static const struct snd_soc_dai_driver tda998x_dai[] = {
> +    {
> +	.name = "i2s-hifi",

Coding style, indents are tabs.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ