OSDN Git Service

ALSA: pcm: More helper macros for reducing snd_pcm_format_t cast
authorTakashi Iwai <tiwai@suse.de>
Thu, 6 Feb 2020 16:39:39 +0000 (17:39 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 10 Feb 2020 07:27:08 +0000 (08:27 +0100)
commitb9c7d41087bc1755e01f9584f0bdbce0bb8b195d
tree8961ab76f08c65e5d14939351bc1e96cfabe78b5
parent8c356c524af88c0ad4d75b30fa201ed43d9a64c2
ALSA: pcm: More helper macros for reducing snd_pcm_format_t cast

snd_pcm_format_t is a strong-typed integer and requires the explicit
cast with __force if converted or compared with a normal integer
value.  Since most of use cases do iterate over all formats and test /
set the mask, provide a couple of new helper macros that do the
explicit cast.

Link: https://lore.kernel.org/r/20200206163945.6797-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/pcm.h
include/sound/pcm_params.h