summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2015-10-19 11:16:37 +0200
committerArun Raghavan <git@arunraghavan.net>2015-10-30 17:58:03 +0530
commitc01e70ec67807bd3b6f6e330fd498353562c3d8c (patch)
tree3d8caf2362cddafcd5075707a9f7a4f3eee1df6c
parent2354dd47acb346c3eca288611ae1b1edaa05a6e3 (diff)
downloadpulseaudio-c01e70ec67807bd3b6f6e330fd498353562c3d8c.tar.gz
alsa-mixer: Ignore volume with unexpected number of channels
We currently only support one and two channels for volumes, and bail out otherwise. This makes Xonar users unhappy because they have a volume with eight channels, and bailing out means they don't have a path/port at all. This way they will at least have a port, which will in turn make the gnome/unity UI behave better. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=84983 BugLink: https://bugzilla.gnome.org/show_bug.cgi?id=745017 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r--src/modules/alsa/alsa-mixer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
index 425c5e6f3..7580e8aea 100644
--- a/src/modules/alsa/alsa-mixer.c
+++ b/src/modules/alsa/alsa-mixer.c
@@ -1743,10 +1743,10 @@ static int element_probe(pa_alsa_element *e, snd_mixer_t *m) {
if (e->n_channels <= 0) {
pa_log_warn("Volume element %s with no channels?", e->alsa_name);
- return -1;
+ e->volume_use = PA_ALSA_VOLUME_IGNORE;
}
- if (e->n_channels > 2) {
+ else if (e->n_channels > 2) {
/* FIXME: In some places code like this is used:
*
* e->masks[alsa_channel_ids[p]][e->n_channels-1]
@@ -1759,7 +1759,7 @@ static int element_probe(pa_alsa_element *e, snd_mixer_t *m) {
* don't support elements with more than two
* channels... */
pa_log_warn("Volume element %s has %u channels. That's too much! I can't handle that!", e->alsa_name, e->n_channels);
- return -1;
+ e->volume_use = PA_ALSA_VOLUME_IGNORE;
}
if (!e->override_map) {