From patchwork Sat Jul 11 01:18:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Raymond Yau X-Patchwork-Id: 6769611 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 143D69F380 for ; Sat, 11 Jul 2015 01:18:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20FA4207FA for ; Sat, 11 Jul 2015 01:18:51 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A8380207F2 for ; Sat, 11 Jul 2015 01:18:48 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5D287260506; Sat, 11 Jul 2015 03:18:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 5AA7C2604EA; Sat, 11 Jul 2015 03:18:38 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BF7B72604F3; Sat, 11 Jul 2015 03:18:36 +0200 (CEST) Received: from mail-ob0-f175.google.com (mail-ob0-f175.google.com [209.85.214.175]) by alsa0.perex.cz (Postfix) with ESMTP id 09F202604CA for ; Sat, 11 Jul 2015 03:18:32 +0200 (CEST) Received: by obbgp5 with SMTP id gp5so88949861obb.0 for ; Fri, 10 Jul 2015 18:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Tc/OjgJLwFpPCoLDG2P8onU0/Nm4onTgqKC4BsRCfZg=; b=um4grsdWc/P4YCP+muS3VsNcdhHeh0Vm/s3iaMPadgOP+Zk7x1s3YzVv84ci+Sc9ly o3vgSGYCoLv6vu/+OMC5qQerfETp6DNCAJux8WapY7JPc/M9zP430xydHzJZwkfcYeos gvBp4WkLlo2vlQbCQnpaLYkwV4UDShlJwxf/Tv1WRUXWDizkaDUZbyydT1l6Pus2dGZ3 H4kES5EpsodJcUwBhTqspTJD9i1m4E8+sXEWnvtCkRJZk7ZTSmAhVp7+hLbaIA9Xd0Sb 26YGMSoTnFieI8mhfCjBgleSXC72VLRfTB8igciMdeuDkd6MqQN3iscr1m35HAGWiwem jmDQ== MIME-Version: 1.0 X-Received: by 10.182.153.161 with SMTP id vh1mr20992793obb.34.1436577510461; Fri, 10 Jul 2015 18:18:30 -0700 (PDT) Received: by 10.202.197.15 with HTTP; Fri, 10 Jul 2015 18:18:30 -0700 (PDT) In-Reply-To: <31911886.6mcodbBrA7@luklap.workgroup> References: <2927807.UsnFnTlWVL@luklap.workgroup> <31911886.6mcodbBrA7@luklap.workgroup> Date: Sat, 11 Jul 2015 09:18:30 +0800 Message-ID: From: Raymond Yau To: =?UTF-8?B?xYF1a2FzeiBXb2puacWCb3dpY3o=?= , ALSA Development Mailing List X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Subject: Re: [alsa-devel] Fwd: Front speakers doesn't work in multichannel output, regression in ALC888 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP > > > > http://www.alsa-project.org/db/?f=30b3f0087374b914a20dbe20a618fb892a5d6fd5 > > > > > > Are there any offical specificaion ? > > > > > > > > So far most review only mention stereo speakers and subwoofer, the > > > > service > > > > > > guide only show how to replace two internal speakers > > > > > > Service manual mentions > > > > > > "Dolby®-certified surround sound system with two built-in stereo > > > > speakers and > > > > > one subwoofer supporting low-frequency effects" > > > > > > so all additional channels what I'm hearing in Windows is emulated. I hope > > > that it is clear now that my laptop has two internal speakers and one > > > subwoofer. > > > > https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pc > > i/hda?id=8e38395360844806041ea69ab9690f5f174bc40c > > > > You need to define your 2.1 chmap if the subwoofer only use left channel > > > > Compiling and running PulseAudio from git > > > > http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/ > > In Fedora 22 workaround with setting "Line out (front)" for 0x15 pin doesn't > work. > > Sound on my system is totally fucked up. http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-lineout.conf Are you sure that it is alsa driver bug since pulseaudio seem not using line out jack to mute internal speakers ? by adding new hint alt_config , you can use alt_config to select different set of pin config * Strangely, the speaker output doesn't work on Vaio Z and some Vaio * all-in-one desktop PCs (for example VGC-LN51JGB) through DAC 0x05 @@ -2048,12 +2073,8 @@ static const struct hda_fixup alc882_fixups[] = { .v.func = alc889_fixup_coef, }, [ALC882_FIXUP_ACER_ASPIRE_4930G] = { - .type = HDA_FIXUP_PINS, - .v.pins = (const struct hda_pintbl[]) { - { 0x16, 0x99130111 }, /* CLFE speaker */ - { 0x17, 0x99130112 }, /* surround speaker */ - { } - }, + .type = HDA_FIXUP_FUNC, + .v.func = alc888_fixup_acer_aspire_4930g, .chained = true, .chain_id = ALC882_FIXUP_GPIO1, }, diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index 03b7399..683a0ab 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c @@ -952,6 +952,7 @@ void snd_hda_pick_fixup(struct hda_codec *codec, const struct snd_pci_quirk *q; int id = HDA_FIXUP_ID_NOT_SET; const char *name = NULL; + int i; if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET) return; @@ -966,6 +967,9 @@ void snd_hda_pick_fixup(struct hda_codec *codec, return; } + if (!snd_hda_get_int_hint(codec, "alt_config", &i)) + codec->alt_config = i; + if (codec->modelname && models) { while (models->name) { if (!strcmp(codec->modelname, models->name)) { diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8e02cdf..f406835 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1914,6 +1914,31 @@ static void alc889_fixup_mba21_vref(struct hda_codec *codec, alc889_fixup_mac_pins(codec, nids, ARRAY_SIZE(nids)); } +static void alc888_fixup_acer_aspire_4930g(struct hda_codec *codec, + const struct hda_fixup *fix, int action) +{ + struct hda_pintbl subwoofer_config[] = { + { 0x16, 0x90170111 }, /* internal subwoofer */ + {} + }; + struct hda_pintbl alt_config[] = { + { 0x15, 0x02014010}, + { 0x1a, 0x02014011}, + { 0x18, 0x02014012}, + {} + }; + snd_hda_apply_pincfgs(codec, subwoofer_config); + switch(codec->alt_config){ + case 1: + codec_info(codec, "5.1 External Speaker\n"); + snd_hda_apply_pincfgs(codec, alt_config); + break; + default: + codec_info(codec, "use [Hint]\nalt_config=1 for 5.1 External Speaker\n"); + break; + } +} + /* Don't take HP output as primary