[alsa-devel] [PATCH 2/2 v2] ASoC: omap: Add HA (HEAD acoustics) DSP add-on card audio driver for TAO3530

Mark Brown broonie at kernel.org
Sat Aug 16 16:40:24 CEST 2014


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()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140816/c67ac9ab/attachment.sig>


More information about the Alsa-devel mailing list