Commit graph

143 commits

Author SHA1 Message Date
Lennart Poettering
f5046759cd llvm-clang-analyzer: drop a few unnecessary assignments and other trivial fixes 2009-09-08 23:46:23 +02:00
Lennart Poettering
2970c11902 core: always allow volume setting with single-channel pa_cvolume 2009-08-31 21:40:59 +02:00
Lennart Poettering
e1ce365cd9 native: make sure clients cannot trigger an assert by sending us invalid volume info 2009-08-29 06:11:02 +02:00
Lennart Poettering
a7b3125206 protocol-native: replace use of pa_namereg_is_valid_name() by pa_namereg_is_valid_name_or_wildcard() where applicable to allow use of @@ wildcards 2009-08-29 03:57:53 +02:00
Lennart Poettering
84eb6614eb core: move 'flags' field into 'pa_sink_input_new_data' structure so that hooks can access it 2009-08-28 23:24:09 +02:00
Lennart Poettering
c372b52a77 protocol-native: print more volume change debug messages to easy tracking down of feedback loops 2009-08-27 00:05:54 +02:00
Lennart Poettering
cab48d48d1 protocol-native: compare uint64_t variable with (uint64_t) -1 instead of (size_t) -1 for compat with 32bit archs 2009-08-27 00:04:33 +02:00
Lennart Poettering
9abc010c93 object: speed up type verification by not relying on strcmp()
Instead of using string contents for type identification use the address
of a constant string array. This should speed up type verifications a
little sind we only need to compare one machine word instead of a full
string. Also, this saves a few strings.

To make clear that types must be compared via address and not string
contents 'type_name' is now called 'type_id'.

This also simplifies the macros for declaring and defining public and
private subclasses.
2009-08-21 21:27:44 +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
d7d86e32dd native-protocol: downgrade volume change log messages 2009-08-15 00:54:51 +02:00
Lennart Poettering
58d441f7ea log: place more rate limit invocations 2009-08-15 00:16:25 +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
e53d2fc6b5 native: handle moving() callback with NULL destination properly 2009-08-15 00:05:17 +02:00
Lennart Poettering
72d2540e8d protocol-native: log explicitly each time a client triggers a volume change 2009-08-14 19:31:05 +02:00
Wim Taymans
3b01d3a53f protocol-native: use the right samplerate
The render_memblockq is expressed in the sample_spec of the sink, not of the
particular stream before resampling.
2009-07-23 13:57:42 +02:00
Lennart Poettering
a10b7cda4e native: don't hit assert when user uploads zero-sized sample 2009-07-01 14:25:13 +02:00
Marc-André Lureau
0955e3d45b Base mainloop on pa_rtclock_now()
Move the mainloop to monotonic based time events.

Introduces 4 helper functions:
pa_{context,core}_rttime_{new,restart}(), that fill correctly a
timeval with the rtclock flag set if the mainloop supports it.

Both mainloop-test and mainloop-test-glib works with rt and timeval
based time events. PulseAudio and clients should be fully functional.

This patch has received several iterations, and this one as been
largely untested.

Signed-off-by: Marc-André Lureau <marca-andre.lureau@nokia.com>
2009-06-20 17:29:31 +03:00
Lennart Poettering
46b8ca21d1 native-protocol: allow enumerating ports 2009-06-17 23:17:37 +02:00
Lennart Poettering
6d7cf14dbf native: implement command to change sink/source port 2009-06-17 04:52:41 +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
ad5a1f312a protocol-native,proplist-util: port to pa_get_{user|host}_name_malloc() 2009-04-29 01:56:02 +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
f8ebe8571c protocol-native: downgrade message if we receive pcm block for dead stream 2009-04-10 01:16:59 +02:00
Lennart Poettering
5b871966ab protocol-native: print underrun message only once for each underrun 2009-04-10 01:16:24 +02:00
Lennart Poettering
e61728e67a Make sure we don't get stuck when prebuf is too high
If prebuf is greater than tlength minus minreq we might end up waiting
for the buffer to fill up further however without ever asking for more
data from the client since less minreq bytes might be missing.

This fixes bug #440
2009-04-06 22:13:41 +02:00
Lennart Poettering
14e11e4533 Fix a couple of races in native protocol
Also make sure we account for recording memblock that are currently 'on
the fly' between the main and the IO thread.

Also makes a couple of timing calls that were done in different calls
in a single inter-thread call. That way there is a better guarantee that
they match up.
2009-04-05 02:59:02 +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
76c44d104d be a bit more verbose about max_request changes 2009-03-31 21:36:45 +02:00
Lennart Poettering
cebaa98b38 Log underruns 2009-03-31 21:36:09 +02:00
Lennart Poettering
65b787d000 notify clients about tlength changes 2009-03-30 18:46:12 +02:00
Lennart Poettering
7c37c37fff document more often the context certain functions are called in 2009-03-30 18:26:23 +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
08154554b0 only store card profile if flagged for that 2009-03-23 19:31:36 +01:00
Lennart Poettering
fe3709c5c7 fix a comment 2009-03-19 19:38:30 +01:00
Lennart Poettering
ff38eaf677 Merge commit 'coling/lgpl21' 2009-03-03 21:44:56 +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
297515a39e pass profile priority value to clients 2009-03-03 00:32:10 +01:00
Lennart Poettering
f8a085f5cf properly handle directed card info requests 2009-03-02 18:11:49 +01:00
Lennart Poettering
4505bc9cc6 introduce default channel map in addition to the default sample spec 2009-02-21 16:32:42 +01:00
Marc-André Lureau
88fc458393 protocol-native: don't leak a proplist 2009-02-19 04:58:05 +01:00
Marc-André Lureau
d1306e3020 pulsecore: fix check for cb (m is already checked before) 2009-02-19 04:55:20 +01:00
Marc-André Lureau
6c8d851643 protocol-native: fix get_info() for cards 2009-02-19 04:50:16 +01:00
Lennart Poettering
6db307360b export card information for sinks/sources and number of sinks/sources a profile would create to clients 2009-02-18 22:11:50 +01:00
Lennart Poettering
be81a681ac if we fail to import a memblock fill in silence to guarantee stability of timing 2009-02-18 21:55:55 +01:00
Lennart Poettering
823431e447 allow sending meta/policy events to clients 2009-02-12 03:18:05 +01:00
Lennart Poettering
ee5abc3d64 make native protocol use pa_{sink_input|source_output|card}_update_proplist() 2009-02-05 04:10:08 +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
b2c923e727 properly handle failing stream creation 2009-02-04 18:33:01 +01:00