From 3b322323d036ae2fc9f685bfc74d1ebcd5532159 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Fri, 27 Nov 2015 14:36:50 +0100 Subject: alsa: Relax ALSA version checks for 1.1.x to be detected. Relax the check for SND_LIB_MINOR and SND_LIB_SUBMINOR so that ALSA 1.1.x is not considered older than 1.0.10. QtMultimedia builds fine with ALSA 1.1. Change-Id: If697c34cc7d9bbe2f2a3413d0c25ac4de4e93b34 Reviewed-by: Christian Stromme --- src/plugins/alsa/qalsaaudiodeviceinfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/alsa/qalsaaudiodeviceinfo.cpp') diff --git a/src/plugins/alsa/qalsaaudiodeviceinfo.cpp b/src/plugins/alsa/qalsaaudiodeviceinfo.cpp index be90ca666..3d310871f 100644 --- a/src/plugins/alsa/qalsaaudiodeviceinfo.cpp +++ b/src/plugins/alsa/qalsaaudiodeviceinfo.cpp @@ -141,7 +141,7 @@ bool QAlsaAudioDeviceInfo::open() QList devices = availableDevices(mode); if(dev.compare(QLatin1String("default")) == 0) { -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) +#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) if (devices.size() > 0) dev = QLatin1String(devices.first().constData()); else @@ -150,7 +150,7 @@ bool QAlsaAudioDeviceInfo::open() dev = QLatin1String("hw:0,0"); #endif } else { -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) +#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) dev = device; #else int idx = 0; @@ -194,7 +194,7 @@ bool QAlsaAudioDeviceInfo::testSettings(const QAudioFormat& format) const snd_pcm_hw_params_t *params; QString dev; -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) +#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) dev = device; if (dev.compare(QLatin1String("default")) == 0) { QList devices = availableDevices(QAudio::AudioOutput); @@ -335,7 +335,7 @@ QList QAlsaAudioDeviceInfo::availableDevices(QAudio::Mode mode) QList devices; QByteArray filter; -#if(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 14) +#if (SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 14)) // Create a list of all current audio devices that support mode void **hints, **n; char *name, *descr, *io; -- cgit v1.2.3