diff --git a/src/lib/alsa/Format.hxx b/src/lib/alsa/Format.hxx index 0fa79e69f..145e4b3fc 100644 --- a/src/lib/alsa/Format.hxx +++ b/src/lib/alsa/Format.hxx @@ -28,6 +28,16 @@ #include +#if SND_LIB_VERSION >= 0x1001c +/* alsa-lib supports DSD since version 1.0.27.1 */ +#define HAVE_ALSA_DSD +#endif + +#if SND_LIB_VERSION >= 0x1001d +/* alsa-lib supports DSD_U32 since version 1.0.29 */ +#define HAVE_ALSA_DSD_U32 +#endif + /** * Convert MPD's #SampleFormat enum to libasound's snd_pcm_format_t * enum. Returns SND_PCM_FORMAT_UNKNOWN if there is no according ALSA diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index ad9bf7599..3a20ec884 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -44,16 +44,6 @@ #include -#if SND_LIB_VERSION >= 0x1001c -/* alsa-lib supports DSD since version 1.0.27.1 */ -#define HAVE_ALSA_DSD -#endif - -#if SND_LIB_VERSION >= 0x1001d -/* alsa-lib supports DSD_U32 since version 1.0.29 */ -#define HAVE_ALSA_DSD_U32 -#endif - static const char default_device[] = "default"; static constexpr unsigned MPD_ALSA_BUFFER_TIME_US = 500000;