[alsa-devel] [V2 2/2] vgaswitchreoo: set audio client id in vgaswitchreoo enable function
Takashi Iwai
tiwai at suse.de
Mon Jul 16 16:47:11 CEST 2018
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
More information about the Alsa-devel
mailing list