[alsa-devel] [PATCH 10/10] ASoC: soc.h: add for_each_pcm_stream()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Feb 13 07:46:52 CET 2020


Hi Takashi

Thank you for your feedback

> > From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> > 
> > ALSA SoC has SNDRV_PCM_STREAM_PLAYBACK/CAPTURE everywhere.
> > Having for_each_xxxx macro is useful.
> > This patch adds for_each_pcm_stream() for it.
> 
> This macro can be put in sound/pcm.h.  The similar pattern is found
> also generically in many non-ASoC codes, too.
(snip)
> > +#define for_each_pcm_stream(stream) \
> > +	for (stream  = SNDRV_PCM_STREAM_PLAYBACK;	\
> > +	     stream <= SNDRV_PCM_STREAM_LAST;		\
> > +	     stream++)

I see.
Will do in v2


Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list