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 2/2 v2] ASoC: omap: Add HA (HEAD acoustics) DSP add-on card audio driver for TAO3530
Date: Sat, 16 Aug 2014 15:40:24 +0100	[thread overview]
Message-ID: <20140816144024.GP28623@sirena.org.uk> (raw)
In-Reply-To: <1399372596-10744-2-git-send-email-sr@denx.de>

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

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

> HA DSP card which features a HA DSP audio codec is intended to be connected
> to TAO-3530 (or BeagleBoard) using McBSP3 for digital audio and I2C bus for
> codec control. A GPIO signal from CPU to codec is used to request clock
> signals active.

So, it's been a while.  In part this is because I'm still really not
happy with the exceptionally generic name here - there must be some kind
of name that's more specific than the entire company here?  It seems
awfully generic.

> +	/* Set CODEC as master */
> +	fmt |= SND_SOC_DAIFMT_CBM_CFM;
> +
> +	/* Set codec DAI configuration */
> +	ret = snd_soc_dai_set_fmt(codec_dai, fmt);
> +	if (ret < 0) {
> +		pr_err("Can't set codec DAI configuration\n");
> +		return ret;
> +	}
> +
> +	/* Set cpu DAI configuration */
> +	ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
> +	if (ret < 0) {
> +		pr_err("Can't set cpu DAI configuration\n");
> +		return ret;
> +	}

Just initialise the format in the DAI link and leave the error checking
for the number of channels as the only code here.

> +	ret = devm_gpio_request(&pdev->dev, priv->gpio,	"HA-DSP clock request");
> +	if (ret) {
> +		dev_err(&pdev->dev, "Failed to request GPIO %u\n", priv->gpio);
> +		return ret;
> +	}
> +
> +	ret = gpio_direction_output(priv->gpio, 0);
> +	if (ret) {
> +		dev_err(&pdev->dev, "failed to set pin direction\n");
> +		return -EINVAL;
> +	}

devm_gpio_request_one()

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

  reply	other threads:[~2014-08-16 14:40 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 [this message]
2014-08-16 14:49 ` [PATCH 1/2 v2] ASoC: Add HA (HEAD acoustics) DSP codec driver template Mark Brown

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=20140816144024.GP28623@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