SGT. Garcia | 30 Oct 20:43 2014
Picon

raop on gentoo+systemd

hello,
i've got an airport express and i would like to use it as an output sound
device on this linux box. i read somewhere that pa would do this using its
raop module. i have added these lines in /etc/pulse/system.pa:

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1/32
#load-module module-raop-discover
load-module module-raop-sink server=192.168.1.218

pa doesn't have avahi support btw.

now when i switch the sink to raop, mpv (mplayer clone) plays back
video in a funny way and there is no sound.
now questions:
- how do i go about fixing this?
- what config/logs do you i need to post here?
- can i use aplay to test raop to see if the problem is really with pa and
  not mpv?

thanks,
SGT. Garcia
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Ibrar Ahmed | 29 Oct 12:28 2014
Picon

Controlling the PulseAudio Read Call back.

I am writing an audio program using PulseAudio. I have registered a call back function to read the data from the mid

pa_stream_set_read_callback (stream, RadCB, userdata)

The questions are

1 - How to control the occurrence of the ReadCB call back, don't want to much calling of this. 
2 - Is these startling effects the callback?


--Ibrar
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Peter Meerwald | 28 Oct 20:46 2014
Picon

[PATCH RFCv2 00/27] memory optimizations

this patch series aims to save memory allocations and some system calls
related to PA's client/server protocol implementation

v2 incorporates David's and Alexander's suggestions; no functional change to
the first 17 patches; v2 then adds some cleanup and two optimizations

patches 1 to 5 ('tagstruct:') introduce a new tagstruct type _APPENDED
which can hold tagstruct data up to a certain size; tagstructs are now 
kept in a specific free-list -- this typically replaces two malloc()/free()s
with one flist push()/pop()

patches 6 to 8 ('packet:') make packets fixed-size (typically); packets are
kept in a specific free-list -- this replaces one malloc()/free() with one
flist push()/pop()

patches 9 to 14 ('pstream:') allows to send tagstructs directly to a pstream
without encapsulation in a packet -- this saves one flist push()/pop()

patches 15 and 16 ('pstream') often save a read() call by reading more than
just the descriptor (up to 40 bytes, e.g. description (20 bytes) + shm
info (16 bytes)); the idea is similar to b4342845d, "Optimize write 
of smaller packages", but for read -- this trades some extra memcpy() for
a read()

patch 17 ('iochannel') fixes a strange behaviour in iochannel/mainloop that
deleted the input_event with every read which caused a rebuild of the pollfds
for every read()!

v2 material:

patches 18 to 20 ('queue', 'pstream') aim to combine two write items into one
minibuffer by peeking ahead in the send queue

patch 21 inlines pa_run_once() as this function came out high in profiling

patch 25 ('mainloop') only clears the wakeup pipe when poll() indicates that
the pipe is readable; if the only ready file descriptor is the wakeup pipe,
searching io_events can be avoided

patch 26 and 27 ('flish') removes the volatile annotation and makes flist_elem attributes
non-atomic -- needed?

with these patches typical playback (i.e. after setup) runs without any malloc()/free()
thanks to the use of free-lists; the number of memory management operations is reduced

no benchmarking yet, on i7 64-bit 'paplay --latency-msec=10 48KHz.wav" improved from
around 12% CPU to around 10% CPU for me; I plan to benchmark this on ARM soonish

Peter Meerwald (27):
  tagstruct: Distinguish pa_tagstruct_new() use cases
  tagstruct: Replace dynamic flag with type
  tagstruct: Get rid of pa_tagstruct_free_data()
  tagstruct: Add type _APPENDED
  tagstruct: Use flist to potentially save calls to malloc()/free()
  packet: Hide internals of pa_packet, introduce pa_packet_data()
  packet: Make pa_packet_new() create fixed-size packets
  packet: Introduce pa_packet_new_data() to copy data into a newly
    created packet
  packet: Use flist to save calls to malloc()/free()
  pstream: Unionize item_info
  pstream: Add pa_pstream_send_tagstruct()
  pstream: #define PA_PSTREAM_SHM_SIZE
  pstream: Duplicate assignment, write.data is always NULL
  pstream: Only reset memchunk if it has been used
  pstream: Split up do_read()
  pstream: Use small minibuffer to combine several read()s if possible
  iochannel: Fix channel enable
  queue: Add pa_queue_peek() function
  pstream: Add helper functions reset_descriptor(), shm_descriptor()
  pstream: Peek into next item on send queue to see if it can be put
    into minibuffer together with current item
  once: Inline functions
  rtpoll: typo
  rtpoll: Fix condition for DEBUG_TIMING output
  rtpoll: Drop extra wait_op argument to pa_rtpoll_run()
  mainloop: Clear wakeup pipe only when necessary
  flist: Don't use atomic operations to manipulate ptr, next
  flist: Don't make flist volatile

 src/modules/alsa/alsa-sink.c                 |   2 +-
 src/modules/alsa/alsa-source.c               |   2 +-
 src/modules/module-card-restore.c            |   4 +-
 src/modules/module-combine-sink.c            |   2 +-
 src/modules/module-device-manager.c          |  12 +-
 src/modules/module-device-restore.c          |  16 +-
 src/modules/module-esound-sink.c             |   2 +-
 src/modules/module-null-sink.c               |   2 +-
 src/modules/module-null-source.c             |   2 +-
 src/modules/module-pipe-sink.c               |   2 +-
 src/modules/module-pipe-source.c             |   2 +-
 src/modules/module-sine-source.c             |   2 +-
 src/modules/module-stream-restore.c          |  12 +-
 src/modules/module-tunnel.c                  |  54 +-
 src/modules/oss/module-oss.c                 |   2 +-
 src/modules/raop/module-raop-sink.c          |   2 +-
 src/pulse/context.c                          |  26 +-
 src/pulse/ext-device-manager.c               |  14 +-
 src/pulse/ext-device-restore.c               |  10 +-
 src/pulse/ext-stream-restore.c               |  10 +-
 src/pulse/introspect.c                       |  82 +--
 src/pulse/mainloop.c                         |  24 +-
 src/pulse/scache.c                           |  10 +-
 src/pulse/stream.c                           |  22 +-
 src/pulse/subscribe.c                        |   2 +-
 src/pulsecore/flist.c                        |  14 +-
 src/pulsecore/flist.h                        |   2 +-
 src/pulsecore/iochannel.c                    |  35 +-
 src/pulsecore/once.c                         |  18 +-
 src/pulsecore/once.h                         |  27 +-
 src/pulsecore/packet.c                       |  55 +-
 src/pulsecore/packet.h                       |  20 +-
 src/pulsecore/pdispatch.c                    |   9 +-
 src/pulsecore/protocol-native.c              |  94 ++--
 src/pulsecore/pstream-util.c                 |  33 +-
 src/pulsecore/pstream-util.h                 |   2 -
 src/pulsecore/pstream.c                      | 728 +++++++++++++++++----------
 src/pulsecore/pstream.h                      |   2 +
 src/pulsecore/queue.c                        |  11 +
 src/pulsecore/queue.h                        |   3 +
 src/pulsecore/rtpoll.c                       |  14 +-
 src/pulsecore/rtpoll.h                       |   7 +-
 src/pulsecore/tagstruct.c                    |  67 ++-
 src/pulsecore/tagstruct.h                    |   4 +-
 src/tests/rtpoll-test.c                      |   4 +-
 src/tests/srbchannel-test.c                  |  21 +-
 47 files changed, 919 insertions(+), 616 deletions(-)

--

-- 
1.9.1

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Andrej Šimko | 28 Oct 10:39 2014
Picon

Pulseaudio sound quality problem on ARM

Hello everybody,

we have problem with quality of sound with pulseaudio used with
freeswitch with portaudio modul, which gets worse(crackling) after
random time (couple of hours). When we restart pulseaudio with our own
script (in attachment pulseaudio-restart and pulseaudio-restore)
everything gets back to normal. Everything is running on gentoo and
installed like this:
[I] media-sound/pulseaudio
     Available versions:  [M]2.1-r1 [M]4.0 5.0-r2 (~)5.0-r3 {+X +alsa
+asyncns avahi bluetooth +caps dbus doc equalizer +gdbm +glib gnome gtk
ipv6 jack libsamplerate lirc neon +orc oss qt4 realtime ssl system-wide
systemd tcpd test +udev +webrtc-aec xen zeroconf ABI_MIPS="n32 n64 o32"
ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  5.0-r3(11:07:32 AM 10/21/2014)(X alsa asyncns
bluetooth caps dbus equalizer gdbm glib gnome libsamplerate neon qt4
realtime ssl tcpd udev webrtc-aec -doc -gtk -ipv6 -jack -lirc -orc -oss
-system-wide -systemd -test -xen -zeroconf ABI_MIPS="-n32 -n64 -o32"
ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="-32 -64 -x32")
     Homepage:            http://www.pulseaudio.org/
     Description:         A networked sound server with an advanced
plugin system

Our hardware: Olimex A20
Cpu info:
Processor    : ARMv7 Processor rev 4 (v7l)
processor    : 0
BogoMIPS    : 954.36

processor    : 1
BogoMIPS    : 957.64

Features    : swp half thumb fastmult vfp edsp neon vfpv3 tls vfpv4
idiva idivt
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x0
CPU part    : 0xc07
CPU revision    : 4

Hardware    : sun7i
Revision    : 0000
Serial        : 0000000000000000

/etc/pulseaudio/daemon.conf ... in attachment
/etc/pulse/default.pa  ... in attachment
users .pulse/default.pa ... in attachment
pacmd info output ... in attachment

We tried, to change aec method from speex to webrtc, only difference is,
that cpu "eats" 5% less with speex. We tried also tsched=0, but it gets
worse ...
Does anybody know how to solve this and have clear sound all the time?
Problem is with pulseaudio, that we know for sure, we have the same
exactly setup on 6 pc's in different locations.

Thank you!
Andrej
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

; daemonize = no
; fail = yes
; allow-module-loading = yes
; allow-exit = yes
; use-pid-file = yes
; system-instance = no
; local-server-type = user
; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
; lock-memory = no
; cpu-limit = no

high-priority = yes
nice-level = -11

; realtime-scheduling = yes
; realtime-priority = 5

; exit-idle-time = 20
; scache-idle-time = 20

; dl-search-path = (depends on architecture)

; load-default-script-file = yes
; default-script-file = /etc/pulse/default.pa

; log-target = auto
; log-level = notice
; log-meta = no
; log-time = no
; log-backtrace = 0

resample-method = trivial

; resample-method = speex-float-1
; enable-remixing = yes
; enable-lfe-remixing = no

; flat-volumes = yes

; rlimit-fsize = -1
; rlimit-data = -1
; rlimit-stack = -1
; rlimit-core = -1
; rlimit-as = -1
; rlimit-rss = -1
; rlimit-nproc = -1
; rlimit-nofile = 256
; rlimit-memlock = -1
; rlimit-locks = -1
; rlimit-sigpending = -1
; rlimit-msgqueue = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; rlimit-rttime = 1000000

; default-sample-format = s16le
default-sample-rate = 32000
; alternate-sample-rate = 48000
; default-sample-channels = 2
; default-channel-map = front-left,front-right

; default-fragments = 4
; default-fragment-size-msec = 25

; enable-deferred-volume = yes
; deferred-volume-safety-margin-usec = 8000
; deferred-volume-extra-delay-usec = 0
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.nofail

### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Should be after module-*-restore but before module-*-detect
load-module module-switch-on-port-available

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect channels=2
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100
sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply

# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.

### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system

### Register ourselves in the X11 session manager
#load-module module-x11-xsmp

### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif

### Make some devices default
#set-default-sink output
#set-default-source input
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.

# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)

.nofail

### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav

.fail

### Automatically restore the volume of streams and devices
load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore

### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties

### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev/hal support)
load-module module-detect
.endif

### Automatically connect sink and source if JACK server is present
.ifexists module-jackdbus-detect.so
.nofail
load-module module-jackdbus-detect
.fail
.endif

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv

### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100
sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor

### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif

### Automatically restore the default sink/source when changed by the user
### during runtime
### NOTE: This should be loaded as early as possible so that subsequent modules
### that look up the default sink/source get the right value
load-module module-default-device-restore

### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams

### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink

### Honour intended role device property
load-module module-intended-roles

### Automatically suspend sinks/sources that become idle for too long
# load-module module-suspend-on-idle

### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif

### Enable positioned event sounds
load-module module-position-event-sounds

### Cork music/video streams when a phone stream is active
load-module module-role-cork

### Modules to allow autoloading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-echo-cancel rate=32000 aec_method=webrtc

### Load DBus protocol
.ifexists module-dbus-protocol.so
load-module module-dbus-protocol
.endif

# X11 modules should not be started from default.pa so that one daemon
# can be shared by multiple sessions.

### Load X11 bell module
#load-module module-x11-bell sample=bell-windowing-system

### Register ourselves in the X11 session manager
#load-module module-x11-xsmp

### Publish connection data in the X11 root window
#.ifexists module-x11-publish.so
#.nofail
#load-module module-x11-publish
#.fail
#.endif

load-module module-switch-on-port-available

### Make some devices default
#set-default-sink output
#set-default-source input
Attachment (pacmd.info): application/x-info, 24 KiB
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Tanu Kaskinen | 27 Oct 12:20 2014
Picon

[PATCH] alsa-mixer: Merge analog-output-desktop-speaker with analog-output-speaker(-always)

According to David[1], it's unlikely that there are any sound cards
that would have separate "speaker" and "desktop speaker" paths, so
let's remove the unnecessary distinction.

[1] http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/20915/focus=21193
---
 src/Makefile.am                                    |   1 -
 .../mixer/paths/analog-output-desktop-speaker.conf | 102 ---------------------
 .../mixer/paths/analog-output-speaker-always.conf  |   7 +-
 .../alsa/mixer/paths/analog-output-speaker.conf    |   7 +-
 src/modules/alsa/mixer/profile-sets/default.conf   |  16 ++--
 .../profile-sets/force-speaker-and-int-mic.conf    |  16 ++--
 .../alsa/mixer/profile-sets/force-speaker.conf     |  16 ++--
 7 files changed, 34 insertions(+), 131 deletions(-)
 delete mode 100644 src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf

diff --git a/src/Makefile.am b/src/Makefile.am
index 8d49af3..4219ece 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
 <at>  <at>  -1270,7 +1270,6  <at>  <at>  dist_alsapaths_DATA = \
 		modules/alsa/mixer/paths/analog-output-speaker.conf \
 		modules/alsa/mixer/paths/analog-output-speaker-always.conf \
 		modules/alsa/mixer/paths/analog-output.conf.common \
-		modules/alsa/mixer/paths/analog-output-desktop-speaker.conf \
 		modules/alsa/mixer/paths/analog-output-headphones.conf \
 		modules/alsa/mixer/paths/analog-output-headphones-2.conf \
 		modules/alsa/mixer/paths/analog-output-lineout.conf \
diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
deleted file mode 100644
index 2b68117..0000000
--- a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
+++ /dev/null
 <at>  <at>  -1,102 +0,0  <at>  <at> 
-# This file is part of PulseAudio.
-#
-# PulseAudio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as
-# published by the Free Software Foundation; either version 2.1 of the
-# License, or (at your option) any later version.
-#
-# PulseAudio is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with PulseAudio; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-
-; Path for mixers that have a 'Desktop Speaker' control
-;
-; See analog-output.conf.common for an explanation on the directives
-
-[General]
-priority = 101
-description-key = analog-output-speaker
-
-[Properties]
-device.icon_name = audio-speakers
-
-[Element Hardware Master]
-switch = mute
-volume = merge
-override-map.1 = all
-override-map.2 = all-left,all-right
-
-[Element Master]
-switch = mute
-volume = merge
-override-map.1 = all
-override-map.2 = all-left,all-right
-
-[Element Master Mono]
-switch = off
-volume = off
-
-; This profile path is intended to control the desktop speaker, not
-; the headphones. But it should not hurt if we leave the headphone
-; jack enabled nonetheless.
-[Element Headphone]
-switch = mute
-volume = zero
-
-[Element Headphone2]
-switch = mute
-volume = zero
-
-[Element Speaker]
-switch = off
-volume = off
-
-[Element Desktop Speaker]
-required = any
-switch = mute
-volume = merge
-override-map.1 = all
-override-map.2 = all-left,all-right
-
-[Element Front]
-switch = mute
-volume = merge
-override-map.1 = all-front
-override-map.2 = front-left,front-right
-
-[Element Rear]
-switch = mute
-volume = merge
-override-map.1 = all-rear
-override-map.2 = rear-left,rear-right
-
-[Element Surround]
-switch = mute
-volume = merge
-override-map.1 = all-rear
-override-map.2 = rear-left,rear-right
-
-[Element Side]
-switch = mute
-volume = merge
-override-map.1 = all-side
-override-map.2 = side-left,side-right
-
-[Element Center]
-switch = mute
-volume = merge
-override-map.1 = all-center
-override-map.2 = all-center,all-center
-
-[Element LFE]
-switch = mute
-volume = merge
-override-map.1 = lfe
-override-map.2 = lfe,lfe
-
-.include analog-output.conf.common
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
index c511813..9a74068 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker-always.conf
 <at>  <at>  -68,8 +68,11  <at>  <at>  override-map.1 = all
 override-map.2 = all-left,all-right

 [Element Desktop Speaker]
-switch = off
-volume = off
+required = any
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right

 [Element Front]
 switch = mute
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
index f708e61..d3baf81 100644
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
 <at>  <at>  -81,8 +81,11  <at>  <at>  override-map.1 = all
 override-map.2 = all-left,all-right

 [Element Desktop Speaker]
-switch = off
-volume = off
+required = any
+switch = mute
+volume = merge
+override-map.1 = all
+override-map.2 = all-left,all-right

 [Element Front]
 switch = mute
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
index d0b2d48..2d2ced7 100644
--- a/src/modules/alsa/mixer/profile-sets/default.conf
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
 <at>  <at>  -105,49 +105,49  <at>  <at>  auto-profiles = yes
 [Mapping analog-mono]
 device-strings = hw:%f
 channel-map = mono
-paths-output = analog-output analog-output-lineout analog-output-speaker
analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker
analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic
analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux
analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic
 priority = 2

 [Mapping analog-stereo]
 device-strings = front:%f hw:%f
 channel-map = left,right
-paths-output = analog-output analog-output-lineout analog-output-speaker
analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2
+paths-output = analog-output analog-output-lineout analog-output-speaker
analog-output-headphones analog-output-headphones-2
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic
analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux
analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
analog-input-headphone-mic analog-input-headset-mic
 priority = 10

 [Mapping analog-surround-21]
 device-strings = surround21:%f
 channel-map = front-left,front-right,lfe
-paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-speaker
 priority = 8
 direction = output

 [Mapping analog-surround-40]
 device-strings = surround40:%f
 channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 7
 direction = output

 [Mapping analog-surround-41]
 device-strings = surround41:%f
 channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 8
 direction = output

 [Mapping analog-surround-50]
 device-strings = surround50:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 7
 direction = output

 [Mapping analog-surround-51]
 device-strings = surround51:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 8
 direction = output

 <at>  <at>  -155,7 +155,7  <at>  <at>  direction = output
 device-strings = surround71:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 description = Analog Surround 7.1
-paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker
 priority = 7
 direction = output

diff --git a/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf b/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
index f94a11d..b9bb44f 100644
--- a/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
+++ b/src/modules/alsa/mixer/profile-sets/force-speaker-and-int-mic.conf
 <at>  <at>  -24,49 +24,49  <at>  <at>  auto-profiles = yes
 [Mapping analog-mono]
 device-strings = hw:%f
 channel-map = mono
-paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic-always
analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux
analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 1

 [Mapping analog-stereo]
 device-strings = front:%f hw:%f
 channel-map = left,right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic-always
analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux
analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 10

 [Mapping analog-surround-21]
 device-strings = surround21:%f
 channel-map = front-left,front-right,lfe
-paths-output = analog-output analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-speaker-always
 priority = 8
 direction = output

 [Mapping analog-surround-40]
 device-strings = surround40:%f
 channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output

 [Mapping analog-surround-41]
 device-strings = surround41:%f
 channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output

 [Mapping analog-surround-50]
 device-strings = surround50:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output

 [Mapping analog-surround-51]
 device-strings = surround51:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output

 <at>  <at>  -74,7 +74,7  <at>  <at>  direction = output
 device-strings = surround71:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 description = Analog Surround 7.1
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output

diff --git a/src/modules/alsa/mixer/profile-sets/force-speaker.conf b/src/modules/alsa/mixer/profile-sets/force-speaker.conf
index f3b7cb0..cbcaff1 100644
--- a/src/modules/alsa/mixer/profile-sets/force-speaker.conf
+++ b/src/modules/alsa/mixer/profile-sets/force-speaker.conf
 <at>  <at>  -23,49 +23,49  <at>  <at>  auto-profiles = yes
 [Mapping analog-mono]
 device-strings = hw:%f
 channel-map = mono
-paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic
analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux
analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 1

 [Mapping analog-stereo]
 device-strings = front:%f hw:%f
 channel-map = left,right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
analog-output-headphones analog-output-headphones-2 analog-output-mono
 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic
analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux
analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
 priority = 10

 [Mapping analog-surround-21]
 device-strings = surround21:%f
 channel-map = front-left,front-right,lfe
-paths-output = analog-output analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-speaker-always
 priority = 8
 direction = output

 [Mapping analog-surround-40]
 device-strings = surround40:%f
 channel-map = front-left,front-right,rear-left,rear-right
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output

 [Mapping analog-surround-41]
 device-strings = surround41:%f
 channel-map = front-left,front-right,rear-left,rear-right,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output

 [Mapping analog-surround-50]
 device-strings = surround50:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output

 [Mapping analog-surround-51]
 device-strings = surround51:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 8
 direction = output

 <at>  <at>  -73,7 +73,7  <at>  <at>  direction = output
 device-strings = surround71:%f
 channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 description = Analog Surround 7.1
-paths-output = analog-output analog-output-lineout analog-output-speaker-always analog-output-desktop-speaker
+paths-output = analog-output analog-output-lineout analog-output-speaker-always
 priority = 7
 direction = output

--

-- 
1.9.3

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Tanu Kaskinen | 27 Oct 12:00 2014
Picon

[PATCH] alsa-mixer: Ignore some elements in the analog-output path

The analog-output path should be suppressed when there are more
specific paths available. Currently that usually doesn't happen. The
suppression can be done with the path subset detection, and this patch
makes that work (another approach would be to mark the elements as
required-absent, like analog-input does, but I like the subset
suppression more, because it requires less stuff in the configuration
files). The problem with listing the now-removed elements in
analog-output.conf was that if the sound card had e.g. a Speaker
element, then the switch behaviour was different between analog-output
and analog-output-speakers, so analog-output was not considered a
subset of analog-output-speakers.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74609
---

Changes in v2: do not remove Element Master Mono, because
analog-output should not be a subset of analog-output-mono.

 src/modules/alsa/mixer/paths/analog-output.conf | 30 -------------------------
 1 file changed, 30 deletions(-)

diff --git a/src/modules/alsa/mixer/paths/analog-output.conf b/src/modules/alsa/mixer/paths/analog-output.conf
index 3a552c9..4f9cc53 100644
--- a/src/modules/alsa/mixer/paths/analog-output.conf
+++ b/src/modules/alsa/mixer/paths/analog-output.conf
 <at>  <at>  -22,14 +22,6  <at>  <at> 
 [General]
 priority = 99

-[Jack Line Out]
-state.plugged = unknown
-state.unplugged = unknown
-
-[Jack Line Out Phantom]
-state.plugged = unknown
-state.unplugged = unknown
-
 [Element Hardware Master]
 switch = mute
 volume = merge
 <at>  <at>  -46,28 +38,6  <at>  <at>  override-map.2 = all-left,all-right
 switch = off
 volume = off

-[Element Line HP Swap]
-switch = off
-
-; This profile path is intended to control the default output, not the
-; headphones. But it should not hurt if we leave the headphone jack
-; enabled nonetheless.
-[Element Headphone]
-switch = mute
-volume = zero
-
-[Element Headphone2]
-switch = mute
-volume = zero
-
-[Element Speaker]
-switch = mute
-volume = off
-
-[Element Desktop Speaker]
-switch = mute
-volume = off
-
 [Element Front]
 switch = mute
 volume = merge
--

-- 
1.9.3

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Arun Raghavan | 27 Oct 11:40 2014
Picon

[PATCH] creds: Rename pa_ancil to pa_cmsg_ancil_data

Makes the purpose of the structure clearear.
---
 src/modules/module-tunnel.c     |  4 +--
 src/pulse/context.c             |  4 +--
 src/pulsecore/creds.h           | 10 +++----
 src/pulsecore/iochannel.c       | 32 ++++++++++-----------
 src/pulsecore/iochannel.h       |  2 +-
 src/pulsecore/pdispatch.c       | 18 ++++++------
 src/pulsecore/pdispatch.h       |  2 +-
 src/pulsecore/protocol-native.c |  4 +--
 src/pulsecore/pstream-util.c    | 20 ++++++-------
 src/pulsecore/pstream.c         | 62 ++++++++++++++++++++---------------------
 src/pulsecore/pstream.h         |  4 +--
 src/tests/srbchannel-test.c     |  2 +-
 12 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 193d091..2584e8b 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
 <at>  <at>  -1780,14 +1780,14  <at>  <at>  static void pstream_die_callback(pa_pstream *p, void *userdata) {
 }

 /* Called from main context */
-static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_ancil *ancil, void
*userdata) {
+static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data
*ancil_data, void *userdata) {
     struct userdata *u = userdata;

     pa_assert(p);
     pa_assert(packet);
     pa_assert(u);

-    if (pa_pdispatch_run(u->pdispatch, packet, ancil, u) < 0) {
+    if (pa_pdispatch_run(u->pdispatch, packet, ancil_data, u) < 0) {
         pa_log("Invalid packet");
         pa_module_unload_request(u->module, true);
         return;
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 8897de0..a06aa81 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
 <at>  <at>  -328,7 +328,7  <at>  <at>  static void pstream_die_callback(pa_pstream *p, void *userdata) {
     pa_context_fail(c, PA_ERR_CONNECTIONTERMINATED);
 }

-static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_ancil *ancil, void
*userdata) {
+static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data
*ancil_data, void *userdata) {
     pa_context *c = userdata;

     pa_assert(p);
 <at>  <at>  -337,7 +337,7  <at>  <at>  static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_a

     pa_context_ref(c);

-    if (pa_pdispatch_run(c->pdispatch, packet, ancil, c) < 0)
+    if (pa_pdispatch_run(c->pdispatch, packet, ancil_data, c) < 0)
         pa_context_fail(c, PA_ERR_PROTOCOL);

     pa_context_unref(c);
diff --git a/src/pulsecore/creds.h b/src/pulsecore/creds.h
index 06806bc..43f6166 100644
--- a/src/pulsecore/creds.h
+++ b/src/pulsecore/creds.h
 <at>  <at>  -31,10 +31,10  <at>  <at> 
 #include <pulsecore/socket.h>
 #include <stdbool.h>

-#define MAX_ANCIL_FDS 2
+#define MAX_ANCIL_DATA_FDS 2

 typedef struct pa_creds pa_creds;
-typedef struct pa_ancil pa_ancil;
+typedef struct pa_cmsg_ancil_data pa_cmsg_ancil_data;

 #if defined(SCM_CREDENTIALS)

 <at>  <at>  -46,12 +46,12  <at>  <at>  struct pa_creds {
 };

 /* Struct for handling ancillary data, i e, extra data that can be sent together with a message
-   over unix pipes. Supports sending and receiving credentials and file descriptors. */
-struct pa_ancil {
+ * over unix pipes. Supports sending and receiving credentials and file descriptors. */
+struct pa_cmsg_ancil_data {
     pa_creds creds;
     bool creds_valid;
     int nfd;
-    int fds[MAX_ANCIL_FDS];
+    int fds[MAX_ANCIL_DATA_FDS];
 };

 #else
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
index 2971c89..2d35113 100644
--- a/src/pulsecore/iochannel.c
+++ b/src/pulsecore/iochannel.c
 <at>  <at>  -355,7 +355,7  <at>  <at>  ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
     struct iovec iov;
     union {
         struct cmsghdr hdr;
-        uint8_t data[CMSG_SPACE(sizeof(int) * MAX_ANCIL_FDS)];
+        uint8_t data[CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)];
     } cmsg;

     pa_assert(io);
 <at>  <at>  -364,7 +364,7  <at>  <at>  ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
     pa_assert(io->ofd >= 0);
     pa_assert(fds);
     pa_assert(nfd > 0);
-    pa_assert(nfd <= MAX_ANCIL_FDS);
+    pa_assert(nfd <= MAX_ANCIL_DATA_FDS);

     pa_zero(iov);
     iov.iov_base = (void*) data;
 <at>  <at>  -391,24 +391,24  <at>  <at>  ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
     return r;
 }

-ssize_t pa_iochannel_read_with_ancil(pa_iochannel*io, void*data, size_t l, pa_ancil *ancil) {
+ssize_t pa_iochannel_read_with_ancil_data(pa_iochannel*io, void*data, size_t l,
pa_cmsg_ancil_data *ancil_data) {
     ssize_t r;
     struct msghdr mh;
     struct iovec iov;
     union {
         struct cmsghdr hdr;
-        uint8_t data[CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE(sizeof(int) * MAX_ANCIL_FDS)];
+        uint8_t data[CMSG_SPACE(sizeof(struct ucred)) + CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)];
     } cmsg;

     pa_assert(io);
     pa_assert(data);
     pa_assert(l);
     pa_assert(io->ifd >= 0);
-    pa_assert(ancil);
+    pa_assert(ancil_data);

     if (io->ifd_type > 0) {
-        ancil->creds_valid = false;
-        ancil->nfd = 0;
+        ancil_data->creds_valid = false;
+        ancil_data->nfd = 0;
         return pa_iochannel_read(io, data, l);
     }

 <at>  <at>  -426,8 +426,8  <at>  <at>  ssize_t pa_iochannel_read_with_ancil(pa_iochannel*io, void*data, size_t l, pa_an
     if ((r = recvmsg(io->ifd, &mh, 0)) >= 0) {
         struct cmsghdr *cmh;

-        ancil->creds_valid = false;
-        ancil->nfd = 0;
+        ancil_data->creds_valid = false;
+        ancil_data->nfd = 0;

         for (cmh = CMSG_FIRSTHDR(&mh); cmh; cmh = CMSG_NXTHDR(&mh, cmh)) {

 <at>  <at>  -439,21 +439,21  <at>  <at>  ssize_t pa_iochannel_read_with_ancil(pa_iochannel*io, void*data, size_t l, pa_an
                 pa_assert(cmh->cmsg_len == CMSG_LEN(sizeof(struct ucred)));
                 memcpy(&u, CMSG_DATA(cmh), sizeof(struct ucred));

-                ancil->creds.gid = u.gid;
-                ancil->creds.uid = u.uid;
-                ancil->creds_valid = true;
+                ancil_data->creds.gid = u.gid;
+                ancil_data->creds.uid = u.uid;
+                ancil_data->creds_valid = true;
             }
             else if (cmh->cmsg_type == SCM_RIGHTS) {
                 int nfd = (cmh->cmsg_len - CMSG_LEN(0)) / sizeof(int);
-                if (nfd > MAX_ANCIL_FDS) {
+                if (nfd > MAX_ANCIL_DATA_FDS) {
                     int i;
                     pa_log("Trying to receive too many file descriptors!");
                     for (i = 0; i < nfd; i++)
                         pa_close(((int*) CMSG_DATA(cmh))[i]);
                     continue;
                 }
-                memcpy(ancil->fds, CMSG_DATA(cmh), nfd * sizeof(int));
-                ancil->nfd = nfd;
+                memcpy(ancil_data->fds, CMSG_DATA(cmh), nfd * sizeof(int));
+                ancil_data->nfd = nfd;
             }
         }

 <at>  <at>  -463,7 +463,7  <at>  <at>  ssize_t pa_iochannel_read_with_ancil(pa_iochannel*io, void*data, size_t l, pa_an

     if (r == -1 && errno == ENOTSOCK) {
         io->ifd_type = 1;
-        return pa_iochannel_read_with_ancil(io, data, l, ancil);
+        return pa_iochannel_read_with_ancil_data(io, data, l, ancil_data);
     }

     return r;
diff --git a/src/pulsecore/iochannel.h b/src/pulsecore/iochannel.h
index 390f798..959ee88 100644
--- a/src/pulsecore/iochannel.h
+++ b/src/pulsecore/iochannel.h
 <at>  <at>  -59,7 +59,7  <at>  <at>  int pa_iochannel_creds_enable(pa_iochannel *io);

 ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l, int nfd, const int *fds);
 ssize_t pa_iochannel_write_with_creds(pa_iochannel*io, const void*data, size_t l, const pa_creds *ucred);
-ssize_t pa_iochannel_read_with_ancil(pa_iochannel*io, void*data, size_t l, pa_ancil *ancil);
+ssize_t pa_iochannel_read_with_ancil_data(pa_iochannel*io, void*data, size_t l,
pa_cmsg_ancil_data *ancil_data);
 #endif

 bool pa_iochannel_is_readable(pa_iochannel*io);
diff --git a/src/pulsecore/pdispatch.c b/src/pulsecore/pdispatch.c
index fdb27c9..53284ee 100644
--- a/src/pulsecore/pdispatch.c
+++ b/src/pulsecore/pdispatch.c
 <at>  <at>  -221,7 +221,7  <at>  <at>  struct pa_pdispatch {
     PA_LLIST_HEAD(struct reply_info, replies);
     pa_pdispatch_drain_cb_t drain_callback;
     void *drain_userdata;
-    const pa_ancil *ancil;
+    const pa_cmsg_ancil_data *ancil_data;
     bool use_rtclock;
 };

 <at>  <at>  -291,7 +291,7  <at>  <at>  static void run_action(pa_pdispatch *pd, struct reply_info *r, uint32_t command,
     pa_pdispatch_unref(pd);
 }

-int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_ancil *ancil, void *userdata) {
+int pa_pdispatch_run(pa_pdispatch *pd, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data,
void *userdata) {
     uint32_t tag, command;
     pa_tagstruct *ts = NULL;
     int ret = -1;
 <at>  <at>  -325,7 +325,7  <at>  <at>  int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_ancil *ancil,
 }
 #endif

-    pd->ancil = ancil;
+    pd->ancil_data = ancil_data;

     if (command == PA_COMMAND_ERROR || command == PA_COMMAND_REPLY) {
         struct reply_info *r;
 <at>  <at>  -349,7 +349,7  <at>  <at>  int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*packet, const pa_ancil *ancil,
     ret = 0;

 finish:
-    pd->ancil = NULL;
+    pd->ancil_data = NULL;

     if (ts)
         pa_tagstruct_free(ts);
 <at>  <at>  -444,8 +444,8  <at>  <at>  const pa_creds * pa_pdispatch_creds(pa_pdispatch *pd) {
     pa_assert(pd);
     pa_assert(PA_REFCNT_VALUE(pd) >= 1);

-    if (pd->ancil && pd->ancil->creds_valid)
-         return &pd->ancil->creds;
+    if (pd->ancil_data && pd->ancil_data->creds_valid)
+         return &pd->ancil_data->creds;
     return NULL;
 }

 <at>  <at>  -454,9 +454,9  <at>  <at>  const int * pa_pdispatch_fds(pa_pdispatch *pd, int *nfd) {
     pa_assert(PA_REFCNT_VALUE(pd) >= 1);
     pa_assert(nfd);

-    if (pd->ancil) {
-         *nfd = pd->ancil->nfd;
-         return pd->ancil->fds;
+    if (pd->ancil_data) {
+         *nfd = pd->ancil_data->nfd;
+         return pd->ancil_data->fds;
     }

     *nfd = 0;
diff --git a/src/pulsecore/pdispatch.h b/src/pulsecore/pdispatch.h
index 038f90d..df2e2fd 100644
--- a/src/pulsecore/pdispatch.h
+++ b/src/pulsecore/pdispatch.h
 <at>  <at>  -41,7 +41,7  <at>  <at>  pa_pdispatch* pa_pdispatch_new(pa_mainloop_api *m, bool use_rtclock, const pa_pd
 void pa_pdispatch_unref(pa_pdispatch *pd);
 pa_pdispatch* pa_pdispatch_ref(pa_pdispatch *pd);

-int pa_pdispatch_run(pa_pdispatch *pd, pa_packet*p, const pa_ancil *ancil, void *userdata);
+int pa_pdispatch_run(pa_pdispatch *pd, pa_packet *p, const pa_cmsg_ancil_data *ancil_data, void *userdata);

 void pa_pdispatch_register_reply(pa_pdispatch *pd, uint32_t tag, int timeout, pa_pdispatch_cb_t
callback, void *userdata, pa_free_cb_t free_cb);

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 2ef1854..c0cd0e0 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
 <at>  <at>  -4888,14 +4888,14  <at>  <at>  static void command_set_port_latency_offset(pa_pdispatch *pd, uint32_t command,

 /*** pstream callbacks ***/

-static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_ancil *ancil, void
*userdata) {
+static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data
*ancil_data, void *userdata) {
     pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);

     pa_assert(p);
     pa_assert(packet);
     pa_native_connection_assert_ref(c);

-    if (pa_pdispatch_run(c->pdispatch, packet, ancil, c) < 0) {
+    if (pa_pdispatch_run(c->pdispatch, packet, ancil_data, c) < 0) {
         pa_log("invalid packet.");
         native_connection_unlink(c);
     }
diff --git a/src/pulsecore/pstream-util.c b/src/pulsecore/pstream-util.c
index a31c0c8..a66c700 100644
--- a/src/pulsecore/pstream-util.c
+++ b/src/pulsecore/pstream-util.c
 <at>  <at>  -28,7 +28,7  <at>  <at> 

 #include "pstream-util.h"

-static void pa_pstream_send_tagstruct_with_ancil(pa_pstream *p, pa_tagstruct *t, const pa_ancil
*ancil) {
+static void pa_pstream_send_tagstruct_with_ancil_data(pa_pstream *p, pa_tagstruct *t, const
pa_cmsg_ancil_data *ancil_data) {
     size_t length;
     uint8_t *data;
     pa_packet *packet;
 <at>  <at>  -38,7 +38,7  <at>  <at>  static void pa_pstream_send_tagstruct_with_ancil(pa_pstream *p, pa_tagstruct *t,

     pa_assert_se(data = pa_tagstruct_free_data(t, &length));
     pa_assert_se(packet = pa_packet_new_dynamic(data, length));
-    pa_pstream_send_packet(p, packet, ancil);
+    pa_pstream_send_packet(p, packet, ancil_data);
     pa_packet_unref(packet);
 }

 <at>  <at>  -46,35 +46,35  <at>  <at>  static void pa_pstream_send_tagstruct_with_ancil(pa_pstream *p, pa_tagstruct *t,

 void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds) {
     if (creds) {
-        pa_ancil a;
+        pa_cmsg_ancil_data a;

         a.nfd = 0;
         a.creds_valid = true;
         a.creds = *creds;
-        pa_pstream_send_tagstruct_with_ancil(p, t, &a);
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, &a);
     }
     else
-        pa_pstream_send_tagstruct_with_ancil(p, t, NULL);
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, NULL);
 }

 void pa_pstream_send_tagstruct_with_fds(pa_pstream *p, pa_tagstruct *t, int nfd, const int *fds) {
     if (nfd > 0) {
-        pa_ancil a;
+        pa_cmsg_ancil_data a;

         a.nfd = nfd;
         a.creds_valid = false;
-        pa_assert(nfd <= MAX_ANCIL_FDS);
+        pa_assert(nfd <= MAX_ANCIL_DATA_FDS);
         memcpy(a.fds, fds, sizeof(int) * nfd);
-        pa_pstream_send_tagstruct_with_ancil(p, t, &a);
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, &a);
     }
     else
-        pa_pstream_send_tagstruct_with_ancil(p, t, NULL);
+        pa_pstream_send_tagstruct_with_ancil_data(p, t, NULL);
 }

 #else

 void pa_pstream_send_tagstruct_with_creds(pa_pstream *p, pa_tagstruct *t, const pa_creds *creds) {
-    pa_pstream_send_tagstruct_with_ancil(p, t, NULL);
+    pa_pstream_send_tagstruct_with_ancil_data(p, t, NULL);
 }

 #endif
diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c
index ceda728..c32b44c 100644
--- a/src/pulsecore/pstream.c
+++ b/src/pulsecore/pstream.c
 <at>  <at>  -95,8 +95,8  <at>  <at>  struct item_info {
     /* packet info */
     pa_packet *packet;
 #ifdef HAVE_CREDS
-    bool with_ancil;
-    pa_ancil ancil;
+    bool with_ancil_data;
+    pa_cmsg_ancil_data ancil_data;
 #endif

     /* memblock info */
 <at>  <at>  -170,8 +170,8  <at>  <at>  struct pa_pstream {
     pa_mempool *mempool;

 #ifdef HAVE_CREDS
-    pa_ancil read_ancil, write_ancil;
-    bool send_ancil_now;
+    pa_cmsg_ancil_data read_ancil_data, write_ancil_data;
+    bool send_ancil_data_now;
 #endif
 };

 <at>  <at>  -324,7 +324,7  <at>  <at>  static void pstream_free(pa_pstream *p) {
     pa_xfree(p);
 }

-void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_ancil *ancil) {
+void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_cmsg_ancil_data
*ancil_data) {
     struct item_info *i;

     pa_assert(p);
 <at>  <at>  -341,12 +341,12  <at>  <at>  void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_ancil *anc
     i->packet = pa_packet_ref(packet);

 #ifdef HAVE_CREDS
-    if ((i->with_ancil = !!ancil)) {
-        i->ancil = *ancil;
-        if (ancil->creds_valid)
-            pa_assert(ancil->nfd == 0);
+    if ((i->with_ancil_data = !!ancil_data)) {
+        i->ancil_data = *ancil_data;
+        if (ancil_data->creds_valid)
+            pa_assert(ancil_data->nfd == 0);
         else
-            pa_assert(ancil->nfd > 0);
+            pa_assert(ancil_data->nfd > 0);
     }
 #endif

 <at>  <at>  -389,7 +389,7  <at>  <at>  void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa
         i->offset = offset;
         i->seek_mode = seek_mode;
 #ifdef HAVE_CREDS
-        i->with_ancil = false;
+        i->with_ancil_data = false;
 #endif

         pa_queue_push(p->send_queue, i);
 <at>  <at>  -416,7 +416,7  <at>  <at>  void pa_pstream_send_release(pa_pstream *p, uint32_t block_id) {
     item->type = PA_PSTREAM_ITEM_SHMRELEASE;
     item->block_id = block_id;
 #ifdef HAVE_CREDS
-    item->with_ancil = false;
+    item->with_ancil_data = false;
 #endif

     pa_queue_push(p->send_queue, item);
 <at>  <at>  -453,7 +453,7  <at>  <at>  void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id) {
     item->type = PA_PSTREAM_ITEM_SHMREVOKE;
     item->block_id = block_id;
 #ifdef HAVE_CREDS
-    item->with_ancil = false;
+    item->with_ancil_data = false;
 #endif

     pa_queue_push(p->send_queue, item);
 <at>  <at>  -577,8 +577,8  <at>  <at>  static void prepare_next_write_item(pa_pstream *p) {
     }

 #ifdef HAVE_CREDS
-    if ((p->send_ancil_now = p->write.current->with_ancil))
-        p->write_ancil = p->write.current->ancil;
+    if ((p->send_ancil_data_now = p->write.current->with_ancil_data))
+        p->write_ancil_data = p->write.current->ancil_data;
 #endif
 }

 <at>  <at>  -637,16 +637,16  <at>  <at>  static int do_write(pa_pstream *p) {
     pa_assert(l > 0);

 #ifdef HAVE_CREDS
-    if (p->send_ancil_now) {
-        if (p->write_ancil.creds_valid) {
-            pa_assert(p->write_ancil.nfd == 0);
-            if ((r = pa_iochannel_write_with_creds(p->io, d, l, &p->write_ancil.creds)) < 0)
+    if (p->send_ancil_data_now) {
+        if (p->write_ancil_data.creds_valid) {
+            pa_assert(p->write_ancil_data.nfd == 0);
+            if ((r = pa_iochannel_write_with_creds(p->io, d, l, &p->write_ancil_data.creds)) < 0)
                 goto fail;
         }
         else
-            if ((r = pa_iochannel_write_with_fds(p->io, d, l, p->write_ancil.nfd, p->write_ancil.fds)) < 0)
+            if ((r = pa_iochannel_write_with_fds(p->io, d, l, p->write_ancil_data.nfd,
p->write_ancil_data.fds)) < 0)
                 goto fail;
-        p->send_ancil_now = false;
+        p->send_ancil_data_now = false;
     } else
 #endif
     if (p->srb)
 <at>  <at>  -719,19 +719,19  <at>  <at>  static int do_read(pa_pstream *p, struct pstream_read *re) {
     else
 #ifdef HAVE_CREDS
     {
-        pa_ancil b;
+        pa_cmsg_ancil_data b;

-        if ((r = pa_iochannel_read_with_ancil(p->io, d, l, &b)) <= 0)
+        if ((r = pa_iochannel_read_with_ancil_data(p->io, d, l, &b)) <= 0)
             goto fail;

         if (b.creds_valid) {
-            p->read_ancil.creds_valid = true;
-            p->read_ancil.creds = b.creds;
+            p->read_ancil_data.creds_valid = true;
+            p->read_ancil_data.creds = b.creds;
         }
         if (b.nfd > 0) {
-            pa_assert(b.nfd <= MAX_ANCIL_FDS);
-            p->read_ancil.nfd = b.nfd;
-            memcpy(p->read_ancil.fds, b.fds, sizeof(int) * b.nfd);
+            pa_assert(b.nfd <= MAX_ANCIL_DATA_FDS);
+            p->read_ancil_data.nfd = b.nfd;
+            memcpy(p->read_ancil_data.fds, b.fds, sizeof(int) * b.nfd);
         }
     }
 #else
 <at>  <at>  -880,7 +880,7  <at>  <at>  static int do_read(pa_pstream *p, struct pstream_read *re) {

                 if (p->receive_packet_callback)
 #ifdef HAVE_CREDS
-                    p->receive_packet_callback(p, re->packet, &p->read_ancil, p->receive_packet_callback_userdata);
+                    p->receive_packet_callback(p, re->packet, &p->read_ancil_data, p->receive_packet_callback_userdata);
 #else
                     p->receive_packet_callback(p, re->packet, NULL, p->receive_packet_callback_userdata);
 #endif
 <at>  <at>  -942,8 +942,8  <at>  <at>  frame_done:
     re->data = NULL;

 #ifdef HAVE_CREDS
-    p->read_ancil.creds_valid = false;
-    p->read_ancil.nfd = 0;
+    p->read_ancil_data.creds_valid = false;
+    p->read_ancil_data.nfd = 0;
 #endif

     return 0;
diff --git a/src/pulsecore/pstream.h b/src/pulsecore/pstream.h
index 8e4056c..cbea237 100644
--- a/src/pulsecore/pstream.h
+++ b/src/pulsecore/pstream.h
 <at>  <at>  -38,7 +38,7  <at>  <at> 

 typedef struct pa_pstream pa_pstream;

-typedef void (*pa_pstream_packet_cb_t)(pa_pstream *p, pa_packet *packet, const pa_ancil *ancil,
void *userdata);
+typedef void (*pa_pstream_packet_cb_t)(pa_pstream *p, pa_packet *packet, const
pa_cmsg_ancil_data *ancil_data, void *userdata);
 typedef void (*pa_pstream_memblock_cb_t)(pa_pstream *p, uint32_t channel, int64_t offset,
pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata);
 typedef void (*pa_pstream_notify_cb_t)(pa_pstream *p, void *userdata);
 typedef void (*pa_pstream_block_id_cb_t)(pa_pstream *p, uint32_t block_id, void *userdata);
 <at>  <at>  -50,7 +50,7  <at>  <at>  void pa_pstream_unref(pa_pstream*p);

 void pa_pstream_unlink(pa_pstream *p);

-void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_ancil *ancil);
+void pa_pstream_send_packet(pa_pstream*p, pa_packet *packet, const pa_cmsg_ancil_data *ancil_data);
 void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa_seek_mode_t
seek, const pa_memchunk *chunk);
 void pa_pstream_send_release(pa_pstream *p, uint32_t block_id);
 void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id);
diff --git a/src/tests/srbchannel-test.c b/src/tests/srbchannel-test.c
index 78a401b..cc679a2 100644
--- a/src/tests/srbchannel-test.c
+++ b/src/tests/srbchannel-test.c
 <at>  <at>  -36,7 +36,7  <at>  <at>  int packets_received;
 int packets_checksum;
 int packets_length;

-static void packet_received(pa_pstream *p, pa_packet *packet, const pa_ancil *ancil, void
*userdata) {
+static void packet_received(pa_pstream *p, pa_packet *packet, const pa_cmsg_ancil_data
*ancil_data, void *userdata) {
     unsigned int i;
     fail_unless(packets_length == (int) packet->length);
     packets_received++;
--

-- 
1.9.3

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Peter Meerwald | 24 Oct 23:21 2014
Picon

[PATCH RFC 00/17] memory optimizations

this patch series aims to save memory allocations and some system calls
related to PA's client/server protocol implementation

patches 1 to 5 ('tagstruct:') introduce a new tagstruct type _APPENDED
which can hold tagstruct data up to a certain size; tagstructs are now 
kept in a specific free-list -- this typically replaces two malloc()/free()s
with one flist push()/pop()

patches 6 to 8 ('packet:') make packets fixed-size (typically); packets are
kept in a specific free-list -- this replaces one malloc()/free() with one
flist push()/pop()

patches 9 to 14 ('pstream:') allows to send tagstructs directly to a pstream
without encapsulation in a packet -- this saves one flist push()/pop()

patches 15 and 16 ('pstream') often save a read() call by reading more than
just the descriptor (up to 40 bytes, e.g. description (20 bytes) + shm
info (16 bytes)); the idea is similar to b4342845d, "Optimize write 
of smaller packages", but for read -- this trades some extra memcpy() for
a read()

patch 17 ('iochannel') fixes a strange behaviour in iochannel/mainloop that
deleted the input_event with every read which caused a rebuild of the pollfds
for every read()!

with these patches typical playback (i.e. after setup) runs without any malloc()/free()
thanks to the use of free-lists; number of memory management operations is reduced

no benchmarking yet

Peter Meerwald (17):
  tagstruct: Distinguish pa_tagstruct_new() use cases
  tagstruct: Replace dynamic flag with type
  tagstruct: Get rid of pa_tagstruct_free_data()
  tagstruct: Add type _APPENDED
  tagstruct: Use flist to potentially save calls to malloc()/free()
  packet: Hide internals of pa_packet, introduce pa_packet_data()
  packet: Make pa_packet_new() create fixed-size packets
  packet: Introduce pa_packet_new_data() to copy data into a newly
    created packet
  packet: Use flist to save calls to malloc()/free()
  pstream: Unionize item_info
  pstream: Add pa_pstream_send_tagstruct()
  pstream: #define PA_PSTREAM_SHM_SIZE
  pstream: Duplicate assignment, write.data is always NULL
  pstream: Only reset memchunk if it has been used
  pstream: Split up do_read()
  pstream: Use small minibuffer to combine several read()s if possible
  iochannel: Fix channel enable

 src/modules/module-card-restore.c   |   4 +-
 src/modules/module-device-manager.c |  12 +-
 src/modules/module-device-restore.c |  16 +-
 src/modules/module-stream-restore.c |  12 +-
 src/modules/module-tunnel.c         |  52 +--
 src/pulse/context.c                 |  26 +-
 src/pulse/ext-device-manager.c      |  14 +-
 src/pulse/ext-device-restore.c      |  10 +-
 src/pulse/ext-stream-restore.c      |  10 +-
 src/pulse/introspect.c              |  82 ++---
 src/pulse/scache.c                  |  10 +-
 src/pulse/stream.c                  |  22 +-
 src/pulse/subscribe.c               |   2 +-
 src/pulsecore/iochannel.c           |  35 +-
 src/pulsecore/packet.c              |  53 ++-
 src/pulsecore/packet.h              |  20 +-
 src/pulsecore/pdispatch.c           |   9 +-
 src/pulsecore/protocol-native.c     |  94 +++---
 src/pulsecore/pstream-util.c        |  33 +-
 src/pulsecore/pstream-util.h        |   2 -
 src/pulsecore/pstream.c             | 635 +++++++++++++++++++++---------------
 src/pulsecore/pstream.h             |   2 +
 src/pulsecore/tagstruct.c           |  66 ++--
 src/pulsecore/tagstruct.h           |   4 +-
 src/tests/srbchannel-test.c         |  21 +-
 25 files changed, 704 insertions(+), 542 deletions(-)

--

-- 
1.9.1
Wim Taymans | 24 Oct 09:56 2014
Picon

[PATCH 0/4] Add simple HSP support in new native backend v3

This set of patches adds a simple handler for the HSP profile to bluez
and makes a new card for each connected device. This makes it possible to
send audio to a Headset. The profile is implemented in a new native
headset backend.

The first 2 patches are mostly some very small cleanups and little bits to
implement the following patches.

The patches also switches the default backend from ofono to native.

This patchset replaces the previously posted native backend patches and
incorporates the suggestions I received to date.

Wim Taymans (4):
  bluez5-device: use get_profile_direction
  bluez5-util: add dispose function
  backend-native: add a new native headset backend
  backend-native: implement volume control

 configure.ac                                 |   6 +-
 src/modules/bluetooth/backend-native.c       | 490 +++++++++++++++++++++++++++
 src/modules/bluetooth/bluez5-util.c          |   2 +
 src/modules/bluetooth/bluez5-util.h          |  11 +
 src/modules/bluetooth/module-bluez5-device.c | 172 +++++++++-
 5 files changed, 661 insertions(+), 20 deletions(-)
 create mode 100644 src/modules/bluetooth/backend-native.c

--

-- 
1.9.3
Tanu Kaskinen | 18 Oct 20:10 2014
Picon

[PATCH 0/2] A couple of Zsh completion patches

Tanu Kaskinen (2):
  shell-completion: zsh: Mark a variable as local
  shell-completion: zsh: Rework pactl completion

 shell-completion/zsh/_pulseaudio | 266 +++++++++++++++++++++++++++++++++------
 1 file changed, 231 insertions(+), 35 deletions(-)

--

-- 
1.9.3
David Henningsson | 15 Oct 09:10 2014

[PATCH 1/2] configure: Move path to modules to /usr/lib/pulseaudio/modules-x.y

The path /usr/lib/pulse-x.y is non-standard, both considering that
other software more often than not have a non-versioned directory
under /usr/lib, and that we ourselves don't use "pulse-x.y" anywhere
else.

It could still be reasonable to have more than one version of PA
installed, so let's have the x.y at the module directory instead.

Signed-off-by: David Henningsson <david.henningsson <at> canonical.com>
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f13ddb0..fe4a1e3 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -1354,8 +1354,8  <at>  <at>  fi

 AC_ARG_WITH(
         [module-dir],
-        AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulse-${PA_MAJORMINOR}/modules]),
-        [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulse-${PA_MAJORMINOR}/modules"])
+        AS_HELP_STRING([--with-module-dir],[Directory where to install the modules to (defaults to ${libdir}/pulseaudio/modules-${PA_MAJORMINOR}]),
+        [modlibexecdir=$withval], [modlibexecdir="${libdir}/pulseaudio/modules-${PA_MAJORMINOR}"])

 AC_SUBST(modlibexecdir)
 AX_DEFINE_DIR(PA_DLSEARCHPATH, modlibexecdir, [Modules dir])
--

-- 
1.9.1

Gmane