summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2015-12-21 04:10:35 +0100
committerArun Raghavan <git@arunraghavan.net>2016-01-22 13:25:29 +0530
commita1191874fe73e016cf292356e620ded59a7a9acf (patch)
tree986ab5365efbcb56255ee0c9c0fe6cc8cf12d956 /src/utils
parent68216e8ff804dcbf1f5aad07eeae86403324435c (diff)
solaris: Illumos does not ship with SOUND_PCM* functionality
Code reference: https://github.com/joyent/illumos-joyent/blob/master/usr/src/uts/common/sys/audio/audio_oss.h Add autoconf checks for: - SOUND_PCM_READ_RATE - SOUND_PCM_READ_CHANNELS - SOUND_PCM_READ_BITS Some platforms like SunOS (Illumos) may ship without SOUND_PCM_* functionality Thanks to Jonathan Perkin (Joyent) for Illumos code reference.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/padsp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index 5e336bb1d..943479b39 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -2278,6 +2278,7 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
break;
}
+#if HAVE_DECL_SOUND_PCM_READ_RATE
case SOUND_PCM_READ_RATE:
debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_RATE\n");
@@ -2285,7 +2286,9 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
*(int*) argp = i->sample_spec.rate;
pa_threaded_mainloop_unlock(i->mainloop);
break;
+#endif
+#if HAVE_DECL_SOUND_PCM_READ_CHANNELS
case SOUND_PCM_READ_CHANNELS:
debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_CHANNELS\n");
@@ -2293,7 +2296,9 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
*(int*) argp = i->sample_spec.channels;
pa_threaded_mainloop_unlock(i->mainloop);
break;
+#endif
+#if HAVE_DECL_SOUND_PCM_READ_BITS
case SOUND_PCM_READ_BITS:
debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_BITS\n");
@@ -2301,6 +2306,7 @@ static int dsp_ioctl(fd_info *i, unsigned long request, void*argp, int *_errno)
*(int*) argp = pa_sample_size(&i->sample_spec)*8;
pa_threaded_mainloop_unlock(i->mainloop);
break;
+#endif
case SNDCTL_DSP_GETOPTR: {
count_info *info;