summaryrefslogtreecommitdiff
path: root/src/modules/alsa/alsa-mixer.c
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2011-07-02 16:29:00 +0100
committerColin Guthrie <colin@mageia.org>2011-07-20 22:23:10 +0100
commit85834107a0eb81a823287b3a9ae834314961c290 (patch)
tree19ab1484745a01e7420ef75a21d960b6352c828b /src/modules/alsa/alsa-mixer.c
parent6c6b50d6a8bbd7fc7fb2cfb59a66183741567922 (diff)
alsa-mixer: Do not 'unify' mixer paths.
Unification is really just a 'lowest common denominator' system. If any paths do not support volume, mute or decibels, then mark them all as not having them. This was originally done this way because the flags set on sinks that dictate if it supports h/w volume, mute etc. could not be changed after the sink was created. The fact that these flags could not change has now been change in the previous commits, and thus there is now no need to use this 'lowest common denominator' approach as we can fully support the various different combinations, even if they change after initial creation of the sinks/source.
Diffstat (limited to 'src/modules/alsa/alsa-mixer.c')
-rw-r--r--src/modules/alsa/alsa-mixer.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 348f037f3..abd3bf24f 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -2873,49 +2873,6 @@ void pa_alsa_path_set_dump(pa_alsa_path_set *ps) {
pa_alsa_path_dump(p);
}
-static void path_set_unify(pa_alsa_path_set *ps) {
- pa_alsa_path *p;
- pa_bool_t has_dB = TRUE, has_volume = TRUE, has_mute = TRUE;
- pa_assert(ps);
-
- /* We have issues dealing with paths that vary too wildly. That
- * means for now we have to have all paths support volume/mute/dB
- * or none. */
-
- PA_LLIST_FOREACH(p, ps->paths) {
- pa_assert(p->probed);
-
- if (!p->has_volume)
- has_volume = FALSE;
- else if (!p->has_dB)
- has_dB = FALSE;
-
- if (!p->has_mute)
- has_mute = FALSE;
- }
-
- if (!has_volume || !has_dB || !has_mute) {
-
- if (!has_volume)
- pa_log_debug("Some paths of the device lack hardware volume control, disabling hardware control altogether.");
- else if (!has_dB)
- pa_log_debug("Some paths of the device lack dB information, disabling dB logic altogether.");
-
- if (!has_mute)
- pa_log_debug("Some paths of the device lack hardware mute control, disabling hardware control altogether.");
-
- PA_LLIST_FOREACH(p, ps->paths) {
- if (!has_volume)
- p->has_volume = FALSE;
- else if (!has_dB)
- p->has_dB = FALSE;
-
- if (!has_mute)
- p->has_mute = FALSE;
- }
- }
-}
-
static void path_set_make_paths_unique(pa_alsa_path_set *ps) {
pa_alsa_path *p, *q;
@@ -2971,7 +2928,6 @@ void pa_alsa_path_set_probe(pa_alsa_path_set *ps, snd_mixer_t *m, pa_bool_t igno
}
}
- path_set_unify(ps);
path_set_make_paths_unique(ps);
ps->probed = TRUE;
}