| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This fix was done for _set_port_cb() already, but the first fix didn't fix
setup_mixer(). Now that's done too.
|
|
|
|
|
|
|
|
| |
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]
|
| |
|
|
|
|
|
| |
This adds profiles for Native Instruments recently announced
"Trator Audio 6" and "Traktor Audio 10".
|
|
|
|
| |
Only whitespace changes in here
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
| |
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
profile set configuration file.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
When logging a suppression message do so on the same log level as the
suppressed messages.
Cherry picked by Colin Guthrie from ec5a7857127a1b3b9c5517c4a70a9b2c8aab35ca
with a couple of additional changes due to extra limiting in master
that was not present in stable-queue.
|
|
|
|
|
| |
This patch also disables mixer callback code if we do not have neither
HW-volume or HW-mute.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed to better support out of tree builds (including
distcheck) and to ensure the necessary folders are created in the
build tree on configure and also works around an intl-tools bug
(https://bugs.launchpad.net/intltool/+bug/605826)
The Makefile.am's used are minimal (and in some cases completely
blank). At present they do not include anything interesting
with the majority of the real work still done by the monolitic
src/Makefile.am
It may make sense to start splitting out src/Makefile.am into
smaller chunks but this commit makes the minimum changes to address
the issues that result from using make distcheck and other out of
tree builds.
Note: This 'breaks' the ability to type make in e.g. the src/modules
folder and have all of PA rebuilt accordingly (this is because the
static Makefiles previously present just did a "make -C ..") which
was purportedly for use in emacs. But I'm sure there will be a better
and more robust way to configure emacs to do your builds properly if
this behaviour is still desirable.
|
|
|
|
|
|
|
| |
Currently if sink base volume differs from 0dB and sync-volume is used,
wrong volume values are written to hw. This patch fixes that.
Signed-off-by: Juho Hämäläinen <ext-juho.hamalainen@nokia.com>
|
| |
|
|
|
|
|
|
| |
Original patch contributed by 'kelemeng'
http://pulseaudio.org/ticket/843
|
|
|
|
|
|
|
|
|
| |
BugLink: https://launchpad.net/bugs/680810
Some laptops have 'Internal Mic 1' exposed as an 'Input Source', e.g., Dell
XPSM 1530, so handle these, too.
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
|
|
|
|
| |
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
|
|
|
|
|
| |
How about this? There are a couple of bugs in sink_write_volume_cb,
by the way. Another patch will be sent once this dB value printing
patch is accepted.
-- 8< --
|
|
|
|
|
| |
This just adds a few PA_UNLIKELY macros around some error paths in
frequently called code.
|
|
|
|
|
|
|
| |
The PCM handle is already opened with the SND_PCM_NONBLOCK flag.
This additional call is useless.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
|
| |
|
|
|
|
|
|
| |
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: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
|
|
|
|
| |
Previously, if work_done was false, we could conceivably not call snd_pcm_start().
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when rewinding alsa, a fixed value of 256 bytes is used,
which represents 1.33ms @ 48kHz (2ch, 16bit). This is typically fine
and due to DMA constraints we would not want to rewind less than this.
However with more demanding sample specs, (e.g. 8ch 192kHz 32bit)
256 bytes is likely not sufficient, so calculate what 1.33ms would
be and use which ever value is bigger.
Discussed with David Henningsson and Pierre-Louis Bossart here:
http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/7286
|
|
|
|
|
| |
This new audio interface from Native Instruments has 2 stereo channels
for both input and output direction. This patch adds mappings for them.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make new defines for the smoother window size and adjust time constants instead
of reusing some unrelated constant.
Increase the smoother window size even more because the bigger it is, the
better. Since we have a 200ms max update interval and the max smoother history
is 64 entries, 10seconds is a good default.
Decrease the smoother adjust time to 1 second. The previous value of 4 seconds
was too much to adapt quickly after a resume.
|