[alsa-devel] [PATCH 4/6] ASoC/mpc5200: add to_psc_dma_stream() helper

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Nov 7 13:33:20 CET 2009


On Sat, Nov 07, 2009 at 01:34:31AM -0700, Grant Likely wrote:

> +/* Utility for retrieving psc_dma_stream structure from a substream */
> +inline struct psc_dma_stream *
> +to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma)
> +{
> +	if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
> +		return &psc_dma->capture;
> +	return &psc_dma->playback;
> +}

Traditionally this'd be an if () else but it makes no difference either
way to the generated code.


More information about the Alsa-devel mailing list