Age | Commit message (Collapse) | Author | Files | Lines |
|
This lets us suspend devices from within the core for short periods
without having to overload one of the existing suspend causes.
https://bugs.freedesktop.org/show_bug.cgi?id=64118
|
|
Log mute state and switch state.
|
|
Log all updates to switches and enums.
|
|
Log to what we restored the mute state to.
|
|
Render audio in smaller chunks, the amount of data to mix is not bounded
and we might end up hitting the maximum memory limit (96M).
Fixes rhbz#989552
|
|
As far as I can see, having a mono path in a stereo mapping doesn't
make any sense. It also causes breakage: if the Master Mono mixer
element has two volume channels, the analog-output path gets removed
due to being a subset of analog-output-mono, and that in turn causes
the Master element getting muted. Users generally don't like that.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=54673
|
|
On some machines which has a headset jack, the headset mic does not have its own
jack detection. Then we can look at the headphone jack to get some indication:
We know that if the headphone is unplugged, so is the headset mic. The opposite
is not guaranteed since the user might have plugged in a headphone, not a headset.
Also, there exist multi-function jacks which support both Headphone, Mic in headphone jack
and Headset Mic. In this case the jack name will be "Headphone Mic", not "Headphone", so
we need to include this name too.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
In kernel 3.10, some devices will have the "Headset Microphone" name
to indicate that the mic is part of a mic + headphone combo, i e, a headset.
|
|
|
|
|
|
|
|
Encoding is deprecated according to
http://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
|
|
Build SUID proximity-helper with full relro
|
|
Avoid multilib conflict in /usr/bin/padsp
|
|
The use of the pseudo-blocking D-Bus calls leads to the problem that
NameLost signals are received after the reply to ReleaseName().
The problem with this is that a later acquisition of the same audio
device can potentially receive the NameLost signal corresponding to
the previous instance, due to the fact that the signal hasn't been
popped from the D-Bus message queue.
The simplest approach to solve this problem is to poll the actual name
owner from the D-Bus daemon, in order to make sure that we did really
lose the name.
The proposal uses a blocking call to GetNameOwner to avoid incosistent
states in the internal APIs: it would otherwise be possible to have a
"busy" device before the reservation has been lost, in the unlikely
case if some other process acquires the name before we got the
confirmation that the NameLost was actually true.
|
|
The function is interesting for both rd_device and rd_monitor so make
it part of the rd_device public API to avoid duplicated code.
The decision to move the function to reserve.c is motivated by the fact
that other projects (i.e. jack) use reserve.c only. Therefore, adding a
reserve->reserve-monitor dependency should be avoided.
|
|
Bug found by David Henningsson.
|
|
Calling change_cb() whenever anything happens in the ownership of the
bus name caused trouble in PulseAudio in this scenario:
1. PulseAudio is using a device and owns the corresponding service
name.
2. Another application requests device release.
3. PulseAudio releases the device.
4. Change in the bus name ownership: PulseAudio gives up the
ownership, and nobody owns the name.
5. reserve-monitor notices that, and notifies PulseAudio.
6. Since reserve-monitor reports the device as "not busy", PulseAudio
decides to reserve the bus name immediately back to itself and
opens the device again.
The other application will forcibly take the bus name to itself, as
it should according to the protocol, but the other application may
have trouble opening the device if it tries to do that before
PulseAudio has had time to react to the NameLost signal.
This can be solved by not calling change_cb() if there are no changes
in the device busy status. In this scenario the device is considered
"not busy" while PulseAudio is owning the bus name, so PulseAudio gets
no notification when the ownership changes from PulseAudio to nobody.
|
|
|
|
A left over "required-any" made this path useless for most people.
While we're at it, also add "Front Headphone" like for the normal
speaker path.
Tested-by: Colin Guthrie <gmane@colin.guthr.ie>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
If we expose this information, UIs can use this to make better
decisions about what icon to display.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
BugLink: https://bugs.launchpad.net/bugs/1073420
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Added Dell Inspiron 3420, 3520 and Vostro 2420, 2520.
Note that this is only necessary for kernels 3.3 to 3.5, as 3.6
has phantom jack support.
BugLink: https://bugs.launchpad.net/bugs/1076840
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
We inadvertantly stopped supporting non-standard rates when the
passthrough work was done. This makes sure that if no standard rates are
supported, we try to fallback to whatever ALSA gives us.
|
|
The sink can be resumed while the source is still in PA_SOURCE_INIT.
This is the case if a module such as module-stream-restore routes the
audio to the sink during pa_sink_put(), leading to an inconsistent
state: the sink stays RUNNING but the transport is not actually
acquired.
|
|
When a headset is having a profile switch, we can either leave the
SCO state unmodified (as it was before this patch) or we can
alternatively request it (as older versions of PA).
This patch tries to avoid a potential regression in case a module
such as module-suspend-on-idle is not present, due to the provided
resume-on-running policy. Without this patch, and without such a policy,
the sink and sources would stay suspended until the user manually
performed another profile switch (i.e. hsp->off->hsp).
There are several other solutions currently being discussed as a longer
term solution, some of which require extendind the core. This patch is
therefore proposed as a short-term workaround to avoid the regression.
|
|
bt_transport_acquire() might get called from the main thread, in case
the IO thread hasn't been started yet. In this case, we should not call
setup_stream() since this is going to be called in the beginning of
thread_func().
|
|
If the transport is already acquired and the stream needs to be started,
call setup_stream() directly instead of bt_transport_acquire(u, TRUE).
Both calls are identical in these conditions, with the exception of the
log trace which has now been moved to setup_stream().
|
|
Headset use-cases shouldn't get affected by this module and the support
for A2DP source is interesting, therefore load the module by default.
|
|
Given that headsets have just one single port exposing whether the
audio is streaming (playing) or not, it's not possible that
module-bluetooth-policy would distinguish A2DP/HSP cases, and thus
the automatic selection of the card profile is not deterministic.
For this reason, disable the policy entirely for headsets and focus
only on HFGW and A2DP source profiles.
|
|
Merge the former "hsp-output" and "a2dp-output" ports into one single
port, in order to fix the regression of having several independent
entries in the UI.
|
|
Since commit e32a408b3cdd46857fdf12210c1bf5bdbf3a96f8, we silence the
input memblock in order to give the resampler enough input samples, if
necessary.
But if there is no need to resample the hrir, the resampled memblock is
actually the same as the input memblock. Thus, we have to make sure that
we do not silence it in this case.
|
|
Without this patch, device modules will be left around after the
device has been disconnected and when they are reconnected, the
discovery module will load duplicate device module instances.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=57239
|
|
This is a minor optimization too, but the main benefit is that it's
makes the code easier to understand (I hope), since run_callback()
won't be called at times when it's not needed.
|
|
The new helper function makes it easier to check whether any audio
profiles are connected. That information is needed by the discovery
module for deciding whether a new device module should be loaded. The
device module should use this information too to unload itself at the
right time, but that's currently not implemented.
|
|
Use a more accurate name for the function since it doesn't just check
if it is an audio device (which can be detected quite early), but it
also checks if the most relevant properties (device info, etc.) have
been received.
Besides, add the const qualifier to the pointer since it's not going to
be modified.
|
|
The Device.Connected was only used for tracking whether a device module
should be loaded, but that information is already included in the
individual profile state properties. The property can therefore be
completely ignored without any loss in functionality.
|
|
This simplifies some function argument lists.
|
|
Stream-restore DBus API method argument list is missing last boolean
argument apply_immediately, causing assert to fail in AddEntry handling.
Signed-off-by: Juho Hämäläinen <jusa@hilvi.org>
|
|
The string created when trying to use XDG_RUNTIME_DIR is freed before it
is used in a debug message, and is freed again.
https://bugs.freedesktop.org/show_bug.cgi?id=57280
|
|
This makes sure we don't try to plug in a passthrough stream if the
final sink/source sample spec doesn't match what we want. In the future,
we might want to change rate updates to try a full sample spec update
for passthrough streams.
https://bugs.freedesktop.org/show_bug.cgi?id=50951
|
|
The could that should have been after the rate update ended up being
before, which is incorrect.
|
|
This drops ChangeLog generation from git. It does not make sense to
distribute 500 kB of ChangeLog given how easy it is these days to browse
history with git.
We might replace this with a release-annoucement-esque high-level
summary of changes.
|
|
|
|
Since the old UNIX fd IPC mechanism was removed and we rely on the D-Bus
based API, this is the oldest version that is known to reliably work.
|
|
Since some devices can be chatty with regards to how often they return
from poll(), this adds a PA_UNLIKELY() to all the the rewind_requested
checks in our sink modules to make the general case (no rewind was
requested) the fast path.
|
|
When a rewind is requested on a sink input, the request parameters are
stored in the pa_sink_input struct. The parameters are reset during
rewind processing, and if the sink decides to ignore the rewind
request due to being suspended, stale parameters are left in
pa_sink_input. It's particularly problematic if the rewrite_bytes
parameter is left at -1, because that will prevent all future rewind
processing on that sink input. So, in order to avoid stale parameters,
every rewind request needs to be processed, even if the sink is
suspended.
Reported-by: Uoti Urpala
|
|
We don't need to try a rate update if the desired sample rate is the
same as the one the sink or source is already using.
|