summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Implement the "volume sharing" feature.Tanu Kaskinen2011-02-265-185/+591
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* alsa-mixer: Make sure capture source and input source use right pathDavid Henningsson2011-02-256-45/+12
| | | | | | | Make sure that mic and line (with common names) use the specific path instead of the analog-input one. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* alsa-mixer: Fixup "Mic"/"Line"/"analog-input" paths to work with the new pathsDavid Henningsson2011-02-254-22/+111
| | | | Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* alsa-mixer: Add new paths for Internal Mic, Front Mic, Rear Mic and Dock MicDavid Henningsson2011-02-257-79/+321
| | | | Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* alsa-mixer: always round towards 0 dBDavid Henningsson2011-02-251-6/+9
| | | | | | | Always round towards 0 dB. Also add a few debug comments to aid troubleshooting. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* alsa-mixer: add required-any and required-* for enum optionsDavid Henningsson2011-02-253-12/+91
| | | | | | | | | | | Now you can add required-any to elements in a path and the path will be valid as long as at least one of the elements are present. Also you can have required, required-any and required-absent in element options, causing a path to be unsupported if an option is (not) present (simplified example: to skip line in path if "Capture source" doesn't have a "Line In" option). Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* alsa-mixer: Add a few well-known descriptionsDavid Henningsson2011-02-251-0/+7
| | | | | | | | Add front mic, rear mic, and docking line-in. These are likely to be present on modern hda chips, for reference see linux-2.6/sound/pci/hda/hda_codec.c:hda_get_input_pin_label Signed-off-by: David Henningsson <david.henningsson@canonical.com>
* alsa-card: Add a new modarg "profile_set" for giving the card a custom ↵Tanu Kaskinen2011-02-251-1/+8
| | | | profile set configuration file.
* alsa-mixer: Fix path set building when using the element-output or ↵Tanu Kaskinen2011-02-251-0/+5
| | | | | | | | | element-input mapping options in profile set configuration. When creating synthesized paths, pa_alsa_path_set_new() created duplicate elements for each path, and one of the duplicate elements would be marked as required absent. That made path probing fail. While debugging this, I noticed also that pa_alsa_path_synthesize() didn't initialize p->last_element properly.
* core: Add a new hook PA_CORE_HOOK_CARD_PROFILE_CHANGEDColin Guthrie2011-02-252-0/+3
| | | | | | This will allow modules to know when a card profile has changed and take appropriate action. This might prove useful when developing UCM so that the appropriate verb can be set.
* core: Added new hooks: PA_CORE_HOOK_SOURCE_PORT_CHANGED and ↵Kim Therkelsen2011-02-253-0/+6
| | | | | | | | | | | PA_CORE_HOOK_SINK_PORT_CHANGED This allows modules to know when certain ports are changed. This will allow e.g. a filter module (or LADSAP) to only load when a certain port is used on the device (e.g. to only filter headphones and not normal speakers). (Comment from Colin Guthrie: This may also have use in UCM)
* Support for multichannel DSP processing in module-ladspa-sinkKim Therkelsen2011-02-251-147/+237
|
* Merge remote-tracking branch 'mkbosmans/mingw32-build'Colin Guthrie2011-02-2566-433/+659
|\
| * Use pa_read, pa_write and pa_poll instead of system functionsMaarten Bosmans2011-02-174-14/+14
| |
| * tests/rtstutter: Use pa_rtclockMaarten Bosmans2011-02-171-22/+11
| |
| * Use pa_* instead of generic functions to improve portabilityMaarten Bosmans2011-02-174-14/+15
| |
| * Give module-waveout a configure switchMaarten Bosmans2011-02-171-3/+6
| | | | | | | | | | - Also disable the scary DBus and udev warnings when building for win32 - and only install some dbus/x11 specific files when appropriate
| * module-waveout: Adapted to updated APIMaarten Bosmans2011-02-172-177/+235
| | | | | | | | Waveout sink works again, Wavein source still needs some work.
| * win32: Implement pa_randomMaarten Bosmans2011-02-171-1/+16
| |
| * win32: Implement rtclock based on QueryPerformanceCounterMaarten Bosmans2011-02-179-19/+36
| | | | | | | | Also remove some unnecessary <time.h> headers.
| * win32: flush stderr after log outputMaarten Bosmans2011-02-171-0/+3
| |
| * Implement some functions for win32Maarten Bosmans2011-02-174-17/+71
| | | | | | | | And disable building binaries for win32 that make no sense there
| * Repair some typosMaarten Bosmans2011-02-173-6/+6
| |
| * Add AM_LDFLAGS more consistently to all commandsMaarten Bosmans2011-02-171-14/+14
| |
| * Fix dependencies and include necessary headersMaarten Bosmans2011-02-178-1/+15
| |
| * Use PCRE if POSIX regex.h is not availableMaarten Bosmans2011-02-172-2/+12
| |
| * Apply #ifdefs around functionality not available on win32Maarten Bosmans2011-02-1719-12/+118
| | | | | | | | And also the reverse: around some win32 specific functionality
| * Adapt win32 specific code to current APIMaarten Bosmans2011-02-173-5/+29
| |
| * Use <pulsecore/socket.h> instead of <sys/socket.h>Maarten Bosmans2011-02-1730-108/+52
| | | | | | | | | | | | | | | | 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-1710-20/+8
| | | | | | | | | | | | 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.
| * Use setenv instead of putenvMaarten Bosmans2011-02-171-1/+1
| | | | | | | | | | | | | | In theory putenv could be used to handle freeing of strings yourself, but this was not done in PulseAudio. That leaves no advantages in using putenv. With setenv you're at the mercy of the implementation whether the strings leak, but at least that is better then a certain leak, as it was before.
* | sconv_sse: Exclude SSE optimizations for Mac OS XEdward Rudd2011-02-221-2/+2
| | | | | | | | At least on 32bit compiles, there are not enough registers.
* | solaris: update call of pa_thread_new to new prototypeEdward Rudd2011-02-221-1/+1
| |
* | coreaudio: Fix call to pa_thread_newEdward Rudd2011-02-221-1/+1
| |
* | Allow read-only or non-existing sink input volume.Tanu Kaskinen2011-02-228-61/+148
| | | | | | | | | | | | | | | | | | | | | | | | 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()).
* | dbusiface-stream: Send the Device property in the GetAll handler.Tanu Kaskinen2011-02-221-0/+1
| |
* | core: Link virtual sinks and sources to their streams.Tanu Kaskinen2011-02-2214-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change doesn't add any functionality in itself, but it will be useful in the future for operating on chains of sinks or sources that are piggy-backing on each other. For example, the PA_PROP_DEVICE_MASTER_DEVICE property could be handled in the core so that each virtual device doesn't have to maintain it separately. By using the origin_sink and destination_source pointers the core is able to see at stream creation time that the stream is created by a virtual device, and then update that device's property list using the name of the master device that the stream is being connected to. The same thing can be done also when the stream is being moved from a device to another, in which case the _MASTER_DEVICE property needs updating.
* | src/Makefile.am: add missing space to fix build using uClibcHenning Heinold2011-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using uClibc AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS) is not empty because `$(INTLLIBS)` is set to `-lintl`. This uncovered a missing space in commit ef0cc745 which resulted in the following build error. […] CC libbluetooth_ipc_la-ipc.lo modules/bluetooth/ipc.c: In function 'bt_audio_service_open': modules/bluetooth/ipc.c:65:26: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing] modules/bluetooth/ipc.c: In function 'bt_audio_service_get_data_fd': modules/bluetooth/ipc.c:110:13: warning: cast increases required alignment of target type [-Wcast-align] modules/bluetooth/ipc.c:110:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] make[3]: *** No rule to make target `-lintl', needed by `libbluetooth-ipc.la'. Stop. make[3]: Leaving directory `/oe/build-minimal-uclibc/minimal-uclibc-dev/work/armv7a-oe-linux-uclibceabi/pulseaudio-0.9.22-r11.0+gitr0+051d82133f0ae6a57bf66fd200bc8e3591a7d5ca/git/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/oe/build-minimal-uclibc/minimal-uclibc-dev/work/armv7a-oe-linux-uclibceabi/pulseaudio-0.9.22-r11.0+gitr0+051d82133f0ae6a57bf66fd200bc8e3591a7d5ca/git/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/oe/build-minimal-uclibc/minimal-uclibc-dev/work/armv7a-oe-linux-uclibceabi/pulseaudio-0.9.22-r11.0+gitr0+051d82133f0ae6a57bf66fd200bc8e3591a7d5ca/git' make: *** [all] Error 2 This patch is taken from OpenEmbedded where it has been present since 2009 for PulseAudio 0.9.15 and greater [1]. [1] http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=ef0cc74567b3bb98378c17f6a523bf18ba132ed7 [2] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=7c33f2e906a20e139d53b4f2d8fbc2773a4725b3 Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de> Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> CC: Henning Heinold <heinold@inf.fu-berlin.de>
* | Correct wav file creation for 24/32 and 24 bits sample formats HSD=3669357Vincent Becker2011-02-221-2/+11
| |
* | PulseAudio: added IT block to fix thumb conditional instruction build error ↵Kurt Taylor2011-02-211-0/+1
|/ | | | | | | | messages See: http://pulseaudio.org/ticket/914 Tweaked-By: Arun Raghavan <arun.raghavan@collabora.co.uk>
* alsa: disable period wakeups in tsched mode if possiblePierre-Louis Bossart2011-02-011-0/+28
| | | | | | | | | | | | | | | | | | | | | | | This patch reflects a new capability that Lennart was wishing for. Wish granted... Re-submitting it now that alsa-lib 1.0.24 provides additional entry points to disable period wakeups in timer-scheduling mode if hardware can work without it (HDAudio, oxygen and Intel SST). Example with standard playback on HDAudio output Before change: Top causes for wakeups: 3.8% ( 5.4) [hda_intel] <interrupt> 2.8% ( 4.0) alsa-sink After change: Top causes for wakeups: 2.3% ( 3.0) alsa-sink Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
* echo-cancel: Make Orc file names less sillyArun Raghavan2011-02-013-4/+4
| | | | | The naming was what it was because of the way orc.mak was originally written. This has changed now.
* build: Simplify Orc-related make rulesArun Raghavan2011-02-014-321/+23
| | | | | | | This greatly simplifies the Orc-related make rules. The old system of distributing generated files is gone, which means that anyone who wants to build with Orc support enabled needs to have the orcc compiler installed (presumably the orc 'devel' package in most distros).
* build: Move orc.mak out of build/Arun Raghavan2011-01-311-1/+1
| | | | | That directory is commonly used by developers for out-of-tree builds, so don't keep the Makefile in there.
* build: Remove unnecessary flags in AM_CFLAGSMaarten Bosmans2011-01-311-15/+9
| | | | | | | | The CFLAGS and LIBS of libsamplerate, libspeex and libsndfile are added to the pulse libraries depending on those libraries. Also src/pulse/version.h is generated by configure, so it does not need to go in BUILT_SOURCES. (Slightly tweaked by Colin Guthrie to fix a merge problem relating to BUILT_SOURCES)
* build: Don't include empty Makefile.am in subdirsMaarten Bosmans2011-01-3120-382/+0
|
* build: Generate module symdefs in src/modules directoryMaarten Bosmans2011-01-311-104/+88
| | | | | | | | | | | This will make it possible to remove the empty Makefile.am files. - module-...-symdef.h files are all generated in src/modules, instead of in the subdir of the module. - The default inclusion of src/modules subdirs in AM_CFLAGS can be removed, where necessary (raop) the subdir is included in the specific CFLAGS. - The src/daemon and src/modules directories are always created on make, to facilitate out of tree builds. - AM silent rules are used for the generation of symdef files by m4. - For echo-cancel, keep the build dir include for now (and mkdir it) although limit it to just the echo-cancel module's CFLAGS (Colin Guthrie)
* Merge remote branch 'mkbosmans/rate-adjustment'Colin Guthrie2011-01-313-60/+103
|\
| * module-rtp-recv: Request proper rewind after underrunMaarten Bosmans2011-01-161-1/+3
| |
| * module-rtp-recv: Remove smoother from write indexMaarten Bosmans2011-01-161-21/+3
| | | | | | | | | | It isn't necessary anymore with the new algorithm. The slow adjust of the smoother was even detrimental to the accuracy of the rate estimate.