Updating link to change in openSUSE:Factory/pulseaudio revision 56.0
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=a41c182c62abf2480b0be2b95493c211
This commit is contained in:
parent
026c4958c2
commit
078b914c2d
25
0033-core-Fix-macro-typo-PA_SINK_IS_LINKED-PA_SINK_.patch
Normal file
25
0033-core-Fix-macro-typo-PA_SINK_IS_LINKED-PA_SINK_.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From a631beeafb4729f8bed1c538846d0bb142cee7bf Mon Sep 17 00:00:00 2001
|
||||
From: Colin Guthrie <cguthrie@mandriva.org>
|
||||
Date: Tue, 9 Feb 2010 21:37:32 +0000
|
||||
Subject: [PATCH] core: Fix macro typo - PA_SINK_IS_LINKED -> PA_SINK_INPUT_IS_LINKED
|
||||
|
||||
---
|
||||
src/pulsecore/sink-input.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
|
||||
index 7acb25f..3c957f1 100644
|
||||
--- a/src/pulsecore/sink-input.c
|
||||
+++ b/src/pulsecore/sink-input.c
|
||||
@@ -1086,7 +1086,7 @@ void pa_sink_input_update_proplist(pa_sink_input *i, pa_update_mode_t mode, pa_p
|
||||
if (p)
|
||||
pa_proplist_update(i->proplist, mode, p);
|
||||
|
||||
- if (PA_SINK_IS_LINKED(i->state)) {
|
||||
+ if (PA_SINK_INPUT_IS_LINKED(i->state)) {
|
||||
pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_PROPLIST_CHANGED], i);
|
||||
pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, i->index);
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
292
0034-alsa-cover-Desktop-Speaker-mixer-elements.patch
Normal file
292
0034-alsa-cover-Desktop-Speaker-mixer-elements.patch
Normal file
@ -0,0 +1,292 @@
|
||||
From e8cb96c0103d5bd23fe945afdc658a5f60b70a9d Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 15 Feb 2010 22:23:39 +0100
|
||||
Subject: [PATCH] alsa: cover "Desktop Speaker" mixer elements
|
||||
|
||||
As exposed by really old Microsoft USB sound systems
|
||||
---
|
||||
src/modules/alsa/alsa-mixer.c | 3 +-
|
||||
.../mixer/paths/analog-output-desktop-speaker.conf | 98 ++++++++++++++++++++
|
||||
.../mixer/paths/analog-output-headphones-2.conf | 4 +
|
||||
.../alsa/mixer/paths/analog-output-headphones.conf | 4 +
|
||||
.../mixer/paths/analog-output-lfe-on-mono.conf | 4 +
|
||||
.../alsa/mixer/paths/analog-output-mono.conf | 4 +
|
||||
.../alsa/mixer/paths/analog-output-speaker.conf | 4 +
|
||||
src/modules/alsa/mixer/paths/analog-output.conf | 4 +
|
||||
src/modules/alsa/mixer/profile-sets/default.conf | 14 ++--
|
||||
9 files changed, 131 insertions(+), 8 deletions(-)
|
||||
create mode 100644 src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
|
||||
index 8bbd1f5..cb814af 100644
|
||||
--- a/src/modules/alsa/alsa-mixer.c
|
||||
+++ b/src/modules/alsa/alsa-mixer.c
|
||||
@@ -1784,7 +1784,8 @@ static int path_verify(pa_alsa_path *p) {
|
||||
{ "analog-output-lfe-on-mono", N_("Analog Output (LFE)") },
|
||||
{ "analog-output-mono", N_("Analog Mono Output") },
|
||||
{ "analog-output-headphones-2", N_("Analog Headphones 2") },
|
||||
- { "analog-output-speaker", N_("Analog Speaker") }
|
||||
+ { "analog-output-speaker", N_("Analog Speakers") }
|
||||
+ { "analog-output-desktop-speaker", N_("Analog Speakers 2") }
|
||||
};
|
||||
|
||||
pa_alsa_element *e;
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
|
||||
new file mode 100644
|
||||
index 0000000..9f18b25
|
||||
--- /dev/null
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
|
||||
@@ -0,0 +1,98 @@
|
||||
+# This file is part of PulseAudio.
|
||||
+#
|
||||
+# PulseAudio is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU Lesser General Public License as
|
||||
+# published by the Free Software Foundation; either version 2.1 of the
|
||||
+# License, or (at your option) any later version.
|
||||
+#
|
||||
+# PulseAudio is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU Lesser General Public License
|
||||
+# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
+
|
||||
+; Path for mixers that have a 'Desktop Speaker' control
|
||||
+;
|
||||
+; See analog-output.conf.common for an explanation on the directives
|
||||
+
|
||||
+[General]
|
||||
+priority = 100
|
||||
+
|
||||
+[Element Hardware Master]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all
|
||||
+override-map.2 = all-left,all-right
|
||||
+
|
||||
+[Element Master]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all
|
||||
+override-map.2 = all-left,all-right
|
||||
+
|
||||
+[Element Master Mono]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+; This profile path is intended to control the desktop speaker, not
|
||||
+; the headphones. But it should not hurt if we leave the headphone
|
||||
+; jack enabled nonetheless.
|
||||
+[Element Headphone]
|
||||
+switch = mute
|
||||
+volume = zero
|
||||
+
|
||||
+[Element Headphone2]
|
||||
+switch = mute
|
||||
+volume = zero
|
||||
+
|
||||
+[Element Speaker]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+[Element Desktop Speaker]
|
||||
+required = any
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all
|
||||
+override-map.2 = all-left,all-right
|
||||
+
|
||||
+[Element Front]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all-front
|
||||
+override-map.2 = front-left,front-right
|
||||
+
|
||||
+[Element Rear]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all-rear
|
||||
+override-map.2 = rear-left,rear-right
|
||||
+
|
||||
+[Element Surround]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all-rear
|
||||
+override-map.2 = rear-left,rear-right
|
||||
+
|
||||
+[Element Side]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all-side
|
||||
+override-map.2 = side-left,side-right
|
||||
+
|
||||
+[Element Center]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all-center
|
||||
+override-map.2 = all-center,all-center
|
||||
+
|
||||
+[Element LFE]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = lfe
|
||||
+override-map.2 = lfe,lfe
|
||||
+
|
||||
+.include analog-output.conf.common
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
|
||||
index f2fd31c..580c798 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
|
||||
@@ -55,6 +55,10 @@ override-map.2 = all-left,all-right
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Desktop Speaker]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Front]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
|
||||
index 2131cfe..79ebc7f 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
|
||||
@@ -55,6 +55,10 @@ volume = zero
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Desktop Speaker]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Front]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf b/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
|
||||
index 0a43e27..67ee32f 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
|
||||
@@ -58,6 +58,10 @@ volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
+[Element Desktop Speaker]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Front]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-mono.conf b/src/modules/alsa/mixer/paths/analog-output-mono.conf
|
||||
index 542edc4..13a2d6a 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-mono.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-mono.conf
|
||||
@@ -55,6 +55,10 @@ volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
+[Element Desktop Speaker]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Front]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
|
||||
index aea7853..b133a2e 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
|
||||
@@ -55,6 +55,10 @@ volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
+[Element Desktop Speaker]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Front]
|
||||
switch = mute
|
||||
volume = merge
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output.conf b/src/modules/alsa/mixer/paths/analog-output.conf
|
||||
index d7c1223..50fc88e 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output.conf
|
||||
@@ -53,6 +53,10 @@ volume = zero
|
||||
switch = mute
|
||||
volume = off
|
||||
|
||||
+[Element Desktop Speaker]
|
||||
+switch = mute
|
||||
+volume = off
|
||||
+
|
||||
[Element Front]
|
||||
switch = mute
|
||||
volume = merge
|
||||
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
|
||||
index 046938f..5d352f1 100644
|
||||
--- a/src/modules/alsa/mixer/profile-sets/default.conf
|
||||
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
|
||||
@@ -62,42 +62,42 @@ auto-profiles = yes
|
||||
[Mapping analog-mono]
|
||||
device-strings = hw:%f
|
||||
channel-map = mono
|
||||
-paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
|
||||
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
|
||||
paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
|
||||
priority = 1
|
||||
|
||||
[Mapping analog-stereo]
|
||||
device-strings = front:%f hw:%f
|
||||
channel-map = left,right
|
||||
-paths-output = analog-output analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
|
||||
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono analog-output-lfe-on-mono
|
||||
paths-input = analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line
|
||||
priority = 10
|
||||
|
||||
[Mapping analog-surround-40]
|
||||
device-strings = surround40:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right
|
||||
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
|
||||
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
|
||||
priority = 7
|
||||
direction = output
|
||||
|
||||
[Mapping analog-surround-41]
|
||||
device-strings = surround41:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,lfe
|
||||
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
|
||||
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
[Mapping analog-surround-50]
|
||||
device-strings = surround50:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center
|
||||
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
|
||||
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
|
||||
priority = 7
|
||||
direction = output
|
||||
|
||||
[Mapping analog-surround-51]
|
||||
device-strings = surround51:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
|
||||
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
|
||||
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
|
||||
priority = 8
|
||||
direction = output
|
||||
|
||||
@@ -105,7 +105,7 @@ direction = output
|
||||
device-strings = surround71:%f
|
||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
|
||||
description = Analog Surround 7.1
|
||||
-paths-output = analog-output analog-output-speaker analog-output-lfe-on-mono
|
||||
+paths-output = analog-output analog-output-speaker analog-output-desktop-speaker analog-output-lfe-on-mono
|
||||
priority = 7
|
||||
direction = output
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
49
0035-alsa-cover-Shared-Mic-Line-in-Analog-Source.patch
Normal file
49
0035-alsa-cover-Shared-Mic-Line-in-Analog-Source.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 7d6bab0d003386baba3ff3fad4cc3caa5839b361 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 15 Feb 2010 23:39:12 +0100
|
||||
Subject: [PATCH] alsa: cover 'Shared Mic/Line in', 'Analog Source'
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=558638
|
||||
---
|
||||
.../alsa/mixer/paths/analog-input.conf.common | 25 ++++++++++++++++++++
|
||||
1 files changed, 25 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input.conf.common b/src/modules/alsa/mixer/paths/analog-input.conf.common
|
||||
index fbdc8fb..66c3dda 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input.conf.common
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input.conf.common
|
||||
@@ -277,6 +277,31 @@ name = input-microphone
|
||||
[Option Digital Input Source:Digital Mic 2]
|
||||
name = input-microphone
|
||||
|
||||
+;;; 'Analog Source'
|
||||
+
|
||||
+[Element Analog Source]
|
||||
+enumeration = select
|
||||
+
|
||||
+[Option Analog Source:Mic]
|
||||
+name = input-microphone
|
||||
+
|
||||
+[Option Analog Source:Line in]
|
||||
+name = input-linein
|
||||
+
|
||||
+[Option Analog Source:Aux]
|
||||
+name = input
|
||||
+
|
||||
+;;; 'Shared Mic/Line in'
|
||||
+
|
||||
+[Element Shared Mic/Line in]
|
||||
+enumeration = select
|
||||
+
|
||||
+[Option Shared Mic/Line in:Mic in]
|
||||
+name = input-microphone
|
||||
+
|
||||
+[Option Shared Mic/Line in:Line in]
|
||||
+name = input-linein
|
||||
+
|
||||
;;; Various Boosts
|
||||
|
||||
[Element Capture Boost]
|
||||
--
|
||||
1.6.0.2
|
||||
|
214
0036-alsa-cover-Internal-Mic-elements.patch
Normal file
214
0036-alsa-cover-Internal-Mic-elements.patch
Normal file
@ -0,0 +1,214 @@
|
||||
From 0c836aacd8be34bcb5e02581495f7d30a5fbee05 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 16 Feb 2010 00:58:49 +0100
|
||||
Subject: [PATCH] alsa: cover "Internal Mic" elements
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=562216
|
||||
---
|
||||
src/modules/alsa/mixer/paths/analog-input-aux.conf | 4 +
|
||||
src/modules/alsa/mixer/paths/analog-input-fm.conf | 4 +
|
||||
.../mixer/paths/analog-input-internal-mic.conf | 67 ++++++++++++++++++++
|
||||
.../alsa/mixer/paths/analog-input-linein.conf | 4 +
|
||||
.../alsa/mixer/paths/analog-input-mic-line.conf | 4 +
|
||||
src/modules/alsa/mixer/paths/analog-input-mic.conf | 4 +
|
||||
.../alsa/mixer/paths/analog-input-tvtuner.conf | 4 +
|
||||
.../alsa/mixer/paths/analog-input-video.conf | 4 +
|
||||
src/modules/alsa/mixer/paths/analog-input.conf | 3 +
|
||||
9 files changed, 98 insertions(+), 0 deletions(-)
|
||||
create mode 100644 src/modules/alsa/mixer/paths/analog-input-internal-mic.conf
|
||||
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-aux.conf b/src/modules/alsa/mixer/paths/analog-input-aux.conf
|
||||
index db78eb4..3a7cb7b 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input-aux.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-aux.conf
|
||||
@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Internal Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-fm.conf b/src/modules/alsa/mixer/paths/analog-input-fm.conf
|
||||
index baf674a..7f150e3 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input-fm.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-fm.conf
|
||||
@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Internal Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf b/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf
|
||||
new file mode 100644
|
||||
index 0000000..70cd512
|
||||
--- /dev/null
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf
|
||||
@@ -0,0 +1,67 @@
|
||||
+# This file is part of PulseAudio.
|
||||
+#
|
||||
+# PulseAudio is free software; you can redistribute it and/or modify
|
||||
+# it under the terms of the GNU Lesser General Public License as
|
||||
+# published by the Free Software Foundation; either version 2.1 of the
|
||||
+# License, or (at your option) any later version.
|
||||
+#
|
||||
+# PulseAudio is distributed in the hope that it will be useful, but
|
||||
+# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU Lesser General Public License
|
||||
+# along with PulseAudio; if not, write to the Free Software Foundation,
|
||||
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
+
|
||||
+; For devices where a 'Internal Mic' element exists
|
||||
+;
|
||||
+; See analog-output.conf.common for an explanation on the directives
|
||||
+
|
||||
+[General]
|
||||
+priority = 90
|
||||
+name = analog-input-microphone
|
||||
+
|
||||
+[Element Capture]
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all
|
||||
+override-map.2 = all-left,all-right
|
||||
+
|
||||
+[Element Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+[Element Internal Mic]
|
||||
+required = any
|
||||
+switch = mute
|
||||
+volume = merge
|
||||
+override-map.1 = all
|
||||
+override-map.2 = all-left,all-right
|
||||
+
|
||||
+[Element Line]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+[Element Aux]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+[Element Video]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+[Element Mic/Line]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+[Element TV Tuner]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+[Element FM]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
+.include analog-input.conf.common
|
||||
+.include analog-input-mic.conf.common
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-linein.conf b/src/modules/alsa/mixer/paths/analog-input-linein.conf
|
||||
index 4be5722..57568cc 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input-linein.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-linein.conf
|
||||
@@ -31,6 +31,10 @@ override-map.2 = all-left,all-right
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Internal Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Line]
|
||||
required = any
|
||||
switch = mute
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-mic-line.conf b/src/modules/alsa/mixer/paths/analog-input-mic-line.conf
|
||||
index f7f3085..fa680aa 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input-mic-line.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-mic-line.conf
|
||||
@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Internal Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-mic.conf b/src/modules/alsa/mixer/paths/analog-input-mic.conf
|
||||
index 2a36f2f..9b8b75a 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input-mic.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-mic.conf
|
||||
@@ -35,6 +35,10 @@ volume = merge
|
||||
override-map.1 = all
|
||||
override-map.2 = all-left,all-right
|
||||
|
||||
+[Element Internal Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf b/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
|
||||
index 8531ec7..fae3ce8 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
|
||||
@@ -32,6 +32,10 @@ override-map.2 = all-left,all-right
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Internal Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input-video.conf b/src/modules/alsa/mixer/paths/analog-input-video.conf
|
||||
index 74c76f0..19f1809 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input-video.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input-video.conf
|
||||
@@ -31,6 +31,10 @@ override-map.2 = all-left,all-right
|
||||
switch = off
|
||||
volume = off
|
||||
|
||||
+[Element Internal Mic]
|
||||
+switch = off
|
||||
+volume = off
|
||||
+
|
||||
[Element Line]
|
||||
switch = off
|
||||
volume = off
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-input.conf b/src/modules/alsa/mixer/paths/analog-input.conf
|
||||
index 5055f90..3050738 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-input.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-input.conf
|
||||
@@ -32,6 +32,9 @@ override-map.2 = all-left,all-right
|
||||
[Element Mic]
|
||||
required-absent = any
|
||||
|
||||
+[Element Internal Mic]
|
||||
+required-absent = any
|
||||
+
|
||||
[Element Line]
|
||||
required-absent = any
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
82
0037-alsa-use-default-output-port-names.patch
Normal file
82
0037-alsa-use-default-output-port-names.patch
Normal file
@ -0,0 +1,82 @@
|
||||
From 307bd142feef8f42d3adcea354b72f4c076470e4 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 16 Feb 2010 00:59:24 +0100
|
||||
Subject: [PATCH] alsa: use default output port names
|
||||
|
||||
instead of coming up with pointless aliases, reuse the already established
|
||||
names, for second headphones, and second speakers.
|
||||
---
|
||||
src/modules/alsa/alsa-mixer.c | 2 --
|
||||
.../mixer/paths/analog-output-desktop-speaker.conf | 3 ++-
|
||||
.../mixer/paths/analog-output-headphones-2.conf | 1 +
|
||||
.../alsa/mixer/paths/analog-output-headphones.conf | 1 +
|
||||
.../alsa/mixer/paths/analog-output-speaker.conf | 1 +
|
||||
5 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
|
||||
index cb814af..93f2ed0 100644
|
||||
--- a/src/modules/alsa/alsa-mixer.c
|
||||
+++ b/src/modules/alsa/alsa-mixer.c
|
||||
@@ -1783,9 +1783,7 @@ static int path_verify(pa_alsa_path *p) {
|
||||
{ "analog-output-headphones", N_("Analog Headphones") },
|
||||
{ "analog-output-lfe-on-mono", N_("Analog Output (LFE)") },
|
||||
{ "analog-output-mono", N_("Analog Mono Output") },
|
||||
- { "analog-output-headphones-2", N_("Analog Headphones 2") },
|
||||
{ "analog-output-speaker", N_("Analog Speakers") }
|
||||
- { "analog-output-desktop-speaker", N_("Analog Speakers 2") }
|
||||
};
|
||||
|
||||
pa_alsa_element *e;
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
|
||||
index 9f18b25..dfdecf4 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-desktop-speaker.conf
|
||||
@@ -19,7 +19,8 @@
|
||||
; See analog-output.conf.common for an explanation on the directives
|
||||
|
||||
[General]
|
||||
-priority = 100
|
||||
+priority = 101
|
||||
+name = analog-output-speaker
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
|
||||
index 580c798..e47543f 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones-2.conf
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
[General]
|
||||
priority = 89
|
||||
+name = analog-output-headphones
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
|
||||
index 79ebc7f..1d7bb0b 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
[General]
|
||||
priority = 90
|
||||
+name = analog-output-headphones
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
diff --git a/src/modules/alsa/mixer/paths/analog-output-speaker.conf b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
|
||||
index b133a2e..c6916d6 100644
|
||||
--- a/src/modules/alsa/mixer/paths/analog-output-speaker.conf
|
||||
+++ b/src/modules/alsa/mixer/paths/analog-output-speaker.conf
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
[General]
|
||||
priority = 100
|
||||
+name = analog-output-speaker
|
||||
|
||||
[Element Hardware Master]
|
||||
switch = mute
|
||||
--
|
||||
1.6.0.2
|
||||
|
27
0038-build-sys-add-gobject-to-build-dependencies.patch
Normal file
27
0038-build-sys-add-gobject-to-build-dependencies.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From f9b31fe5443bded4a55b0900f08f04486c3395bd Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 16 Feb 2010 01:43:00 +0100
|
||||
Subject: [PATCH] build-sys: add gobject to build dependencies
|
||||
|
||||
Since we call g_object_unref() we need to link against gobject in
|
||||
compliance of the new Fedora implicit DSO linking policy.
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c9ec490..1b80788 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -893,7 +893,7 @@ AC_ARG_ENABLE([gconf],
|
||||
[gconf=auto])
|
||||
|
||||
if test "x${gconf}" != xno ; then
|
||||
- PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 ],
|
||||
+ PKG_CHECK_MODULES(GCONF, [ gconf-2.0 >= 2.4.0 gobject-2.0 ],
|
||||
HAVE_GCONF=1,
|
||||
[
|
||||
HAVE_GCONF=0
|
||||
--
|
||||
1.6.0.2
|
||||
|
142
0039-padsp-emulate-dev-audio-too.patch
Normal file
142
0039-padsp-emulate-dev-audio-too.patch
Normal file
@ -0,0 +1,142 @@
|
||||
From ff2474e5fc9eaa4c7f687e71a39a5bed4f56c259 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 16 Feb 2010 02:03:45 +0100
|
||||
Subject: [PATCH] padsp: emulate /dev/audio, too
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=561262
|
||||
---
|
||||
src/utils/padsp.c | 55 +++++++++++++++++++---------------------------------
|
||||
1 files changed, 20 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
|
||||
index 2ed0a03..fb756d3 100644
|
||||
--- a/src/utils/padsp.c
|
||||
+++ b/src/utils/padsp.c
|
||||
@@ -1458,11 +1458,11 @@ static int real_open(const char *filename, int flags, mode_t mode) {
|
||||
return _open(filename, flags, mode);
|
||||
}
|
||||
|
||||
- if (filename && dsp_cloak_enable() && (strcmp(filename, "/dev/dsp") == 0 || strcmp(filename, "/dev/adsp") == 0))
|
||||
+ if (filename && dsp_cloak_enable() && (pa_streq(filename, "/dev/dsp") || pa_streq(filename, "/dev/adsp") || pa_streq(filename, "/dev/audio")))
|
||||
r = dsp_open(flags, &_errno);
|
||||
- else if (filename && mixer_cloak_enable() && strcmp(filename, "/dev/mixer") == 0)
|
||||
+ else if (filename && mixer_cloak_enable() && pa_streq(filename, "/dev/mixer"))
|
||||
r = mixer_open(flags, &_errno);
|
||||
- else if (filename && sndstat_cloak_enable() && strcmp(filename, "/dev/sndstat") == 0)
|
||||
+ else if (filename && sndstat_cloak_enable() && pa_streq(filename, "/dev/sndstat"))
|
||||
r = sndstat_open(flags, &_errno);
|
||||
else {
|
||||
function_exit();
|
||||
@@ -2383,15 +2383,21 @@ int close(int fd) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static pa_bool_t is_audio_device_node(const char *path) {
|
||||
+ return
|
||||
+ pa_streq(path, "/dev/dsp") ||
|
||||
+ pa_streq(path, "/dev/adsp") ||
|
||||
+ pa_streq(path, "/dev/audio") ||
|
||||
+ pa_streq(path, "/dev/sndstat") ||
|
||||
+ pa_streq(path, "/dev/mixer");
|
||||
+}
|
||||
+
|
||||
int access(const char *pathname, int mode) {
|
||||
|
||||
debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname?pathname:"NULL");
|
||||
|
||||
if (!pathname ||
|
||||
- (strcmp(pathname, "/dev/dsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/adsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/sndstat") != 0 &&
|
||||
- strcmp(pathname, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(pathname)) {
|
||||
LOAD_ACCESS_FUNC();
|
||||
return _access(pathname, mode);
|
||||
}
|
||||
@@ -2417,10 +2423,7 @@ int stat(const char *pathname, struct stat *buf) {
|
||||
|
||||
if (!pathname ||
|
||||
!buf ||
|
||||
- ( strcmp(pathname, "/dev/dsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/adsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/sndstat") != 0 &&
|
||||
- strcmp(pathname, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(pathname)) {
|
||||
debug(DEBUG_LEVEL_VERBOSE, __FILE__": stat(%s)\n", pathname?pathname:"NULL");
|
||||
LOAD_STAT_FUNC();
|
||||
return _stat(pathname, buf);
|
||||
@@ -2474,10 +2477,7 @@ int stat64(const char *pathname, struct stat64 *buf) {
|
||||
|
||||
if (!pathname ||
|
||||
!buf ||
|
||||
- ( strcmp(pathname, "/dev/dsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/adsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/sndstat") != 0 &&
|
||||
- strcmp(pathname, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(pathname)) {
|
||||
LOAD_STAT64_FUNC();
|
||||
return _stat64(pathname, buf);
|
||||
}
|
||||
@@ -2519,10 +2519,7 @@ int open64(const char *filename, int flags, ...) {
|
||||
}
|
||||
|
||||
if (!filename ||
|
||||
- ( strcmp(filename, "/dev/dsp") != 0 &&
|
||||
- strcmp(filename, "/dev/adsp") != 0 &&
|
||||
- strcmp(filename, "/dev/sndstat") != 0 &&
|
||||
- strcmp(filename, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(filename)) {
|
||||
LOAD_OPEN64_FUNC();
|
||||
return _open64(filename, flags, mode);
|
||||
}
|
||||
@@ -2539,10 +2536,7 @@ int __xstat(int ver, const char *pathname, struct stat *buf) {
|
||||
|
||||
if (!pathname ||
|
||||
!buf ||
|
||||
- ( strcmp(pathname, "/dev/dsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/adsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/sndstat") != 0 &&
|
||||
- strcmp(pathname, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(pathname)) {
|
||||
LOAD_XSTAT_FUNC();
|
||||
return ___xstat(ver, pathname, buf);
|
||||
}
|
||||
@@ -2562,10 +2556,7 @@ int __xstat64(int ver, const char *pathname, struct stat64 *buf) {
|
||||
|
||||
if (!pathname ||
|
||||
!buf ||
|
||||
- ( strcmp(pathname, "/dev/dsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/adsp") != 0 &&
|
||||
- strcmp(pathname, "/dev/sndstat") != 0 &&
|
||||
- strcmp(pathname, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(pathname)) {
|
||||
LOAD_XSTAT64_FUNC();
|
||||
return ___xstat64(ver, pathname, buf);
|
||||
}
|
||||
@@ -2591,10 +2582,7 @@ FILE* fopen(const char *filename, const char *mode) {
|
||||
|
||||
if (!filename ||
|
||||
!mode ||
|
||||
- ( strcmp(filename, "/dev/dsp") != 0 &&
|
||||
- strcmp(filename, "/dev/adsp") != 0 &&
|
||||
- strcmp(filename, "/dev/sndstat") != 0 &&
|
||||
- strcmp(filename, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(filename)) {
|
||||
LOAD_FOPEN_FUNC();
|
||||
return _fopen(filename, mode);
|
||||
}
|
||||
@@ -2634,10 +2622,7 @@ FILE *fopen64(const char *filename, const char *mode) {
|
||||
|
||||
if (!filename ||
|
||||
!mode ||
|
||||
- ( strcmp(filename, "/dev/dsp") != 0 &&
|
||||
- strcmp(filename, "/dev/adsp") != 0 &&
|
||||
- strcmp(filename, "/dev/sndstat") != 0 &&
|
||||
- strcmp(filename, "/dev/mixer") != 0 )) {
|
||||
+ !is_audio_device_node(filename)) {
|
||||
LOAD_FOPEN64_FUNC();
|
||||
return _fopen64(filename, mode);
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
92
0040-dbus-first-restart-timer-then-dispatch-it.patch
Normal file
92
0040-dbus-first-restart-timer-then-dispatch-it.patch
Normal file
@ -0,0 +1,92 @@
|
||||
From 96592c21150e789156153dcebd14e201cd41cbeb Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 16 Feb 2010 02:49:44 +0100
|
||||
Subject: [PATCH] dbus: first restart timer, then dispatch it
|
||||
|
||||
This makes sure that we don't access the timer after it might have been
|
||||
destroyed already from the dbus timeout callback.
|
||||
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=389952
|
||||
---
|
||||
src/pulsecore/dbus-util.c | 29 ++++++++++++++++-------------
|
||||
1 files changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c
|
||||
index 4e6148f..40b64a0 100644
|
||||
--- a/src/pulsecore/dbus-util.c
|
||||
+++ b/src/pulsecore/dbus-util.c
|
||||
@@ -44,17 +44,16 @@ struct pa_dbus_wrap_connection {
|
||||
};
|
||||
|
||||
struct timeout_data {
|
||||
- pa_dbus_wrap_connection *c;
|
||||
+ pa_dbus_wrap_connection *connection;
|
||||
DBusTimeout *timeout;
|
||||
};
|
||||
|
||||
static void dispatch_cb(pa_mainloop_api *ea, pa_defer_event *ev, void *userdata) {
|
||||
DBusConnection *conn = userdata;
|
||||
|
||||
- if (dbus_connection_dispatch(conn) == DBUS_DISPATCH_COMPLETE) {
|
||||
+ if (dbus_connection_dispatch(conn) == DBUS_DISPATCH_COMPLETE)
|
||||
/* no more data to process, disable the deferred */
|
||||
ea->defer_enable(ev, 0);
|
||||
- }
|
||||
}
|
||||
|
||||
/* DBusDispatchStatusFunction callback for the pa mainloop */
|
||||
@@ -131,13 +130,17 @@ static void handle_time_event(pa_mainloop_api *ea, pa_time_event* e, const struc
|
||||
struct timeout_data *d = userdata;
|
||||
|
||||
pa_assert(d);
|
||||
- pa_assert(d->c);
|
||||
+ pa_assert(d->connection);
|
||||
|
||||
if (dbus_timeout_get_enabled(d->timeout)) {
|
||||
- dbus_timeout_handle(d->timeout);
|
||||
+ /* Restart it for the next scheduled time. We do this before
|
||||
+ * calling dbus_timeout_handle() to make sure that the time
|
||||
+ * event is still around. */
|
||||
+ ea->time_restart(e, pa_timeval_rtstore(&tv,
|
||||
+ pa_timeval_load(t) + dbus_timeout_get_interval(d->timeout) * PA_USEC_PER_MSEC,
|
||||
+ d->connection->use_rtclock));
|
||||
|
||||
- /* restart it for the next scheduled time */
|
||||
- ea->time_restart(e, pa_timeval_rtstore(&tv, pa_timeval_load(t) + dbus_timeout_get_interval(d->timeout) * PA_USEC_PER_MSEC, d->c->use_rtclock));
|
||||
+ dbus_timeout_handle(d->timeout);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +210,7 @@ static dbus_bool_t add_timeout(DBusTimeout *timeout, void *data) {
|
||||
return FALSE;
|
||||
|
||||
d = pa_xnew(struct timeout_data, 1);
|
||||
- d->c = c;
|
||||
+ d->connection = c;
|
||||
d->timeout = timeout;
|
||||
ev = c->mainloop->time_new(c->mainloop, pa_timeval_rtstore(&tv, pa_rtclock_now() + dbus_timeout_get_interval(timeout) * PA_USEC_PER_MSEC, c->use_rtclock), handle_time_event, d);
|
||||
c->mainloop->time_set_destroy(ev, time_event_destroy_cb);
|
||||
@@ -236,15 +239,15 @@ static void toggle_timeout(DBusTimeout *timeout, void *data) {
|
||||
struct timeval tv;
|
||||
|
||||
pa_assert(d);
|
||||
- pa_assert(d->c);
|
||||
+ pa_assert(d->connection);
|
||||
pa_assert(timeout);
|
||||
|
||||
pa_assert_se(ev = dbus_timeout_get_data(timeout));
|
||||
|
||||
- if (dbus_timeout_get_enabled(timeout)) {
|
||||
- d->c->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, pa_rtclock_now() + dbus_timeout_get_interval(timeout) * PA_USEC_PER_MSEC, d->c->use_rtclock));
|
||||
- } else
|
||||
- d->c->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, PA_USEC_INVALID, d->c->use_rtclock));
|
||||
+ if (dbus_timeout_get_enabled(timeout))
|
||||
+ d->connection->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, pa_rtclock_now() + dbus_timeout_get_interval(timeout) * PA_USEC_PER_MSEC, d->connection->use_rtclock));
|
||||
+ else
|
||||
+ d->connection->mainloop->time_restart(ev, pa_timeval_rtstore(&tv, PA_USEC_INVALID, d->connection->use_rtclock));
|
||||
}
|
||||
|
||||
static void wakeup_main(void *userdata) {
|
||||
--
|
||||
1.6.0.2
|
||||
|
111
0041-fdsem-be-more-verbose-when-reading-from-eventfd-fai.patch
Normal file
111
0041-fdsem-be-more-verbose-when-reading-from-eventfd-fai.patch
Normal file
@ -0,0 +1,111 @@
|
||||
From 5e2af2d3f3dea473d46b33a5e90a993ac5da3f35 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 16 Feb 2010 03:36:44 +0100
|
||||
Subject: [PATCH] fdsem: be more verbose when reading from eventfd fails.
|
||||
|
||||
Apperently reading from an eventfd can fail, which results in an assert
|
||||
to be hit. I am not sure about the reason for the failure, but in
|
||||
attempt to track down the issue the next time is hit this prints a more
|
||||
useful log message.
|
||||
|
||||
https://bugzilla.redhat.com/attachment.cgi?id=386380
|
||||
---
|
||||
src/pulsecore/fdsem.c | 41 +++++++++++++++++++++++++++++++++++------
|
||||
1 files changed, 35 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/fdsem.c b/src/pulsecore/fdsem.c
|
||||
index 380f34f..00836f9 100644
|
||||
--- a/src/pulsecore/fdsem.c
|
||||
+++ b/src/pulsecore/fdsem.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <pulsecore/thread.h>
|
||||
#include <pulsecore/macro.h>
|
||||
#include <pulsecore/core-util.h>
|
||||
+#include <pulsecore/core-error.h>
|
||||
#include <pulse/xmalloc.h>
|
||||
|
||||
#ifndef HAVE_PIPE
|
||||
@@ -159,7 +160,12 @@ static void flush(pa_fdsem *f) {
|
||||
uint64_t u;
|
||||
|
||||
if ((r = read(f->efd, &u, sizeof(u))) != sizeof(u)) {
|
||||
- pa_assert(r < 0 && errno == EINTR);
|
||||
+
|
||||
+ if (r >= 0 || errno != EINTR) {
|
||||
+ pa_log_error("Invalid read from eventfd: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
+ pa_assert_not_reached();
|
||||
+ }
|
||||
+
|
||||
continue;
|
||||
}
|
||||
r = (ssize_t) u;
|
||||
@@ -167,7 +173,12 @@ static void flush(pa_fdsem *f) {
|
||||
#endif
|
||||
|
||||
if ((r = read(f->fds[0], &x, sizeof(x))) <= 0) {
|
||||
- pa_assert(r < 0 && errno == EINTR);
|
||||
+
|
||||
+ if (r >= 0 || errno != EINTR) {
|
||||
+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
+ pa_assert_not_reached();
|
||||
+ }
|
||||
+
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -192,14 +203,22 @@ void pa_fdsem_post(pa_fdsem *f) {
|
||||
uint64_t u = 1;
|
||||
|
||||
if ((r = write(f->efd, &u, sizeof(u))) != sizeof(u)) {
|
||||
- pa_assert(r < 0 && errno == EINTR);
|
||||
+ if (r >= 0 || errno != EINTR) {
|
||||
+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
+ pa_assert_not_reached();
|
||||
+ }
|
||||
+
|
||||
continue;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
|
||||
if ((r = write(f->fds[1], &x, 1)) != 1) {
|
||||
- pa_assert(r < 0 && errno == EINTR);
|
||||
+ if (r >= 0 || errno != EINTR) {
|
||||
+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
+ pa_assert_not_reached();
|
||||
+ }
|
||||
+
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -228,7 +247,12 @@ void pa_fdsem_wait(pa_fdsem *f) {
|
||||
uint64_t u;
|
||||
|
||||
if ((r = read(f->efd, &u, sizeof(u))) != sizeof(u)) {
|
||||
- pa_assert(r < 0 && errno == EINTR);
|
||||
+
|
||||
+ if (r >= 0 || errno != EINTR) {
|
||||
+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
+ pa_assert_not_reached();
|
||||
+ }
|
||||
+
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -237,7 +261,12 @@ void pa_fdsem_wait(pa_fdsem *f) {
|
||||
#endif
|
||||
|
||||
if ((r = read(f->fds[0], &x, sizeof(x))) <= 0) {
|
||||
- pa_assert(r < 0 && errno == EINTR);
|
||||
+
|
||||
+ if (r >= 0 || errno != EINTR) {
|
||||
+ pa_log_error("Invalid read from pipe: %s", r < 0 ? pa_cstrerror(errno) : "EOF");
|
||||
+ pa_assert_not_reached();
|
||||
+ }
|
||||
+
|
||||
continue;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
79
0042-pacat-always-fully-fulfill-write-requests.patch
Normal file
79
0042-pacat-always-fully-fulfill-write-requests.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From 19fa81bf1375032cb1a27c7715a28a52b238d4cb Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 18 Feb 2010 01:54:51 +0100
|
||||
Subject: [PATCH] pacat: always fully fulfill write requests
|
||||
|
||||
Make sure we always fulfill write requests from the server. If we don't
|
||||
the server won't ask us again and playback will stay stuck.
|
||||
|
||||
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-February/006611.html
|
||||
---
|
||||
src/utils/pacat.c | 47 ++++++++++++++++++++++++++++++-----------------
|
||||
1 files changed, 30 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
|
||||
index a5d2e9a..d136f6b 100644
|
||||
--- a/src/utils/pacat.c
|
||||
+++ b/src/utils/pacat.c
|
||||
@@ -195,28 +195,41 @@ static void stream_write_callback(pa_stream *s, size_t length, void *userdata) {
|
||||
|
||||
pa_assert(sndfile);
|
||||
|
||||
- if (pa_stream_begin_write(s, &data, &length) < 0) {
|
||||
- pa_log(_("pa_stream_begin_write() failed: %s"), pa_strerror(pa_context_errno(context)));
|
||||
- quit(1);
|
||||
- return;
|
||||
- }
|
||||
+ for (;;) {
|
||||
+ size_t data_length = length;
|
||||
|
||||
- if (readf_function) {
|
||||
- size_t k = pa_frame_size(&sample_spec);
|
||||
+ if (pa_stream_begin_write(s, &data, &data_length) < 0) {
|
||||
+ pa_log(_("pa_stream_begin_write() failed: %s"), pa_strerror(pa_context_errno(context)));
|
||||
+ quit(1);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- if ((bytes = readf_function(sndfile, data, (sf_count_t) (length/k))) > 0)
|
||||
- bytes *= (sf_count_t) k;
|
||||
+ if (readf_function) {
|
||||
+ size_t k = pa_frame_size(&sample_spec);
|
||||
|
||||
- } else
|
||||
- bytes = sf_read_raw(sndfile, data, (sf_count_t) length);
|
||||
+ if ((bytes = readf_function(sndfile, data, (sf_count_t) (data_length/k))) > 0)
|
||||
+ bytes *= (sf_count_t) k;
|
||||
|
||||
- if (bytes > 0)
|
||||
- pa_stream_write(s, data, (size_t) bytes, NULL, 0, PA_SEEK_RELATIVE);
|
||||
- else
|
||||
- pa_stream_cancel_write(s);
|
||||
+ } else
|
||||
+ bytes = sf_read_raw(sndfile, data, (sf_count_t) data_length);
|
||||
|
||||
- if (bytes < (sf_count_t) length)
|
||||
- start_drain();
|
||||
+ if (bytes > 0)
|
||||
+ pa_stream_write(s, data, (size_t) bytes, NULL, 0, PA_SEEK_RELATIVE);
|
||||
+ else
|
||||
+ pa_stream_cancel_write(s);
|
||||
+
|
||||
+ /* EOF? */
|
||||
+ if (bytes < (sf_count_t) data_length) {
|
||||
+ start_drain();
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Request fulfilled */
|
||||
+ if ((size_t) bytes >= length)
|
||||
+ break;
|
||||
+
|
||||
+ length -= bytes;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
60
0043-pacmd-store-away-fd-type.patch
Normal file
60
0043-pacmd-store-away-fd-type.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From 96ec29c6b2a40d3851f46587143a4ba6dce29d0d Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 18 Feb 2010 02:32:35 +0100
|
||||
Subject: [PATCH] pacmd: store away fd type
|
||||
|
||||
---
|
||||
src/utils/pacmd.c | 9 +++++----
|
||||
1 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
|
||||
index 5ef57e3..59aae48 100644
|
||||
--- a/src/utils/pacmd.c
|
||||
+++ b/src/utils/pacmd.c
|
||||
@@ -61,6 +61,7 @@ int main(int argc, char*argv[]) {
|
||||
char *cli;
|
||||
pa_bool_t ibuf_eof, obuf_eof, ibuf_closed, obuf_closed;
|
||||
struct pollfd pollfd[N_WATCH];
|
||||
+ int stdin_type = 0, stdout_type = 0, fd_type = 0;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(GETTEXT_PACKAGE, PULSE_LOCALEDIR);
|
||||
@@ -166,7 +167,7 @@ int main(int argc, char*argv[]) {
|
||||
ssize_t r;
|
||||
pa_assert(!ibuf_length);
|
||||
|
||||
- if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), NULL)) <= 0) {
|
||||
+ if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), &stdin_type)) <= 0) {
|
||||
if (r < 0) {
|
||||
pa_log(_("read(): %s"), strerror(errno));
|
||||
goto fail;
|
||||
@@ -183,7 +184,7 @@ int main(int argc, char*argv[]) {
|
||||
ssize_t r;
|
||||
pa_assert(!obuf_length);
|
||||
|
||||
- if ((r = pa_read(fd, obuf, sizeof(obuf), NULL)) <= 0) {
|
||||
+ if ((r = pa_read(fd, obuf, sizeof(obuf), &fd_type)) <= 0) {
|
||||
if (r < 0) {
|
||||
pa_log(_("read(): %s"), strerror(errno));
|
||||
goto fail;
|
||||
@@ -203,7 +204,7 @@ int main(int argc, char*argv[]) {
|
||||
ssize_t r;
|
||||
pa_assert(obuf_length);
|
||||
|
||||
- if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, NULL)) < 0) {
|
||||
+ if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, &stdout_type)) < 0) {
|
||||
pa_log(_("write(): %s"), strerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
@@ -219,7 +220,7 @@ int main(int argc, char*argv[]) {
|
||||
ssize_t r;
|
||||
pa_assert(ibuf_length);
|
||||
|
||||
- if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, NULL)) < 0) {
|
||||
+ if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, &fd_type)) < 0) {
|
||||
pa_log(_("write(): %s"), strerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
257
0044-pacmd-don-t-enter-busy-loop-when-reading-from-stdin.patch
Normal file
257
0044-pacmd-don-t-enter-busy-loop-when-reading-from-stdin.patch
Normal file
@ -0,0 +1,257 @@
|
||||
From 6e064d1d6d0292d230c752b1f41034fd0754487b Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 18 Feb 2010 03:28:56 +0100
|
||||
Subject: [PATCH] pacmd: don't enter busy loop when reading from stdin very early
|
||||
|
||||
pointed out in:
|
||||
|
||||
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-January/006365.html
|
||||
---
|
||||
src/utils/pacmd.c | 186 ++++++++++++++++++++++++++++------------------------
|
||||
1 files changed, 100 insertions(+), 86 deletions(-)
|
||||
|
||||
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
|
||||
index 59aae48..87661e3 100644
|
||||
--- a/src/utils/pacmd.c
|
||||
+++ b/src/utils/pacmd.c
|
||||
@@ -45,13 +45,6 @@
|
||||
|
||||
int main(int argc, char*argv[]) {
|
||||
|
||||
- enum {
|
||||
- WATCH_STDIN,
|
||||
- WATCH_STDOUT,
|
||||
- WATCH_SOCKET,
|
||||
- N_WATCH
|
||||
- };
|
||||
-
|
||||
pid_t pid ;
|
||||
int fd = -1;
|
||||
int ret = 1, i;
|
||||
@@ -60,7 +53,9 @@ int main(int argc, char*argv[]) {
|
||||
size_t ibuf_index, ibuf_length, obuf_index, obuf_length;
|
||||
char *cli;
|
||||
pa_bool_t ibuf_eof, obuf_eof, ibuf_closed, obuf_closed;
|
||||
- struct pollfd pollfd[N_WATCH];
|
||||
+ struct pollfd pollfd[3];
|
||||
+ struct pollfd *watch_socket, *watch_stdin, *watch_stdout;
|
||||
+
|
||||
int stdin_type = 0, stdout_type = 0, fd_type = 0;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
@@ -129,32 +124,53 @@ int main(int argc, char*argv[]) {
|
||||
ibuf_eof = TRUE;
|
||||
}
|
||||
|
||||
- pa_zero(pollfd);
|
||||
-
|
||||
- pollfd[WATCH_STDIN].fd = STDIN_FILENO;
|
||||
- pollfd[WATCH_STDOUT].fd = STDOUT_FILENO;
|
||||
- pollfd[WATCH_SOCKET].fd = fd;
|
||||
-
|
||||
for (;;) {
|
||||
+ struct pollfd *p;
|
||||
+
|
||||
if (ibuf_eof &&
|
||||
obuf_eof &&
|
||||
ibuf_length <= 0 &&
|
||||
obuf_length <= 0)
|
||||
break;
|
||||
|
||||
- pollfd[WATCH_STDIN].events = pollfd[WATCH_STDOUT].events = pollfd[WATCH_SOCKET].events = 0;
|
||||
+ if (ibuf_length <= 0 && ibuf_eof && !ibuf_closed) {
|
||||
+ shutdown(fd, SHUT_WR);
|
||||
+ ibuf_closed = TRUE;
|
||||
+ }
|
||||
|
||||
- if (obuf_length > 0)
|
||||
- pollfd[WATCH_STDOUT].events |= POLLOUT;
|
||||
- else if (!obuf_eof)
|
||||
- pollfd[WATCH_SOCKET].events |= POLLIN;
|
||||
+ if (obuf_length <= 0 && obuf_eof && !obuf_closed) {
|
||||
+ shutdown(fd, SHUT_RD);
|
||||
+ obuf_closed = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ pa_zero(pollfd);
|
||||
+
|
||||
+ p = pollfd;
|
||||
|
||||
- if (ibuf_length > 0)
|
||||
- pollfd[WATCH_SOCKET].events |= POLLOUT;
|
||||
- else if (!ibuf_eof)
|
||||
- pollfd[WATCH_STDIN].events |= POLLIN;
|
||||
+ if (ibuf_length > 0 || (!obuf_eof && obuf_length <= 0)) {
|
||||
+ watch_socket = p++;
|
||||
+ watch_socket->fd = fd;
|
||||
+ watch_socket->events =
|
||||
+ (ibuf_length > 0 ? POLLOUT : 0) |
|
||||
+ (!obuf_eof && obuf_length <= 0 ? POLLIN : 0);
|
||||
+ } else
|
||||
+ watch_socket = NULL;
|
||||
|
||||
- if (poll(pollfd, N_WATCH, -1) < 0) {
|
||||
+ if (!ibuf_eof && ibuf_length <= 0) {
|
||||
+ watch_stdin = p++;
|
||||
+ watch_stdin->fd = STDIN_FILENO;
|
||||
+ watch_stdin->events = POLLIN;
|
||||
+ } else
|
||||
+ watch_stdin = NULL;
|
||||
+
|
||||
+ if (obuf_length > 0) {
|
||||
+ watch_stdout = p++;
|
||||
+ watch_stdout->fd = STDOUT_FILENO;
|
||||
+ watch_stdout->events = POLLOUT;
|
||||
+ } else
|
||||
+ watch_stdout = NULL;
|
||||
+
|
||||
+ if (poll(pollfd, p-pollfd, -1) < 0) {
|
||||
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
@@ -163,82 +179,80 @@ int main(int argc, char*argv[]) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- if (pollfd[WATCH_STDIN].revents & POLLIN) {
|
||||
- ssize_t r;
|
||||
- pa_assert(!ibuf_length);
|
||||
-
|
||||
- if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), &stdin_type)) <= 0) {
|
||||
- if (r < 0) {
|
||||
- pa_log(_("read(): %s"), strerror(errno));
|
||||
- goto fail;
|
||||
+ if (watch_stdin) {
|
||||
+ if (watch_stdin->revents & POLLIN) {
|
||||
+ ssize_t r;
|
||||
+ pa_assert(ibuf_length <= 0);
|
||||
+
|
||||
+ if ((r = pa_read(STDIN_FILENO, ibuf, sizeof(ibuf), &stdin_type)) <= 0) {
|
||||
+ if (r < 0) {
|
||||
+ pa_log(_("read(): %s"), strerror(errno));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ ibuf_eof = TRUE;
|
||||
+ } else {
|
||||
+ ibuf_length = (size_t) r;
|
||||
+ ibuf_index = 0;
|
||||
}
|
||||
-
|
||||
+ } else if (watch_stdin->revents & POLLHUP)
|
||||
ibuf_eof = TRUE;
|
||||
- } else {
|
||||
- ibuf_length = (size_t) r;
|
||||
- ibuf_index = 0;
|
||||
- }
|
||||
}
|
||||
|
||||
- if (pollfd[WATCH_SOCKET].revents & POLLIN) {
|
||||
- ssize_t r;
|
||||
- pa_assert(!obuf_length);
|
||||
-
|
||||
- if ((r = pa_read(fd, obuf, sizeof(obuf), &fd_type)) <= 0) {
|
||||
- if (r < 0) {
|
||||
- pa_log(_("read(): %s"), strerror(errno));
|
||||
- goto fail;
|
||||
+ if (watch_socket) {
|
||||
+ if (watch_socket->revents & POLLIN) {
|
||||
+ ssize_t r;
|
||||
+ pa_assert(obuf_length <= 0);
|
||||
+
|
||||
+ if ((r = pa_read(fd, obuf, sizeof(obuf), &fd_type)) <= 0) {
|
||||
+ if (r < 0) {
|
||||
+ pa_log(_("read(): %s"), strerror(errno));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ obuf_eof = TRUE;
|
||||
+ } else {
|
||||
+ obuf_length = (size_t) r;
|
||||
+ obuf_index = 0;
|
||||
}
|
||||
-
|
||||
+ } else if (watch_socket->revents & POLLHUP)
|
||||
obuf_eof = TRUE;
|
||||
- } else {
|
||||
- obuf_length = (size_t) r;
|
||||
- obuf_index = 0;
|
||||
- }
|
||||
}
|
||||
|
||||
- if (pollfd[WATCH_STDOUT].revents & POLLHUP) {
|
||||
- obuf_eof = TRUE;
|
||||
- obuf_length = 0;
|
||||
- } else if (pollfd[WATCH_STDOUT].revents & POLLOUT) {
|
||||
- ssize_t r;
|
||||
- pa_assert(obuf_length);
|
||||
-
|
||||
- if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, &stdout_type)) < 0) {
|
||||
- pa_log(_("write(): %s"), strerror(errno));
|
||||
- goto fail;
|
||||
- }
|
||||
-
|
||||
- obuf_length -= (size_t) r;
|
||||
- obuf_index += obuf_index;
|
||||
- }
|
||||
+ if (watch_stdout) {
|
||||
+ if (watch_stdout->revents & POLLHUP) {
|
||||
+ obuf_eof = TRUE;
|
||||
+ obuf_length = 0;
|
||||
+ } else if (watch_stdout->revents & POLLOUT) {
|
||||
+ ssize_t r;
|
||||
+ pa_assert(obuf_length > 0);
|
||||
|
||||
- if (pollfd[WATCH_SOCKET].revents & POLLHUP) {
|
||||
- ibuf_eof = TRUE;
|
||||
- ibuf_length = 0;
|
||||
- } if (pollfd[WATCH_SOCKET].revents & POLLOUT) {
|
||||
- ssize_t r;
|
||||
- pa_assert(ibuf_length);
|
||||
+ if ((r = pa_write(STDOUT_FILENO, obuf + obuf_index, obuf_length, &stdout_type)) < 0) {
|
||||
+ pa_log(_("write(): %s"), strerror(errno));
|
||||
+ goto fail;
|
||||
+ }
|
||||
|
||||
- if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, &fd_type)) < 0) {
|
||||
- pa_log(_("write(): %s"), strerror(errno));
|
||||
- goto fail;
|
||||
+ obuf_length -= (size_t) r;
|
||||
+ obuf_index += obuf_index;
|
||||
}
|
||||
-
|
||||
- ibuf_length -= (size_t) r;
|
||||
- ibuf_index += obuf_index;
|
||||
}
|
||||
|
||||
- if (ibuf_length <= 0 && ibuf_eof && !ibuf_closed) {
|
||||
- pa_close(STDIN_FILENO);
|
||||
- shutdown(fd, SHUT_WR);
|
||||
- ibuf_closed = TRUE;
|
||||
- }
|
||||
+ if (watch_socket) {
|
||||
+ if (watch_socket->revents & POLLHUP) {
|
||||
+ ibuf_eof = TRUE;
|
||||
+ ibuf_length = 0;
|
||||
+ } if (watch_socket->revents & POLLOUT) {
|
||||
+ ssize_t r;
|
||||
+ pa_assert(ibuf_length > 0);
|
||||
|
||||
- if (obuf_length <= 0 && obuf_eof && !obuf_closed) {
|
||||
- shutdown(fd, SHUT_RD);
|
||||
- pa_close(STDOUT_FILENO);
|
||||
- obuf_closed = TRUE;
|
||||
+ if ((r = pa_write(fd, ibuf + ibuf_index, ibuf_length, &fd_type)) < 0) {
|
||||
+ pa_log(_("write(): %s"), strerror(errno));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ ibuf_length -= (size_t) r;
|
||||
+ ibuf_index += obuf_index;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
29
0045-shm-don-t-complain-about-missing-SHM-segments.patch
Normal file
29
0045-shm-don-t-complain-about-missing-SHM-segments.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From dfe27f623765b20bdaff2306109f89baca67d0cf Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 19 Feb 2010 03:29:36 +0100
|
||||
Subject: [PATCH] shm: don't complain about missing SHM segments
|
||||
|
||||
If two clients try to cleanup the SHM directory at the same time, they
|
||||
might want to open and then delete the same segment at the same time, in
|
||||
which case one client might win, the other one lose. In this case, don't
|
||||
warn about ENOENT.
|
||||
---
|
||||
src/pulsecore/shm.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
|
||||
index fbf777a..1e31d54 100644
|
||||
--- a/src/pulsecore/shm.c
|
||||
+++ b/src/pulsecore/shm.c
|
||||
@@ -286,7 +286,7 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) {
|
||||
segment_name(fn, sizeof(fn), m->id = id);
|
||||
|
||||
if ((fd = shm_open(fn, O_RDONLY, 0)) < 0) {
|
||||
- if (errno != EACCES)
|
||||
+ if (errno != EACCES && errno != ENOENT)
|
||||
pa_log("shm_open() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
25
0046-vala-fix-definition-of-INVALID_INDEX.patch
Normal file
25
0046-vala-fix-definition-of-INVALID_INDEX.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 5ce18c32f6ba8202c9f17f84aaffbdbbd8df071c Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 19 Feb 2010 03:31:46 +0100
|
||||
Subject: [PATCH] vala: fix definition of INVALID_INDEX
|
||||
|
||||
---
|
||||
vala/libpulse.vapi | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi
|
||||
index 9e05b14..b02bb56 100644
|
||||
--- a/vala/libpulse.vapi
|
||||
+++ b/vala/libpulse.vapi
|
||||
@@ -46,7 +46,7 @@ namespace PulseAudio {
|
||||
[CCode (cname="PA_CHECK_VERSION")]
|
||||
public bool CHECK_VERSION(int major, int minor, int micro);
|
||||
|
||||
- [CCode (cname="INVALID_INDEX")]
|
||||
+ [CCode (cname="PA_INVALID_INDEX")]
|
||||
public const uint32 INVALID_INDEX;
|
||||
|
||||
[CCode (cname="pa_free_cb_t")]
|
||||
--
|
||||
1.6.0.2
|
||||
|
30
0047-vala-fix-definition-of-the-GLib-mainloop-adapter.patch
Normal file
30
0047-vala-fix-definition-of-the-GLib-mainloop-adapter.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 6bbdd200e89bdbf180071e5281c0feb9617de81d Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 19 Feb 2010 03:32:00 +0100
|
||||
Subject: [PATCH] vala: fix definition of the GLib mainloop adapter
|
||||
|
||||
---
|
||||
vala/libpulse.vapi | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi
|
||||
index b02bb56..d47ef73 100644
|
||||
--- a/vala/libpulse.vapi
|
||||
+++ b/vala/libpulse.vapi
|
||||
@@ -879,11 +879,11 @@ namespace PulseAudio {
|
||||
}
|
||||
|
||||
[Compact]
|
||||
- [CCode (cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")]
|
||||
+ [CCode (cheader_filename="pulse/glib-mainloop.h", cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")]
|
||||
public class GLibMainLoop {
|
||||
|
||||
[CCode (cname="pa_glib_mainloop_new")]
|
||||
- public GLibMainLoop();
|
||||
+ public GLibMainLoop(MainContext? c = null);
|
||||
|
||||
public unowned MainLoopApi get_api();
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
@ -0,0 +1,49 @@
|
||||
From 047e16f2d18c20ea8d9dbb8a24175e1c4bb34d5e Mon Sep 17 00:00:00 2001
|
||||
From: Daniel T Chen <crimsun@ubuntu.com>
|
||||
Date: Fri, 19 Feb 2010 00:23:17 -0500
|
||||
Subject: [PATCH] Add missing profile and alsa-mixer/paths to src/Makefile.am
|
||||
|
||||
Commits e8cb96c and 0c836aa created mixer paths but did not update
|
||||
src/Makefile.am. Building a snapshot containing these two commits
|
||||
therefore results in the user being unable to adjust the volume or
|
||||
(un)mute through PA. Fix this by adding the two new mixer paths
|
||||
files to src/Makefile.am.
|
||||
|
||||
Likewise, commit 66e1a2d created a profile for the M-Audio FastTrack
|
||||
Pro USB but did not update src/Makefile.am. Fix this by adding the
|
||||
profile to src/Makefile.am.
|
||||
---
|
||||
src/Makefile.am | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 598e77f..ffe7558 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -109,6 +109,7 @@ MODULE_LDFLAGS = -module -disable-static -avoid-version $(LDFLAGS_NOUNDEFINED)
|
||||
|
||||
ALSA_PROFILES = \
|
||||
modules/alsa/mixer/profile-sets/default.conf \
|
||||
+ modules/alsa/mixer/profile-sets/maudio-fasttrack-pro.conf \
|
||||
modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf \
|
||||
modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
|
||||
|
||||
@@ -117,6 +118,7 @@ ALSA_PATHS = \
|
||||
modules/alsa/mixer/paths/analog-input.conf \
|
||||
modules/alsa/mixer/paths/analog-input.conf.common \
|
||||
modules/alsa/mixer/paths/analog-input-fm.conf \
|
||||
+ modules/alsa/mixer/paths/analog-input-internal-mic.conf \
|
||||
modules/alsa/mixer/paths/analog-input-linein.conf \
|
||||
modules/alsa/mixer/paths/analog-input-mic.conf \
|
||||
modules/alsa/mixer/paths/analog-input-mic.conf.common \
|
||||
@@ -126,6 +128,7 @@ ALSA_PATHS = \
|
||||
modules/alsa/mixer/paths/analog-output.conf \
|
||||
modules/alsa/mixer/paths/analog-output-speaker.conf \
|
||||
modules/alsa/mixer/paths/analog-output.conf.common \
|
||||
+ modules/alsa/mixer/paths/analog-output-desktop-speaker.conf \
|
||||
modules/alsa/mixer/paths/analog-output-headphones.conf \
|
||||
modules/alsa/mixer/paths/analog-output-headphones-2.conf \
|
||||
modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf \
|
||||
--
|
||||
1.6.0.2
|
||||
|
28
0049-channelmap-Use-Subwoofer-as-pretty-name-for-LFE.patch
Normal file
28
0049-channelmap-Use-Subwoofer-as-pretty-name-for-LFE.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 3f44bf0afaba9c227f09a475f4886c14813afc2f Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 16:19:40 +0100
|
||||
Subject: [PATCH] channelmap: Use "Subwoofer" as pretty name for LFE
|
||||
|
||||
The pretty name is suspposed to be understandable by non-technical
|
||||
folks, and they are generally more used to the term "Subwoofer" than
|
||||
"Low Frequency Emitter", so let's change the name here.
|
||||
---
|
||||
src/pulse/channelmap.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
|
||||
index 9b51626..83fdb43 100644
|
||||
--- a/src/pulse/channelmap.c
|
||||
+++ b/src/pulse/channelmap.c
|
||||
@@ -112,7 +112,7 @@ const char *const pretty_table[PA_CHANNEL_POSITION_MAX] = {
|
||||
[PA_CHANNEL_POSITION_REAR_LEFT] = N_("Rear Left"),
|
||||
[PA_CHANNEL_POSITION_REAR_RIGHT] = N_("Rear Right"),
|
||||
|
||||
- [PA_CHANNEL_POSITION_LFE] = N_("Low Frequency Emmiter"),
|
||||
+ [PA_CHANNEL_POSITION_LFE] = N_("Subwoofer"),
|
||||
|
||||
[PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER] = N_("Front Left-of-center"),
|
||||
[PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER] = N_("Front Right-of-center"),
|
||||
--
|
||||
1.6.0.2
|
||||
|
34
0050-vala-fix-wrapping-of-port-setting-calls.patch
Normal file
34
0050-vala-fix-wrapping-of-port-setting-calls.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 117c99de3af9a19104d946852821f7b2f5646526 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 16:21:13 +0100
|
||||
Subject: [PATCH] vala: fix wrapping of port setting calls
|
||||
|
||||
---
|
||||
vala/libpulse.vapi | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/vala/libpulse.vapi b/vala/libpulse.vapi
|
||||
index d47ef73..21c0f7c 100644
|
||||
--- a/vala/libpulse.vapi
|
||||
+++ b/vala/libpulse.vapi
|
||||
@@ -1024,7 +1024,7 @@ namespace PulseAudio {
|
||||
public Operation? suspend_sink_by_index(uint32 idx, bool suspend, SuccessCb? cb = null);
|
||||
|
||||
public Operation? set_sink_port_by_name(string name, string port, SuccessCb? cb = null);
|
||||
- public Operation? set_sink_port_by_index(string idx, string port, SuccessCb? cb = null);
|
||||
+ public Operation? set_sink_port_by_index(uint32 idx, string port, SuccessCb? cb = null);
|
||||
|
||||
public Operation? get_source_info_by_name(string name, SourceInfoCb cb);
|
||||
public Operation? get_source_info_by_index(uint32 idx, SourceInfoCb cb);
|
||||
@@ -1039,7 +1039,7 @@ namespace PulseAudio {
|
||||
public Operation? suspend_source_by_index(uint32 idx, bool suspend, SuccessCb? cb = null);
|
||||
|
||||
public Operation? set_source_port_by_name(string name, string port, SuccessCb? cb = null);
|
||||
- public Operation? set_source_port_by_index(string idx, string port, SuccessCb? cb = null);
|
||||
+ public Operation? set_source_port_by_index(uint32 idx, string port, SuccessCb? cb = null);
|
||||
|
||||
public Operation? get_server_info(ServerInfoCb cb);
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
25
0051-proplist-explicitly-mention-a-role-test.patch
Normal file
25
0051-proplist-explicitly-mention-a-role-test.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From ddabaa3b0f7b95e2cf5279f5be74769905af8496 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 16:21:43 +0100
|
||||
Subject: [PATCH] proplist: explicitly mention a role 'test'
|
||||
|
||||
---
|
||||
src/pulse/proplist.h | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h
|
||||
index 8dff8df..6283177 100644
|
||||
--- a/src/pulse/proplist.h
|
||||
+++ b/src/pulse/proplist.h
|
||||
@@ -59,7 +59,7 @@ PA_C_DECL_BEGIN
|
||||
/** For streams: an XDG icon name for the media. e.g. "audio-x-mp3" */
|
||||
#define PA_PROP_MEDIA_ICON_NAME "media.icon_name"
|
||||
|
||||
-/** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y" */
|
||||
+/** For streams: logic role of this media. One of the strings "video", "music", "game", "event", "phone", "animation", "production", "a11y", "test" */
|
||||
#define PA_PROP_MEDIA_ROLE "media.role"
|
||||
|
||||
/** For event sound streams: XDG event sound name. e.g. "message-new-email" (Event sound streams are those with media.role set to "event") */
|
||||
--
|
||||
1.6.0.2
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 8adf536426a86e986fb5bd4ad31ba2d50054c485 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 16:22:17 +0100
|
||||
Subject: [PATCH] stream-restore: be a little bit more verbose why we don't reastore a sink
|
||||
|
||||
---
|
||||
src/modules/module-stream-restore.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
|
||||
index 9b6f914..00ce5ab 100644
|
||||
--- a/src/modules/module-stream-restore.c
|
||||
+++ b/src/modules/module-stream-restore.c
|
||||
@@ -394,7 +394,7 @@ static pa_hook_result_t sink_input_new_hook_callback(pa_core *c, pa_sink_input_n
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if (new_data->sink)
|
||||
- pa_log_debug("Not restoring device for stream %s, because already set.", name);
|
||||
+ pa_log_debug("Not restoring device for stream %s, because already set to '%s'.", name, new_data->sink->name);
|
||||
else if ((e = read_entry(u, name))) {
|
||||
pa_sink *s = NULL;
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 180589511dab1b5d0388b58b41a0e9843ea1a35a Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 16:23:25 +0100
|
||||
Subject: [PATCH] sample-cache: use the sample name as unmodified fallback in the properties when playing a sample from the cache
|
||||
|
||||
---
|
||||
src/pulsecore/core-scache.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c
|
||||
index 1fb81d0..95aaa10 100644
|
||||
--- a/src/pulsecore/core-scache.c
|
||||
+++ b/src/pulsecore/core-scache.c
|
||||
@@ -310,7 +310,8 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
|
||||
return -1;
|
||||
|
||||
merged = pa_proplist_new();
|
||||
- pa_proplist_setf(merged, PA_PROP_MEDIA_NAME, "Sample %s", name);
|
||||
+ pa_proplist_sets(merged, PA_PROP_MEDIA_NAME, name);
|
||||
+ pa_proplist_sets(merged, PA_PROP_EVENT_ID, name);
|
||||
|
||||
if (e->lazy && !e->memchunk.memblock) {
|
||||
pa_channel_map old_channel_map = e->channel_map;
|
||||
--
|
||||
1.6.0.2
|
||||
|
153
0054-scache-when-playing-a-sample-from-the-cache-make-su.patch
Normal file
153
0054-scache-when-playing-a-sample-from-the-cache-make-su.patch
Normal file
@ -0,0 +1,153 @@
|
||||
From f9b9579cf4fe65d3619629b5bc28ce02ceca305e Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 17:35:05 +0100
|
||||
Subject: [PATCH] scache: when playing a sample from the cache make sure not queue them up when the sink is suspended
|
||||
|
||||
libcanberra already sets the appropriate flags for uncached sample
|
||||
streams, we now need to make sure to set them for cached samples too.
|
||||
---
|
||||
src/pulsecore/core-scache.c | 7 ++++++-
|
||||
src/pulsecore/play-memblockq.c | 7 +++++--
|
||||
src/pulsecore/play-memblockq.h | 18 ++++++++++--------
|
||||
src/pulsecore/play-memchunk.c | 3 ++-
|
||||
src/pulsecore/play-memchunk.h | 15 ++++++++-------
|
||||
5 files changed, 31 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c
|
||||
index 95aaa10..0172419 100644
|
||||
--- a/src/pulsecore/core-scache.c
|
||||
+++ b/src/pulsecore/core-scache.c
|
||||
@@ -351,7 +351,12 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
|
||||
if (p)
|
||||
pa_proplist_update(merged, PA_UPDATE_REPLACE, p);
|
||||
|
||||
- if (pa_play_memchunk(sink, &e->sample_spec, &e->channel_map, &e->memchunk, pass_volume ? &r : NULL, merged, sink_input_idx) < 0)
|
||||
+ if (pa_play_memchunk(sink,
|
||||
+ &e->sample_spec, &e->channel_map,
|
||||
+ &e->memchunk,
|
||||
+ pass_volume ? &r : NULL,
|
||||
+ merged,
|
||||
+ PA_SINK_INPUT_NO_CREATE_ON_SUSPEND|PA_SINK_INPUT_KILL_ON_SUSPEND, sink_input_idx) < 0)
|
||||
goto fail;
|
||||
|
||||
pa_proplist_free(merged);
|
||||
diff --git a/src/pulsecore/play-memblockq.c b/src/pulsecore/play-memblockq.c
|
||||
index f528c49..0d6da3e 100644
|
||||
--- a/src/pulsecore/play-memblockq.c
|
||||
+++ b/src/pulsecore/play-memblockq.c
|
||||
@@ -173,7 +173,8 @@ pa_sink_input* pa_memblockq_sink_input_new(
|
||||
const pa_channel_map *map,
|
||||
pa_memblockq *q,
|
||||
pa_cvolume *volume,
|
||||
- pa_proplist *p) {
|
||||
+ pa_proplist *p,
|
||||
+ pa_sink_input_flags_t flags) {
|
||||
|
||||
memblockq_stream *u = NULL;
|
||||
pa_sink_input_new_data data;
|
||||
@@ -198,6 +199,7 @@ pa_sink_input* pa_memblockq_sink_input_new(
|
||||
pa_sink_input_new_data_set_channel_map(&data, map);
|
||||
pa_sink_input_new_data_set_volume(&data, volume);
|
||||
pa_proplist_update(data.proplist, PA_UPDATE_REPLACE, p);
|
||||
+ data.flags |= flags;
|
||||
|
||||
pa_sink_input_new(&u->sink_input, sink->core, &data);
|
||||
pa_sink_input_new_data_done(&data);
|
||||
@@ -237,6 +239,7 @@ int pa_play_memblockq(
|
||||
pa_memblockq *q,
|
||||
pa_cvolume *volume,
|
||||
pa_proplist *p,
|
||||
+ pa_sink_input_flags_t flags,
|
||||
uint32_t *sink_input_index) {
|
||||
|
||||
pa_sink_input *i;
|
||||
@@ -245,7 +248,7 @@ int pa_play_memblockq(
|
||||
pa_assert(ss);
|
||||
pa_assert(q);
|
||||
|
||||
- if (!(i = pa_memblockq_sink_input_new(sink, ss, map, q, volume, p)))
|
||||
+ if (!(i = pa_memblockq_sink_input_new(sink, ss, map, q, volume, p, flags)))
|
||||
return -1;
|
||||
|
||||
pa_sink_input_put(i);
|
||||
diff --git a/src/pulsecore/play-memblockq.h b/src/pulsecore/play-memblockq.h
|
||||
index 9d5f40f..a55fed0 100644
|
||||
--- a/src/pulsecore/play-memblockq.h
|
||||
+++ b/src/pulsecore/play-memblockq.h
|
||||
@@ -31,17 +31,19 @@ pa_sink_input* pa_memblockq_sink_input_new(
|
||||
const pa_channel_map *map,
|
||||
pa_memblockq *q,
|
||||
pa_cvolume *volume,
|
||||
- pa_proplist *p);
|
||||
+ pa_proplist *p,
|
||||
+ pa_sink_input_flags_t flags);
|
||||
|
||||
void pa_memblockq_sink_input_set_queue(pa_sink_input *i, pa_memblockq *q);
|
||||
|
||||
int pa_play_memblockq(
|
||||
- pa_sink *sink,
|
||||
- const pa_sample_spec *ss,
|
||||
- const pa_channel_map *map,
|
||||
- pa_memblockq *q,
|
||||
- pa_cvolume *cvolume,
|
||||
- pa_proplist *p,
|
||||
- uint32_t *sink_input_index);
|
||||
+ pa_sink *sink,
|
||||
+ const pa_sample_spec *ss,
|
||||
+ const pa_channel_map *map,
|
||||
+ pa_memblockq *q,
|
||||
+ pa_cvolume *cvolume,
|
||||
+ pa_proplist *p,
|
||||
+ pa_sink_input_flags_t flags,
|
||||
+ uint32_t *sink_input_index);
|
||||
|
||||
#endif
|
||||
diff --git a/src/pulsecore/play-memchunk.c b/src/pulsecore/play-memchunk.c
|
||||
index 1a3bd5b..6fb8902 100644
|
||||
--- a/src/pulsecore/play-memchunk.c
|
||||
+++ b/src/pulsecore/play-memchunk.c
|
||||
@@ -43,6 +43,7 @@ int pa_play_memchunk(
|
||||
const pa_memchunk *chunk,
|
||||
pa_cvolume *volume,
|
||||
pa_proplist *p,
|
||||
+ pa_sink_input_flags_t flags,
|
||||
uint32_t *sink_input_index) {
|
||||
|
||||
pa_memblockq *q;
|
||||
@@ -59,7 +60,7 @@ int pa_play_memchunk(
|
||||
|
||||
pa_assert_se(pa_memblockq_push(q, chunk) >= 0);
|
||||
|
||||
- if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, sink_input_index)) < 0) {
|
||||
+ if ((r = pa_play_memblockq(sink, ss, map, q, volume, p, flags, sink_input_index)) < 0) {
|
||||
pa_memblockq_free(q);
|
||||
return r;
|
||||
}
|
||||
diff --git a/src/pulsecore/play-memchunk.h b/src/pulsecore/play-memchunk.h
|
||||
index c813611..068add1 100644
|
||||
--- a/src/pulsecore/play-memchunk.h
|
||||
+++ b/src/pulsecore/play-memchunk.h
|
||||
@@ -26,12 +26,13 @@
|
||||
#include <pulsecore/memchunk.h>
|
||||
|
||||
int pa_play_memchunk(
|
||||
- pa_sink *sink,
|
||||
- const pa_sample_spec *ss,
|
||||
- const pa_channel_map *map,
|
||||
- const pa_memchunk *chunk,
|
||||
- pa_cvolume *cvolume,
|
||||
- pa_proplist *p,
|
||||
- uint32_t *sink_input_index);
|
||||
+ pa_sink *sink,
|
||||
+ const pa_sample_spec *ss,
|
||||
+ const pa_channel_map *map,
|
||||
+ const pa_memchunk *chunk,
|
||||
+ pa_cvolume *cvolume,
|
||||
+ pa_proplist *p,
|
||||
+ pa_sink_input_flags_t flags,
|
||||
+ uint32_t *sink_input_index);
|
||||
|
||||
#endif
|
||||
--
|
||||
1.6.0.2
|
||||
|
28
0055-pacat-pass-buffer_attr-to-recording-streams-too.patch
Normal file
28
0055-pacat-pass-buffer_attr-to-recording-streams-too.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From b2e9fb6f6e12a3eab8a41c67017507e60d616e2a Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 21:09:26 +0100
|
||||
Subject: [PATCH] pacat: pass buffer_attr to recording streams too
|
||||
|
||||
Pointed out by Colin Guthrie.
|
||||
|
||||
https://tango.0pointer.de/pipermail/pulseaudio-discuss/2010-February/006698.html
|
||||
---
|
||||
src/utils/pacat.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
|
||||
index d136f6b..394cfbf 100644
|
||||
--- a/src/utils/pacat.c
|
||||
+++ b/src/utils/pacat.c
|
||||
@@ -473,7 +473,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
|
||||
}
|
||||
|
||||
} else {
|
||||
- if (pa_stream_connect_record(stream, device, latency > 0 ? &buffer_attr : NULL, flags) < 0) {
|
||||
+ if (pa_stream_connect_record(stream, device, &buffer_attr, flags) < 0) {
|
||||
pa_log(_("pa_stream_connect_record() failed: %s"), pa_strerror(pa_context_errno(c)));
|
||||
goto fail;
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
@ -0,0 +1,47 @@
|
||||
From a469d44e6993c4e9e7a53ac91ed53eacb500e279 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 22 Feb 2010 03:22:28 +0100
|
||||
Subject: [PATCH] suspend-on-idle: resume audio device even for initially corked streams
|
||||
|
||||
We need to resume audio devices even for streams that are created in
|
||||
corked stat, so that the latency ranges of the audio device are known
|
||||
during the initial latency negotiation. If we don't the latency
|
||||
negotiation will be based on placeholder data and changed later on which
|
||||
clients do not expect.
|
||||
|
||||
This should fix issues with Skype.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=554929
|
||||
---
|
||||
src/modules/module-suspend-on-idle.c | 8 +++-----
|
||||
1 files changed, 3 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
|
||||
index 7adaa0b..cfb7879 100644
|
||||
--- a/src/modules/module-suspend-on-idle.c
|
||||
+++ b/src/modules/module-suspend-on-idle.c
|
||||
@@ -145,8 +145,9 @@ static pa_hook_result_t sink_input_fixate_hook_cb(pa_core *c, pa_sink_input_new_
|
||||
pa_assert(data);
|
||||
pa_assert(u);
|
||||
|
||||
- if (data->flags & PA_SINK_INPUT_START_CORKED)
|
||||
- return PA_HOOK_OK;
|
||||
+ /* We need to resume the audio device here even for
|
||||
+ * PA_SINK_INPUT_START_CORKED, since we need the device parameters
|
||||
+ * to be fully available while the stream is set up. */
|
||||
|
||||
if ((d = pa_hashmap_get(u->device_infos, data->sink)))
|
||||
resume(d);
|
||||
@@ -161,9 +162,6 @@ static pa_hook_result_t source_output_fixate_hook_cb(pa_core *c, pa_source_outpu
|
||||
pa_assert(data);
|
||||
pa_assert(u);
|
||||
|
||||
- if (data->flags & PA_SOURCE_OUTPUT_START_CORKED)
|
||||
- return PA_HOOK_OK;
|
||||
-
|
||||
if (data->source->monitor_of)
|
||||
d = pa_hashmap_get(u->device_infos, data->source->monitor_of);
|
||||
else
|
||||
--
|
||||
1.6.0.2
|
||||
|
48
0057-native-improve-logging-for-buffer_attrs.patch
Normal file
48
0057-native-improve-logging-for-buffer_attrs.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 4a32103d84102ee91368eed1f30613de6da12f6a Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 22 Feb 2010 03:40:29 +0100
|
||||
Subject: [PATCH] native: improve logging for buffer_attrs
|
||||
|
||||
---
|
||||
src/pulsecore/protocol-native.c | 18 ++++++++++++++++++
|
||||
1 files changed, 18 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
|
||||
index f80b0c2..337869d 100644
|
||||
--- a/src/pulsecore/protocol-native.c
|
||||
+++ b/src/pulsecore/protocol-native.c
|
||||
@@ -858,6 +858,18 @@ static void fix_playback_buffer_attr(playback_stream *s) {
|
||||
|
||||
pa_assert(s);
|
||||
|
||||
+ /* pa_log("Client requested: maxlength=%li bytes tlength=%li bytes minreq=%li bytes prebuf=%li bytes", */
|
||||
+ /* (long) s->buffer_attr.maxlength, */
|
||||
+ /* (long) s->buffer_attr.tlength, */
|
||||
+ /* (long) s->buffer_attr.minreq, */
|
||||
+ /* (long) s->buffer_attr.prebuf); */
|
||||
+
|
||||
+ /* pa_log("Client requested: maxlength=%lu ms tlength=%lu ms minreq=%lu ms prebuf=%lu ms", */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.maxlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.tlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.minreq, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.prebuf, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC)); */
|
||||
+
|
||||
/* This function will be called from the main thread, before as
|
||||
* well as after the sink input has been activated using
|
||||
* pa_sink_input_put()! That means it may not touch any
|
||||
@@ -984,6 +996,12 @@ static void fix_playback_buffer_attr(playback_stream *s) {
|
||||
if (s->buffer_attr.prebuf == (uint32_t) -1 ||
|
||||
s->buffer_attr.prebuf > max_prebuf)
|
||||
s->buffer_attr.prebuf = max_prebuf;
|
||||
+
|
||||
+ /* pa_log("Client accepted: maxlength=%lu ms tlength=%lu ms minreq=%lu ms prebuf=%lu ms", */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.maxlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.tlength, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.minreq, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC), */
|
||||
+ /* (unsigned long) (pa_bytes_to_usec(s->buffer_attr.prebuf, &s->sink_input->sample_spec) / PA_USEC_PER_MSEC)); */
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
--
|
||||
1.6.0.2
|
||||
|
53
0058-alsa-util-strip-spaces-from-ALSA-card-pcm-names.patch
Normal file
53
0058-alsa-util-strip-spaces-from-ALSA-card-pcm-names.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 522c446ddc2bf2f4467f9de16f8618fc544a94fe Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 22:00:49 +0100
|
||||
Subject: [PATCH] alsa-util: strip spaces from ALSA card/pcm names
|
||||
|
||||
http://pulseaudio.org/ticket/778
|
||||
---
|
||||
src/modules/alsa/alsa-util.c | 12 +++++++-----
|
||||
1 files changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
|
||||
index 52f1259..1cbb3f3 100644
|
||||
--- a/src/modules/alsa/alsa-util.c
|
||||
+++ b/src/modules/alsa/alsa-util.c
|
||||
@@ -874,12 +874,12 @@ void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card) {
|
||||
pa_proplist_setf(p, "alsa.card", "%i", card);
|
||||
|
||||
if (snd_card_get_name(card, &cn) >= 0) {
|
||||
- pa_proplist_sets(p, "alsa.card_name", cn);
|
||||
+ pa_proplist_sets(p, "alsa.card_name", pa_strip(cn));
|
||||
free(cn);
|
||||
}
|
||||
|
||||
if (snd_card_get_longname(card, &lcn) >= 0) {
|
||||
- pa_proplist_sets(p, "alsa.long_card_name", lcn);
|
||||
+ pa_proplist_sets(p, "alsa.long_card_name", pa_strip(lcn));
|
||||
free(lcn);
|
||||
}
|
||||
|
||||
@@ -937,8 +937,11 @@ void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *
|
||||
if (alsa_subclass_table[subclass])
|
||||
pa_proplist_sets(p, "alsa.subclass", alsa_subclass_table[subclass]);
|
||||
|
||||
- if ((n = snd_pcm_info_get_name(pcm_info)))
|
||||
- pa_proplist_sets(p, "alsa.name", n);
|
||||
+ if ((n = snd_pcm_info_get_name(pcm_info))) {
|
||||
+ char *t = pa_xstrdup(n);
|
||||
+ pa_proplist_sets(p, "alsa.name", pa_strip(t));
|
||||
+ pa_xfree(t);
|
||||
+ }
|
||||
|
||||
if ((id = snd_pcm_info_get_id(pcm_info)))
|
||||
pa_proplist_sets(p, "alsa.id", id);
|
||||
@@ -1331,6 +1334,5 @@ pa_bool_t pa_alsa_may_tsched(pa_bool_t want) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
-
|
||||
return TRUE;
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
@ -0,0 +1,48 @@
|
||||
From dd682d6f96fe7133b866c97b72edcb6136a9737c Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 22 Feb 2010 04:54:24 +0100
|
||||
Subject: [PATCH] alsa: reset max_rewind/max_request while suspending
|
||||
|
||||
---
|
||||
src/modules/alsa/alsa-sink.c | 11 ++++++++++-
|
||||
1 files changed, 10 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
|
||||
index 690480f..60c10c4 100644
|
||||
--- a/src/modules/alsa/alsa-sink.c
|
||||
+++ b/src/modules/alsa/alsa-sink.c
|
||||
@@ -79,7 +79,7 @@
|
||||
#define TSCHED_MIN_WAKEUP_USEC (4*PA_USEC_PER_MSEC) /* 4ms -- Wakeup at least this long before the buffer runs empty*/
|
||||
|
||||
#define SMOOTHER_MIN_INTERVAL (2*PA_USEC_PER_MSEC) /* 2ms -- min smoother update interval */
|
||||
-#define SMOOTHER_MAX_INTERVAL (200*PA_USEC_PER_MSEC) /* 200ms -- max smoother update inteval */
|
||||
+#define SMOOTHER_MAX_INTERVAL (200*PA_USEC_PER_MSEC) /* 200ms -- max smoother update interval */
|
||||
|
||||
#define VOLUME_ACCURACY (PA_VOLUME_NORM/100) /* don't require volume adjustments to be perfectly correct. don't necessarily extend granularity in software unless the differences get greater than this level */
|
||||
|
||||
@@ -876,6 +876,14 @@ static int suspend(struct userdata *u) {
|
||||
u->alsa_rtpoll_item = NULL;
|
||||
}
|
||||
|
||||
+ /* We reset max_rewind/max_request here to make sure that while we
|
||||
+ * are suspended the old max_request/max_rewind values set before
|
||||
+ * the suspend can influence the per-stream buffer of newly
|
||||
+ * created streams, without their requirements having any
|
||||
+ * influence on them. */
|
||||
+ pa_sink_set_max_rewind_within_thread(u->sink, 0);
|
||||
+ pa_sink_set_max_request_within_thread(u->sink, 0);
|
||||
+
|
||||
pa_log_info("Device suspended...");
|
||||
|
||||
return 0;
|
||||
@@ -933,6 +941,7 @@ static int update_sw_params(struct userdata *u) {
|
||||
}
|
||||
|
||||
pa_sink_set_max_request_within_thread(u->sink, u->hwbuf_size - u->hwbuf_unused);
|
||||
+ pa_sink_set_max_rewind_within_thread(u->sink, u->hwbuf_size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
78
0060-core-util-introduce-generic-function-pa_strip.patch
Normal file
78
0060-core-util-introduce-generic-function-pa_strip.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From 195069c1815a1483b2c44f8cc72e2dd25e9b8fb1 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Sun, 21 Feb 2010 21:59:53 +0100
|
||||
Subject: [PATCH] core-util: introduce generic function pa_strip()
|
||||
|
||||
---
|
||||
src/pulsecore/core-util.c | 28 ++++++++++++++++++++++++----
|
||||
src/pulsecore/core-util.h | 1 +
|
||||
2 files changed, 25 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
|
||||
index 258e8ee..d6017b9 100644
|
||||
--- a/src/pulsecore/core-util.c
|
||||
+++ b/src/pulsecore/core-util.c
|
||||
@@ -126,6 +126,9 @@
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
+#define NEWLINE "\r\n"
|
||||
+#define WHITESPACE "\n\r \t"
|
||||
+
|
||||
static pa_strlist *recorded_env = NULL;
|
||||
|
||||
#ifdef OS_IS_WIN32
|
||||
@@ -830,9 +833,6 @@ char *pa_split(const char *c, const char *delimiter, const char**state) {
|
||||
return pa_xstrndup(current, l);
|
||||
}
|
||||
|
||||
-/* What is interpreted as whitespace? */
|
||||
-#define WHITESPACE " \t\n"
|
||||
-
|
||||
/* Split a string into words. Otherwise similar to pa_split(). */
|
||||
char *pa_split_spaces(const char *c, const char **state) {
|
||||
const char *current = *state ? *state : c;
|
||||
@@ -1189,7 +1189,27 @@ int pa_lock_fd(int fd, int b) {
|
||||
char* pa_strip_nl(char *s) {
|
||||
pa_assert(s);
|
||||
|
||||
- s[strcspn(s, "\r\n")] = 0;
|
||||
+ s[strcspn(s, NEWLINE)] = 0;
|
||||
+ return s;
|
||||
+}
|
||||
+
|
||||
+char *pa_strip(char *s) {
|
||||
+ char *e, *l = NULL;
|
||||
+
|
||||
+ /* Drops trailing whitespace. Modifies the string in
|
||||
+ * place. Returns pointer to first non-space character */
|
||||
+
|
||||
+ s += strspn(s, WHITESPACE);
|
||||
+
|
||||
+ for (e = s; *e; e++)
|
||||
+ if (!strchr(WHITESPACE, *e))
|
||||
+ l = e;
|
||||
+
|
||||
+ if (l)
|
||||
+ *(l+1) = 0;
|
||||
+ else
|
||||
+ *s = 0;
|
||||
+
|
||||
return s;
|
||||
}
|
||||
|
||||
diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h
|
||||
index eba1b40..71be9de 100644
|
||||
--- a/src/pulsecore/core-util.h
|
||||
+++ b/src/pulsecore/core-util.h
|
||||
@@ -102,6 +102,7 @@ char *pa_split(const char *c, const char*delimiters, const char **state);
|
||||
char *pa_split_spaces(const char *c, const char **state);
|
||||
|
||||
char *pa_strip_nl(char *s);
|
||||
+char *pa_strip(char *s);
|
||||
|
||||
const char *pa_sig2str(int sig) PA_GCC_PURE;
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
46
0061-esd-simple-use-pa_memblockq_pop_missing.patch
Normal file
46
0061-esd-simple-use-pa_memblockq_pop_missing.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 30f28ebf3619a86b49009e8dbce154233f597dbb Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 23 Feb 2010 00:48:35 +0100
|
||||
Subject: [PATCH] esd,simple: use pa_memblockq_pop_missing()
|
||||
|
||||
We need to use pa_memblockq_pop_missing() for all request handling,
|
||||
including the initial request, because otherwise the counters will be
|
||||
stay off during the entire runtime.
|
||||
|
||||
This should fix:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=559467
|
||||
---
|
||||
src/pulsecore/protocol-esound.c | 2 +-
|
||||
src/pulsecore/protocol-simple.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/protocol-esound.c b/src/pulsecore/protocol-esound.c
|
||||
index a89f327..1e16334 100644
|
||||
--- a/src/pulsecore/protocol-esound.c
|
||||
+++ b/src/pulsecore/protocol-esound.c
|
||||
@@ -462,7 +462,7 @@ static int esd_proto_stream_play(connection *c, esd_proto_t request, const void
|
||||
|
||||
c->protocol->n_player++;
|
||||
|
||||
- pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq));
|
||||
+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_pop_missing(c->input_memblockq));
|
||||
|
||||
pa_sink_input_put(c->sink_input);
|
||||
|
||||
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
|
||||
index fb2e564..77277e1 100644
|
||||
--- a/src/pulsecore/protocol-simple.c
|
||||
+++ b/src/pulsecore/protocol-simple.c
|
||||
@@ -574,7 +574,7 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp
|
||||
|
||||
pa_iochannel_socket_set_rcvbuf(io, l);
|
||||
|
||||
- pa_atomic_store(&c->playback.missing, (int) pa_memblockq_missing(c->input_memblockq));
|
||||
+ pa_atomic_store(&c->playback.missing, (int) pa_memblockq_pop_missing(c->input_memblockq));
|
||||
|
||||
pa_sink_input_put(c->sink_input);
|
||||
}
|
||||
--
|
||||
1.6.0.2
|
||||
|
@ -0,0 +1,72 @@
|
||||
From 0d1154d078f8f149e2ab9a67b09835a829416e49 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 23 Feb 2010 18:41:18 +0100
|
||||
Subject: [PATCH] core: rework how stream volumes affect sink volumes
|
||||
|
||||
---
|
||||
src/pulsecore/sink.c | 42 +++++++++++++++++++++++++++++++++++++++++-
|
||||
1 files changed, 41 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
|
||||
index e6d718f..3a92f67 100644
|
||||
--- a/src/pulsecore/sink.c
|
||||
+++ b/src/pulsecore/sink.c
|
||||
@@ -1162,6 +1162,46 @@ pa_usec_t pa_sink_get_latency_within_thread(pa_sink *s) {
|
||||
return usec;
|
||||
}
|
||||
|
||||
+static pa_cvolume* cvolume_remap_minimal_impact(
|
||||
+ pa_cvolume *v,
|
||||
+ const pa_cvolume *template,
|
||||
+ const pa_channel_map *from,
|
||||
+ const pa_channel_map *to) {
|
||||
+
|
||||
+ pa_cvolume t;
|
||||
+
|
||||
+ pa_assert(v);
|
||||
+ pa_assert(template);
|
||||
+ pa_assert(from);
|
||||
+ pa_assert(to);
|
||||
+
|
||||
+ pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(v, from), NULL);
|
||||
+ pa_return_val_if_fail(pa_cvolume_compatible_with_channel_map(template, to), NULL);
|
||||
+
|
||||
+ /* Much like pa_cvolume_remap(), but tries to minimize impact when
|
||||
+ * mapping from sink input to sink volumes:
|
||||
+ *
|
||||
+ * If template is a possible remapping from v it is used instead
|
||||
+ * of remapping anew.
|
||||
+ *
|
||||
+ * If the channel maps don't match we set an all-channel volume on
|
||||
+ * the sink to ensure that changing a volume on one stream has no
|
||||
+ * effect that cannot be compensated for in another stream that
|
||||
+ * does not have the same channel map as the sink. */
|
||||
+
|
||||
+ if (pa_channel_map_equal(from, to))
|
||||
+ return v;
|
||||
+
|
||||
+ t = *template;
|
||||
+ if (pa_cvolume_equal(pa_cvolume_remap(&t, to, from), v)) {
|
||||
+ *v = *template;
|
||||
+ return v;
|
||||
+ }
|
||||
+
|
||||
+ pa_cvolume_set(v, to->channels, pa_cvolume_max(v));
|
||||
+ return v;
|
||||
+}
|
||||
+
|
||||
/* Called from main context */
|
||||
static void compute_reference_ratios(pa_sink *s) {
|
||||
uint32_t idx;
|
||||
@@ -1289,7 +1329,7 @@ static void compute_real_volume(pa_sink *s) {
|
||||
pa_cvolume remapped;
|
||||
|
||||
remapped = i->volume;
|
||||
- pa_cvolume_remap(&remapped, &i->channel_map, &s->channel_map);
|
||||
+ cvolume_remap_minimal_impact(&remapped, &s->real_volume, &i->channel_map, &s->channel_map);
|
||||
pa_cvolume_merge(&s->real_volume, &s->real_volume, &remapped);
|
||||
}
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 1 21:26:48 UTC 2010 - sreeves@novell.com
|
||||
|
||||
- Add another set of patches backported from upstream git
|
||||
[0033 - 0062].patch
|
||||
Fixes for latency settings, cpu utilization, stuck playback,...
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 19 22:13:22 UTC 2010 - sreeves@novell.com
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
Name: pulseaudio
|
||||
Summary: A Networked Sound Server
|
||||
Version: 0.9.21
|
||||
Release: 2
|
||||
Release: 3
|
||||
License: LGPLv2.1+
|
||||
Group: System/Sound Daemons
|
||||
Source: %{name}-%{version}.tar.bz2
|
||||
@ -62,6 +62,36 @@ Patch29: 0029-More-src-pulsecore-cpu-arm.c-FTBFS-fixes.patch
|
||||
Patch30: 0030-Fix-the-following-warnings-which-now-cause-buildd-f.patch
|
||||
Patch31: 0031-libpulse-Store-pa_stream-pointers-to-hashmaps-inste.patch
|
||||
Patch32: 0032-native-rework-handling-of-seeks-that-depend-on-vari.patch
|
||||
Patch33: 0033-core-Fix-macro-typo-PA_SINK_IS_LINKED-PA_SINK_.patch
|
||||
Patch34: 0034-alsa-cover-Desktop-Speaker-mixer-elements.patch
|
||||
Patch35: 0035-alsa-cover-Shared-Mic-Line-in-Analog-Source.patch
|
||||
Patch36: 0036-alsa-cover-Internal-Mic-elements.patch
|
||||
Patch37: 0037-alsa-use-default-output-port-names.patch
|
||||
Patch38: 0038-build-sys-add-gobject-to-build-dependencies.patch
|
||||
Patch39: 0039-padsp-emulate-dev-audio-too.patch
|
||||
Patch40: 0040-dbus-first-restart-timer-then-dispatch-it.patch
|
||||
Patch41: 0041-fdsem-be-more-verbose-when-reading-from-eventfd-fai.patch
|
||||
Patch42: 0042-pacat-always-fully-fulfill-write-requests.patch
|
||||
Patch43: 0043-pacmd-store-away-fd-type.patch
|
||||
Patch44: 0044-pacmd-don-t-enter-busy-loop-when-reading-from-stdin.patch
|
||||
Patch45: 0045-shm-don-t-complain-about-missing-SHM-segments.patch
|
||||
Patch46: 0046-vala-fix-definition-of-INVALID_INDEX.patch
|
||||
Patch47: 0047-vala-fix-definition-of-the-GLib-mainloop-adapter.patch
|
||||
Patch48: 0048-Add-missing-profile-and-alsa-mixer-paths-to-src-Make.patch
|
||||
Patch49: 0049-channelmap-Use-Subwoofer-as-pretty-name-for-LFE.patch
|
||||
Patch50: 0050-vala-fix-wrapping-of-port-setting-calls.patch
|
||||
Patch51: 0051-proplist-explicitly-mention-a-role-test.patch
|
||||
Patch52: 0052-stream-restore-be-a-little-bit-more-verbose-why-we.patch
|
||||
Patch53: 0053-sample-cache-use-the-sample-name-as-unmodified-fall.patch
|
||||
Patch54: 0054-scache-when-playing-a-sample-from-the-cache-make-su.patch
|
||||
Patch55: 0055-pacat-pass-buffer_attr-to-recording-streams-too.patch
|
||||
Patch56: 0056-suspend-on-idle-resume-audio-device-even-for-initia.patch
|
||||
Patch57: 0057-native-improve-logging-for-buffer_attrs.patch
|
||||
Patch58: 0058-alsa-util-strip-spaces-from-ALSA-card-pcm-names.patch
|
||||
Patch59: 0059-alsa-reset-max_rewind-max_request-while-suspending.patch
|
||||
Patch60: 0060-core-util-introduce-generic-function-pa_strip.patch
|
||||
Patch61: 0061-esd-simple-use-pa_memblockq_pop_missing.patch
|
||||
Patch62: 0062-core-rework-how-stream-volumes-affect-sink-volumes.patch
|
||||
Url: http://pulseaudio.org
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: alsa-devel
|
||||
@ -304,8 +334,39 @@ This package contains GDM integration hooks for the PulseAudio sound server.
|
||||
%patch30 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
%patch34 -p1
|
||||
%patch35 -p1
|
||||
%patch36 -p1
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
%patch41 -p1
|
||||
%patch42 -p1
|
||||
%patch43 -p1
|
||||
%patch44 -p1
|
||||
%patch45 -p1
|
||||
%patch46 -p1
|
||||
%patch47 -p1
|
||||
%patch48 -p1
|
||||
%patch49 -p1
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
%patch53 -p1
|
||||
%patch54 -p1
|
||||
%patch55 -p1
|
||||
%patch56 -p1
|
||||
%patch57 -p1
|
||||
%patch58 -p1
|
||||
%patch59 -p1
|
||||
%patch60 -p1
|
||||
%patch61 -p1
|
||||
%patch62 -p1
|
||||
|
||||
%build
|
||||
autoreconf
|
||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
||||
# libpulse and libpulsecommon need each other - no way with as-needed
|
||||
export SUSE_ASNEEDED=0
|
||||
|
Loading…
Reference in New Issue
Block a user