Commit affd447d authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

winealsa: Don't require a cswitch control for capture.

parent f75600dd
...@@ -233,8 +233,7 @@ static int blacklisted(snd_mixer_elem_t *elem) ...@@ -233,8 +233,7 @@ static int blacklisted(snd_mixer_elem_t *elem)
BOOL blisted = 0; BOOL blisted = 0;
if (!snd_mixer_selem_has_playback_volume(elem) && if (!snd_mixer_selem_has_playback_volume(elem) &&
(!snd_mixer_selem_has_capture_volume(elem) || !snd_mixer_selem_has_capture_volume(elem))
!snd_mixer_selem_has_capture_switch(elem)))
blisted = 1; blisted = 1;
TRACE("%s: %x\n", name, blisted); TRACE("%s: %x\n", name, blisted);
...@@ -382,7 +381,7 @@ static void filllines(mixer *mmixer, snd_mixer_elem_t *mastelem, snd_mixer_elem_ ...@@ -382,7 +381,7 @@ static void filllines(mixer *mmixer, snd_mixer_elem_t *mastelem, snd_mixer_elem_
else if (!capt) else if (!capt)
continue; continue;
if (capt && snd_mixer_selem_has_capture_switch(elem)) if (capt && snd_mixer_selem_has_capture_volume(elem))
{ {
(++mline)->component = comp; (++mline)->component = comp;
MultiByteToWideChar(CP_UNIXCP, 0, name, -1, mline->name, MAXPNAMELEN); MultiByteToWideChar(CP_UNIXCP, 0, name, -1, mline->name, MAXPNAMELEN);
...@@ -473,7 +472,7 @@ static void ALSA_MixerInit(void) ...@@ -473,7 +472,7 @@ static void ALSA_MixerInit(void)
captelem = elem; captelem = elem;
else if (!blacklisted(elem)) else if (!blacklisted(elem))
{ {
if (snd_mixer_selem_has_capture_switch(elem)) if (snd_mixer_selem_has_capture_volume(elem))
++capcontrols; ++capcontrols;
if (snd_mixer_selem_has_playback_volume(elem)) if (snd_mixer_selem_has_playback_volume(elem))
{ {
...@@ -1306,14 +1305,14 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags) ...@@ -1306,14 +1305,14 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags)
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
} }
Ml->fdwLine = MIXERLINE_LINEF_ACTIVE;
Ml->dwUser = 0; Ml->dwUser = 0;
Ml->fdwLine = MIXERLINE_LINEF_DISCONNECTED;
switch (qf) switch (qf)
{ {
case MIXER_GETLINEINFOF_COMPONENTTYPE: case MIXER_GETLINEINFOF_COMPONENTTYPE:
{ {
Ml->dwLineID = 0xFFFF; Ml->dwLineID = 0xFFFF;
TRACE("Looking for componenttype %d/%x\n", Ml->dwComponentType, Ml->dwComponentType);
for (idx = 0; idx < mmixer->chans; ++idx) for (idx = 0; idx < mmixer->chans; ++idx)
if (mmixer->lines[idx].component == Ml->dwComponentType) if (mmixer->lines[idx].component == Ml->dwComponentType)
{ {
...@@ -1383,6 +1382,8 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags) ...@@ -1383,6 +1382,8 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags)
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
} }
Ml->fdwLine &= ~MIXERLINE_LINEF_DISCONNECTED;
Ml->fdwLine |= MIXERLINE_LINEF_ACTIVE;
if (Ml->dwLineID >= mmixer->dests) if (Ml->dwLineID >= mmixer->dests)
Ml->fdwLine |= MIXERLINE_LINEF_SOURCE; Ml->fdwLine |= MIXERLINE_LINEF_SOURCE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment