Commit graph

83 commits

Author SHA1 Message Date
Tanu Kaskinen
0ce3008605 Improve the port available_group and type documentation 2020-08-10 20:54:21 +03:00
Jaroslav Kysela
feee531c2b device-port: add type member
The clients might wanna to know for which purpose is the port.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2020-06-17 06:06:12 +00:00
jnqnfe
26b1d0fc84 merge and deduplicate some pa_buffer_attr documentation 2017-11-30 00:51:25 +02:00
jnqnfe
b683350856 api documentation improvements
includes typo fixes, neatening, addition of more return info, and such.
2017-11-30 00:43:57 +02:00
Tanu Kaskinen
50918e908b mention the sound card clock and system clock difference in libpulse docs 2017-10-23 18:29:53 +03:00
Ondrej Holecek
5effc83479 update FSF addresses to FSF web page
FSF addresses used in PA sources are no longer valid and rpmlint
generates numerous warnings during packaging because of this.
This patch changes all FSF addresses to FSF web page according to
the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html

Done automatically by sed-ing through sources.
2015-01-14 22:20:40 +02:00
David Henningsson
58cffdcfc8 Replace "authorization" with "authentication"
Since we don't have "limited" clients, a client that authenticates
correctly is automatically authorized. However, it's the authentication
that can go wrong, rather than the authorization.

Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=78566
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-02 12:50:48 +02:00
Peter Meerwald
679eed5340 doc: Fix a couple of 'to to' typos
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-03-06 15:47:33 +01:00
Peter Meerwald
ad61ef4477 doc: Assorted spelling and grammar fixes for doxygen output
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-02-23 17:03:50 +01:00
Tanu Kaskinen
77ebb6567f def, format: Document how to leave PCM parameters to be decided by the server 2014-01-08 21:32:02 +02:00
Peter Meerwald
f771bbcfa9 doc: Some more nitpicking in pulse/def.h doxygen documentation
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-04-17 08:12:23 +02:00
David Henningsson
feeec28de4 client API: Document buffer_attr.maxlength
Let's officially support that people use maxlength to put an upper
bound on playback latency.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-03-25 15:44:36 +02:00
Tanu Kaskinen
7e1ebf9455 pulse: Document the operation state behavior on context disconnection. 2013-03-13 16:10:16 +02:00
Mikel Astiz
8851644a3c core: Internally deprecate pa_port_available_t to use pa_available_t
Generalize the availability flag in order to be used beyond the scope of
ports.

However, pa_port_availability_t is left unchanged to avoid modifying the
protocol and the client API. This should be replaced by pa_available_t
after a validation phase of this new generic enum type.
2013-02-18 17:25:53 +02:00
David Henningsson
793f46320e introspect: Expose port info per card to clients
For volume control UIs to be able to show ports in inactive profiles,
expose all ports together with the card info. This includes updating
the protocol and the client API to show the connection between ports
and for which profiles the ports are relevant.

Update protocol to 26.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2012-03-11 12:23:46 +05:30
Peter Meerwald
910bc7c2b4 pulse: Turn the anonymous error code enum into pa_error_code_t.
The purpose is to make it possible to link to the
enumeration in doxygen.
2012-01-14 16:30:45 +02:00
Peter Meerwald
564997e487 def: Document that pa_buffer_attr.maxlength is in bytes.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42919
2011-12-12 22:39:58 +00:00
David Henningsson
961ec210a6 Introduce "available" concept for ports, and communicate that to clients. Bump protocol version to 24.
Note: There is still no notification when status availability changes.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-11-26 13:47:33 +02:00
Pierre-Louis Bossart
f0ec495938 sink,source: support for rate update
Avoid resampling or use integer resampling when supported by the
sinks/sources

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2011-10-17 20:09:46 +05:30
Arun Raghavan
a9c85074cb def: Hide server-side sink/source flags
This makes sure that sink/source flags that are used on the server side
only are not leaked to clients.
2011-09-14 14:02:12 +05:30
Colin Guthrie
aa3142ab20 volume: Rename 'sync volume' to 'deferred volume'.
This just covers Lennart's concern over the terminology used.

The majority of this change is simply the following command:
 grep -rli sync[-_]volume . | xargs sed -i 's/sync_volume/deferred_volume/g;s/PA_SINK_SYNC_VOLUME/PA_SINK_DEFERRED_VOLUME/g;s/PA_SOURCE_SYNC_VOLUME/PA_SOURCE_DEFERRED_VOLUME/g;s/sync-volume/deferred-volume/g'

Some minor tweaks were added on top to tidy up formatting and
a couple of phrases were clarified too.
2011-09-13 21:15:49 +01:00
Colin Guthrie
cc117be62b def: Add a new enum to allow differntiation between sinks and sources.
This is for bits of code or API where the concepts and constructs are
extensibly the same for sinks and sources. To avoid duplication we can
simply define our structure/API and then use this enum to differentiate
the two.
2011-08-18 17:10:13 +01:00
Arun Raghavan
a6ad2d860a sink: Add PA_SINK_SET_FORMATS macro
Required for testing the existence of the flag
2011-08-18 14:56:41 +05:30
Arun Raghavan
2677911e92 source: Remove the PA_SOURCE_PASSTHROUGH flag
This isn't actually used anywhere, and PA_SINK_PASSTHROUGH was also
removed.
2011-08-17 09:00:47 +05:30
Arun Raghavan
fb67016844 sink: Add a SET_FORMATS flag
This adds a PA_SINK_SET_FORMATS flag to the pa_sink_flags enum,
signalling that a sink allows the set of supported formats to be set
externally. The idea is for clients to be able to know what sinks
support this ability and adapt their UI appropriately.
2011-08-16 11:11:34 +05:30
Colin Guthrie
a9cf320bc1 devices: Set certain sink/source flags automatically.
Some sink flags are really just a product of what callbacks
are set on the device. We still enforce a degree of sanity
that the flags match the callbacks set, but we also set the
flags automatically in our callback setter functions to
help ensure that a) people use them and b) flags & callbacks
are kept in sync.
2011-07-20 22:20:37 +01:00
Colin Guthrie
30597b7c27 def: Add some flags for source outputs.
These flags will be required in upcoming work to integrate format and volume
support for source outputs.
2011-06-22 21:53:20 +01:00
Arun Raghavan
53091cc5f0 sink-input: Add a format-lost event
This event is emitted if the sink-input could not be moved to a new sink
because it doesn't support the format of the sink-input. Clients can
reconnect their stream with a different format if they wish or
gracefully exit.
2011-05-15 10:09:34 +05:30
Arun Raghavan
71ec9577cf sink: Remove PASSTHROUGH flag
This removes the passthrough flag from sinks since we will drop
exclusively passthrough sinks in favour of providing a list of formats
supported by each sink. We can still determine whether a sink is in
passthrough mode by checking if any non-PCM streams are attached to it.
2011-05-02 11:54:48 +05:30
Tanu Kaskinen
c9c88fb8dc Implement the "volume sharing" feature.
When we have a filter sink that does some processing, currently the
benefits of the flat volume feature are not really available. That's
because if you have a music player that is connected to the filter sink,
the hardware sink doesn't have any idea of the music player's stream
volume.

This problem is solved by this "volume sharing" feature. The volume
sharing feature works so that the filter sinks that want to avoid the
previously described problem declare that they don't want to have
independent volume, but they follow the master sink volume instead.
The PA_SINK_SHARE_VOLUME_WITH_MASTER sink flag is used for that
declaration. Then the volume logic is changed so that the hardware
sink calculates its real volume using also the streams connected to the
filter sink in addition to the streams that are connected directly to
the hardware sink. Basically we're trying to create an illusion that
from volume point of view all streams are connected directly to the
hardware sink.

For that illusion to work, the volumes of the filter sinks and their
virtual streams have to be managed carefully according to a set of
rules:

If a filter sink follows the hardware sink volume, then the filter sink's
 * reference_volume always equals the hw sink's reference_volume
 * real_volume always equals the hw sink's real_volume
 * soft_volume is always 0dB (ie. no soft volume)

If a filter sink doesn't follow the hardware sink volume, then the filter
sink's
 * reference_volume can be whatever (completely independent from the hw sink)
 * real_volume always equals reference_volume
 * soft_volume always equals real_volume (and reference_volume)

If a filter sink follows the hardware sink volume, and the hardware sink
supports flat volume, then the filter sink's virtual stream's
 * volume always equals the hw sink's real_volume
 * reference_ratio is calculated normally from the stream volume and the hw
   sink's reference_volume
 * real_ratio always equals 0dB (follows from the first point)
 * soft_volume always equals volume_factor (follows from the previous point)

If a filter sink follows the hardware sink volume, and the hardware sink
doesn't support flat volume, then the filter sink's virtual stream's
 * volume is always 0dB
 * reference_ratio is always 0dB
 * real_ratio is always 0dB
 * soft_volume always equals volume_factor

If a filter sink doesn't follow the hardware sink volume, then the filter
sink's virtual stream is handled as a regular stream.

Since the volumes of the virtual streams are controlled by a set of rules,
the user is not allowed to change the virtual streams' volumes. It would
probably also make sense to forbid changing the filter sinks' volume, but
that's not strictly necessary, and currently changing a filter sink's volume
changes actually the hardware sink's volume, and from there it propagates to
all filter sinks ("funny" effects are expected when adjusting a single
channel in cases where all sinks don't have the same channel maps).

This patch is based on the work of Marc-André Lureau, who did the
initial implementation for Pulseaudio 0.9.15.
2011-02-26 10:37:20 +00:00
Maarten Bosmans
a39a83665f win32: Implement rtclock based on QueryPerformanceCounter
Also remove some unnecessary <time.h> headers.
2011-02-17 12:02:31 +01:00
Colin Guthrie
2a01bab3cc doxygen: Fix version numbers for new features
Due to how our branching worked out, these new features will
debut in v1.0 and not v0.9.22 which has already been released
from the stable-queue branch
2010-12-04 16:43:04 +00:00
Jyri Sarha
5391daf8df core: Add infrastructure for synchronizing HW and SW volume changes
To make concurrent use of SW and HW volume glitchles their application
needs to be synchronized. For accurate synchronization the HW volume
needs to be applied in IO thread. This patch adds infrastructure to
delay the applying of HW volume to match with SW volume timing. To
avoid synchronization problems this patch moves many of the volume and
mute related functions from main thread to IO thread. All these
changes become active only if the sync volume flag for a sink has been
set. So, for this patch to have any effect it needs to be taken into
use by sink implementor.

Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
2010-10-16 11:53:38 +01:00
Pierre-Louis Bossart
9b6c84ad6e AC3 passthrough support
Second version after Tanu's feedback

TODO:
    - notify client that volume control is disabled
    - change sink rate in passthrough mode if needed
    - automatic detection of passthrough mode instead of hard
    coded profile names

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
2010-08-12 18:20:27 +01:00
Mads Kiilerich
6faf38313e headers: Some trivial fixes for some documentation typos
Note also the willneed/will_need inconsistency. I guess it could be nice to ASAP
choose one of them and introduce a backward compatibility hack for the other.

The issues was mostly found with:
for a in $(grep -r '^[ /]\*.*()' $(
	find -name '*.[ch]') |
	sed 's,^.* \([^ ]*\)().*$,\1,g' |
	sort |
	uniq |
	grep ^pa_)
do
	grep -rq "^.[^*].*\<$a(" $(find * -name '*.h') || echo $a
done
2010-01-05 21:27:33 +01:00
Lennart Poettering
f27a50691c libpulse: introduce PA_STREAM_RELATIVE_VOLUME 2009-10-29 00:46:22 +01:00
Colin Guthrie
8f4940b17a libpulse: Add *_NOFLAGS flags with value 0 for various enums
This avoids the need for ugly casting in client implementations.
2009-09-22 18:43:03 +01:00
Lennart Poettering
6b8fdc4169 CANCELLED vs. CANCELED
Define CANCELLED as alias for CANCELED
2009-09-17 01:19:55 +02:00
Lennart Poettering
54609675e5 libpulse: add new error code PA_ERR_BUSY 2009-09-11 01:20:45 +02:00
Lennart Poettering
bd8e043a52 bluetooth: return sensible error code in set_profile() 2009-06-17 04:51:57 +02:00
Maarten Bosmans
8bcb9c6910 various spelling fixes 2009-04-04 02:27:13 +02:00
Lennart Poettering
d33be12fde Merge commit 'elmarco/dbus' 2009-03-30 20:26:27 +02:00
Marc-André Lureau
1dad83b73c pulse: client connect to dbus 2009-03-30 21:05:31 +03:00
Lennart Poettering
491aafd8dc typo fix 2009-03-30 18:27:33 +02:00
Lennart Poettering
8282efcfa3 fix value of DYNAMIC_LATENCY 2009-03-25 16:17:15 +01:00
Lennart Poettering
44ca897769 introduce new flag that marks sinks/sources which can adjust the latency dynamically 2009-03-25 00:30:54 +01:00
Lennart Poettering
3122008704 try to detect when stupid clients forks and refuse all service from then on 2009-03-05 04:33:40 +01:00
Lennart Poettering
823431e447 allow sending meta/policy events to clients 2009-02-12 03:18:05 +01:00
Lennart Poettering
6bb2c49057 add #defines for all enums that lacked it 2009-02-06 02:01:17 +01:00
Lennart Poettering
f9696c0e7f add a macro definition for each error code 2009-02-03 03:38:40 +01:00