Commit graph

142 commits

Author SHA1 Message Date
Lennart Poettering
ab5ac06ac7 Merge commit 'wtay/optimize' 2009-08-23 00:06:35 +02:00
Lennart Poettering
fe9a577cf2 alsa: leave headphone jack enabled in normal mixer paths 2009-08-21 03:45:58 +02:00
Lennart Poettering
8a2a6b2004 adjust various data/library paths automatically if we are run from a build tree 2009-08-21 03:43:53 +02:00
Wim Taymans
c1b6a87b27 alsa-sink: reduce the amount of smoother updates
Exponentially increase the amount of time between smoother updates. We start
with a 2ms interval and increase up to 200ms intervals.
Smoother updates and the resulting linear regression take a fair amount of CPU
so we want to reduce the amount of updates.
2009-08-20 13:40:27 +02:00
Lennart Poettering
8c31974f56 sink: volume handling rework, new flat volume logic
- We now implement a logic where the sink maintains two distinct
  volumes: the 'reference' volume which is shown to the users, and the
  'real' volume, which is configured to the hardware. The latter is
  configured to the max of all streams. Volume changes on sinks are
  propagated back to the streams proportional to the reference volume
  change. Volume changes on sink inputs are forwarded to the sink by
  'pushing' the volume if necessary.

  This renames the old 'virtual_volume' to 'real_volume'. The
  'reference_volume' is now the one exposed to users.

  By this logic the sink volume visible to the user, will always be the
  "upper" boundary for everything that is played. Saved/restored stream
  volumes are measured relative to this boundary, the factor here is
  always < 1.0.

- introduce accuracy for sink volumes, similar to the accuracy we
  already have for source volumes.

- other cleanups.
2009-08-19 02:55:02 +02:00
Lennart Poettering
d6f598ab3e udev: allow passing of ignore_dB= parameter to alsa modules 2009-08-19 02:29:59 +02:00
Lennart Poettering
24e582808c source: rework volume handling
- 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
2009-08-19 01:35:43 +02:00
Lennart Poettering
58d441f7ea log: place more rate limit invocations 2009-08-15 00:16:25 +02:00
Lennart Poettering
e8340345f6 alsa: enable ext. amplifier by default 2009-08-12 00:56:10 +02:00
Lennart Poettering
462cdf44b7 alsa: adjust priority bonus of mappings that match the configured default 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
2009-08-12 00:53:38 +02:00
Lennart Poettering
9b2534b6d0 alsa: properly treat ESTRPIPE as system suspend 2009-08-04 00:23:43 +02:00
Lubomir Rintel
34f31f666e Recover stream when it's suspended upon rewind
Error from snd_pcm_rewind() might mean we just woke up from suspend and
didn't have a chance to try to recover the stream since we didn't write
to it in between. Call try_recover() in such cases.

Note that for this to work kernel must return ESTRPIPE instead of EBADF
for rewind/forward attempts on suspended streams, so that
snd_pcm_recover() can recognize it should snd_pcm_resume() the stream.
This is not the case yet (2.6.31-rc5), patch is available.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2009-08-03 22:47:15 +02:00
Lennart Poettering
39aa1cf94d alsa: revert to first set number of periods, then set buffer size
Apparently some ALSA drivers aren't happy with getting the buffer size
configured first followed the period size. So swap the order again and
document this for future reference so that we don't turn that around
again.
2009-07-31 02:07:24 +02:00
Lennart Poettering
5efb07281d alsa: throw timing data away after device resume 2009-07-24 20:13:52 +02:00
Lennart Poettering
18433c19b6 alsa: handle correctly if alsa returns us 0 or EAGAIN on snd_pcm_mmap_begin if we didn't call snd_pcm_avail immediately before 2009-07-24 13:45:59 +02:00
Lennart Poettering
c325b93c01 alsa: don't reset volume/mute when selecting path 2009-07-23 19:24:26 +02:00
Lennart Poettering
ac38c4d898 build-sys: add a couple of stub Makefiles 2009-07-23 18:49:28 +02:00
Lennart Poettering
1160cad9c3 alsa: control 'Speaker' element as well 2009-07-23 18:44:26 +02:00
Lennart Poettering
7e2afffb81 alsa: deal properly with IO functions asking us to write 0 bytes 2009-07-22 22:38:38 +02:00
Lennart Poettering
5d4769b7dd alsa: fix a few comments 2009-07-01 20:20:06 +02:00
Lennart Poettering
fc33f7ee97 Merge most of elmarco/rtclock2
Merge commit 'e4d914c945'
2009-06-22 23:09:46 +02:00
Marc-André Lureau
125c528896 pulse: move pa_rtclock_now in pulsecommon 2009-06-20 17:29:08 +03:00
Lennart Poettering
32e2cd6d32 core: get rid of rt sig/timer handling since modern Linux' ppooll() is finally fixed for granularity 2009-06-19 21:00:06 +02:00
Marc-André Lureau
5dcdd5e358 perl -p -i -e 's/pa_rtclock_usec/pa_rtclock_now/g' find . -name '*.[ch]' 2009-06-19 19:04:04 +03:00
Lennart Poettering
6ad3855639 alsa: synthesize volume values more sensibly for channels that are not controllable in hw 2009-06-19 02:03:03 +02:00
Lennart Poettering
b1ea7c0d89 alsa: document alsa mixer path/profile sets a bit more 2009-06-19 01:55:59 +02:00
Lennart Poettering
b70b5edcfc alsa: add copyright blobs and comments to all mixer paths/profile sets 2009-06-19 01:30:24 +02:00
Lennart Poettering
11d2a7ee21 alsa: move udev rules file behind the other sound related rules 2009-06-18 23:03:28 +02:00
Lennart Poettering
0fd17c6cb9 alsa: document default profile set a bit better 2009-06-18 23:00:53 +02:00
Lennart Poettering
8a5f8f41f6 alsa: add profile set for Native Instruments 4 DJ 2009-06-18 22:58:58 +02:00
Lennart Poettering
348dcd6a31 alsa: unify alsa log handling and snd_config_update_free_global() handling in one place 2009-06-18 21:27:02 +02:00
Lennart Poettering
25e5197f6a alsa: merge mic boost into volume slider 2009-06-18 15:50:41 +02:00
Lennart Poettering
8fe50b0d7c alsa,core: include mapping name in description strings 2009-06-18 04:38:59 +02:00
Lennart Poettering
ca560ccc4a alsa: add profile set for Native Instruments Audio 8 DJ sound card 2009-06-18 03:58:05 +02:00
Lennart Poettering
60df970bd9 alsa: properly count mappings of manually defined profiles 2009-06-18 03:43:51 +02:00
Lennart Poettering
b5cea8d590 alsa: fix duplicate mapping detection 2009-06-18 03:43:22 +02:00
Lennart Poettering
34b48887ef alsa: when creating alsa sinks/sources include mapping name in device name to allow profiles mit multiple sinks or multiple sources 2009-06-18 03:42:39 +02:00
Lennart Poettering
334325efd7 alsa: allow placing device id in alsa device strings at arbitrary positions 2009-06-17 04:17:25 +02:00
Lennart Poettering
31575f7766 alsa: rework mixer logic
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.
2009-06-17 03:45:14 +02:00
Lennart Poettering
1e8a374f2f alsa: fix bad memory access for devices that lack a mixer 2009-06-10 23:22:12 +02:00
Lennart Poettering
587fc2ab1c core: make sure soft mute status stays in sync with hw mute status
This should close rhbz #494851, mandriva bz #51234.

Probably the same as our own #572, launchpad #352732.
2009-06-08 00:02:15 +02:00
Lennart Poettering
561c0af851 alsa: monitor device reservation status and resume automatically when device becomes unused 2009-06-05 19:05:42 +02:00
Lennart Poettering
00797b8b6e core: add a suspend cause flags field 2009-06-05 19:05:07 +02:00
Lennart Poettering
1c4393acf0 modules: add {sink|source|card}_properties argument to all modules 2009-05-28 02:39:22 +02:00
Lennart Poettering
d2198c9ba1 alsa: fix wording, we are speaking of card profiles, not output profiles 2009-05-26 22:29:33 +02:00
Lennart Poettering
0cb383717e alsa: be a bit more verbose when a hwparam call fails 2009-05-14 01:25:07 +02:00
Lennart Poettering
dfd6b61cd1 alsa: include mixer name in sink/source properties 2009-05-12 22:55:50 +02:00
Lennart Poettering
3766850c8b core: introduce pa_{sink,source}_set_fixed_latency()
This allows us to forward the fixed latency directly from the sink to
the monitor source withut having to wait for pa_sink_put().
2009-05-08 02:04:48 +02:00
Lennart Poettering
4bffc7849f alsa: initialize buffer size before number of periods to improve compat with some backends 2009-05-01 04:16:17 +02:00
Lennart Poettering
4129f51194 alsa: don't hit an assert when invalid module arguments are passed 2009-05-01 04:11:30 +02:00