aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-12 14:34:13 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-12 14:34:13 +0200
commit9d79ba45c0630143b31d05f86ebe6d58e7c03ecf (patch)
treed1ee745b09d9f92e7dbcf391f947804df20d50d2
parentb9ddae02e8089320f26f7f89fc5fb3f53fb5ead4 (diff)
downloadhda-emu-9d79ba45c0630143b31d05f86ebe6d58e7c03ecf.tar.gz
Check the drop of hdac_io_ops
-rw-r--r--configure.ac20
-rw-r--r--hda-emu.c4
2 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4d6e564..a7b3705 100644
--- a/configure.ac
+++ b/configure.ac
@@ -636,4 +636,24 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING(for HDMI chmap helper)
+if test -f dist/sound/hda/hdmi_chmap.c; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_HDMI_CHMAP)
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(for HDMI chmap helper)
+HAVE_HDAC_IO_OPS=
+if grep -q 'struct hdac_io_ops' dist/include/sound/hdaudio.h; then
+ AC_MSG_RESULT(yes)
+ HAVE_HDAC_IO_OPS=1
+else
+ AC_MSG_RESULT(no)
+fi
+if test "$HAVE_HDAC_IO_OPS" = "1"; then
+ AC_DEFINE(HAVE_HDAC_IO_OPS)
+fi
+
AC_OUTPUT(Makefile lib/Makefile kernel/Makefile include/Makefile)
diff --git a/hda-emu.c b/hda-emu.c
index 3f0bad5..08a54c2 100644
--- a/hda-emu.c
+++ b/hda-emu.c
@@ -1559,7 +1559,11 @@ int main(int argc, char **argv)
#ifdef HAVE_BUS_OPS
err = snd_hda_bus_new(&card, &bus);
#else /* HAVE_BUS_OPS */
+#ifdef HAVE_HDAC_IO_OPS
err = snd_hdac_bus_init(&_bus.core, NULL, NULL, NULL);
+#else
+ err = snd_hdac_bus_init(&_bus.core, NULL, NULL);
+#endif
bus = &_bus;
bus->card = &card;
mutex_init(&bus->prepare_mutex);