summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-06-22 22:36:31 +0200
committerLennart Poettering <lennart@poettering.net>2009-06-22 22:36:31 +0200
commit374efbded48d969cdc21997427a5f1790b4804a4 (patch)
treeeb9b587d031e117f83e5a4ccd646932ec1fb95a5 /src/modules
parentaa2570c2ba8f1ff3cbbcb56607f0d013351916ff (diff)
parent32e2cd6d3216f780c4cffed0f8eb3c30f2c8d732 (diff)
Merge branch 'master' of ssh://rootserver/home/lennart/git/public/pulseaudio
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/alsa/alsa-mixer.c24
-rw-r--r--src/modules/alsa/alsa-sink.c2
-rw-r--r--src/modules/alsa/alsa-source.c3
-rw-r--r--src/modules/alsa/alsa-util.c8
-rw-r--r--src/modules/alsa/alsa-util.h4
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-aux.conf32
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-fm.conf20
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-linein.conf20
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-mic-line.conf21
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-mic.conf20
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-mic.conf.common20
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-tvtuner.conf20
-rw-r--r--src/modules/alsa/mixer/paths/analog-input-video.conf32
-rw-r--r--src/modules/alsa/mixer/paths/analog-input.conf21
-rw-r--r--src/modules/alsa/mixer/paths/analog-input.conf.common66
-rw-r--r--src/modules/alsa/mixer/paths/analog-output-headphones.conf20
-rw-r--r--src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf22
-rw-r--r--src/modules/alsa/mixer/paths/analog-output-mono.conf20
-rw-r--r--src/modules/alsa/mixer/paths/analog-output.conf20
-rw-r--r--src/modules/alsa/mixer/paths/analog-output.conf.common111
-rw-r--r--src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules9
-rw-r--r--src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules26
-rw-r--r--src/modules/alsa/mixer/profile-sets/default.conf73
-rw-r--r--src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf91
-rw-r--r--src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf2
-rw-r--r--src/modules/alsa/module-alsa-card.c6
-rw-r--r--src/modules/alsa/module-alsa-sink.c6
-rw-r--r--src/modules/alsa/module-alsa-source.c6
-rw-r--r--src/modules/bluetooth/module-bluetooth-device.c1
-rw-r--r--src/modules/jack/module-jack-sink.c1
-rw-r--r--src/modules/jack/module-jack-source.c1
-rw-r--r--src/modules/module-combine.c1
-rw-r--r--src/modules/module-esound-sink.c1
-rw-r--r--src/modules/module-null-sink.c1
-rw-r--r--src/modules/module-pipe-sink.c1
-rw-r--r--src/modules/module-pipe-source.c1
-rw-r--r--src/modules/module-sine-source.c1
-rw-r--r--src/modules/module-tunnel.c1
-rw-r--r--src/modules/oss/module-oss.c1
-rw-r--r--src/modules/raop/module-raop-sink.c1
40 files changed, 617 insertions, 120 deletions
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index def26221..a5515e1b 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -479,6 +479,7 @@ static int element_get_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
snd_mixer_elem_t *me;
snd_mixer_selem_channel_id_t c;
pa_channel_position_mask_t mask = 0;
+ pa_volume_t max_channel_volume = PA_VOLUME_MUTED;
unsigned k;
pa_assert(m);
@@ -545,6 +546,9 @@ static int element_get_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
f = from_alsa_volume(value, e->min_volume, e->max_volume);
}
+ if (f > max_channel_volume)
+ max_channel_volume = f;
+
for (k = 0; k < cm->channels; k++)
if (e->masks[c][e->n_channels-1] & PA_CHANNEL_POSITION_MASK(cm->map[k]))
if (v->values[k] < f)
@@ -555,7 +559,7 @@ static int element_get_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
for (k = 0; k < cm->channels; k++)
if (!(mask & PA_CHANNEL_POSITION_MASK(cm->map[k])))
- v->values[k] = PA_VOLUME_NORM;
+ v->values[k] = max_channel_volume;
return 0;
}
@@ -677,6 +681,7 @@ static int element_set_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
snd_mixer_elem_t *me;
snd_mixer_selem_channel_id_t c;
pa_channel_position_mask_t mask = 0;
+ pa_volume_t max_channel_volume = PA_VOLUME_MUTED;
unsigned k;
pa_assert(m);
@@ -696,11 +701,21 @@ static int element_set_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
for (c = 0; c <= SND_MIXER_SCHN_LAST; c++) {
int r;
pa_volume_t f = PA_VOLUME_MUTED;
+ pa_bool_t found = FALSE;
for (k = 0; k < cm->channels; k++)
- if (e->masks[c][e->n_channels-1] & PA_CHANNEL_POSITION_MASK(cm->map[k]))
+ if (e->masks[c][e->n_channels-1] & PA_CHANNEL_POSITION_MASK(cm->map[k])) {
+ found = TRUE;
if (v->values[k] > f)
f = v->values[k];
+ }
+
+ if (!found) {
+ /* Hmm, so this channel does not exist in the volume
+ * struct, so let's bind it to the overall max of the
+ * volume. */
+ f = pa_cvolume_max(v);
+ }
if (e->has_dB) {
long value = to_alsa_dB(f);
@@ -756,6 +771,9 @@ static int element_set_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
f = from_alsa_volume(value, e->min_volume, e->max_volume);
}
+ if (f > max_channel_volume)
+ max_channel_volume = f;
+
for (k = 0; k < cm->channels; k++)
if (e->masks[c][e->n_channels-1] & PA_CHANNEL_POSITION_MASK(cm->map[k]))
if (rv.values[k] < f)
@@ -766,7 +784,7 @@ static int element_set_volume(pa_alsa_element *e, snd_mixer_t *m, const pa_chann
for (k = 0; k < cm->channels; k++)
if (!(mask & PA_CHANNEL_POSITION_MASK(cm->map[k])))
- rv.values[k] = PA_VOLUME_NORM;
+ rv.values[k] = max_channel_volume;
*v = rv;
return 0;
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index 34ff6582..c39a898f 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -838,7 +838,6 @@ static int unsuspend(struct userdata *u) {
pa_log_info("Trying resume...");
- snd_config_update_free_global();
if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_PLAYBACK,
/*SND_PCM_NONBLOCK|*/
SND_PCM_NO_AUTO_RESAMPLE|
@@ -1213,7 +1212,6 @@ static void thread_func(void *userdata) {
pa_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
int ret;
diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c
index c8244c66..755ceae2 100644
--- a/src/modules/alsa/alsa-source.c
+++ b/src/modules/alsa/alsa-source.c
@@ -787,8 +787,6 @@ static int unsuspend(struct userdata *u) {
pa_log_info("Trying resume...");
- snd_config_update_free_global();
-
if ((err = snd_pcm_open(&u->pcm_handle, u->device_name, SND_PCM_STREAM_CAPTURE,
/*SND_PCM_NONBLOCK|*/
SND_PCM_NO_AUTO_RESAMPLE|
@@ -1096,7 +1094,6 @@ static void thread_func(void *userdata) {
pa_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
int ret;
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 0ed4361c..1f3e5dcd 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -735,20 +735,22 @@ static void alsa_error_handler(const char *file, int line, const char *function,
static pa_atomic_t n_error_handler_installed = PA_ATOMIC_INIT(0);
-void pa_alsa_redirect_errors_inc(void) {
+void pa_alsa_refcnt_inc(void) {
/* This is not really thread safe, but we do our best */
if (pa_atomic_inc(&n_error_handler_installed) == 0)
snd_lib_error_set_handler(alsa_error_handler);
}
-void pa_alsa_redirect_errors_dec(void) {
+void pa_alsa_refcnt_dec(void) {
int r;
pa_assert_se((r = pa_atomic_dec(&n_error_handler_installed)) >= 1);
- if (r == 1)
+ if (r == 1) {
snd_lib_error_set_handler(NULL);
+ snd_config_update_free_global();
+ }
}
pa_bool_t pa_alsa_init_description(pa_proplist *p) {
diff --git a/src/modules/alsa/alsa-util.h b/src/modules/alsa/alsa-util.h
index c2f0e5b7..830a922e 100644
--- a/src/modules/alsa/alsa-util.h
+++ b/src/modules/alsa/alsa-util.h
@@ -114,8 +114,8 @@ snd_pcm_t *pa_alsa_open_by_template(
void pa_alsa_dump(pa_log_level_t level, snd_pcm_t *pcm);
void pa_alsa_dump_status(snd_pcm_t *pcm);
-void pa_alsa_redirect_errors_inc(void);
-void pa_alsa_redirect_errors_dec(void);
+void pa_alsa_refcnt_inc(void);
+void pa_alsa_refcnt_dec(void);
void pa_alsa_init_proplist_pcm_info(pa_core *c, pa_proplist *p, snd_pcm_info_t *pcm_info);
void pa_alsa_init_proplist_card(pa_core *c, pa_proplist *p, int card);
diff --git a/src/modules/alsa/mixer/paths/analog-input-aux.conf b/src/modules/alsa/mixer/paths/analog-input-aux.conf
index 8f480567..db78eb48 100644
--- a/src/modules/alsa/mixer/paths/analog-input-aux.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-aux.conf
@@ -1,4 +1,22 @@
-# For devices, where we have an Aux element
+# 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 an 'Aux' element exists
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 90
@@ -29,4 +47,16 @@ override-map.2 = all-left,all-right
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
diff --git a/src/modules/alsa/mixer/paths/analog-input-fm.conf b/src/modules/alsa/mixer/paths/analog-input-fm.conf
index 0f78f39f..baf674aa 100644
--- a/src/modules/alsa/mixer/paths/analog-input-fm.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-fm.conf
@@ -1,4 +1,22 @@
-# For devices where we have an FM element
+# 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 an 'FM' element exists
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 70
diff --git a/src/modules/alsa/mixer/paths/analog-input-linein.conf b/src/modules/alsa/mixer/paths/analog-input-linein.conf
index b6ba738c..4be5722d 100644
--- a/src/modules/alsa/mixer/paths/analog-input-linein.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-linein.conf
@@ -1,4 +1,22 @@
-# For devices, where we have a Line element
+# 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 'Line' element exists
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 90
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 7d4addf7..f7f30854 100644
--- a/src/modules/alsa/mixer/paths/analog-input-mic-line.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-mic-line.conf
@@ -1,4 +1,22 @@
-# For devices where we have a Mic/Lineb element
+# 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 'Mic/Line' element exists
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 90
@@ -42,3 +60,4 @@ 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-mic.conf b/src/modules/alsa/mixer/paths/analog-input-mic.conf
index 004cd24a..2a36f2f3 100644
--- a/src/modules/alsa/mixer/paths/analog-input-mic.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-mic.conf
@@ -1,4 +1,22 @@
-# For devices where we have a Mic element
+# 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 'Mic' element exists
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 100
diff --git a/src/modules/alsa/mixer/paths/analog-input-mic.conf.common b/src/modules/alsa/mixer/paths/analog-input-mic.conf.common
index db70e507..b35e7af8 100644
--- a/src/modules/alsa/mixer/paths/analog-input-mic.conf.common
+++ b/src/modules/alsa/mixer/paths/analog-input-mic.conf.common
@@ -1,3 +1,23 @@
+# 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.
+
+; Common element for all microphone inputs
+;
+; See analog-output.conf.common for an explanation on the directives
+
;;; 'Mic Select'
[Element Mic Select]
diff --git a/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf b/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
index ea0a0b72..8531ec70 100644
--- a/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-tvtuner.conf
@@ -1,4 +1,22 @@
-# For devices, where we have a TV Tuner element
+# 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 'TV Tuner' element exists
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 70
diff --git a/src/modules/alsa/mixer/paths/analog-input-video.conf b/src/modules/alsa/mixer/paths/analog-input-video.conf
index 27acc254..74c76f07 100644
--- a/src/modules/alsa/mixer/paths/analog-input-video.conf
+++ b/src/modules/alsa/mixer/paths/analog-input-video.conf
@@ -1,4 +1,22 @@
-# For devices, where we have a Video element
+# 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 'Video' element exists
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 70
@@ -28,4 +46,16 @@ volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
+[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
diff --git a/src/modules/alsa/mixer/paths/analog-input.conf b/src/modules/alsa/mixer/paths/analog-input.conf
index b221bb44..5055f90a 100644
--- a/src/modules/alsa/mixer/paths/analog-input.conf
+++ b/src/modules/alsa/mixer/paths/analog-input.conf
@@ -1,4 +1,23 @@
-# A fallback for devices that lack seperate Mic/Line/Aux/Video elements
+# 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.
+
+; A fallback for devices that lack seperate Mic/Line/Aux/Video/TV
+; Tuner/FM elements
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 100
diff --git a/src/modules/alsa/mixer/paths/analog-input.conf.common b/src/modules/alsa/mixer/paths/analog-input.conf.common
index d34afd04..6728a6ae 100644
--- a/src/modules/alsa/mixer/paths/analog-input.conf.common
+++ b/src/modules/alsa/mixer/paths/analog-input.conf.common
@@ -1,30 +1,48 @@
-# Mixer path for PulseAudio's ALSA backend. If multiple options by the
-# same id are discovered they will be suffixed with a number to
-# distuingish them, in the same order they appear here.
+# This file is part of PulseAudio.
#
-# Source selection should use the following names:
+# 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.
#
-# input -- If we don't know the exact kind of input
-# input-microphone
-# input-microphone-internal
-# input-microphone-external
-# input-linein
-# input-video
-# input-radio
-# input-docking-microphone
-# input-docking-linein
-# input-docking
-#
-# We explicitly don't want to wrap the following sources:
-#
-# CD
-# Synth/MIDI
-# Phone
-# Mix
-# Digital/SPDIF
-# Master
-# PC Speaker
+# 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.
+
+; Mixer path for PulseAudio's ALSA backend, common elements for all
+; input paths. If multiple options by the same id are discovered they
+; will be suffixed with a number to distuingish them, in the same
+; order they appear here.
+;
+; Source selection should use the following names:
+;
+; input -- If we don't know the exact kind of input
+; input-microphone
+; input-microphone-internal
+; input-microphone-external
+; input-linein
+; input-video
+; input-radio
+; input-docking-microphone
+; input-docking-linein
+; input-docking
+;
+; We explicitly don't want to wrap the following sources:
+;
+; CD
+; Synth/MIDI
+; Phone
+; Mix
+; Digital/SPDIF
+; Master
+; PC Speaker
+;
+; See analog-output.conf.common for an explanation on the directives
;;; 'Input Source Select'
diff --git a/src/modules/alsa/mixer/paths/analog-output-headphones.conf b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
index 1a172d4c..c018e0eb 100644
--- a/src/modules/alsa/mixer/paths/analog-output-headphones.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-headphones.conf
@@ -1,4 +1,22 @@
-# Path for mixers that have a Headphone slider
+# 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 'Headphone' control
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 90
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 67031762..7a267890 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
@@ -1,5 +1,23 @@
-# Intended for usage in laptops that have a seperate LFE speaker
-# connected to the Master mono connector
+# 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.
+
+; Intended for usage in laptops that have a seperate LFE speaker
+; connected to the Master mono connector
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 40
diff --git a/src/modules/alsa/mixer/paths/analog-output-mono.conf b/src/modules/alsa/mixer/paths/analog-output-mono.conf
index a23d9b79..f6cb9f8a 100644
--- a/src/modules/alsa/mixer/paths/analog-output-mono.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-mono.conf
@@ -1,4 +1,22 @@
-# Intended for usage on boards that have a seperate Mono output plug.
+# 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.
+
+; Intended for usage on boards that have a seperate Mono output plug.
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 50
diff --git a/src/modules/alsa/mixer/paths/analog-output.conf b/src/modules/alsa/mixer/paths/analog-output.conf
index 15e703c4..ea108aaf 100644
--- a/src/modules/alsa/mixer/paths/analog-output.conf
+++ b/src/modules/alsa/mixer/paths/analog-output.conf
@@ -1,4 +1,22 @@
-# Intended for the 'default' output
+# 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.
+
+; Intended for the 'default' output
+;
+; See analog-output.conf.common for an explanation on the directives
[General]
priority = 100
diff --git a/src/modules/alsa/mixer/paths/analog-output.conf.common b/src/modules/alsa/mixer/paths/analog-output.conf.common
index c38eccde..cc1185f4 100644
--- a/src/modules/alsa/mixer/paths/analog-output.conf.common
+++ b/src/modules/alsa/mixer/paths/analog-output.conf.common
@@ -1,26 +1,97 @@
-# Common part of all paths
-
-# [General]
-# priority = ...
-# description = ...
-#
-# [Option ...:...]
-# name = ...
-# priority = ...
+# This file is part of PulseAudio.
#
-# [Element ...]
-# required = ignore | switch | volume | enumeration | any
-# required-absent = ignore | switch | volume
+# 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.
#
-# switch = ignore | mute | off | on | select
-# volume = ignore | merge | off | zero
-# enumeration = ignore | select
+# 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.
#
-# direction = playback | capture
-# direction-try-other = no | yes
-#
-# override-map.1 = ...
-# override-map.2 = ...
+# 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.
+
+; Common part of all paths
+
+; So here's generally how mixer paths are used by PA: PA goes through
+; a mixer path file from top to bottom and checks if a mixer element
+; described therein exists. If so it is added to the list of mixer
+; elements PA will control, keeping the order it read them in. If a
+; mixer element described here has set the required= or
+; required-absent= directives a path might not be accepted as valid
+; and is ignored in its entirety (see below). However usually if a
+; element listed here is missing this one element is ignored but not
+; the entire path.
+;
+; When a device shall be muted/unmuted *all* elements listed in a path
+; file with "switch = mute" will be toggled.
+;
+; When a device shall change its volume, PA will got through the list
+; of all elements with "volume = merge" and set the volume on the
+; first element. If that element does not support dB volumes, this is
+; where the story ends. If it does support dB volumes, PA divides the
+; requested volume by the volume that was set on this element, and
+; then go on to the next element with "volume = merge" and then set
+; that there, and so on. That way the first volume element in the
+; path will be the one that does the 'biggest' part of the overall
+; volume adjustment, with the remaining elements usually being set to
+; some value next to 0dB. This logic makes sure we get the full range
+; over all volume sliders and a very high granularity of volumes
+; already in hardware.
+;
+; All switches and enumerations set to "select" are exposed via the
+; "port" functionality of sinks/sources. Basically every possible
+; switch setting and every possible enumeration setting will be
+; combined and made into a "port". So make sure you don't list too
+; many switches/enums for exposing, because the number of ports might
+; rise exponentially.
+;
+; Only one path can be selected at a time. All paths that are valid
+; for an audio device will be exposed as "port" for the sink/source.
+
+
+; [General]
+; priority = ... # Priority for this path
+; description = ...
+;
+; [Option ...:...] # For each option of an enumeration or switch element
+; # that shall be exposed as a sink/source port. Needs to
+; # be named after the Element, followed by a colon, followed
+; # by the option name, resp. on/off if the element is a switch.
+; name = ... # Logical name to use in the path identifier
+; priority = ... # Priority if this is made into a device port
+;
+; [Element ...] # For each element that we shall control
+; required = ignore | switch | volume | enumeration | any # If set, require this element to be of this kind and available,
+; # otherwise don't consider this path valid for the card
+; required-absent = ignore | switch | volume # If set, require this element to not be of this kind and not
+; # available, otherwise don't consider this path valid for the card
+;
+; switch = ignore | mute | off | on | select # What to do with this switch: ignore it, make it follow mute status,
+; # always set it to off, always to on, or make it selectable as port.
+; # If set to 'select' you need to define an Option section for on
+; # and off
+; volume = ignore | merge | off | zero # What to do with this volume: ignore it, merge it into the device
+; # volume slider, always set it to the lowest value possible, or always
+; # set it to 0 dB (for whatever that means)
+; enumeration = ignore | select # What to do with this enumeration, ignore it or make it selectable
+; # via device ports. If set to 'select' you need to define an Option section
+; # for each of the items you want to expose
+; direction = playback | capture # Is this relevant only for playback or capture? If not set this will implicitly be
+; # set the direction of the PCM device is opened as. Generally this doesn't need to be set
+; # unless you have a broken driver that has playback controls marked for capture or vice
+; # versa
+; direction-try-other = no | yes # If the element does not supported what is requested, try the other direction, too?
+;
+; override-map.1 = ... # Override the channel mask of the mixer control if the control only exposes a single channel
+; override-map.2 = ... # Override the channel masks of the mixer control if the control only exposes two channels
+; # Override maps should list for each element channel which high-level channels it controls via a
+; # channel mask. A channel mask may either be the name of a single channel, or the words "all-left",
+; # "all-right", "all-center", "all-front", "all-rear", and "all" to encode a specific subset of
+; # channels in a mask
[Element PCM]
switch = mute
diff --git a/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules
deleted file mode 100644
index 92a6b034..00000000
--- a/src/modules/alsa/mixer/profile-sets/78-pulseaudio.rules
+++ /dev/null
@@ -1,9 +0,0 @@
-# do not edit this file, it will be overwritten on update
-
-SUBSYSTEM!="sound", GOTO="pulseaudio_end"
-ACTION!="change", GOTO="pulseaudio_end"
-KERNEL!="card*", GOTO="pulseaudio_end"
-
-SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf"
-
-LABEL="pulseaudio_end"
diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
new file mode 100644
index 00000000..ea1a2fed
--- /dev/null
+++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
@@ -0,0 +1,26 @@
+# do not edit this file, it will be overwritten on update
+
+# 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.
+
+SUBSYSTEM!="sound", GOTO="pulseaudio_end"
+ACTION!="change", GOTO="pulseaudio_end"
+KERNEL!="card*", GOTO="pulseaudio_end"
+
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="1978", ENV{PULSE_PROFILE_SET}="native-instruments-audio8dj.conf"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="17cc", ATTRS{idProduct}=="0839", ENV{PULSE_PROFILE_SET}="native-instruments-audio4dj.conf"
+
+LABEL="pulseaudio_end"
diff --git a/src/modules/alsa/mixer/profile-sets/default.conf b/src/modules/alsa/mixer/profile-sets/default.conf
index bbe53410..ac41a8d3 100644
--- a/src/modules/alsa/mixer/profile-sets/default.conf
+++ b/src/modules/alsa/mixer/profile-sets/default.conf
@@ -1,22 +1,60 @@
-# Profile definitions for PulseAudio's ALSA backend
+# This file is part of PulseAudio.
#
-# [Mapping id]
-# device-strings = ...
-# channel-map = ...
-# description = ...
-# paths-input = ...
-# paths-output = ...
-# element-input = ...
-# element-output = ...
-# priority = ...
-# direction = any | input | output
+# 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.
#
-# [Profile id]
-# input-mappings = ...
-# output-mappings = ...
-# description = ...
-# priority = ...
-# skip-probe = no | yes
+# 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.
+
+; Default profile definitions for the ALSA backend of PulseAudio. This
+; is used as fallback for all cards that have no special mapping
+; assigned. (and should be good enough for the vast majority of
+; cards). Use the udev property PULSE_PROFILE_SET to assign a
+; different profile set than this one to a device. So what is this
+; about? Simply, what we do here is map ALSA devices to how they are
+; exposed in PA. We say which ALSA device string to use to open a
+; device, which channel mapping to use then, and which mixer path to
+; use. This is encoded in a 'mapping'. Multiple of these mappings can
+; be bound together in a 'profile' which is then directly exposed in
+; the UI as a card profile. Each mapping assigned to a profile will
+; result in one sink/source to be created if the profile is selected
+; for the card.
+
+; [General]
+; auto-profiles = no | yes # Instead of defining all profiles manually, autogenerate
+; # them by combining every input mapping with every output mapping.
+;
+; [Mapping id]
+; device-strings = ... # ALSA device string. %f will be replaced by the card identifier.
+; channel-map = ... # Channel mapping to use for this device
+; description = ...
+; paths-input = ... # A list of mixer paths to use. Every path in this list will be probed.
+; # If multiple are found to be working they will be available as device ports
+; paths-output = ...
+; element-input = ... # Instead of configuring a full mixer path simply configure a single
+; # mixer element for volume/mute handling
+; element-output = ...
+; priority = ...
+; direction = any | input | output # Only useful for?
+;
+; [Profile id]
+; input-mappings = ... # Lists mappings for sources on this profile, those mapping must be
+; # defined in this file too
+; output-mappings = ... # Lists mappings for sinks on this profile, those mappings must be
+; # defined in this file too
+; description = ...
+; priority = ... # Numeric value to deduce priority for this profile
+; skip-probe = no | yes # Skip probing for availability? If this is yes then this profile
+; # will be assumed as working without probing. Makes initialization
+; # a bit faster but only works if the card is really known well.
[General]
auto-profiles = yes
@@ -99,6 +137,7 @@ channel-map = left,right
priority = 4
direction = output
+; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]
#description = Foobar
#output-mappings = analog-stereo iec958-stereo
diff --git a/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf b/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf
new file mode 100644
index 00000000..2b835308
--- /dev/null
+++ b/src/modules/alsa/mixer/profile-sets/native-instruments-audio4dj.conf
@@ -0,0 +1,91 @@
+# 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.
+
+; Native Instruments Audio 4 DJ
+;
+; This card has two stereo pairs of input and two stereo pairs of
+; output, named channels A and B. Channel B has an additional
+; Headphone connector.
+;
+; We knowingly only define a subset of the theoretically possible
+; mapping combinations as profiles here.
+;
+; See default.conf for an explanation on the directives used here.
+
+[General]
+auto-profiles = no
+
+[Mapping analog-stereo-a]
+description = Analog Stereo Channel A
+device-strings = hw:%f,0,0
+channel-map = left,right
+
+[Mapping analog-stereo-b-output]
+description = Analog Stereo Channel B (Headphones)
+device-strings = hw:%f,0,1
+channel-map = left,right
+direction = output
+
+[Mapping analog-stereo-b-input]
+description = Analog Stereo Channel B
+device-strings = hw:%f,0,1
+channel-map = left,right
+direction = input
+
+[Profile output:analog-stereo-all+input:analog-stereo-all]
+description = Analog Stereo Duplex Channels A, B (Headphones)
+output-mappings = analog-stereo-a analog-stereo-b-output
+input-mappings = analog-stereo-a analog-stereo-b-input
+priority = 100
+skip-probe = yes
+
+[Profile output:analog-stereo-a+input:analog-stereo-a]
+description = Analog Stereo Duplex Channel A
+output-mappings = analog-stereo-a
+input-mappings = analog-stereo-a
+priority = 40
+skip-probe = yes
+
+[Profile output:analog-stereo-b+input:analog-stereo-b]
+description = Analog Stereo Duplex Channel B (Headphones)
+output-mappings = analog-stereo-b-output
+input-mappings = analog-stereo-b-input
+priority = 50
+skip-probe = yes
+
+[Profile output:analog-stereo-a]
+description = Analog Stereo Output Channel A
+output-mappings = analog-stereo-a
+priority = 5
+skip-probe = yes
+
+[Profile output:analog-stereo-b]
+description = Analog Stereo Output Channel B (Headphones)
+output-mappings = analog-stereo-b-output
+priority = 6
+skip-probe = yes
+
+[Profile input:analog-stereo-a]
+description = Analog Stereo Input Channel A
+input-mappings = analog-stereo-a
+priority = 2
+skip-probe = yes
+
+[Profile input:analog-stereo-b]
+description = Analog Stereo Input Channel B
+input-mappings = analog-stereo-b-input
+priority = 1
+skip-probe = yes
diff --git a/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
index fe1e9ae8..3fe3cc56 100644
--- a/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
+++ b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
@@ -22,6 +22,8 @@
;
; We knowingly only define a subset of the theoretically possible
; mapping combinations as profiles here.
+;
+; See default.conf for an explanation on the directives used here.
[General]
auto-profiles = no
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
index e8a7f206..55f6a6e2 100644
--- a/src/modules/alsa/module-alsa-card.c
+++ b/src/modules/alsa/module-alsa-card.c
@@ -287,8 +287,7 @@ int pa__init(pa_module *m) {
const char *description;
char *fn = NULL;
- pa_alsa_redirect_errors_inc();
- snd_config_update_free_global();
+ pa_alsa_refcnt_inc();
pa_assert(m);
@@ -443,6 +442,5 @@ void pa__done(pa_module*m) {
pa_xfree(u);
finish:
- snd_config_update_free_global();
- pa_alsa_redirect_errors_dec();
+ pa_alsa_refcnt_dec();
}
diff --git a/src/modules/alsa/module-alsa-sink.c b/src/modules/alsa/module-alsa-sink.c
index 058ea205..3aa89b2a 100644
--- a/src/modules/alsa/module-alsa-sink.c
+++ b/src/modules/alsa/module-alsa-sink.c
@@ -82,8 +82,7 @@ int pa__init(pa_module*m) {
pa_assert(m);
- pa_alsa_redirect_errors_inc();
- snd_config_update_free_global();
+ pa_alsa_refcnt_inc();
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments");
@@ -124,6 +123,5 @@ void pa__done(pa_module*m) {
if ((sink = m->userdata))
pa_alsa_sink_free(sink);
- snd_config_update_free_global();
- pa_alsa_redirect_errors_dec();
+ pa_alsa_refcnt_dec();
}
diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c
index 3bd1b451..de8bcd0b 100644
--- a/src/modules/alsa/module-alsa-source.c
+++ b/src/modules/alsa/module-alsa-source.c
@@ -106,8 +106,7 @@ int pa__init(pa_module*m) {
pa_assert(m);
- pa_alsa_redirect_errors_inc();
- snd_config_update_free_global();
+ pa_alsa_refcnt_inc();
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
pa_log("Failed to parse module arguments");
@@ -148,6 +147,5 @@ void pa__done(pa_module*m) {
if ((source = m->userdata))
pa_alsa_source_free(source);
- snd_config_update_free_global();
- pa_alsa_redirect_errors_dec();
+ pa_alsa_refcnt_dec();
}
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 6bcd0b80..0f1e78f2 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -1265,7 +1265,6 @@ static void thread_func(void *userdata) {
goto fail;
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
struct pollfd *pollfd;
diff --git a/src/modules/jack/module-jack-sink.c b/src/modules/jack/module-jack-sink.c
index 290038e7..fc976fa7 100644
--- a/src/modules/jack/module-jack-sink.c
+++ b/src/modules/jack/module-jack-sink.c
@@ -225,7 +225,6 @@ static void thread_func(void *userdata) {
pa_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
int ret;
diff --git a/src/modules/jack/module-jack-source.c b/src/modules/jack/module-jack-source.c
index ef89a98e..a898e0e5 100644
--- a/src/modules/jack/module-jack-source.c
+++ b/src/modules/jack/module-jack-source.c
@@ -196,7 +196,6 @@ static void thread_func(void *userdata) {
pa_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
int ret;
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 725faa0c..cd3118d7 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -280,7 +280,6 @@ static void thread_func(void *userdata) {
pa_make_realtime(u->core->realtime_priority+1);
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
u->thread_info.timestamp = pa_rtclock_usec();
u->thread_info.in_null_mode = FALSE;
diff --git a/src/modules/module-esound-sink.c b/src/modules/module-esound-sink.c
index 8cb25c51..48a9c794 100644
--- a/src/modules/module-esound-sink.c
+++ b/src/modules/module-esound-sink.c
@@ -200,7 +200,6 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());
diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c
index 30a99ca7..c4753c9d 100644
--- a/src/modules/module-null-sink.c
+++ b/src/modules/module-null-sink.c
@@ -208,7 +208,6 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
u->timestamp = pa_rtclock_usec();
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 5b0f6414..8a7dc846 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -170,7 +170,6 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
struct pollfd *pollfd;
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index 61c9fc0e..e5609fb5 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
@@ -129,7 +129,6 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
int ret;
diff --git a/src/modules/module-sine-source.c b/src/modules/module-sine-source.c
index 14a04e47..8df4d9bb 100644
--- a/src/modules/module-sine-source.c
+++ b/src/modules/module-sine-source.c
@@ -166,7 +166,6 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
u->timestamp = pa_rtclock_usec();
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index c493d9bb..eaed5f9a 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -683,7 +683,6 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
int ret;
diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c
index b1afcfd6..c44b882b 100644
--- a/src/modules/oss/module-oss.c
+++ b/src/modules/oss/module-oss.c
@@ -889,7 +889,6 @@ static void thread_func(void *userdata) {
pa_make_realtime(u->core->realtime_priority);
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
for (;;) {
int ret;
diff --git a/src/modules/raop/module-raop-sink.c b/src/modules/raop/module-raop-sink.c
index 54de42c2..cab3a82a 100644
--- a/src/modules/raop/module-raop-sink.c
+++ b/src/modules/raop/module-raop-sink.c
@@ -323,7 +323,6 @@ static void thread_func(void *userdata) {
pa_log_debug("Thread starting up");
pa_thread_mq_install(&u->thread_mq);
- pa_rtpoll_install(u->rtpoll);
pa_smoother_set_time_offset(u->smoother, pa_rtclock_usec());