Hi, On Thu, Jul 18, 2024 at 11:34:01PM +0000, Kuninori Morimoto wrote: > 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 ? > Because it will be too many patch-set, I want to know it was acceptable > idea or not before posting patch-bomb. > > I will post main patch, and sample driver patches. It is better to rename these inline functions introduced in this patchset so that they belong to PCM category, since in Linux sound subsystem there is another type of substream in rawmidi category. The concept of 'substream' corresponds to 'subdevice' in some operations to PCM/RawMidi cdev, thus should be handled with enough care as much as possible, in my opinion. Regards Takashi Sakamoto