Patchwork [QUANTAL] ALSA: hda - fix control names for multiple speaker out on IDT/STAC

login
register
mail settings
Submitter David Henningsson
Date Sept. 26, 2012, 9:18 a.m.
Message ID <1348651124-5304-1-git-send-email-david.henningsson@canonical.com>
Download mbox | patch
Permalink /patch/187030/
State New
Headers show

Comments

David Henningsson - Sept. 26, 2012, 9:18 a.m.
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>
(cherry picked from commit 298efee7f5a20a32c9ebfa0f7469d87d84998ba1,
 linux/kernel/git/tiwai/sound.git)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---

Motivation:
 * Fixes surround output on a machine we want to enable/certify.
 * Takashi did not want to send to stable because it renames some mixer element
   (change of behaviour). Since we haven't released 12.10 yet, that argument does
   not apply to us.

 sound/pci/hda/patch_sigmatel.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Tim Gardner - Sept. 26, 2012, 12:16 p.m.

Patch

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 8c2b80b..0922e4e 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -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;