[PATCH] winealsa.drv: Count micelem in mixer chans, don't add spare capture input for half-duplex mics.
David Laight
david at l8s.co.uk
Sun Sep 5 04:45:18 CDT 2010
On Wed, Sep 01, 2010 at 05:40:35PM +0200, Alexandre Julliard wrote:
> Jeff Cook <jeff at deserettechnology.com> writes:
>
> > @@ -520,7 +520,12 @@ static void ALSA_MixerInit(void)
> > }
> >
> > /* Add master channel, uncounted channels and an extra for capture */
> > - mixdev[mixnum].chans += !!mastelem + !!headelem + !!pcmelem + 1;
> > + /* Do not add the extra channel needed for capture on half-duplex capture cards
> > + like snd_usb_audio mics */
> > + if (micelem && !mastelem && !captelem)
> > + mixdev[mixnum].chans += !!mastelem + !!headelem + !!pcmelem + !!micelem;
> > + else
> > + mixdev[mixnum].chans += !!mastelem + !!headelem + !!pcmelem + !!micelem + 1;
>
> This statement wasn't exactly clear before, but now it's really
> impossible to follow. Please rewrite this in a way that makes sense to a
> casual reader.
Clearly it should be:
mixdev[mixnum].chans += !!mastelem + !!headelem + !!pcmelem + (micelem && !mastelem && !captelem);
ducks quickly ... :-)
David
--
David Laight: david at l8s.co.uk
More information about the wine-devel
mailing list