Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4620563ybv; Mon, 10 Feb 2020 23:53:46 -0800 (PST) X-Google-Smtp-Source: APXvYqzEHTnZ3mRi1+2JI/6Ne/f9QOAjHAdK4nJe840JNrjd/80MqHaeXmW5Jz+u+o1HFLEhWlKy X-Received: by 2002:a05:6830:612:: with SMTP id w18mr4313292oti.160.1581407626555; Mon, 10 Feb 2020 23:53:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581407626; cv=none; d=google.com; s=arc-20160816; b=HTl5q1g3t6S+5pGelCI1q/vwxiOhrS5e4/khcQ+P79iY2navsGpaWXhx+z6/4fS2Av C8o49wrRfHImD9OyOnpB9pjnMUKbM0KDVrR9kHQG1tRCwrKSF1GhQIVa44ZJeJjTE+jN UeLajWawPuQtW+QqbMPV9Q4ySWSqJuMJuiSYo6UTPSfhXjF7CkAFkzVEezwwtwLuhCcL qui2yEtjIVpJHqW3oq+DkCuG6WkvUudjhbV44hggvtIJrwg+skRU05mE3i3VrU13a5tf 5+9ybjgWR04qGKTjigijQ+e/oz7UNUR/3/K96WDxf/2QdydnGRmCdlLuvzpkEiwGWtD2 UGQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter; bh=REuN32AszY9i63pAP7wyB0Bevs0Di3fTL0d0VlG4R+8=; b=L7e5sBSjYrwQ0aV7YJLQcwL9zs0bvCO9hX40gFW2BBk/9jDRC2dvBx4eLGw+LPVuu6 wpQOKz4q2lzgrX37DKrzaiIkg4AgKkKobKOsCxwl0wNivZDrnZEuEWT5G167VTe3o66Z st1s65xcY2AWcWcajuVFLtXUPb2+J5BT6mYv9YZGOqJ18F0Xj7RTG5pSatzPBcFe8yTj fTjFGDWhqURySnkZ3Le9+xPawno4a3oFYVEJaj4vLPxEIPWfja+9auN6siMp8cnot+5n 0TTePfURxdyu7qwPRUJ5O4GftcbT/PAHDTzOW7ayM7Egbfo9S/onYFSztJS302TWWD0n WcGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@perex.cz header.s=default header.b=YkVpS+MW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=perex.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si1505663oti.311.2020.02.10.23.53.24; Mon, 10 Feb 2020 23:53:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@perex.cz header.s=default header.b=YkVpS+MW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=perex.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727600AbgBKHkf (ORCPT + 99 others); Tue, 11 Feb 2020 02:40:35 -0500 Received: from mail1.perex.cz ([77.48.224.245]:55612 "EHLO mail1.perex.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727561AbgBKHkf (ORCPT ); Tue, 11 Feb 2020 02:40:35 -0500 Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 0B3F1A0040; Tue, 11 Feb 2020 08:40:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 0B3F1A0040 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1581406832; bh=REuN32AszY9i63pAP7wyB0Bevs0Di3fTL0d0VlG4R+8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=YkVpS+MWC0LjjHaa1no+jx6K9PwzwYMFwWqQFHeLq58Elbailo9PdMeJjpX5yn/BB v+bcqMDe/oEJkYJf0vY8DWKCUYs69iVVV2PgjdxPRrznFbS1R5ECQVm1CENKNCi//0 dPLD1aLSaYEiFKRTD+8hECYKB1k8MAiNcjke7w9k= Received: from p50.perex-int.cz (unknown [192.168.100.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Tue, 11 Feb 2020 08:40:26 +0100 (CET) Subject: Re: [PATCH 2/2] ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk value To: Benjamin Poirier , Takashi Iwai Cc: Kailang Yang , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20200211055651.4405-1-benjamin.poirier@gmail.com> <20200211055651.4405-2-benjamin.poirier@gmail.com> From: Jaroslav Kysela Message-ID: Date: Tue, 11 Feb 2020 08:40:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200211055651.4405-2-benjamin.poirier@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne 11. 02. 20 v 6:56 Benjamin Poirier napsal(a): > As a result of commit d2cd795c4ece ("ALSA: hda - fixup for the bass speaker > on Lenovo Carbon X1 7th gen"), the maximum sound output level on my > machine, an X1 Carbon, was reduced to ~60% of its previous level. > > This laptop model has two sets of stereo speakers: Front and Bass (aka Rear > in some contexts). > Before commit d2cd795c4ece, volume control was commonly ineffective (using > the Master slider in alsa or pulseaudio apparently had little effect or > alternated between mute or max with nothing in between - more details > below) > commit d2cd795c4ece added quirk ALC285_FIXUP_SPEAKER2_TO_DAC1 which > resulted in assigning both sets of speakers to the same DAC, bringing > the two sets of speakers under one effective volume control but also > lowering the max output volume noticeably. > > Fix this by changing the quirk so that each set of speakers can be > controlled individually and the max output volume is restored to what it > was before commit d2cd795c4ece. > > Since there is no documentation about the audio codec, here is some > detailed information about the result of applying different quirks. > DAC connection (which is what's affected by the quirk) is reported as found > in /proc/asound/card0/codec#0, Node 0x17. > pavucontrol controls are reported with the device configured with the > "Analog Surround 4.0 Output" profile. > > no quirk > Loud max output volume > DAC connection > Connection: 3 > 0x02 0x03 0x06* > Controls in alsamixer > Master controls front speakers only. > Speaker controls front speakers only. > Bass Speaker is a toggle that mutes everything. > PCM controls all speakers. > There is no "Front" mixer. > Controls in pavucontrol > "Front Left"/"Front Right" sliders work as expected. > "Rear Left"/"Rear Right" sliders seem to operate in a > non-linear fashion such that most values above 0% result in > max volume output. > -> Because the bass speakers (Rear) are more powerful, the > net effect is that when the channels are linked into a > single slider, it seems like it has just two modes: mute or > max. > ALC285_FIXUP_SPEAKER2_TO_DAC1 > Weak (~60%) max output volume > DAC connection > Connection: 3 > 0x02* 0x03 0x06 > In-driver Connection: 1 > 0x02 > Controls in alsamixer > Master controls all four speakers. > Speaker controls all four speakers. > Bass Speaker is a toggle that mutes everything. > PCM controls all four speakers. > There is no "Front" mixer. > Controls in pavucontrol > "Front Left"/"Front Right" sliders have no effect. > "Rear Left"/"Rear Right" sliders control both front and > bass speakers. > -> Volume control is effective but it's not possible to > control front and bass speakers individually. > ALC295_FIXUP_DISABLE_DAC3 > Loud max output volume > DAC connection > Connection: 3 > 0x02 0x03* 0x06 > In-driver Connection: 2 > 0x02 0x03 > Controls in alsamixer > Master controls all speakers. > Speaker is a toggle that mutes everything. > Bass Speaker controls bass speakers only. > PCM controls all speakers. > Front controls front speakers only. > Controls in pavucontrol > "Front Left"/"Front Right" sliders control front speakers > only. > "Rear Left"/"Rear Right" sliders control bass speakers > only. > -> Volume control is effective and it's possible to control > each of the four speakers individually. > > In summary, Node 0x17 DAC connection 0x3 offers the loudest max volume and > the most detailed mixer controls. That connection is obtained with quirk > ALC295_FIXUP_DISABLE_DAC3. Therefore, change the ThinkPad X1 Carbon 7th to > use ALC295_FIXUP_DISABLE_DAC3. The volume split (individual volume control) will cause trouble for the UCM volume control at the moment which is the target for this device to get the digital microphone working. If there is no possibility to share DAC, it would be probably more nice to join the volume control in the driver. Have you tried to use 0x03 as source for all four speakers? Why PA handles the rear volume control with the current driver code in the legacy ALSA driver? It should be handled like standard stereo device. I'll check. You should also test PA with UCM. Thanks, Jaroslav > > Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen") > Link: https://lore.kernel.org/alsa-devel/20200210025249.GA2700@f3/ > Cc: Jaroslav Kysela > Cc: Kailang Yang > Signed-off-by: Benjamin Poirier > --- > sound/pci/hda/patch_realtek.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index 05d44df2008e..3171da10123e 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -7268,7 +7268,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { > SND_PCI_QUIRK(0x17aa, 0x224c, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), > SND_PCI_QUIRK(0x17aa, 0x224d, "Thinkpad", ALC298_FIXUP_TPT470_DOCK), > SND_PCI_QUIRK(0x17aa, 0x225d, "Thinkpad T480", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), > - SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC285_FIXUP_SPEAKER2_TO_DAC1), > + SND_PCI_QUIRK(0x17aa, 0x2292, "Thinkpad X1 Carbon 7th", ALC295_FIXUP_DISABLE_DAC3), > SND_PCI_QUIRK(0x17aa, 0x30bb, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), > SND_PCI_QUIRK(0x17aa, 0x30e2, "ThinkCentre AIO", ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY), > SND_PCI_QUIRK(0x17aa, 0x310c, "ThinkCentre Station", ALC294_FIXUP_LENOVO_MIC_LOCATION), > -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.