add sndio driver

Index: platform/linuxbsd/detect.py
--- platform/linuxbsd/detect.py.orig
+++ platform/linuxbsd/detect.py
@@ -42,6 +42,7 @@ def get_opts():
         BoolVariable("use_sowrap", "Dynamically load system libraries", True),
         BoolVariable("alsa", "Use ALSA", True),
         BoolVariable("pulseaudio", "Use PulseAudio", True),
+        BoolVariable("sndio", "Detect and use sndio", True),
         BoolVariable("dbus", "Use D-Bus to handle screensaver and portal desktop settings", True),
         BoolVariable("speechd", "Use Speech Dispatcher for Text-to-Speech support", True),
         BoolVariable("fontconfig", "Use fontconfig for system fonts support", True),
@@ -348,6 +349,12 @@ def configure(env: "SConsEnvironment"):
                 env["pulseaudio"] = False
         else:
             env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED", "_REENTRANT"])
+
+    if env["sndio"]:
+            if os.system("pkg-config --exists sndio") == 0:  # 0 means found
+                print("Enabling sndio")
+                env.Append(CPPDEFINES=["SNDIO_ENABLED"])
+                env.ParseConfig("pkg-config --cflags --libs sndio")
 
     if env["dbus"] and env["threads"]:  # D-Bus functionality expects threads.
         if not env["use_sowrap"]:
