Index: branches/2016Q4/audio/pulseaudio/Makefile =================================================================== --- branches/2016Q4/audio/pulseaudio/Makefile (revision 425859) +++ branches/2016Q4/audio/pulseaudio/Makefile (revision 425860) @@ -1,97 +1,98 @@ # Created by: Joe Marcus Clarke # $FreeBSD$ # # !!!NOTE!!! Any PORTVERSION update to this port must be accompanied by # PORTREVISION bumps of depending ports. PORTNAME= pulseaudio PORTVERSION= 8.0 +PORTREVISION= 2 CATEGORIES= audio MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/ MAINTAINER= gnome@FreeBSD.org COMMENT= Sound server for UNIX LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/LGPL LIB_DEPENDS= libsndfile.so:audio/libsndfile \ libspeexdsp.so:audio/speexdsp \ libfftw3.so:math/fftw3 \ libfftw3f.so:math/fftw3-float \ liborc-0.4.so:devel/orc \ libjson-c.so:devel/json-c \ libdbus-1.so:devel/dbus \ libltdl.so:devel/libltdl \ libck-connector.so:sysutils/consolekit USE_GNOME= glib20 intltool USE_XORG= x11 sm xtst ice USE_LDCONFIG= yes USES= cpe compiler:c11 execinfo gettext gmake gnome libtool \ pathfix pkgconfig shebangfix tar:xz GNU_CONFIGURE= yes CONFIGURE_ENV= PTHREAD_LIBS="-lpthread" \ OPENSSL_CFLAGS="-I/usr/include" \ OPENSSL_LIBS="-lcrypto -lssl" \ LIBS="-lm -lintl" \ ac_cv_header_linux_input_h="" CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib INSTALL_TARGET= install-strip SHEBANG_FILES= shell-completion/bash/pulseaudio bash_CMD= ${SETENV} bash SUB_FILES= pkg-message CONFIGURE_ARGS= --localstatedir=/var \ --with-database=simple \ --without-caps \ --disable-udev \ --disable-gtk3 \ --disable-systemd \ --disable-neon-opt \ --disable-xen \ --disable-lirc # untested #FIXME --with-database=auto|tdb|gdbm|simple USERS= pulse GROUPS= pulse pulse-access pulse-rt OPTIONS_SUB= yes OPTIONS_DEFINE= JACK AVAHI GCONF ALSA SIMD BASH ZSH OPTIONS_DEFAULT=AVAHI SIMD JACK_CONFIGURE_ENABLE= jack JACK_LIB_DEPENDS= libjack.so:audio/jack AVAHI_CONFIGURE_ENABLE= avahi AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app GCONF_CONFIGURE_ENABLE= gconf GCONF_USE= GNOME=gconf2 ALSA_CONFIGURE_ENABLE= alsa ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib SIMD_CONFIGURE_ENABLE= orc SIMD_LIB_DEPENDS= liborc-0.4.so:devel/orc ZSH_CONFIGURE_OFF= --without-zsh-completion-dir PULSE_VERSION= ${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} PLIST_SUB= PULSE_VERSION=${PULSE_VERSION} post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/src/daemon/default.pa.in @${REINPLACE_CMD} -e 's|-Wmissing-include-dirs||g' \ -e 's|/lib/dbus/machine-id|/db/dbus/machine-id|g' \ ${WRKSRC}/configure post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/pulse .for ii in default.pa daemon.conf client.conf system.pa ${INSTALL_DATA} ${WRKSRC}/src/${ii} \ ${STAGEDIR}${PREFIX}/etc/pulse/${ii}.sample .endfor post-install-BASH-off: @${RM} -rf ${STAGEDIR}${PREFIX}/share/bash-completion .include Index: branches/2016Q4/audio/pulseaudio/files/patch-src_modules_module-detect.c =================================================================== --- branches/2016Q4/audio/pulseaudio/files/patch-src_modules_module-detect.c (revision 425859) +++ branches/2016Q4/audio/pulseaudio/files/patch-src_modules_module-detect.c (revision 425860) @@ -1,22 +1,61 @@ --- src/modules/module-detect.c.orig 2015-09-10 04:51:41 UTC +++ src/modules/module-detect.c @@ -46,7 +46,9 @@ PA_MODULE_DESCRIPTION("Detect available PA_MODULE_VERSION(PACKAGE_VERSION); PA_MODULE_LOAD_ONCE(true); PA_MODULE_USAGE("just-one="); +#ifdef __linux__ PA_MODULE_DEPRECATED("Please use module-udev-detect instead of module-detect!"); +#endif static const char* const valid_modargs[] = { "just-one", -@@ -157,8 +159,7 @@ static int detect_oss(pa_core *c, int ju +@@ -157,11 +159,45 @@ static int detect_oss(pa_core *c, int ju continue; } else if (sscanf(line, "pcm%u: ", &device) == 1) { - /* FreeBSD support, the devices are named /dev/dsp0.0, dsp0.1 and so on */ - pa_snprintf(args, sizeof(args), "device=/dev/dsp%u.0", device); + pa_snprintf(args, sizeof(args), "device=/dev/dsp%u", device); ++ pa_module *m = pa_module_load(c, "module-oss", args); - if (!pa_module_load(c, "module-oss", args)) +- if (!pa_module_load(c, "module-oss", args)) ++ if (!m) ++ continue; ++ ++ if (!pa_endswith(line, "default")) continue; ++ ++ const char *p = strrchr(line, '('); ++ ++ if (!p) ++ continue; ++ ++ if (!c->default_sink && (strstr(p, "play") || (strstr(p, "p:") && !strstr(p, "(0p:")))) { ++ uint32_t idx = PA_IDXSET_INVALID; ++ pa_sink *s; ++ PA_IDXSET_FOREACH(s, c->sinks, idx) { ++ if (s->module == m) { ++ if (!pa_namereg_set_default_sink(c, s)) ++ pa_log_error("failed to set default sink for device: /dev/dsp%u", device); ++ ++ break; ++ } ++ } ++ } ++ ++ if (!c->default_source && (strstr(p, "rec") || (strstr(p, "r:") && !strstr(p, "/0r:")))) { ++ uint32_t idx = PA_IDXSET_INVALID; ++ pa_source *s; ++ PA_IDXSET_FOREACH(s, c->sources, idx) { ++ if (s->module == m) { ++ if (!pa_namereg_set_default_source(c, s)) ++ pa_log_error("failed to set default source for device: /dev/dsp%u", device); ++ ++ break; ++ } ++ } ++ } + } + + n++; Index: branches/2016Q4/audio/pulseaudio/files/pkg-message.in =================================================================== --- branches/2016Q4/audio/pulseaudio/files/pkg-message.in (revision 425859) +++ branches/2016Q4/audio/pulseaudio/files/pkg-message.in (revision 425860) @@ -1,18 +1,20 @@ +Pulseaudio tries to determine default values for FreeBSD OSS driver at first +start, based on /dev/sndstat output. The hw.snd.default_unit sysctl may affect +these values, but restart of the Pulseaudio might be needed to rescan it again, +e.g. `pacmd exit`. -Pulseaudio doesn't know about the hw.snd.default_unit=3 sysctl for the -FreeBSD OSS driver that is used to select the active input/output. So -for Pulseaudio we also need to tell it which input/output to use. The -difference is that Pulseaudio has separate input and output configure lines. +Pulseaudio has separate input and output configure lines. You can change them +with using following commands: To change the default sink (output): # pacmd set-default-sink 3 To change the default source (input): # pacmd set-default-source 3 This can also be set in %%PREFIX%%/etc/pulse/default.pa -Replace the number '3' with the new default your want to set. +Replace the number '3' with the new default you want to set. The audio/freedesktop-sound-theme is needed if the default sound files are uncommented in the %%PREFIX%%/etc/pulse/default.pa file. Index: branches/2016Q4 =================================================================== --- branches/2016Q4 (revision 425859) +++ branches/2016Q4 (revision 425860) Property changes on: branches/2016Q4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r425809,425812