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

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

 



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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux