Commit graph

81 commits

Author SHA1 Message Date
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
99a6a4742f core: make sure we fix up flags/monitor flags already in pa_sink_new() instead of pa_sink_put() 2009-05-08 02:04:48 +02:00
Lennart Poettering
4ee4a55617 core: use pa_{source|sink}_get_latency_within_thread() at one more place 2009-04-14 01:03:10 +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
9ae8ca2c37 core: memory leak, fix ref counting when moving streams 2009-04-10 01:21:16 +02:00
Lennart Poettering
c32c6c833e introduce relative_volume field in sink_input and make use of it on sink flat volume change 2009-04-08 03:49:16 +02:00
Lennart Poettering
61b07768c2 add suspend_within_thread() callbacks to pa_sink_input/pa_source_output 2009-04-07 00:46:20 +02:00
Lennart Poettering
373b5efe51 properly account for seeks in the requested_bytes counter 2009-04-01 23:05:09 +02:00
Lennart Poettering
75a8d18285 pass destination source/sink when moving streams so that we can access them 2009-04-01 03:04:39 +02:00
Lennart Poettering
c2f6d090c7 don't access i->sink if it is not set 2009-04-01 03:03:20 +02:00
Lennart Poettering
7f5481ede0 simplify latency config functions a bit and make them callable in more contexts 2009-03-30 18:23:48 +02:00
Lennart Poettering
d04f3e1aef Trigger move callback a little bit earlier so that no IO thread is running 2009-03-30 18:21:34 +02:00
Lennart Poettering
a998038ee2 introduce pa_sink_input_get_relative_volume() 2009-03-20 13:50:26 +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
620bf84573 try to vacuum a little when nothing is going on 2009-02-25 09:13:19 +01:00
Lennart Poettering
00839ddaa6 make sure we check the sink status for PA_SINK_INPUT_FAIL_ON_SUSPEND only after module-suspend-on-idle had the chance to resume the device 2009-02-24 22:27:25 +01:00
Lennart Poettering
3bccb704b6 Allow passing a NULL proplist to pa_xxxx_update_proplist() to just fire a notification 2009-02-22 05:01:32 +01:00
Lennart Poettering
823431e447 allow sending meta/policy events to clients 2009-02-12 03:18:05 +01:00
Lennart Poettering
f42afc4883 make return value of pa_{sink_input|source_output}_update_proplist() void 2009-02-05 04:08:18 +01:00
Lennart Poettering
63e234335f handle default volume initialization properly 2009-02-05 04:05:47 +01:00
Lennart Poettering
de86c6e3ad add a 'volume factor' that is implicitly multiplied into the volume of a sink input without being visible to the outside 2009-02-05 01:22:05 +01:00
Lennart Poettering
d802a76963 remove soft volume from pa_sink_input_new_info since it should be handled internally and automatically by the sink input 2009-02-04 18:34:08 +01:00
Lennart Poettering
4cf82c74a1 merge in properties earlier to make identification of streams from hooks easier 2009-02-04 18:28:52 +01:00
Lennart Poettering
fc31d21353 when moving a sink between sinks make volume relative 2009-02-03 04:06:52 +01:00
Lennart Poettering
08800c35b0 make a couple of functions return proper error codes 2009-02-03 03:14:20 +01:00
Lennart Poettering
162e43b306 make a few functions return void where the retval isn't used/never != 0 2009-02-03 03:11:31 +01:00
Lennart Poettering
e47d03dea4 implement PA_STREAM_FAIL_ON_SUSPEND logic 2009-02-03 02:23:46 +01:00
Lennart Poettering
64b0543588 when changing volume, store whether it is worth remembering or no 2009-01-27 23:40:03 +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
948be361c4 invert an ill-placed assert 2009-01-27 00:56:57 +01:00
Lennart Poettering
9ba408415c store requested resampling method in a seperate field and use it when create a new resampler after a move 2009-01-27 00:52:28 +01:00
Lennart Poettering
29cb778dcc move sink input/source output move functions into two parts so that we can start the move, delete the original sink, create a new sink, finish the move; similar for source outputs 2009-01-23 22:38:30 +01:00
Lennart Poettering
cf24b57279 in most cases we can use i->core instead of i->sink->core and o->coure instead of o->source->core 2009-01-23 22:35:19 +01:00
Lennart Poettering
0f7954a9f5 don't include full path in driver name. 2009-01-22 00:15:19 +01:00
Lennart Poettering
47a2b17d01 make proplist inheritance scheme automatic and implicit 2009-01-15 20:27:07 +01:00
Lennart Poettering
29c7a28817 kill autoload stuff as planned 2009-01-15 20:07:13 +01:00
Lennart Poettering
344c934edb maintain a list of sink inputs/source outputs as part of the pa_client object 2009-01-15 18:38:20 +01:00
Lennart Poettering
75119e91cd add new dont_rewind_render flag to allow quick starts of newly created streams 2009-01-15 00:40:06 +01:00
Marc-André Lureau
2204bbebf2 core: add source, si, so proplist_update 2009-01-13 19:06:10 +02:00
Lennart Poettering
03aa91dea7 make sure we don't hit an assert when we issue two rewind requests in a
single iteration

Closes rhbz 472757.
2008-12-21 17:55:29 +01:00
Lennart Poettering
82f09b6d8f Don't hit an assert when checking for idleness
Closes #398
2008-12-17 21:03:17 +01:00
Lennart Poettering
358824b330 add new virtual function may_move_to to sink inputs/source outputs to allow modules to forbid certain connections 2008-10-21 18:24:45 +02:00
Lennart Poettering
309bc71f07 fix invalid validity check 2008-10-21 18:22:28 +02:00
Lennart Poettering
b6ccea3064 add a comment that pa_sink_input_set_volume and module-flat-volume.c are related 2008-10-08 00:10:01 +02:00
Lennart Poettering
e053fa03f7 if the channel map was modified due to PA_SINK_INPUT_FIX_CHANNELS, remap the specified volume properly 2008-10-07 22:46:18 +02:00
Lennart Poettering
e1dbc75eb8 use pa_channel_map_init_extend() instead of pa_channel_map_init_auto() as channel map for sink inputs/source outputs in case no map is specified 2008-10-07 22:45:37 +02:00
Lennart Poettering
ae83483cf0 modernize a few checks 2008-10-07 22:44:43 +02:00
Lennart Poettering
72024cda54 when the volume is changed make sure we send out a subscription event 2008-10-07 22:43:00 +02:00
Lennart Poettering
624f220aa6 instead of resetting virtual_volume unconditionally on initialization, do so only when no volume was set before 2008-10-07 22:42:13 +02:00