Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
	Thorsten Eisbein <thorsten.eisbein@head-acoustics.de>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH 1/2 v2] ASoC: Add HA (HEAD acoustics) DSP codec driver template
Date: Sat, 16 Aug 2014 15:49:58 +0100	[thread overview]
Message-ID: <20140816144958.GQ28623@sirena.org.uk> (raw)
In-Reply-To: <1399372596-10744-1-git-send-email-sr@denx.de>

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

On Tue, May 06, 2014 at 12:36:35PM +0200, Stefan Roese wrote:

> This codec driver template represents an I2C controlled multichannel audio

It's not really a template, it's a driver for a specific device.

Again, naming is the biggest issue here - it's going to get confusing
with a second product.  While the code is pretty clean the template
comment and the really generic name make this seem like it's more of a
placeholder for something that people will hack on to deploy than an
actual driver that someone can pick up and use.

I'm also missing any real management of the actual DSP, this appears to
only control some analogue around the DSP and a single mode switch which
is a bit odd.

> codec that has many typical ASoC codec driver features like volume controls,
> mixer stages, mux selection, output power control, in-codec audio routings,
> codec bias management and DAI link configuration.

> +static int ha_dsp_probe(struct snd_soc_codec *codec)
> +{
> +	int ret;
> +
> +	codec->control_data = dev_get_regmap(codec->dev, NULL);
> +	ret = snd_soc_codec_set_cache_io(codec, codec->control_data);
> +	if (ret != 0) {
> +		dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
> +		return ret;
> +	}

This will be done automatically by the core.

> +	snd_soc_write(codec, HA_DSP_CTRL, HA_DSP_SW_RESET);

I'd expect this to be done in the I2C level probe.

> +/*
> + * This name/ID is neded to match the DT node for the codec
> + */
> +static const struct i2c_device_id ha_dsp_i2c_id[] = {
> +	{ "ha-dsp-audio", 0 },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(i2c, ha_dsp_i2c_id);

For use with DT you should have an explicit compatible string.  There's
also no binding document here that I can see.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2014-08-16 14:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-06 10:36 [PATCH 1/2 v2] ASoC: Add HA (HEAD acoustics) DSP codec driver template Stefan Roese
2014-05-06 10:36 ` [PATCH 2/2 v2] ASoC: omap: Add HA (HEAD acoustics) DSP add-on card audio driver for TAO3530 Stefan Roese
2014-08-16 14:40   ` Mark Brown
2014-08-16 14:49 ` Mark Brown [this message]

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=20140816144958.GQ28623@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=lars@metafoo.de \
    --cc=linux-omap@vger.kernel.org \
    --cc=sr@denx.de \
    --cc=thorsten.eisbein@head-acoustics.de \
    /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