summaryrefslogtreecommitdiffstats
path: root/src/modules/bluetooth/module-bluetooth-device.c
Commit message (Collapse)AuthorAgeFilesLines
* bluetooth: Only close SCO if status has changedLuiz Augusto von Dentz2011-04-301-5/+5
| | | | | In case the io thread is starting there is no point on closing SCO just to resume it latter when the source/sink changes to opened state.
* bluetooth: Fix not updating sample spec when using Media APILuiz Augusto von Dentz2011-04-301-0/+13
| | | | | | When using transport configured via Media API sample spec needs to be updated since codec configuration may affect it when e.g. headset configure a different frequency or number of channels from default.
* bluetooth-device: fix rounding errors caused by few bt volume stepsJuho Hämäläinen2011-04-051-11/+36
| | | | | | | | | | When volume changes in bluetooth device PulseAudio volume is rounded one too low, so if bluetooth headset changes volume and that volume is immediately set again for bluetooth device, bluetooth step drifts lower all the time. Volume is incremented by one in the conversion so that we get right bluetooth step when re-applying volume. Signed-off-by: Juho Hämäläinen <ext-juho.hamalainen@nokia.com>
* bluetooth: drop data every 500ms on oor conditionMarc-André Lureau2011-04-041-11/+14
|
* bluetooth: Fix HSP volume handling.Tanu Kaskinen2011-04-011-32/+69
| | | | | | | | | Previously the userdata for the volume callbacks was saved to pa_core.shared only once when loading module-bluetooth-device, and only when the SCO over PCM feature was used. That breaks volume handling in cases where the HSP profile is used without the SCO over PCM setup. Now the userdata is set always when a sink or source is created, and removed when a sink or source is removed.
* bluetooth: restore original sco_{sink, src}->set_volume when unloadingMarc-André Lureau2011-04-011-0/+6
|
* bluetooth: fix set_volume_cb on sco over pcmMarc-André Lureau2011-04-011-9/+50
| | | | | | | | | | | | The current implementation is totally bogus, it cast the over_sink userdata to the bluetooth-device userdata... It was failing nicely because the previous code had a gentle safe-guard in u->profile == PROFILE_HSP, and u->profile was just random. There is no easy way to associate additional data to a sink or source. Two solutions seems possible: looking up loaded modules and check which one was handling the sink/source, or using pa_shared. I went for the second solution.
* bluetooth: use sco_sink/source to start with right stateMarc-André Lureau2011-04-011-16/+23
| | | | | Note from Tanu Kaskinen: I resolved some conflicts with newer upstream code, so if this patch is broken, blame me..
* bluetooth: Drop all "#ifdef NOKIA" directives.Tanu Kaskinen2011-04-011-49/+8
| | | | | The #ifdefs only added clutter. I don't see any reason to not compile the SCO over PCM support in all the time.
* bluetooth: Pull a2dp-codecs.h from BlueZArun Raghavan2011-03-311-5/+3
| | | | | | This pulls a2dp-codecs.h from BlueZ which contains the capabilities structures for SBC and MPEG. We currently have these manually added to ipc.h, so pulling this header makes our files identical to upstream.
* 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]
* bluetooth: Fix build errors relating to SBCColin Guthrie2011-03-181-1/+1
|
* Fix up some double spacesMaarten Bosmans2011-03-181-1/+1
|
* build: move sbc related files to its own directoryLuiz Augusto von Dentz2011-03-141-1/+1
| | | | | This should make it easier to apply patches from BlueZ which also uses sbc subdir for this files.
* bluetooth: add proper handling for bluetooth.nrec propertyLuiz Augusto von Dentz2011-03-141-48/+38
| | | | | | | | | NREC stands for Noise Reduction and Echo Cancelation, it can be changed at any point by the headset. When set to "1" indicates that those algorithms shall be enabled by default and "0" means the headset probably have them active so they should be disabled in PA side.
* bluetooth: fix a2dp_process_pushLuiz Augusto von Dentz2011-03-141-6/+12
| | | | | | Use minimum bitpool configured to get the maximum block_size possible, also remove checks for how much has been written when decoding sbc frames since the block size may change due to bitpool changes.
* bluetooth: reduce bitpool if audio start skippingLuiz Augusto von Dentz2011-03-141-0/+71
| | | | | | | When audio skips it could be that there is some bandwidth limitation in the link e.g. headset doesn't support EDR (< 2.0), and by reducing the bitpool it may find a better rate that either prevent the skips completely or at least reduce them.
* bluetooth: handle Acquire API changeLuiz Augusto von Dentz2011-03-141-44/+2
| | | | | | Acquire now return input and output MTU of the file descriptor so it is no longer necessary to get those after acquiring the fd, which less round trips and faster response time when switching profiles.
* Fix up according to Coding StyleMaarten Bosmans2011-03-111-18/+9
| | | | Only whitespace changes in here
* Clean up <poll.h> includesMaarten Bosmans2011-02-171-2/+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.
* bluetooth: Fix a2dp processingMaarten Lankhorst2010-12-121-1/+1
|
* bluetooth: Add support for Media APILuiz Augusto von Dentz2010-10-071-59/+402
| | | | Make use of D-Bus to transfer file descriptors.
* thread: name all threads so that the names appear in /proc/$PID/task/$TID/commLennart Poettering2010-05-071-1/+1
|
* bluetooth: add HFP Gateway supportJoão Paulo Rechi Vita2010-02-211-13/+37
| | | | | | | | Create the 'Handsfree Gateway' profile for bluetooth cards and add filters for 'org.bluez.HandsfreeGateway' to the discover module so module-bluetooth-device is loaded with the correct profile when a Handsfree Gateway connects to bluetoothd (in this case bluetoothd is acting as the headset).
* bluetooth: don't hit an assert if latency is queried for a stooped recording ↵Lennart Poettering2010-02-091-3/+7
| | | | | | stream https://bugzilla.redhat.com/show_bug.cgi?id=537422
* bluetooth: destruct stream only if it is not already destructedLennart Poettering2010-02-091-13/+15
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=551842
* dbus: remove filter functions only if they were actually set beforeLennart Poettering2010-02-091-1/+6
| | | | | | | This fixes an assert when destructing modules that have not been fully initialized. https://bugzilla.redhat.com/show_bug.cgi?id=548525
* bluetooth: don't set auto_connect flag when discovering bt devicesLennart Poettering2009-10-041-2/+11
|
* blueooth: actually honour 'room' variable (llvm-clang-analyzer)Lennart Poettering2009-09-081-3/+6
|
* bluetooth: handle bluetooth sourceJoão Paulo Rechi Vita2009-08-231-13/+168
|
* udev: allow passing of ignore_dB= parameter to alsa modulesLennart Poettering2009-08-191-2/+2
|
* source: rework volume handlingLennart Poettering2009-08-191-2/+2
| | | | | | | | | | | | | - drop the 'virtual_' prefix from s->virtual_volume since we don't distuingish between reference and real volumes for sources - introduce an accuracy for source volumes: if the hardware can control the volume "close enough" don't necessarily adjust the rest in software unless it is beyond a certain threshold. This should save a little bit of CPU at the expensive of a bit of accuracy in volume handling. - other minor cleanups
* bluetooth: move installation of mq's earlier to avoid context asserts to be ↵Lennart Poettering2009-08-161-2/+2
| | | | triggered
* bluetooth: fix typo with service_{read,write}_typeMarc-André Lureau2009-08-151-2/+4
|
* bluetooth: don't call pa_sink_render with 0 bytes requestMarc-André Lureau2009-08-151-7/+10
|
* core: make fixed latency dynamically changeableLennart Poettering2009-08-151-2/+2
| | | | | | | | | | | | | This of course makes the name 'fixed' a bit of a misnomer. However the definitions are now like this: fixed latency: the latency may change during runtime, but is solely controlled by the backend, the client has no influence. dynamic latency: the latency may change during runtime, influenced by the requests of the clients. i.e. fixed vs. dynamic is from the perspective of the client.
* core: save volume/mute changes coming from the hardware automaticallyLennart Poettering2009-08-071-2/+2
| | | | | Volume changes coming from the lower layers are most likely changes triggered by the user, so let's save them automatically.
* bluetooth: don't connect on unconnected profileMarc-André Lureau2009-07-011-0/+9
|
* bluetooth: warn on EAGAIN after POLLOUTMarc-André Lureau2009-07-011-0/+3
|
* bluetooth: don't busy loop when device is not writable but we want to writeLennart Poettering2009-07-011-1/+1
|
* Merge most of elmarco/rtclock2Lennart Poettering2009-06-221-13/+14
|\ | | | | | | Merge commit 'e4d914c945c13d23b131d7ba75fbdd03cb6d0043'
| * pulse: move pa_rtclock_now in pulsecommonMarc-André Lureau2009-06-201-4/+5
| |
| * perl -p -i -e 's/pa_rtclock_usec/pa_rtclock_now/g' `find . -name '*.[ch]'`Marc-André Lureau2009-06-191-9/+9
| |
* | core: get rid of rt sig/timer handling since modern Linux' ppooll() is ↵Lennart Poettering2009-06-191-1/+0
|/ | | | finally fixed for granularity
* bluetooth: return sensible error code in set_profile()Lennart Poettering2009-06-171-3/+3
|
* alsa: rework mixer logicLennart Poettering2009-06-171-4/+4
| | | | | | | | | | | | 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.
* prop: introduce new PA_PROP_DEVICE_INTENDED_ROLES propertyLennart Poettering2009-06-081-0/+4
|
* modules: add {sink|source|card}_properties argument to all modulesLennart Poettering2009-05-281-3/+31
|
* bluetooth-device: Add safe guard against BT streaming irregularities.Jyri Sarha2009-05-081-3/+27
| | | | | | | | | Some bad quality BT-headsets block bluez socket sometimes for hundreds of milliseconds, especially when changing mode. When the module tries catch up the lost time it may SBC encode up to half a second of audio without yielding. On slow machine this may cause maximum RT time slice to be exceeded. Cleaned out the minor fix that slipped into first version of the patch.
* core: introduce pa_{sink,source}_set_fixed_latency()Lennart Poettering2009-05-081-6/+6
| | | | | This allows us to forward the fixed latency directly from the sink to the monitor source withut having to wait for pa_sink_put().