[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 2 commits: build: Make alsadatadir configurable
Tanu Kaskinen
gitlab at gitlab.freedesktop.org
Mon Aug 10 11:31:51 UTC 2020
Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio
Commits:
b657cff4 by Jan Alexander Steffens (heftig) at 2020-08-09T01:57:01+00:00
build: Make alsadatadir configurable
Pipewire has started shipping copies of PulseAudio's ALSA card profiles.
It would be useful if both projects could share the same profiles and
this patch is a step toward that.
- - - - -
1ae8097b by Rosen Penev at 2020-08-10T10:56:40+00:00
modules: fix wrong formats under 32-bit
Signed-off-by: Rosen Penev <rosenp at gmail.com>
- - - - -
6 changed files:
- configure.ac
- meson.build
- meson_options.txt
- src/Makefile.am
- src/modules/module-loopback.c
- src/modules/raop/raop-client.c
Changes:
=====================================
configure.ac
=====================================
@@ -1511,6 +1511,13 @@ AC_ARG_WITH(
AC_SUBST(modlibexecdir)
AX_DEFINE_DIR(PA_DLSEARCHPATH, modlibexecdir, [Modules dir])
+AC_ARG_WITH(
+ [alsa-data-dir],
+ AS_HELP_STRING([--with-alsa-data-dir],[Directory for ALSA card profiles (defaults to ${datadir}/pulseaudio/alsa-mixer)]),
+ [alsadatadir=$withval], [alsadatadir="${datadir}/pulseaudio/alsa-mixer"])
+
+AC_SUBST(alsadatadir)
+
AC_ARG_WITH(
[udev-rules-dir],
AS_HELP_STRING([--with-udev-rules-dir],[Directory where to install udev rules to (defaults to /lib/udev/rules.d)]),
@@ -1656,6 +1663,7 @@ echo "
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
modlibexecdir: ${modlibexecdir}
+ alsadatadir: ${alsadatadir}
System Runtime Path: ${PA_SYSTEM_RUNTIME_PATH}
System State Path: ${PA_SYSTEM_STATE_PATH}
System Config Path: ${PA_SYSTEM_CONFIG_PATH}
=====================================
meson.build
=====================================
@@ -66,7 +66,11 @@ localedir = join_paths(prefix, get_option('localedir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
privlibdir = join_paths(libdir, 'pulseaudio')
-alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer')
+
+alsadatadir = get_option('alsadatadir')
+if alsadatadir == ''
+ alsadatadir = join_paths(datadir, 'pulseaudio', 'alsa-mixer')
+endif
pkgconfigdir = join_paths(libdir, 'pkgconfig')
pulselibexecdir = join_paths(libexecdir, 'pulse')
@@ -788,6 +792,7 @@ summary = [
'sysconfdir: @0@'.format(sysconfdir),
'localstatedir: @0@'.format(localstatedir),
'modlibexecdir: @0@'.format(modlibexecdir),
+ 'alsadatadir: @0@'.format(alsadatadir),
'System Runtime Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_RUNTIME_PATH')),
'System State Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_STATE_PATH')),
'System Config Path: @0@'.format(cdata.get_unquoted('PA_SYSTEM_CONFIG_PATH')),
=====================================
meson_options.txt
=====================================
@@ -51,6 +51,9 @@ option('pulsedsp-location',
option('modlibexecdir',
type : 'string',
description : 'Specify location where modules will be installed')
+option('alsadatadir',
+ type : 'string',
+ description : 'Directory for ALSA card profiles (defaults to ${datadir}/pulseaudio/alsa-mixer)')
option('systemduserunitdir',
type : 'string',
description : 'Directory for systemd user service files')
=====================================
src/Makefile.am
=====================================
@@ -28,8 +28,8 @@ if HAVE_X11
xdgautostartdir=$(sysconfdir)/xdg/autostart
endif
if HAVE_ALSA
-alsaprofilesetsdir=$(datadir)/pulseaudio/alsa-mixer/profile-sets
-alsapathsdir=$(datadir)/pulseaudio/alsa-mixer/paths
+alsaprofilesetsdir=$(alsadatadir)/profile-sets
+alsapathsdir=$(alsadatadir)/paths
endif
if HAVE_DBUS
dbuspolicydir=$(sysconfdir)/dbus-1/system.d
=====================================
src/modules/module-loopback.c
=====================================
@@ -401,7 +401,7 @@ static void adjust_rates(struct userdata *u) {
/* Drop or insert samples if fast_adjust_threshold_msec was specified and the latency difference is too large. */
if (u->fast_adjust_threshold > 0 && abs(latency_difference) > u->fast_adjust_threshold) {
- pa_log_debug ("Latency difference larger than %lu msec, skipping or inserting samples.", u->fast_adjust_threshold / PA_USEC_PER_MSEC);
+ pa_log_debug ("Latency difference larger than %" PRIu64 " msec, skipping or inserting samples.", u->fast_adjust_threshold / PA_USEC_PER_MSEC);
pa_asyncmsgq_send(u->sink_input->sink->asyncmsgq, PA_MSGOBJECT(u->sink_input), SINK_INPUT_MESSAGE_FAST_ADJUST, NULL, current_source_sink_latency, NULL);
@@ -539,13 +539,13 @@ static void memblockq_adjust(struct userdata *u, int64_t latency_offset_usec, bo
if (current_memblockq_length > requested_memblockq_length) {
/* Drop audio from queue */
buffer_correction = current_memblockq_length - requested_memblockq_length;
- pa_log_info("Dropping %lu usec of audio from queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
+ pa_log_info("Dropping %" PRIu64 " usec of audio from queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
pa_memblockq_drop(u->memblockq, buffer_correction);
} else if (current_memblockq_length < requested_memblockq_length && allow_push) {
/* Add silence to queue */
buffer_correction = requested_memblockq_length - current_memblockq_length;
- pa_log_info("Adding %lu usec of silence to queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
+ pa_log_info("Adding %" PRIu64 " usec of silence to queue", pa_bytes_to_usec(buffer_correction, &u->sink_input->sample_spec));
pa_memblockq_seek(u->memblockq, (int64_t)buffer_correction, PA_SEEK_RELATIVE, true);
}
}
=====================================
src/modules/raop/raop-client.c
=====================================
@@ -669,7 +669,7 @@ static size_t handle_udp_timing_packet(pa_raop_client *c, const uint8_t packet[]
payload = packet[1] ^ 0x80;
switch (payload) {
case PAYLOAD_TIMING_REQUEST:
- pa_log_debug("Sending timing packet at %lu", rci);
+ pa_log_debug("Sending timing packet at %" PRIu64 , rci);
written = send_udp_timing_packet(c, data, rci);
break;
case PAYLOAD_TIMING_REPLY:
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/af5ae60b333d743cff941620c51e3cb2a9aee64a...1ae8097b8b69c1ce6053c60e46f750e93f67c439
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/af5ae60b333d743cff941620c51e3cb2a9aee64a...1ae8097b8b69c1ce6053c60e46f750e93f67c439
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20200810/8dbfba76/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list