[alsa-devel] [PATCH] ASoC: Add delay information for Samsung IISv2 DAIs

jassi brar jassisinghbrar at gmail.com
Thu Mar 4 14:18:59 CET 2010


On Thu, Mar 4, 2010 at 9:05 PM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> @@ -550,6 +550,21 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
>        return 0;
>  }
>
> +static long s3c2412_i2s_delay(struct snd_pcm_substream *substream,
> +                            struct snd_soc_dai *dai)
return type snd_pcm_sframes_t ?

> +{
> +       struct s3c_i2sv2_info *i2s = to_info(dai);
> +       u32 reg = readl(i2s->regs + S3C2412_IISFIC);
> +       int delay;
'delay' type snd_pcm_sframes_t ?

> +
> +       if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> +               delay = S3C2412_IISFIC_TXCOUNT(reg);
> +       else
> +               delay = S3C2412_IISFIC_RXCOUNT(reg);
> +
> +       return delay;
> +}
> +
> +       /* Allow overriding by (for example) IISv4 */
> +       if (!ops->delay)
> +               ops->delay = s3c2412_i2s_delay,
Ok for now.
I am trying to make functions in s3c-i2s-v2.c re-entrant as much as possible,
'delay' too seems to be a good candidate.


More information about the Alsa-devel mailing list