From affd447db0c7cb9c4c056916ce930d0ffd9511aa Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 12 Dec 2007 23:48:04 +0100 Subject: [PATCH] winealsa: Don't require a cswitch control for capture. --- dlls/winealsa.drv/mixer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/winealsa.drv/mixer.c b/dlls/winealsa.drv/mixer.c index 6b1361081e..90b539e603 100644 --- a/dlls/winealsa.drv/mixer.c +++ b/dlls/winealsa.drv/mixer.c @@ -233,8 +233,7 @@ static int blacklisted(snd_mixer_elem_t *elem) BOOL blisted = 0; if (!snd_mixer_selem_has_playback_volume(elem) && - (!snd_mixer_selem_has_capture_volume(elem) || - !snd_mixer_selem_has_capture_switch(elem))) + !snd_mixer_selem_has_capture_volume(elem)) blisted = 1; TRACE("%s: %x\n", name, blisted); @@ -382,7 +381,7 @@ static void filllines(mixer *mmixer, snd_mixer_elem_t *mastelem, snd_mixer_elem_ else if (!capt) continue; - if (capt && snd_mixer_selem_has_capture_switch(elem)) + if (capt && snd_mixer_selem_has_capture_volume(elem)) { (++mline)->component = comp; MultiByteToWideChar(CP_UNIXCP, 0, name, -1, mline->name, MAXPNAMELEN); @@ -473,7 +472,7 @@ static void ALSA_MixerInit(void) captelem = elem; else if (!blacklisted(elem)) { - if (snd_mixer_selem_has_capture_switch(elem)) + if (snd_mixer_selem_has_capture_volume(elem)) ++capcontrols; if (snd_mixer_selem_has_playback_volume(elem)) { @@ -1306,14 +1305,14 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags) return MMSYSERR_INVALPARAM; } - Ml->fdwLine = MIXERLINE_LINEF_ACTIVE; Ml->dwUser = 0; - + Ml->fdwLine = MIXERLINE_LINEF_DISCONNECTED; switch (qf) { case MIXER_GETLINEINFOF_COMPONENTTYPE: { Ml->dwLineID = 0xFFFF; + TRACE("Looking for componenttype %d/%x\n", Ml->dwComponentType, Ml->dwComponentType); for (idx = 0; idx < mmixer->chans; ++idx) if (mmixer->lines[idx].component == Ml->dwComponentType) { @@ -1383,6 +1382,8 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags) return MMSYSERR_INVALPARAM; } + Ml->fdwLine &= ~MIXERLINE_LINEF_DISCONNECTED; + Ml->fdwLine |= MIXERLINE_LINEF_ACTIVE; if (Ml->dwLineID >= mmixer->dests) Ml->fdwLine |= MIXERLINE_LINEF_SOURCE; -- 2.32.0.93.g670b81a890