ALSA: hda - fix control names for multiple speaker out on IDT/STAC
authorDavid Henningsson <david.henningsson@canonical.com>
Thu, 6 Sep 2012 09:17:58 +0000 (11:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 6 Sep 2012 10:01:55 +0000 (12:01 +0200)
For multiple speaker outs, the names were previously
"Speaker,0", "Speaker,1", "Center"/"LFE", "Speaker,3". This is
inconsistent, confusing, and is not picked up correctly by PulseAudio.
Instead use "Front", "Surround", "Center"/"LFE", "Side" which
is more standard.

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046734
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index 9db3056..c16d0f8 100644 (file)
@@ -3226,9 +3226,12 @@ static int create_multi_out_ctls(struct hda_codec *codec, int num_outs,
                                idx = i;
                                break;
                        case AUTO_PIN_SPEAKER_OUT:
-                               name = "Speaker";
-                               idx = i;
-                               break;
+                               if (num_outs <= 1) {
+                                       name = "Speaker";
+                                       idx = i;
+                                       break;
+                               }
+                               /* Fall through in case of multi speaker outs */
                        default:
                                name = chname[i];
                                idx = 0;