| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
snd_mixer_selem_get_*_dB_range() and _ask_*_vol_dB().
The check is inspired by a driver that returned higher dB limit from
snd_mixer_selem_get_playback_dB_range() than what _ask_playback_vol_dB()
returned at maximum integer volume.
|
|
|
|
|
|
| |
e->masks.
SND_MIXER_SCHN_UNKNOWN is defined as -1, so that's not a good array index...
|
|
|
|
|
| |
This is just a quick hack to prevent array overflow. Correct fix would be to
implement support for more channels.
|
|
|
|
|
|
|
|
|
|
| |
On 64-bit systems LONG_MAX is greater than the largest possible value of a
uint32_t variable, which caused the compiler to warn about a comparison that is
always false. On 32-bit systems pa_atou() can return a value that will overflow
when assigned to e->volume_limit, which has type long, so the comparison was
necessary.
This dilemma is resolved by using pa_atol() instead of pa_atou().
|
|
|
|
| |
To make the code cleaner and have the checks all in one place.
|
|
|
|
| |
and element_apply_constant_volume() into a single function.
|
|
|
|
|
|
|
| |
This change makes it possible to configure an arbitrary constant volume for a
volume element in the path configuration, which is applied when the path is
selected. Note: this is only useful when the exact hardware and driver are
known beforehand.
|
|
|
|
|
|
|
|
|
|
| |
pulsecore/core-util.c: In function ‘pa_hexstr’:
pulsecore/core-util.c:1858: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
modules/alsa/alsa-mixer.c: In function ‘pa_alsa_decibel_fix_dump’:
modules/alsa/alsa-mixer.c:3678: warning: cannot optimize possibly infinite loops [-Wunsafe-loop-optimizations]
modules/alsa/alsa-mixer.c: In function ‘pa_alsa_path_set_new’:
modules/alsa/alsa-mixer.c:2640: warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
|
|
|
|
|
|
|
|
|
|
|
| |
are used by the path elements.
Without this, p->max_dB could never be less than 0 dB, because the loop at the
end of pa_alsa_path_probe() would reset p->max_dB to 0 as soon as the loop
encountered a channel that wasn't touched by any element.
There was a similar issue for p->min_dB too (it could never be more than 0 dB),
which is also fixed by this patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
volume.
This feature is mainly useful in embedded systems that have built-in speakers.
In such situations the full audio path is known beforehand, so it's possible to
know what is the maximum sensible volume, and any higher volume can be
disabled.
The volume limit is set in path configuration files in the [Element] section,
using option "volume-limit". The value is the desired maximum volume step of
the volume element.
|
|
|
|
| |
complain about unhandled cases.
|
| |
|
|
|
|
|
| |
This commit only implements the parser, the decibel fix data is not yet used
for anything.
|
|
|
|
|
|
|
|
|
|
| |
It seems git managed to mess up a git-am with a patch from
David which moved where this function was called element_probe
to within itself (recursive which could normally lead to an
infinite loop, but as it was now never called from anywhere else,
this didn't happen).
Thank you to Maarten for spotting and following up the issue.
|
|
|
|
|
|
|
| |
Always round towards 0 dB. Also add a few debug comments to aid
troubleshooting.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Original patch contributed by 'kelemeng'
http://pulseaudio.org/ticket/843
|
|
|
|
|
|
| |
Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
|
|
|
|
| |
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
|
|
|
|
|
|
|
| |
PA_ALSA_ENUMERATION_IGNORE.
This fix doesn't have any concrete effect, because the two constants have the
same value.
|
| |
|
|
|
|
|
| |
instead of coming up with pointless aliases, reuse the already established
names, for second headphones, and second speakers.
|
|
|
|
| |
As exposed by really old Microsoft USB sound systems
|
|
|
|
| |
http://pulseaudio.org/ticket/740
|
| |
|
|
|
|
| |
users.
|
|
|
|
|
|
|
| |
If an element does not control some channels assume they are 0dB in
comparison to the other elements, i.e. do not influence the volume at
all. Previously we were assuming they were as high as the highest of the
channels we do control.
|
|
|
|
| |
broken drivers apparently need that
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
channel map
We need to make sure that having both input and output weighs more for
selecting the default profile than a channel map that matches the
default channel map has.
https://bugzilla.redhat.com/show_bug.cgi?id=496320
|
| |
|
|
|
|
| |
controllable in hw
|
| |
|
| |
|
| |
|
|
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.
|