Commit graph

367 commits

Author SHA1 Message Date
Lennart Poettering
6839ef6874 alsa: create a seperate mixer path for Speaker elements
On some cards line-out is independant of Sepaker and it is a good idea
to cover that so that they can independantly be activated.

https://bugzilla.redhat.com/show_bug.cgi?id=520884
2009-10-31 03:43:42 +01:00
Lennart Poettering
73a4f4fdbc alsa: leave other headphone control enabled if possible 2009-10-31 03:42:42 +01:00
Lennart Poettering
591ade1aca alsa: lower priority for Headphone2 path 2009-10-31 03:41:21 +01:00
Lennart Poettering
73d9d317b2 alsa: cover Input Source:AUX IN
As seen on some HDA chips:

https://bugzilla.redhat.com/attachment.cgi?id=359804
2009-10-31 03:25:32 +01:00
Lennart Poettering
220ac0a61a alsa: cover Headphone2 mixer element
As seen on some drivers:

https://bugzilla.redhat.com/show_bug.cgi?id=498612
2009-10-31 03:10:00 +01:00
Lennart Poettering
430e8e2ee5 alsa: cover 'Digital Input Source' element
As used by some HDA devices:

https://bugzilla.redhat.com/attachment.cgi?id=365290
2009-10-31 02:56:57 +01:00
Lennart Poettering
3e115a96b0 alsa: cover Mic Jack Mode element
As used by some HDA chips:

https://bugzilla.redhat.com/attachment.cgi?id=366816
2009-10-31 02:52:35 +01:00
Lennart Poettering
c96d2d1117 alsa: disable period event only with tsched=1 2009-10-06 00:17:54 +02:00
Lennart Poettering
88b777311d alsa: make build gcc clean on 32bit 2009-09-20 03:17:36 +02:00
Colin Guthrie
fd25e8fa8b alsa: Give all ports a human name to allow UI tools to present the choice to users. 2009-09-18 09:22:23 +01:00
Lennart Poettering
a37e48a819 alsa: fix Surround mixer element name
s/Sourround/Surround/

Spotted by Colin Guthrie
2009-09-18 04:14:36 +02:00
Vladimir Kokarev
e63c867f87 alsa: correct assumptions about channels an element lacks
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.
2009-09-17 01:26:18 +02:00
Lennart Poettering
80b4457476 alsa: properly report suspension error codes 2009-09-11 01:22:10 +02:00
Lennart Poettering
bb36bb4bbe alsa: properly convert sample buffer sizes 2009-09-11 01:21:46 +02:00
Lennart Poettering
d5f43bd4c6 alsa: disable tsched for software devices before we configure the buffer metrics so that we don't accidently set a buffer size that is suitable for tsched where we don't use tsched 2009-09-09 23:57:49 +02:00
Lennart Poettering
8364b959b4 alsa: when probing for profiles configure buffer/period sizes since some broken drivers apparently need that 2009-09-09 23:56:51 +02:00
Lennart Poettering
84ade2140e alsa: pass SND_PCM_NONBLOCK when opening device during unsuspend, the same way we do it for initial opening 2009-09-09 04:44:51 +02:00
Lennart Poettering
557c429510 alsa: rework buffer/period configuration
- As discussed on alsa-devel it's probably better to initialize the
  buffer size first, followed by the period size. If that fails try the
  other way round. If that fails try to configure only buffer size. If
  that fails try to configure only period size. Finally, try to
  configure neither.

- Don't require integral periods anymore.

Both of these changes should help improving compatibility with various
weirder sound devices, such as TV cards.
2009-09-09 04:28:52 +02:00
Lennart Poettering
382eced35d alsa-sink: init after_avail earlier (llvm-clang-analyzer) 2009-09-08 23:47:23 +02:00
Lennart Poettering
f5046759cd llvm-clang-analyzer: drop a few unnecessary assignments and other trivial fixes 2009-09-08 23:46:23 +02:00
Lennart Poettering
8cd635bc61 alsa: add more input sources to path set 2009-09-03 04:45:55 +02:00
Lennart Poettering
46b9ca7fd5 alsa: by default increase watermarks only on real underruns, don't try to be smart 2009-09-01 04:55:05 +02:00
Lennart Poettering
6b6d14626d alsa: distuingish real underruns from left_to_play=0 2009-09-01 04:54:18 +02:00
Lennart Poettering
050a3a99e1 alsa: automatically decrease watermark after a time of stability 2009-08-24 03:27:29 +02:00
Lennart Poettering
80c6937303 alsa: increase interval between smoother updates exponentially for alsa sources, following the scheme for sinks 2009-08-23 22:34:42 +02:00
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