summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-10-25backend-native: implement volume controlhsp-reviewWim Taymans3-1/+203
Parse the gain changed AT commands from the headset and fire 2 new hooks as a result. The device will connect to those hooks and change the source/sink volumes. When the source/sink volume changes, set the gain on the microphone or speaker respectively. Make sure we do nothing if the transport can not handle the gain changes.
2014-10-25backend-native: add a new native headset backendWim Taymans2-3/+451
Add a simple native headset backend that implements support for the blutooth HSP profile. This allows pulseaudio to output audio to a Headset using the HSP profile. Make the native backend the default.
2014-10-25bluez5-util: add destroy functionWim Taymans2-0/+4
Add a destroy function to the transport that is called before freeing the transport. Useful for cleaning up extra userdata.
2014-10-25bluez5-device: use get_profile_directionWim Taymans1-17/+15
Use the get_profile_direction() helper function to decide when to add a source and a sink instead of enumerating profiles.
2014-10-24configure: Remove "WIBBLE" testDavid Henningsson1-1/+0
Apparently "WIBBLE" is just a test, and maybe the test was "How long does it take until somebody notices a strange row in configure.ac and tries to remove it", if so, the test result is "a little over three years". :-) Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-10-24protocol-native: Fail if trying to push unaligned memblock into queueDavid Henningsson1-0/+7
We will just ignore the memblock if this happens. We already have a check for this in the client library, so this one is just for security reasons. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-10-24stream: Fail on client submitting non-frame-aligned memblocksDavid Henningsson1-0/+2
If somebody tries to push a non-frame-aligned memblock onto the memblockq, then we should fail the write. Otherwise the daemon will crash, see https://bugs.freedesktop.org/show_bug.cgi?id=77595 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-10-24memblockq: Do not allow non-frame indices in the memblock queueDavid Henningsson1-1/+2
Since we don't allow lengths that are not frame aligned, it does not make sense to allow indices that are not frame aligned either. Also, allowing such a thing to be added causes the daemon to crash later instead (see https://bugs.freedesktop.org/show_bug.cgi?id=77595 ). Also drop _se from assert (there is no side effect). Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-10-19tunnel-sink-new: Fix requested latency checkTanu Kaskinen1-1/+1
This fixes a bug in latency configuration. The wrong type in the cast caused UINT64_MAX being not treated as special, so the configured latency was set to UINT64_MAX usecs, which of course is absurdly huge latency.
2014-10-19bluetooth: Move stuff to pa_bluetooth_transport_put/unlink()Tanu Kaskinen2-12/+10
This should not have any effect on behaviour. The goal is to align with the pattern that I think we should follow: Object initialization: - put() is the place to create references from other objects to the newly created object. In this case, adding the transport to discovery->transports was moved from new() to put, and adding the transport to device->transports was moved from set_state() to put(). Object destruction: - unlink() undoes put() and removes all references from other objects to the object being unlinked. In this case setting the device->transports pointer to NULL was moved from set_state() to unlink(), and setting the discovery->transports pointer to NULL was moved from free() to unlink(). - free() undoes new(), but also calls unlink() so that object owners don't need to remember to call unlink() before free().
2014-10-19vala: adding missing fields for sink_input/source_output info structRicardo Salveti de Araujo1-0/+8
Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
2014-10-17pulse: Initalise pa_threaded_mainloop with zeroesArun Raghavan1-6/+1
2014-10-16util: Try finding out application name using dladdr if availableFelipe Sateler2-0/+25
This fixes getting the binary name in the Hurd, or any other port using the GNU C library, but only in the case where the library is directly linked to. Opening with dlopen will not work. Change in v3: reorder header includes and definitions Change in v2: use a weak reference to main, so that we don't crash when main cannot be found.
2014-10-16connect-stress-test: Fix number of streams per sink to "20"David Henningsson1-1/+7
This test broke when PA_MAX_INPUTS_PER_SINK was increased from 32 to 256. Because we currently don't have time to figure out why, let's just set NSTREAMS to 20 in the meantime. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-10-09tunnel-sink-new: Limit the maximum latency to 200 msTanu Kaskinen1-0/+2
The default maximum latency is 10 seconds, which is not good, especially since the tunnel sink doesn't support rewinding. Due to the lack of rewinding, e.g. volume changes take a long time with large latencies.
2014-10-06module-stream-restore: use entry_write when filling up the databaseRicardo Salveti de Araujo1-8/+1
It seems at some point the code migrated to use the entry_write calls, but fill_db is still using the old syntax, causing the entry to be invalid. The crash happens when clean_up_db gets called, which then calls entry_read, causing the crash. Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>
2014-10-06switch-on-connect: Initialize userdata contents to zeroTanu Kaskinen1-1/+1
This fixes userdata.only_from_unavailable being uninitialized in case the user doesn't give the value in modargs.
2014-10-06i18n: Update the Slovak translationDušan Kazik1-101/+108
2014-10-03module-mmkbd-evdev: Don't crash on failure to close fdDavid Henningsson1-2/+5
If the keyboard is unplugged, it looks like the kernel is reporting back -ENODEV when trying to close the fd. This is probably a kernel error, but still, it's better to complain than to crash. Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=80867 Reported-by: Stelios Bounanos Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-10-02core-util: Add pa_unset_env()Tanu Kaskinen3-6/+15
Since we already have pa_set_env(), it's nice to also have a corresponding function for unsetting environment variables.
2014-09-28module-switch-on-port-available: make the output more accurateHui Wang1-2/+1
It is possible that the chosen active_port doesn't equal new_data->active_port, using p->name is more accurate. Please refer to sink_new_hook_callback() Signed-off-by: Hui Wang <hui.wang@canonical.com>
2014-09-28bluetooth: bluez4: Add profile name to sinks and sourcesPali Rohár1-5/+8
Now a2dp and hsp sinks and sources will have different names which means that applications and other modules can use sink/source to distinguish selected profile. Module module-device-restore uses sink/source name and port name as identifier, so if different profiles have different names module-device-restore can store volume settings for each profile. So with this patch it is possible to configure different volume settings for a2dp and hsp profiles. This patch does not change port names so gnome applications will be happy. Note that similar patch is needed also for bluez5, but I'm not using bluez5 so I cannot write or test it. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
2014-09-22module-switch-on-connect: add an argument for conditionally connectingHui Wang1-1/+31
On a machine without fixed connecting audio devices like internal microphone or internal speaker, and when there is no external audio devices plugging in, the default source/sink is alsa_input/alsa_output and there is no input devices/output devices listed in the gnome sound-setting. Under this situation, if we connect a bluetooth headset, the gnome sound-setting will list bluez input/output devices, but they are not active devices by default. This looks very weird that sound-setting lists only one input device and one output device, but they are not active. To change this situation, we add an argument, the policy is if a new source/sink is connected and current default source/sink's active_port is AVAILABLE_NO, we let the new added one switch to default one. BugLink: http://bugs.launchpad.net/bugs/1369476 Signed-off-by: Hui Wang <hui.wang@canonical.com>
2014-09-21Add a Valgrind suppression fileTanu Kaskinen2-0/+51
2014-09-18srbchannel: Defer reading when setting up read callbackDavid Henningsson2-6/+21
Calling the callback while setting it up can make things complicated for clients, as the callback can do arbitrarily things. In this case, a protocol error caused the srbchannel to be owned by both the pstream and the native connection. Now the read callback is deferred, making sure the callback is called from a cleaner context where errors are handled appropriately. Reported-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-18alsa-time-test: Make constants for channels and rateDavid Henningsson1-6/+9
Hard-coding constants on several places is bad coding practice. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-18alsa-time-test: Do not use Lennart's card by defaultDavid Henningsson1-1/+1
Lennart probably had a card with a specific name. It is not a common name anymore. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-18alsa-time-test: Add fillrate parameterDavid Henningsson1-9/+13
As a third parameter, add the number of samples to read/write in every iteration. This will help slow CPUs. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-18bluetooth: Allow policy module to pick 'off' profileLuiz Augusto von Dentz1-5/+2
This allow 'off' profile to be choosen when no other profile is available which is considered better since it requires less resources than other profiles.
2014-09-18bluetooth: Switch transport state to idle in case of HUPJoão Paulo Rechi Vita1-0/+2
In case the socket HUP the transport state should be set to idle which will indicate the profile is no longer available.
2014-09-16bluetooth: Implement org.ofono.HandsfreeAudioAgent.NewConnection()João Paulo Rechi Vita1-2/+30
2014-09-16i18n: Add Slovak translationDusan Kazik2-0/+2734
2014-09-16alsa: Remove unnecessary hctl handles being passed aroundDavid Henningsson8-74/+28
Now that we have switched to using the mixer handle only, there is no use for sending hctl handles around. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-16alsa-mixer/card: Move to use the new mixer interfaceDavid Henningsson3-25/+25
Use the new mixer API to get callbacks, instead of using the hctl API. Using the hctl API caused a memory leak, because alsa-lib itself used the hctl callbacks, which we were previously overriding. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-16alsa-util: Add functions for accessing mixer elements through mixer classDavid Henningsson2-0/+79
Instead of using the hctl interface, we can find controls belonging to other iface types than "mixer". We do this by introducing a new mixer class "SND_MIXER_ELEM_PULSEAUDIO" and create snd_mixer_elem's for all PCM and CARD iface types (as Jacks are of the CARD type and ELD controls are of the PCM type). Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2014-09-11bluetooth: Implement org.ofono.HandsfreeAudioAgent.Release()João Paulo Rechi Vita1-1/+9
2014-09-11bluetooth: Handle CardRemoved signalJoão Paulo Rechi Vita1-0/+27
2014-09-11bluetooth: Handle CardAdded signalJoão Paulo Rechi Vita1-10/+28
2014-09-11bluetooth: Track oFono serviceJoão Paulo Rechi Vita1-0/+36
2014-09-11bluetooth: Implement transport release for hf_audio_agent transportsJoão Paulo Rechi Vita1-0/+16
2014-09-11bluetooth: Implement transport acquire for hf_audio_agent transportsJoão Paulo Rechi Vita1-1/+66
2014-09-11bluetooth: Parse HandsfreeAudioCard propertiesJoão Paulo Rechi Vita1-2/+107
2014-09-11bluetooth: List HandsfreeAudioCard objects from oFonoJoão Paulo Rechi Vita1-1/+53
2014-09-11bluetooth: Register/Unregister Handsfree Audio Agent with oFonoJoão Paulo Rechi Vita1-2/+104
Register as a HandsfreeAudioAgent with oFono during backend initialization and unregiter during backend finalization. This commit also adds a check when receiving method calls or signals to make sure the sender matches with the D-Bus service we're registered with.
2014-09-11bluetooth: Create hf_dbus_send_and_add_to_pending() for oFono backendJoão Paulo Rechi Vita1-0/+21
2014-09-11bluetooth: Monitor D-Bus signalsJoão Paulo Rechi Vita1-4/+45
2014-09-10tests: Remove mix-special-testPeter Meerwald3-334/+1
code has been moved to cpu-mix-test Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-09-10tests: Use float constants in cpu-sconv-testPeter Meerwald1-3/+3
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-09-10tests: Add ARM NEON test code to cpu-remap-testPeter Meerwald1-0/+75
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-09-10tests: Add rearrange remapping test cases to cpu-remap-testPeter Meerwald1-23/+53
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>