Commit graph

12 commits

Author SHA1 Message Date
Tanu Kaskinen
43e7868008 device-port: Remove pa_device_port_hashmap_free() 2013-02-16 01:13:57 +02:00
poljar (Damir Jelić)
9d6eb21c7e device-port: Add a card pointer to the ports.
This way we can directly access the card that owns the port instead of
iterating over all cards.
2013-01-20 09:27:05 +02:00
poljar (Damir Jelić)
bf4091dcf8 device-port: Change the latency offset type to a signed int.
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.
2012-06-28 16:33:14 +03:00
poljar
bc03487896 device-port: Add a latency variable to the port struct
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.
2012-06-25 19:49:54 +03:00
Tanu Kaskinen
e0c16af551 device-port: Remove an out-of-date comment. 2012-06-08 19:00:14 +03:00
David Henningsson
0ef3456f68 device-port: Add a property list to ports.
They're not used for anything yet, but hopefully soon they'll be.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-12-02 18:41:57 +02:00
Colin Guthrie
5958208c26 device-port: Remove redundant include after the better circular dep fix. 2011-11-27 15:44:23 +00:00
Tanu Kaskinen
46920bab16 device-port: Fix the circular dependency problem more cleanly.
Declaring structs before including anything ensures that the
structs are available for everybody in case of circular includes.
2011-11-27 17:22:42 +02:00
Colin Guthrie
c95650b929 pulsecore: Fix issue with circuilar definitions.
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.
2011-11-27 14:54:01 +00:00
David Henningsson
47f28a5843 Notify port available status changes, and update protocol version
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>
2011-11-26 16:58:37 +02:00
David Henningsson
0dced7f275 Cards now has ports directly, and device port has list of profiles
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>
2011-11-26 16:46:42 +02:00
David Henningsson
d9685ec85d Turn device ports into reference counted objects
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>
2011-11-26 16:46:42 +02:00