[alsa-devel] [PATCH 2/2] ASoC: Add support for HifiBerry DAC

Mark Brown broonie at kernel.org
Fri May 13 12:54:09 CEST 2016


On Fri, May 13, 2016 at 09:14:13AM +0000, kernel at martin.sperl.org wrote:

> +static int snd_rpi_hifiberry_dac_init(struct snd_soc_pcm_runtime *rtd)
> +{
> +	return 0;
> +}

Remove empty functions.  Either they are redundant or you really need to
do something in them.

> +static struct snd_soc_dai_link snd_rpi_hifiberry_dac_dai[] = {
> +{
> +	.name		= "HifiBerry DAC",
> +	.stream_name	= "HifiBerry DAC HiFi",
> +	.cpu_dai_name	= "bcm2708-i2s.0",
> +	.codec_dai_name	= "pcm5102a-hifi",
> +	.platform_name	= "bcm2708-i2s.0",
> +	.codec_name	= "pcm5102a-codec",

I would expect all this to be done with DT references in a DT driver
rather than hard coding static names - look at how simple-card does this.
You could almost use simple-card here but the BCLK ratio requirement is
probably a bit much, I'm not immediately seeing a nice way to specify
the ratio there since it depends on the sample width.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160513/9a191e9f/attachment.sig>


More information about the Alsa-devel mailing list