Commit graph

56 commits

Author SHA1 Message Date
Tanu Kaskinen
8239fca09f Assume that the ports hashmap of cards is always non-NULL.
The hashmap is created in pa_card_new_data_init().
2012-06-29 14:47:35 +03:00
Tanu Kaskinen
12af302ac7 card: Ensure that there's always at least one profile.
In practice there is always at least one profile, and I
don't think there will ever be cards without profiles.
Therefore, I added assertions to pa_card_new() stating that
the card new data must always contain at least one profile.
Now a lot of code can be simplified, because it's guaranteed
that the profiles hashmap and the active_profile field are
always non-NULL.
2012-06-29 14:24:43 +03:00
poljar
7688e64739 pacmd: Add functions to handle the latency offset
pacmd was extended so it can handle the new latency offset.

A new function was added so we can set the latency also the list
commands were extended to print the latency offset on the ports.
2012-06-27 14:24:56 +03:00
Harsh Prateek Bora
13c7a55599 pulsecore: Use PA_IDXSET_FOREACH wherever applicable.
Signed-off-by: Harsh Prateek Bora <harsh.bora@linaro.org>
2012-05-31 14:12:36 +02:00
Colin Guthrie
aed3b6f9df cli: Ensure source output volumes are printed via cli interface (pacmd ls) 2012-02-14 11:40:14 +00: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
David Henningsson
7e5a741dd1 cli: Show card ports and jack detection status
Expose the new stuff through pacmd.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-11-26 16:58:37 +02:00
Maarten Bosmans
dd9265ac78 Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
Tanu Kaskinen
99ddca89cd Allow read-only or non-existing sink input volume.
There are two known cases where read-only or non-existing sink input volume is
relevant: passthrough streams and the planned volume sharing logic.
Passthrough streams don't have volume at all, and the volume sharing logic
requires read-only sink input volume. This commit is primarily working towards
the volume sharing feature, but support for non-existing sink input volume is
also added, because it is so closely related to read-only volume.

Some unrelated refactoring in iface-stream.c creeped into this commit too (new
function: stream_to_string()).
2011-02-22 20:12:31 +00:00
Lennart Poettering
3b54849a08 core: add priority field to pa_sink/pa_source 2009-08-28 23:31:05 +02:00
Lennart Poettering
8c31974f56 sink: volume handling rework, new flat volume logic
- We now implement a logic where the sink maintains two distinct
  volumes: the 'reference' volume which is shown to the users, and the
  'real' volume, which is configured to the hardware. The latter is
  configured to the max of all streams. Volume changes on sinks are
  propagated back to the streams proportional to the reference volume
  change. Volume changes on sink inputs are forwarded to the sink by
  'pushing' the volume if necessary.

  This renames the old 'virtual_volume' to 'real_volume'. The
  'reference_volume' is now the one exposed to users.

  By this logic the sink volume visible to the user, will always be the
  "upper" boundary for everything that is played. Saved/restored stream
  volumes are measured relative to this boundary, the factor here is
  always < 1.0.

- introduce accuracy for sink volumes, similar to the accuracy we
  already have for source volumes.

- other cleanups.
2009-08-19 02:55:02 +02:00
Lennart Poettering
350a2bc846 core: make fixed latency dynamically changeable
This of course makes the name 'fixed' a bit of a misnomer. However the
definitions are now like this:

fixed latency: the latency may change during runtime, but is solely
controlled by the backend, the client has no influence.

dynamic latency: the latency may change during runtime, influenced by
the requests of the clients.

i.e. fixed vs. dynamic is from the perspective of the client.
2009-08-15 00:48:14 +02:00
Lennart Poettering
e4db56bf07 core: split of FAIL_ON_SUSPEND into KILL_ON_SUSPEND and NO_CREATE_ON_SUSPEND 2009-08-15 00:12:53 +02:00
Lennart Poettering
31575f7766 alsa: rework mixer logic
Completely rework mixer logic. This now allows controlling a full set of
elements from a single sink's volume slider/mute button.

This also introduces sink and source "ports" that can be used to choose
different input or output ports with the UI. (i.e. "mic"/"line-in" or
"speaker"/"headphones".

The mixer paths and device maps are now configered in external
configuration files and can be tweaked as necessary.
2009-06-17 03:45:14 +02:00
Lennart Poettering
00797b8b6e core: add a suspend cause flags field 2009-06-05 19:05:07 +02:00
Lennart Poettering
fe8b10cc05 core: introduce new 'reference' volume for sinks
The reference volume is to be used as reference volume for stored stream
volumes. Previously if a new stream was created the relative volume was
taken relatively to the virtual device volume. Due to the flat volume
logic this could then be fed back to the virtual device volume.
Repeating the whole story over and over would result in a device volume
that would go lower, and lower and lower.

This patch introduces a 'reference' volume for each sink which stays
unmodified by stream volume changes even if flat volumes are used. It is
only modified if the sink volumes are modified directly by the user.

For further explanations see http://pulseaudio.org/wiki/InternalVolumes
2009-04-13 22:56:25 +02:00
Lennart Poettering
f7c229d8f9 core: add a seperate fixed_latency field for sinks/sources with fixed latency 2009-04-10 01:26:04 +02:00
Lennart Poettering
6defb1a6bf add missing whitespace 2009-03-25 16:30:46 +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
Colin Guthrie
86dee05aec Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
Lennart Poettering
e47d03dea4 implement PA_STREAM_FAIL_ON_SUSPEND logic 2009-02-03 02:23:46 +01:00
Lennart Poettering
a5401a50a6 store the default sink/source in proper pa_sink*/pa_source* pointers instead of a string 2009-01-28 01:46:27 +01:00
Lennart Poettering
d5f46e824e move flat volume logic into the core. while doing so add n_volume_steps field to sinks/sources 2009-01-27 04:39:07 +01:00
Lennart Poettering
1be39e4fa5 allow samples to be played with 'default' (i.e. unspecified) volume. 2009-01-27 03:05:40 +01:00
Lennart Poettering
5449d793ae swap argument order of pa_cvolume_get_balance() to be a bit more systematic 2009-01-27 02:45:37 +01:00
Lennart Poettering
0658d9ae92 show pretty channel map name if possible 2009-01-27 00:55:35 +01:00
Lennart Poettering
d5e088ded7 include list of sinks/source in card dump 2009-01-23 22:30:31 +01:00
Lennart Poettering
7368a6e6be add priority logic to find best default profile 2009-01-20 20:35:18 +01:00
Lennart Poettering
85bc5eb39a dump active profile 2009-01-20 03:24:59 +01:00
Marc-André Lureau
a3762a2f98 cli: fix broken array access with signed state enums
I wish I could have merge sink_to_string and source_to_string, but the
enum values are equal, and we cannot assume they will always be.
2009-01-20 00:16:18 +02:00
Lennart Poettering
ed65081dd8 show dB and balance for cached samples 2009-01-19 23:07:13 +01:00
Lennart Poettering
033791ca9f fix up balance format string a bit 2009-01-19 23:06:37 +01:00
Lennart Poettering
b43a45d184 allow setting properties for modules, too 2009-01-19 22:02:28 +01:00
Lennart Poettering
fe703013ad show balance value in CLI listings 2009-01-19 21:59:57 +01:00
Lennart Poettering
76ca5b8578 beautify cli output a bit 2009-01-17 02:09:02 +01:00
Lennart Poettering
f8ba3a9b07 dump profiles when listing cards 2009-01-17 02:03:59 +01:00
Lennart Poettering
bae221cca9 rework module usage counter stuff to be pull based 2009-01-15 20:49:12 +01:00
Lennart Poettering
29c7a28817 kill autoload stuff as planned 2009-01-15 20:07:13 +01:00
Lennart Poettering
615e05584e add functionality to dump list of cards 2009-01-15 18:52:11 +01:00
Lennart Poettering
6130c5c11b Add "base volume" field to sinks/sources 2008-12-24 00:49:43 +01:00
Lennart Poettering
b7026bf248 add a few more gcc warning flags and fix quite a few problems found by doing so 2008-08-19 22:39:54 +02:00
Lennart Poettering
916899a973 pass force_refresh=FALSE to all volume/mute read invocations 2008-08-13 13:59:50 +02:00
Lennart Poettering
add6c0361a Rework module-combine to work with glitch-free core; add new max_request field to pa_sink 2008-06-20 22:32:41 +02:00
Lennart Poettering
8ae83d618e get rid of svn $ keywords 2008-06-18 23:23:21 +03:00
Lennart Poettering
b27cc1d426 fix a bad memory access pulsecore/client.c
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2527 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-06-13 21:56:19 +00:00
Lennart Poettering
045c1d602d merge glitch-free branch back into trunk
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-15 23:34:41 +00:00
Lennart Poettering
14a9b80afb - Check process name when dealing with PID files
- Add new PA_STREAM_FIX_CHANNELS, FIX_RATE, FIX_FORMAT, DONT_MOVE, VARIABLE_RATES to pa_sream_flags_t adn implement it
- Expose those flags in pacat
- Add notifications about device suspend/resume to the protocol and expose them in libpulse
- Allow changing of buffer_attr during playback
- allow disabling for remixing globally
- hookup polkit support


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2067 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-11-21 01:30:40 +00:00
Lennart Poettering
33c238b7ef ignore network sinks/sources
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1988 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-29 21:23:08 +00:00
Lennart Poettering
a67c21f093 merge 'lennart' branch back into trunk.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1971 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-10-28 19:13:50 +00:00
Pierre Ossman
f6023cb5ee Fix some instances where we printed a string without first checking that
the pointer was valid.


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1436 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-03-06 15:47:11 +00:00