[alsa-devel] [PATCH 2/5] ASoC: Add HA (HEAD acoustics) DSP codec driver template

Mark Brown broonie at kernel.org
Tue Apr 29 20:47:19 CEST 2014


On Mon, Apr 28, 2014 at 02:17:53PM +0200, Stefan Roese wrote:

> +static int ha_dsp_hw_params(struct snd_pcm_substream *substream,
> +			    struct snd_pcm_hw_params *params,
> +			    struct snd_soc_dai *dai)
> +{
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct snd_soc_codec *codec = rtd->codec;
> +
> +	dev_dbg(codec->dev, "Sample format 0x%X\n", params_format(params));
> +	dev_dbg(codec->dev, "Channels %d\n", params_channels(params));
> +	dev_dbg(codec->dev, "Rate %d\n", params_rate(params));
> +
> +	return 0;
> +}

This doesn't do anything, you should either implement active code here
or remove it (I note that a range of sample rates are supported and the
CODEC can be clock master so I'd expect to see code here).

> +	/* codec role */
> +	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
> +	case SND_SOC_DAIFMT_CBM_CFM:
> +		dev_dbg(codec->dev, "Codec is master\n");
> +		break;
> +	case SND_SOC_DAIFMT_CBS_CFS:
> +		dev_dbg(codec->dev, "Codec is slave\n");
> +		break;
> +	default:
> +		return -EINVAL;
> +	}

This isn't doing anything with what it parsed, how does that work?

> +/*
> + * 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);

This doesn't have any actual part numbers?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140429/86604081/attachment.sig>


More information about the Alsa-devel mailing list