[alsa-devel] [RFC 2/4] ASoC: core: Add delay operation to snd_soc_dai_ops

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Mar 2 14:45:08 CET 2010


On Tue, Mar 02, 2010 at 03:39:49PM +0200, Peter Ujfalusi wrote:

> +	/* Query the delay only for playback stream */
> +	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
> +		if (cpu_dai->ops->delay)
> +			delay += cpu_dai->ops->delay(substream, cpu_dai);
> +
> +		if (codec_dai->ops->delay)
> +			delay += codec_dai->ops->delay(substream, codec_dai);
> +
> +		runtime->delay = delay;
> +	}

I'd be inclined to leave this up to the drivers to avoid surprises if it
becomes useful for the capture case in the future.  Not sure that that's
likely, but I'd rather avoid potential future transitions.


More information about the Alsa-devel mailing list