]> code.delx.au - pulseaudio/commitdiff
Add support for the poorly documented SNDCTL_DSP_GETTRIGGER.
authorPierre Ossman <ossman@cendio.se>
Mon, 4 Jun 2007 09:52:03 +0000 (09:52 +0000)
committerPierre Ossman <ossman@cendio.se>
Mon, 4 Jun 2007 09:52:03 +0000 (09:52 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1466 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/utils/padsp.c

index 955bd2f126fd0672a5ec34f70a5c4ffcd6ead23b..b9c26f09399e5c372180115abdf9f13589076e6e 100644 (file)
@@ -2061,6 +2061,17 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
                 *_errno = EIO;
             break;
 
+        case SNDCTL_DSP_GETTRIGGER:
+            debug(DEBUG_LEVEL_NORMAL, __FILE__": SNDCTL_DSP_GETTRIGGER\n");
+
+            *(int*) argp = 0;
+            if (!i->play_precork)
+                *(int*) argp |= PCM_ENABLE_OUTPUT;
+            if (!i->rec_precork)
+                *(int*) argp |= PCM_ENABLE_INPUT;
+
+            break;
+
         case SNDCTL_DSP_SETTRIGGER:
             debug(DEBUG_LEVEL_NORMAL, __FILE__": SNDCTL_DSP_SETTRIGGER: 0x%08x\n", *(int*) argp);