Age | Commit message (Collapse) | Author | Files | Lines |
|
This will be needed if the implementation data stores pointers to
additional data that needs to be freed as well.
|
|
The relationship between sinks, sources, cards, profiles, and ports
is becoming ever more intertwined, to the point that if you try to
include one file from the other, you're likely to end up with some
weird error somewhere else.
Work around this by creating a new typedefs.h, which does not depend
on anything else, and just creates a few typedefs.
(Can be expanded with more typedefs in the future if the need arises.)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
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.
|
|
In case a port has not yet been saved, which is e g often the case
if a sink/source has only one port, reading volume/mute will be done
without port, whereas writing volume/mute will be done with port.
Work around this by setting a default port before the fixate hook,
so module-device-restore can read volume/mute for the correct port.
BugLink: https://bugs.launchpad.net/bugs/1289515
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Port creation is now slightly different. It is now similar to how
other objects are created (e.g. sinks/sources/cards).
This should become more useful in the future when we move more stuff to
the ports.
Functionally nothing has changed.
|
|
|
|
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.
|
|
|
|
This way we can directly access the card that owns the port instead of
iterating over all cards.
|
|
The latency offset type should be signed (int64_t) so we can also add
a negative latency offset.
This also includes changing the type of the sink/source
offsets and updating pacmd so it handles negative numbers.
|
|
A latency offset variable was added to the port struct and a function to
set the latency offset.
The latency offset does nothing for now, but it will be later added to
the sink/source latency.
|
|
|
|
They're not used for anything yet, but hopefully soon they'll be.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
Declaring structs before including anything ensures that the
structs are available for everybody in case of circular includes.
|
|
Without this fix, errors about previous definitions are generated in
numerous locations.
Example of error:
CC libpulsecore_1.98_la-auth-cookie.lo
In file included from ../../src/pulsecore/source.h:46:0,
from ../../src/pulsecore/sink.h:40,
from ../../src/pulsecore/core.h:50,
from ../../src/pulsecore/shared.h:25,
from ../../src/pulsecore/auth-cookie.c:33:
../../src/pulsecore/device-port.h:40:24: error: redefinition of typedef
'pa_core'
../../src/pulsecore/core.h:29:24: note: previous declaration of
'pa_core' was here
make[3]: *** [libpulsecore_1.98_la-auth-cookie.lo] Error 1
Overall it would be nicer if we could avoid this kind of fix, but it
would require further reorganisation that I'm not prepared to undertake
right now.
|
|
The recommended way of setting available status is to call
pa_device_port_set_available, which will send a subscription event
to the relevant card. It will also fire a hook.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
This forms the base for being able to expose all ports of all
profiles (even inactive ones) to clients.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Since both cards and sinks can hold references to a port, it makes
sense to reference count them. Although no current implementation
actually has sinks with ports but without a card, it felt wrong
to make it harder to make such an implementation in the future.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|