head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.8 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.6 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.4 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.2 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.2.0.8 pkgsrc-2009Q4-base:1.2 pkgsrc-2009Q3:1.2.0.6 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.4 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.2 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.1.0.2 pkgsrc-2008Q4-base:1.1; locks; strict; comment @# @; 1.3 date 2010.02.01.15.05.58; author jmcneill; state dead; branches; next 1.2; 1.2 date 2009.01.08.12.11.46; author dsainty; state Exp; branches; next 1.1; 1.1 date 2008.12.23.19.29.29; author jmcneill; state Exp; branches; next ; desc @@ 1.3 log @gc old patches, no longer necessary for pa 0.9.21 @ text @$NetBSD: patch-ak,v 1.2 2009/01/08 12:11:46 dsainty Exp $ --- src/modules/module-oss.c.orig 2008-09-04 09:13:43.000000000 +1200 +++ src/modules/module-oss.c 2009-01-08 20:55:21.000000000 +1300 @@@@ -71,6 +71,11 @@@@ #include #include +#if defined(__NetBSD__) && !defined(SNDCTL_DSP_GETODELAY) +#include +#include +#endif + #include "oss-util.h" #include "module-oss-symdef.h" @@@@ -399,13 +404,27 @@@@ if (u->use_getodelay) { int arg; - +#if defined(__NetBSD__) && !defined(SNDCTL_DSP_GETODELAY) +#if defined(AUDIO_GETBUFINFO) + struct audio_info info; + if (syscall(SYS_ioctl, u->fd, AUDIO_GETBUFINFO, &info) < 0) { + pa_log_info("Device doesn't support AUDIO_GETBUFINFO: %s", pa_cstrerror(errno)); + u->use_getodelay = 0; + } else { + arg = info.play.seek + info.blocksize / 2; + r = pa_bytes_to_usec((size_t) arg, &u->sink->sample_spec); + } +#else + pa_log_info("System doesn't support AUDIO_GETBUFINFO"); + u->use_getodelay = 0; +#endif +#else if (ioctl(u->fd, SNDCTL_DSP_GETODELAY, &arg) < 0) { pa_log_info("Device doesn't support SNDCTL_DSP_GETODELAY: %s", pa_cstrerror(errno)); u->use_getodelay = 0; } else r = pa_bytes_to_usec((size_t) arg, &u->sink->sample_spec); - +#endif } if (!u->use_getodelay && u->use_getospace) { @ 1.2 log @If the target NetBSD system is dated enough (E.g. 4.99.1), AUDIO_GETBUFINFO won't be available, and the previous version of this patch would not allow successful building. Change the code (in the OSS module) to check for a defined AUDIO_GETBUFINFO under NetBSD. If it isn't available, indicate that the system has no mechanism available. (May compromise on audio synchronisation on local OSS devices) Ok jmcneill@@ @ text @d1 1 a1 1 $NetBSD: patch-ak,v 1.1 2008/12/23 19:29:29 jmcneill Exp $ @ 1.1 log @Fix build on NetBSD 4.0. @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- src/modules/module-oss.c.orig 2008-12-23 13:12:54.000000000 -0500 +++ src/modules/module-oss.c 2008-12-23 13:28:40.000000000 -0500 d17 1 a17 1 @@@@ -399,13 +404,22 @@@@ static pa_usec_t io_sink_get_latency(str d23 1 d33 4 @