Re: [V2 2/2] vgaswitchreoo: set audio client id in vgaswitchreoo enable function

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

 



On Mon, 16 Jul 2018 16:43:42 +0200,
Lukas Wunner wrote:
> 
> On Mon, Jul 16, 2018 at 02:06:35PM +0800, Jim Qu wrote:
> > +
> > +	list_for_each_entry(client, &vgasr_priv.clients, list) {
> > +		if (!client_is_audio(client) || client_id(client) !=
> > +			VGA_SWITCHEROO_UNKNOWN_ID)
> 
> Don't you have to check for
> 
>       client_id(client) != VGA_SWITCHEROO_UNKNOWN_ID | ID_BIT_AUDIO
> 
> here?  That's the value you assign when the audio client registers,
> yet you're checking for something else, so you're always skipping
> over audio clients.  Did you actually test this patch?

This should be OK, since client_id() is a macro to strip to the core
id number without ID_BIT_AUDIO.  And client_is_vga() &
client_is_audio() macros were rewritten along with it, too.


Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux