Received: by 10.213.65.68 with SMTP id h4csp2121419imn; Sun, 8 Apr 2018 20:14:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/LMpYFzXVX/BbDnRfDvAprmNTLMjOybDii0flvfYk8eyIU/8zzUJy3ZHNxraPF412sHd3Y X-Received: by 2002:a17:902:74c3:: with SMTP id f3-v6mr5286262plt.7.1523243642518; Sun, 08 Apr 2018 20:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243642; cv=none; d=google.com; s=arc-20160816; b=yjjws+CMQUU1DqjPCBu1mkuZx5Ey6PlgQvXS8iDD6mdIEKHnAcqOrGcvTomH8H+2G9 0SNA7O8QO+9vNDLoeEt8bRdbRFYQJu76QAEA61a8gR+KdFycEDgG4h+ccPap10uT6atU 8pykXZu5jrioem9EauAKzeEqh4w5becjPv4fiiYtYbcwQKB4reRSf2/Su/zsoIZtCuzl TKO0/AlPMs9dfI6SBEcug4sVIRX59T8sByq1xQNn1WlxZ/Wf+eb1Q9TG20ZAOvdvI++B G++plK5uHME7KMowMpG8W8i+NNIOfVeT95uIwYPLdK0OQ005DQ0Son6ezfqi9eU6gwNg Fqsw== 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:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=EplP9RJXdwB75DgZ1E3t2O7xgooCpMQVyvEy9PyeBdg=; b=U+KJCPmh9NCY+kDDZQjSZzznD3Bic6/JPAsINlGUe3jO6Jz21eTWpbxXmABWTNMNNo hJnkfw+be5G/GEF/AaAaX0D6Idn1dqnkub3hMJ6rt7cMbtg9iJ1A7Dl+t8aWWD7ZTZsf tARRRhokZq4vgGtLFXtoRo3qoWGVDYn9eJFv6AZqlYAhq8A0aP9HLa3znEJBEOfb8CuX PzJSV/8mnZC2978JdIDiiiGtOT5GA1MGo3WLb1Vngzly8ip9IfoTe7IqTsfMrTiIUJ71 xbCUaoWgl44mS1feyu5rHuATC3863igYVpQIAFck7nPxE4W+AM3/ULltW1EmuhpEKt6V 44/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=Jkgf1GwJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a18si4599334pgd.330.2018.04.08.20.13.25; Sun, 08 Apr 2018 20:14:02 -0700 (PDT) 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=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=Jkgf1GwJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752107AbeDIDBt (ORCPT + 99 others); Sun, 8 Apr 2018 23:01:49 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:41909 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbeDIDBn (ORCPT ); Sun, 8 Apr 2018 23:01:43 -0400 Received: by mail-io0-f176.google.com with SMTP id m83so7846467ioi.8 for ; Sun, 08 Apr 2018 20:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=EplP9RJXdwB75DgZ1E3t2O7xgooCpMQVyvEy9PyeBdg=; b=Jkgf1GwJbQlGtAjje68cnlu4+eLV9/U0hC87fCue8WfmyiVE/Jzwz149/K9MfPznY2 79t6h8+RrIGlnsCNutwnC67vl1oO+hS2/PcB/gi4ey9zIXwKD5E9kUQPYp5vZHoCbnmn xRltM4bcnRCtXrwzsJXKn85yZbRkIaOCy7WUgsO30rqh1x2+K73lt5eOGwnAiDjWTOs4 B+0d5yuUaAG1NBYMjVQwAnWRPfgqj7doPKKpHsWcHkOu6py95QFRSI4nEPUn0vYSB98g TNDaRpZAqVF/tt0EZbG8BPxJ902JURwqboXbqWRDMEb5MCzG9ZyaPVdCTlfabZ4I+1M1 4gqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EplP9RJXdwB75DgZ1E3t2O7xgooCpMQVyvEy9PyeBdg=; b=SEvZ608tuFotwrg7cnWu3YAFDaMdOOIq8E3xlkzQ2K2wYJVAwnn/BFnaqOMB2a/54M ZyS+ONaB3+SJ3L5m5Q0xUi+YwhnqpQV+FHCypn2b51ffUFKD3yuOekT8KeJqIoyIHctp vNdtjZ45KHBRkkfZMgJ5lkULUtknLrEAGPuiEWyUuUeX+4WlxQAA1sJKeKS4g3npg/eo vIlJnwwV4NCkOLSCVNp3mx6OccudGT21lERfAPzq1L6vpnABOuMMc3V+K9K6itD4XFFN hzh55Gn/a3xxCyyNFxV9oEXTQPbvpiwOO+IrFcQkWlj6C4yEN4oODZEYmlic3KRwk/mD fOYA== X-Gm-Message-State: ALQs6tAX6yRJjdSvBN7nziDMXJJiAVGwdpwsltM1JsnPZEU4TMqxIR/P fU9LumtG+yV6WVT4ntxePruPue5q9l/iinGYnC0V0g== X-Received: by 10.107.12.230 with SMTP id 99mr31929178iom.117.1523242902272; Sun, 08 Apr 2018 20:01:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.214.11 with HTTP; Sun, 8 Apr 2018 20:01:41 -0700 (PDT) In-Reply-To: References: <20180402073313.13247-1-jian-hong@endlessm.com> From: Jian-Hong Pan Date: Mon, 9 Apr 2018 11:01:41 +0800 Message-ID: Subject: Re: [PATCH] ALSA: hda/realtek: Enable audio line out on ASUS D640SA To: Takashi Iwai Cc: alsa-devel@alsa-project.org, Hui Wang , linux@endlessm.com, Jaroslav Kysela , Kailang Yang , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-03 17:04 GMT+08:00 Takashi Iwai : > On Tue, 03 Apr 2018 10:43:02 +0200, > Jian-Hong Pan wrote: >> >> 2018-04-02 19:29 GMT+08:00 Takashi Iwai : >> > >> > On Mon, 02 Apr 2018 09:33:13 +0200, >> > Jian-Hong Pan wrote: >> > > >> > > This ASUS D640SA desktop whose mother board is D640MB has >> > > - two jacks which are a headphone and a mic on the front panel, >> > > - three jacks which are a mic, a line out and a line in on the rear = panel >> > > - one internal speaker. >> > > >> > > If I plug a headphone to the front headphone jack, there will be sou= nd >> > > through the headphone jack, and no sound through the internal speake= r. >> > > If I unplug the headphone from the the headphone jack, there will be >> > > sound through the internal speaker. And always no sound through rea= r >> > > line out, when I plug a headphone or an externel speaker to the rear >> > > line out jack. >> > > >> > > Besides, I had checked and toggled the Auto-Mute Mode in alsamixer, = but >> > > the rear line out still was not working. Then I checked the sound >> > > settings in GUI, and found there was no "Line Out" could be chosen, = only >> > > the "Headphones" and "HDMI/DisplayPort". >> > > However, system does know that there is an "Intel PCH Line Out". >> > > >> > > [ 10.089082] snd_hda_codec_realtek hdaudioC0D0: autoconfig for >> > > ALC887-VD: line_outs=3D1 (0x14/0x0/0x0/0x0/0x0) type:line >> > > [ 10.089083] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=3D= 1 >> > > (0x1a/0x0/0x0/0x0/0x0) >> > > [ 10.089084] snd_hda_codec_realtek hdaudioC0D0: hp_outs=3D1 >> > > (0x1b/0x0/0x0/0x0/0x0) >> > > [ 10.089085] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out= =3D0x0 >> > > [ 10.089086] snd_hda_codec_realtek hdaudioC0D0: inputs: >> > > [ 10.089087] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=3D0x= 18 >> > > [ 10.089088] snd_hda_codec_realtek hdaudioC0D0: Front Mic=3D0= x19 >> > > [ 10.089089] snd_hda_codec_realtek hdaudioC0D0: Line=3D0x15 >> > > [ 10.104387] input: HDA Intel PCH Rear Mic as >> > > /devices/pci0000:00/0000:00:1f.3/sound/card0/input9 >> > > [ 10.104416] input: HDA Intel PCH Front Mic as >> > > /devices/pci0000:00/0000:00:1f.3/sound/card0/input10 >> > > [ 10.104441] input: HDA Intel PCH Line as >> > > /devices/pci0000:00/0000:00:1f.3/sound/card0/input11 >> > > [ 10.104467] input: HDA Intel PCH Line Out as >> > > /devices/pci0000:00/0000:00:1f.3/sound/card0/input12 >> > > [ 10.104494] input: HDA Intel PCH Front Headphone as >> > > /devices/pci0000:00/0000:00:1f.3/sound/card0/input13 >> > > >> > > Consequently, I checked the pin widgets' default configuration value= s: >> > > - Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out >> > > Pin Default 0x01014010: [Jack] Line Out at Ext Rear >> > > >> > > - Node 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out >> > > Pin Default 0x02214030: [Jack] HP Out at Ext Front >> > > >> > > Because the headphone jack (Node ID:0x1b) locates on the desktop's f= ront >> > > panel, not rear panel, I change the headphone jack's configuration f= rom >> > > primary chassis to separate chassis. So, the configuration value of >> > > Node ID:0x1b should be 0x22214030. >> > >> > This is OK, but... >> > >> > > Additionally, I toggle the Auto-Mute Mode of Realtek codecs to =E2= =80=9CSpeaker >> > > Only=E2=80=9D which makes signal outputs through line out jack when = the "Line >> > > Out" is chosen in the sound settings. >> > >> > ... this is a matter of taste, and I don't think it good to set a >> > different default from others. You can change it once and save it via >> > alsactl. >> >> The default state of Auto-Mute Mode of Realtek codec on this machine is >> "Line Out + Speaker". >> This disallows to output audio signal through the line out jack, even I = already >> choose the "Line Out" as the audio output device in the sound settings. >> It means there is no way to use the line out jack in "Line Out + Speaker= " state >> of Auto-Mute Mode on this machine. > > It's a setup issue by PA, and it's not specific to this device at > all. If PA wants the independent output, it can change to auto-mute > off by itself. > >> To enhance the user experience, especially the new one who first uses Li= nux, >> changing this machine's Auto-Mute Mode to "Speaker Only" state, which al= lows >> to output the audio signal through the line out jack, will be the better= choice. >> >> By the way, if the "Headphones" is chosen as the audio output device in = the >> sound settings, the audio signal will not output through the line out ja= ck >> automatically. >> >> Therefore, I think this part of the quirk is still needed on this machin= e. > > Again, this isn't about the machine configuration, but a generic PA > problem. Fixing it in a device-specific fixup is no right way. Thanks for the hint which is about the PulseAudio. I will try to figure out the fix for the Auto-Mute problem with PulseAudio first. And the pin configuration fixup may be not need or still needed, after the = try. Thanks, Jian-Hong Pan > > thanks, > > Takashi