]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aplay: allow to compile with older alsa-lib (subformat)
authorJaroslav Kysela <perex@perex.cz>
Tue, 12 Dec 2023 12:47:03 +0000 (13:47 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 12 Dec 2023 12:47:03 +0000 (13:47 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
aplay/aplay.c

index 03443df52d33b55209c8e2b4515f7074efdbece5..fc4bac697226c48fc8168512a3dc1b1421ddd85a 100644 (file)
@@ -641,8 +641,12 @@ int main(int argc, char *argv[])
                        }
                        break;
                case OPT_SUBFORMAT:
+#if SND_LIB_VER(1, 2, 10) < SND_LIB_VERSION
                        rhwparams.subformat = snd_pcm_subformat_value(optarg);
                        if (rhwparams.subformat == SND_PCM_SUBFORMAT_UNKNOWN) {
+#else
+                       if (strcasecmp(optarg, "std") != 0 && strcasecmp(optarg, "standard") != 0) {
+#endif
                                error(_("wrong extended subformat '%s'"), optarg);
                                prg_exit(EXIT_FAILURE);
                        }