On Fri, 19 Jul 2024 01:34:01 +0200, Kuninori Morimoto wrote:
Hi Iwai-san, Mark
Current many drivers are using below code to know its direction.
if (direction == SNDRV_PCM_STREAM_PLAYBACK)
I think it should be handled by function. But is it acceptable idea ?
Is the conversion just for readability / consistency reason? Or would it bring other benefit like code safety? Honestly speaking, I see no big advantage of conversion, if it's only about the readability.
Because it will be too many patch-set, I want to know it was acceptable idea or not before posting patch-bomb.
A generic macro like Amadeusz suggested would be an interesting idea, and that can be seen as a cleanup. But the straightforward conversion for the mass, I don't know whether it's worth...
thanks,
Takashi
I will post main patch, and sample driver patches.
Thank you for your help !!
Best regards
Kuninori Morimoto