summaryrefslogtreecommitdiffstats
path: root/src/pulse
Commit message (Collapse)AuthorAgeFilesLines
* format: Add a type for DTSArun Raghavan2011-05-022-0/+4
|
* introspect: Get format of sink inputArun Raghavan2011-05-022-1/+6
| | | | | This gets the negotiated format of sink inputs in pa_context_get_sink_input*(). Also prints the format in 'pactl list'.
* introspect: Get formats for sinksArun Raghavan2011-05-022-0/+37
| | | | | This gets the list of supported formats for a sink in pa_context_get_sink_info*(). Also prints these in 'pactl list'.
* stream: Add API to get a stream's pa_format_infoArun Raghavan2011-05-022-0/+13
|
* format: Add some convenience functions for printingArun Raghavan2011-05-022-0/+49
|
* format: Const-ify some parametersArun Raghavan2011-05-022-4/+4
|
* core: Fix some FIXMEs for the extended APIArun Raghavan2011-05-021-6/+17
| | | | | | This adds some checks that I'd postponed and adds a "should-be-good-enough" guess for tlength when using a compressed format.
* format: Avoid some code duplicationArun Raghavan2011-05-022-0/+5
| | | | | | We frequently need to free an idxset containing pa_format_infos, so define an internal free function that can be used directly with this (instead of defining it once-per-file).
* sink-input: Don't assert on bad formatsArun Raghavan2011-05-022-15/+19
| | | | Handles bad format input more gracefully and returns an error instead.
* sink: Remove PASSTHROUGH flagArun Raghavan2011-05-021-8/+2
| | | | | | | This removes the passthrough flag from sinks since we will drop exclusively passthrough sinks in favour of providing a list of formats supported by each sink. We can still determine whether a sink is in passthrough mode by checking if any non-PCM streams are attached to it.
* format: Add convenience API to check if a format is PCM or notArun Raghavan2011-05-022-0/+7
|
* core: Add extended stream API to support compressed formatsArun Raghavan2011-05-023-19/+120
| | | | | | | | | | | | | | | This is the beginning of work to support compressed formats natively in PulseAudio. This adds a pa_stream_new_extended() that takes a format structure, sends it to the server (=> protocol extension) and has the server negotiate with the appropropriate sink to figure out what format it should use. This is work in progress, and works only with PCM streams. Actual compressed format support in some sink needs to be implemented, and extensive testing is required. More details on how this is supposed to work is available at: http://pulseaudio.org/wiki/PassthroughSupport
* format: Add some properties and internal APIArun Raghavan2011-05-023-0/+104
| | | | | The properties will be used by clients to set the sample format, sampling rate, etc. The functions will be used internally.
* core: Add a pa_format_info structureArun Raghavan2011-05-023-0/+151
| | | | | This will be used to represent the format of data provided by the client for both compressed and PCM formats in a new extended API.
* sample: Use PA_SAMPLE_INVALID instead of numeric valueArun Raghavan2011-05-021-1/+1
|
* filters: Handle stream moves properlyArun Raghavan2011-04-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that we handle streams moving between sinks properly. To do this, we change the way the filter.* properties are handled a little bit. Firstly, this splits up the "filter.apply" property into two properties - "filter.want" and "filter.apply". "filter.apply" acts as before - it bypasses module-filter-heuristics and directly tells module-filter-apply what filters are to be applied. "filter.want" is used to tell module-filter-heuristics what filters the client wants. The module then decides whether to actually apply the filter or not (for now, this makes sure we don't apply echo-cancellation even if requested on phone sinks (where it is assumed AEC is taken care of or is not required). Next, we also make sure that we track whether the client set "filter.apply" or module-filter-heuristics did - and in the latter case, we recalculate "filter.apply" and then have module-filter-apply apply the filter if required. This introduces some evil in the form of causing the move_finish callback to possibly trigger another move, but we protect for this case (with a property) to be doubly sure of not causing an infinite loop.
* util: Implement pa_get_binary_name() for Mac OS XDaniel Mack2011-04-231-0/+26
|
* filter: Move the proplist defines into the central place and document them.Colin Guthrie2011-04-201-0/+6
|
* doc: Fix typoColin Guthrie2011-04-051-1/+1
|
* sink-input: Add volume_writable to pa_sink_input.Tanu Kaskinen2011-03-292-4/+4
| | | | | | | | | | This is pretty cosmetic change; there's no actual functionality added. Previously the volume_writable information was available through the pa_sink_input_is_volume_writable() function, but I find it cleaner to have a real variable. The sink input introspection variable name was also changed from read_only_volume to volume_writable for consistency.
* Get rid of some warningsMaarten Bosmans2011-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly warnings about unused stuff. Furthermore, the first hunk is a fix for the change in 177948a6. Finally, comment in AEC_dtd was translated and the code simplified slightly. CC module_bluetooth_device_la-module-bluetooth-device.lo modules/bluetooth/module-bluetooth-device.c: In function ‘a2dp_process_render’: modules/bluetooth/module-bluetooth-device.c:1335:30: warning: pointer targets in passing argument 6 of ‘sbc_encode’ differ in signedness [-Wpointer-sign] ../src/modules/bluetooth/sbc/sbc.h:92:9: note: expected ‘ssize_t *’ but argument is of type ‘size_t *’ CC module_rygel_media_server_la-module-rygel-media-server.lo modules/module-rygel-media-server.c:383:13: warning: ‘append_property_dict_entry_object_array’ defined but not used [-Wunused-function] CC module_echo_cancel_la-adrian-aec.lo modules/echo-cancel/adrian-aec.h:360:15: warning: ‘AEC_getambient’ defined but not used [-Wunused-function] modules/echo-cancel/adrian-aec.h:368:14: warning: ‘AEC_setgain’ defined but not used [-Wunused-function] modules/echo-cancel/adrian-aec.h:374:14: warning: ‘AEC_setaes’ defined but not used [-Wunused-function] modules/echo-cancel/adrian-aec.h:377:16: warning: ‘AEC_max_dotp_xf_xf’ declared ‘static’ but never defined [-Wunused-function] CC module_echo_cancel_la-module-echo-cancel.lo modules/echo-cancel/module-echo-cancel.c: In function ‘time_callback’: modules/echo-cancel/module-echo-cancel.c:266:12: warning: variable ‘fs’ set but not used [-Wunused-but-set-variable] CC module-virtual-sink.lo modules/module-virtual-sink.c: In function ‘sink_input_pop_cb’: modules/module-virtual-sink.c:206:15: warning: variable ‘current_latency’ set but not used [-Wunused-but-set-variable]
* Merge remote-tracking branch 'mkbosmans/mingw32-build'Colin Guthrie2011-03-201-9/+14
|\
| * Fix pa_rtclock_from_wallclockMaarten Bosmans2011-03-191-9/+14
| | | | | | | | | | | | | | | | The HAVE_CLOCK_GETTIME macro protects timespec and related functions, nothing of which is used in pa_rtclock_from_wallclock. And silently just not converting was not the proper solution anyway. Also add an assert in pulse/mainloop.c to report the integer overflow that was triggered by the wrong pa_rtclock_from_wallclock. Without the assert, debugging was painful.
* | Fix up some double spacesMaarten Bosmans2011-03-184-10/+9
| |
* | Fixup #include directives according to Coding StyleMaarten Bosmans2011-03-118-22/+15
| | | | | | | | | | Use #include "header.h" if functionality of header.h is implemented and #include <header.h> if functionality of header.h is used.
* | Fix up according to Coding StyleMaarten Bosmans2011-03-112-2/+2
| | | | | | | | Only whitespace changes in here
* | volume: Add a PA_VOLUME_UI_MAX define for the recommended max volume to show ↵Colin Guthrie2011-03-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in UIs This value is not a technical upper limit, it's just a 'sensible' value that is not crazy high, but also allows software amplification above 0dB (aka 100%) for very quiet audio sources. We recommend that a comprehensive volume control UI should allow users to set volumes up to this limit, although of course should deal gracefully if the user has set the volume even higher than this without resulting in a feedback loop that effectively limits the upper volume. The value chosen is +11dB. This was selected somewhat subjectively and is very similar to the current 150% that gnome-volume-control uses (which is ~+10.57dB). On the plus side, we now recommend that everyone allows 'Volumes up to 11' which is pretty awesome. http://en.wikipedia.org/wiki/Up_to_eleven https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-April/006945.html https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-April/006950.html
* | Various fixes for build warningsMaarten Bosmans2011-03-021-1/+1
| |
* | introspect: Client-side implementation for has_volume/read_only_volumeArun Raghavan2011-03-021-2/+6
| | | | | | | | | | This completes the client-side changes to the protocol extension introduced by commit 99ddca89cdca9b0b92ab9870764f9211e6a82e31
* | Implement the "volume sharing" feature.Tanu Kaskinen2011-02-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have a filter sink that does some processing, currently the benefits of the flat volume feature are not really available. That's because if you have a music player that is connected to the filter sink, the hardware sink doesn't have any idea of the music player's stream volume. This problem is solved by this "volume sharing" feature. The volume sharing feature works so that the filter sinks that want to avoid the previously described problem declare that they don't want to have independent volume, but they follow the master sink volume instead. The PA_SINK_SHARE_VOLUME_WITH_MASTER sink flag is used for that declaration. Then the volume logic is changed so that the hardware sink calculates its real volume using also the streams connected to the filter sink in addition to the streams that are connected directly to the hardware sink. Basically we're trying to create an illusion that from volume point of view all streams are connected directly to the hardware sink. For that illusion to work, the volumes of the filter sinks and their virtual streams have to be managed carefully according to a set of rules: If a filter sink follows the hardware sink volume, then the filter sink's * reference_volume always equals the hw sink's reference_volume * real_volume always equals the hw sink's real_volume * soft_volume is always 0dB (ie. no soft volume) If a filter sink doesn't follow the hardware sink volume, then the filter sink's * reference_volume can be whatever (completely independent from the hw sink) * real_volume always equals reference_volume * soft_volume always equals real_volume (and reference_volume) If a filter sink follows the hardware sink volume, and the hardware sink supports flat volume, then the filter sink's virtual stream's * volume always equals the hw sink's real_volume * reference_ratio is calculated normally from the stream volume and the hw sink's reference_volume * real_ratio always equals 0dB (follows from the first point) * soft_volume always equals volume_factor (follows from the previous point) If a filter sink follows the hardware sink volume, and the hardware sink doesn't support flat volume, then the filter sink's virtual stream's * volume is always 0dB * reference_ratio is always 0dB * real_ratio is always 0dB * soft_volume always equals volume_factor If a filter sink doesn't follow the hardware sink volume, then the filter sink's virtual stream is handled as a regular stream. Since the volumes of the virtual streams are controlled by a set of rules, the user is not allowed to change the virtual streams' volumes. It would probably also make sense to forbid changing the filter sinks' volume, but that's not strictly necessary, and currently changing a filter sink's volume changes actually the hardware sink's volume, and from there it propagates to all filter sinks ("funny" effects are expected when adjusting a single channel in cases where all sinks don't have the same channel maps). This patch is based on the work of Marc-André Lureau, who did the initial implementation for Pulseaudio 0.9.15.
* | Merge remote-tracking branch 'mkbosmans/mingw32-build'Colin Guthrie2011-02-258-42/+31
|\|
| * Use pa_read, pa_write and pa_poll instead of system functionsMaarten Bosmans2011-02-171-1/+1
| |
| * win32: Implement rtclock based on QueryPerformanceCounterMaarten Bosmans2011-02-174-13/+6
| | | | | | | | Also remove some unnecessary <time.h> headers.
| * Apply #ifdefs around functionality not available on win32Maarten Bosmans2011-02-172-5/+15
| | | | | | | | And also the reverse: around some win32 specific functionality
| * Use <pulsecore/socket.h> instead of <sys/socket.h>Maarten Bosmans2011-02-174-17/+8
| | | | | | | | | | | | | | | | The check whether POSIX socket.h or WIN32 winsock2.h must be included can be made centrally. The downside is that some functionality of e.g. arpa/inet.h is also implemented in winsock.h, so that some files that don't use socket functions, but do use inet.h functions, must also include pulsecore/socket.h. (as well as arpa/inet.h)
| * Clean up <poll.h> includesMaarten Bosmans2011-02-171-6/+1
| | | | | | | | | | | | Instead <pulsecore/poll.h> should be included. That file includes poll.h on platform where it is appropriate. Also remove some unnecessary <ioctl.h> includes.
* | Allow read-only or non-existing sink input volume.Tanu Kaskinen2011-02-221-0/+2
|/ | | | | | | | | | | | 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()).
* build: Don't include empty Makefile.am in subdirsMaarten Bosmans2011-01-311-20/+0
|
* client: Don't update smoother while corkedArun Raghavan2011-01-151-2/+2
| | | | | | | | | | | | | | This prevents the smoother attached to the stream clock from being updated while the stream is corked, which in turn ensures that once corking is completed, pa_stream_get_time() always returns the same value until the stream is uncorked - i.e., the clock does not advance when the client believes that it will not. The actual call to pa_smoother_put() happens on things like stream suspend/unsuspend, which trigger timing updates. This changes the smoother coefficients, which means that a call to pa_smoother_get() for the same value of 'x' can return different values before and after a timing update.
* volume: Trivial cosmetics (remove a space)Colin Guthrie2010-12-061-1/+1
|
* build-sys: Replace dummy Makefiles with proper Makefile.am'sColin Guthrie2010-12-052-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | This is needed to better support out of tree builds (including distcheck) and to ensure the necessary folders are created in the build tree on configure and also works around an intl-tools bug (https://bugs.launchpad.net/intltool/+bug/605826) The Makefile.am's used are minimal (and in some cases completely blank). At present they do not include anything interesting with the majority of the real work still done by the monolitic src/Makefile.am It may make sense to start splitting out src/Makefile.am into smaller chunks but this commit makes the minimum changes to address the issues that result from using make distcheck and other out of tree builds. Note: This 'breaks' the ability to type make in e.g. the src/modules folder and have all of PA rebuilt accordingly (this is because the static Makefiles previously present just did a "make -C ..") which was purportedly for use in emacs. But I'm sure there will be a better and more robust way to configure emacs to do your builds properly if this behaviour is still desirable.
* doxygen: Fix version numbers for new featuresColin Guthrie2010-12-043-7/+7
| | | | | | Due to how our branching worked out, these new features will debut in v1.0 and not v0.9.22 which has already been released from the stable-queue branch
* version: Drop the micro version numberColin Guthrie2010-11-281-2/+2
| | | | | | | | | | | As per discussions with Lennart, we will be moving to a two-component version number scheme when the next release is made from git master branch. This means we will be dropping the micro version component (although for compatibility, it will remain defined as 0 in version.h). For more information, please see the announcement here: http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7921
* pulse: make sure legacy_dir is not staticJan Kratochvil2010-11-251-1/+1
|
* core: Add infrastructure for synchronizing HW and SW volume changesJyri Sarha2010-10-161-1/+6
| | | | | | | | | | | | | | | | To make concurrent use of SW and HW volume glitchles their application needs to be synchronized. For accurate synchronization the HW volume needs to be applied in IO thread. This patch adds infrastructure to delay the applying of HW volume to match with SW volume timing. To avoid synchronization problems this patch moves many of the volume and mute related functions from main thread to IO thread. All these changes become active only if the sync volume flag for a sink has been set. So, for this patch to have any effect it needs to be taken into use by sink implementor. Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com> Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com> Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
* volume: Decrease PA_VOLUME_MAX to be < 2^31Arun Raghavan2010-10-151-1/+1
| | | | | | | This decrease PA_VOLUME_MAX to be less than 2^31. We want to do this in order to simplify signed arithmetic when applying software volume scaling (since the volume can now always be safely treated as a signed number).
* volume: Clamp volume to PA_VOLUME_MAXArun Raghavan2010-10-152-9/+14
| | | | | | This ensures that we always clamp the volume to PA_VOLUME_MAX. While this currently has no effect, it will be required for making sure we don't exceed PA_VOLUME_MAX when its value changes in the future.
* volume: Use a macro to check if a volume is validArun Raghavan2010-10-153-19/+22
| | | | | | | This adds a PA_VOLUME_IS_VALID() macro for checking if a given pa_volume_t is valid. This makes changes to the volume ranges simpler (just change PA_VOLUME_MAX, for example, without needing to modify any other code).
* doxygen: Add 'See also' linking to the overview pageDavid Fries2010-10-1312-11/+46
| | | | | | | A good many of the header files are broken into a function reference page and an overview page. These changes add a direct link from each function reference page to their overview page if one exists.
* doxygen: Documentation improvementsDavid Fries2010-10-135-15/+16
| | | | | | | | | stream.h, simple.h The words drain and flush are a little ambiguous, make it explicit as to what happens to any existing audio. *mainloop.h reword *_free and *_get_api for grammar