Re: [PATCH 000/113] ALSA: add snd_pcm_is_playback/capture() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 05, 2024 at 04:04:39PM +0200, Jaroslav Kysela wrote:
> On 05. 08. 24 2:33, Kuninori Morimoto wrote:

> > 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.  

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux