[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Help with 6120d7cc145, causing bugs
From:       Jeff Cook <jeff () deserettechnology ! com>
Date:       2010-08-29 4:13:41
Message-ID: AANLkTikzyOfWHWbk1X7LzfiJJuw6SNgpRr36msM40mOJ () mail ! gmail ! com
[Download RAW message or body]

Wylda reported success with the attached patch on bug 23902. Does it
seem OK to everyone else? In this case, the extra channel needed for
capture is not added when a micelem is found, because micelem should
only be found when there is no other suitable playback or capture
controls (i.e. "Mic" element only). Though I'm not sure if that's
working, so the micelem detection could probably still stand for some
reworking, but this seems to fix things for now.

On Fri, Aug 27, 2010 at 7:51 AM, Henri Verbeet <hverbeet@gmail.com> wrote:
> On 27 August 2010 15:14, =A0<wylda@volny.cz> wrote:
>> All apps are working perfectly! Could i kindly ask you for sending
>> to patches today? It looks like i will have spare time for testing,
>> so it will help me to not to mess with revering.
>>
> It's probably not quite correct. In particular, before 6120d7cc145
> it's likely the Mic element would be counted in capcontrols as well,
> and skipped for the chan count in some cases. Also, the channel count
> for USB mics will probably end up as 2 now, which would make it hit
> the "No channels found, skipping device!\n" path again. I think I'd
> prefer the original author or Maarten to have a look at this, the code
> looks somewhat complicated to me, perhaps more so than really needed.
>

["micelem_chans.diff" (application/octet-stream)]

diff --git a/dlls/winealsa.drv/mixer.c b/dlls/winealsa.drv/mixer.c
index ffa0292..b77d875 100644
--- a/dlls/winealsa.drv/mixer.c
+++ b/dlls/winealsa.drv/mixer.c
@@ -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;
 
         /* If there is only 'Capture' and 'Master', this device is not worth it */
         if (mixdev[mixnum].chans == 2)




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic