From patchwork Wed Sep 26 09:18:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Henningsson X-Patchwork-Id: 187030 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 096502C0090 for ; Wed, 26 Sep 2012 19:18:58 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TGnj0-0000XM-3l; Wed, 26 Sep 2012 09:16:10 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TGniy-0000XH-9w for kernel-team@lists.ubuntu.com; Wed, 26 Sep 2012 09:16:08 +0000 Received: from hd9483857.selulk5.dyn.perspektivbredband.net ([217.72.56.87] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1TGnlT-0007Gn-7a; Wed, 26 Sep 2012 09:18:43 +0000 From: David Henningsson To: kernel-team@lists.ubuntu.com Subject: [QUANTAL PATCH] ALSA: hda - fix control names for multiple speaker out on IDT/STAC Date: Wed, 26 Sep 2012 11:18:44 +0200 Message-Id: <1348651124-5304-1-git-send-email-david.henningsson@canonical.com> X-Mailer: git-send-email 1.7.9.5 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com 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 Signed-off-by: Takashi Iwai (cherry picked from commit 298efee7f5a20a32c9ebfa0f7469d87d84998ba1, linux/kernel/git/tiwai/sound.git) Signed-off-by: David Henningsson --- 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(-) 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;