diff options
Diffstat (limited to 'backends/alsa/alsa-constants.c')
-rw-r--r-- | backends/alsa/alsa-constants.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/backends/alsa/alsa-constants.c b/backends/alsa/alsa-constants.c index 853db95..c55fc6e 100644 --- a/backends/alsa/alsa-constants.c +++ b/backends/alsa/alsa-constants.c @@ -20,6 +20,7 @@ #include <alsa/asoundlib.h> #include <libmatemixer/matemixer.h> +#include "alsa-compat.h" #include "alsa-constants.h" /* @@ -228,9 +229,11 @@ const MateMixerChannelPosition alsa_channel_map_from[SND_MIXER_SCHN_LAST] = [SND_MIXER_SCHN_REAR_RIGHT] = MATE_MIXER_CHANNEL_BACK_RIGHT, [SND_MIXER_SCHN_FRONT_CENTER] = MATE_MIXER_CHANNEL_FRONT_CENTER, [SND_MIXER_SCHN_WOOFER] = MATE_MIXER_CHANNEL_LFE, +#if SND_LIB_VERSION >= ALSA_PACK_VERSION (1, 0, 10) [SND_MIXER_SCHN_SIDE_LEFT] = MATE_MIXER_CHANNEL_SIDE_LEFT, [SND_MIXER_SCHN_SIDE_RIGHT] = MATE_MIXER_CHANNEL_SIDE_RIGHT, [SND_MIXER_SCHN_REAR_CENTER] = MATE_MIXER_CHANNEL_BACK_CENTER +#endif }; const snd_mixer_selem_channel_id_t alsa_channel_map_to[MATE_MIXER_CHANNEL_MAX] = @@ -243,11 +246,17 @@ const snd_mixer_selem_channel_id_t alsa_channel_map_to[MATE_MIXER_CHANNEL_MAX] = [MATE_MIXER_CHANNEL_LFE] = SND_MIXER_SCHN_WOOFER, [MATE_MIXER_CHANNEL_BACK_LEFT] = SND_MIXER_SCHN_REAR_LEFT, [MATE_MIXER_CHANNEL_BACK_RIGHT] = SND_MIXER_SCHN_REAR_RIGHT, +#if SND_LIB_VERSION >= ALSA_PACK_VERSION (1, 0, 10) [MATE_MIXER_CHANNEL_BACK_CENTER] = SND_MIXER_SCHN_REAR_CENTER, - [MATE_MIXER_CHANNEL_FRONT_LEFT_CENTER] = SND_MIXER_SCHN_UNKNOWN, - [MATE_MIXER_CHANNEL_FRONT_RIGHT_CENTER] = SND_MIXER_SCHN_UNKNOWN, [MATE_MIXER_CHANNEL_SIDE_LEFT] = SND_MIXER_SCHN_SIDE_LEFT, [MATE_MIXER_CHANNEL_SIDE_RIGHT] = SND_MIXER_SCHN_SIDE_RIGHT, +#else + [MATE_MIXER_CHANNEL_BACK_CENTER] = SND_MIXER_SCHN_UNKNOWN, + [MATE_MIXER_CHANNEL_SIDE_LEFT] = SND_MIXER_SCHN_UNKNOWN, + [MATE_MIXER_CHANNEL_SIDE_RIGHT] = SND_MIXER_SCHN_UNKNOWN, +#endif + [MATE_MIXER_CHANNEL_FRONT_LEFT_CENTER] = SND_MIXER_SCHN_UNKNOWN, + [MATE_MIXER_CHANNEL_FRONT_RIGHT_CENTER] = SND_MIXER_SCHN_UNKNOWN, [MATE_MIXER_CHANNEL_TOP_FRONT_LEFT] = SND_MIXER_SCHN_UNKNOWN, [MATE_MIXER_CHANNEL_TOP_FRONT_RIGHT] = SND_MIXER_SCHN_UNKNOWN, [MATE_MIXER_CHANNEL_TOP_FRONT_CENTER] = SND_MIXER_SCHN_UNKNOWN, |