From 343f85ea66c48285aba21ed48c7db51d942029f3 Mon Sep 17 00:00:00 2001 From: Jeff Cook <jeff@deserettechnology.com> Date: Mon, 2 Aug 2010 17:49:16 -0600 Subject: [PATCH] winealsa.drv: If we can't open a device as stereo, try mono. This is necessary for snd-usb-audio mics. --- dlls/winealsa.drv/waveinit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/winealsa.drv/waveinit.c b/dlls/winealsa.drv/waveinit.c index 4da53c9b094..4ae93bb0124 100644 --- a/dlls/winealsa.drv/waveinit.c +++ b/dlls/winealsa.drv/waveinit.c @@ -105,6 +105,10 @@ static int ALSA_TestDeviceForWine(int card, int device, snd_pcm_stream_t stream /* set the count of channels */ retcode = snd_pcm_hw_params_set_channels(pcm, hwparams, 2); if (retcode < 0) + { + retcode = snd_pcm_hw_params_set_channels(pcm, hwparams, 1); /* If we can't open stereo, try mono; this is vital for snd_usb_audio microphones */ + } + if (retcode < 0) { reason = "Could not set channels"; goto exit; -- GitLab