Hi Takashi, Mark, Jaroslav This is the reply for very old patch (almost 2 month ago).
Many drivers are using below code to know the Sound direction.
if (direction == SNDRV_PCM_STREAM_PLAYBACK)
This patch-set add snd_pcm_is_playback/capture() macro to handle it.
NAK from my side (overdesign, no improved readability). The defines (SNDRV_PCM_STREAM_*) are enough to check the stream type value correctly.
I have to say I do remember this being a little bit of a confusing idiom when I first stated looking at ALSA stuff, especially for capture only cases.
This patch-set got both Ack and Nack. I wonder can I re-post this after merge-window again ? I'm asking because this is very huge patch-set. Thank you for your help !! Best regards --- Kuninori Morimoto