Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26A1CC433E0 for ; Fri, 7 Aug 2020 16:05:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F8A021744 for ; Fri, 7 Aug 2020 16:05:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="JfPb5RkG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F8A021744 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1934E11C; Fri, 7 Aug 2020 18:04:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1934E11C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1596816325; bh=XTvKmKWdP+28CbLzf++KTEjfqdCocIIvrgr8vlr1ycQ=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JfPb5RkGIeCHaaXxXoThI5/mHOUxBtD4VtJiZ6IWMwmPE32m0CvmtGcPuPFPZqzU7 hIg0PU63y/4+iJUYkokJxNvL0ugJWsan5IMAdl4Wl4QJ1gV5m+9jXkM8LmHJL6Yt/G h7Upn3jYzlGm126cWjIQRczVRg0YeQKtzoQE88fg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AB342F8020B; Fri, 7 Aug 2020 18:04:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2F964F80218; Fri, 7 Aug 2020 18:04:33 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 61B4FF801F7 for ; Fri, 7 Aug 2020 18:04:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 61B4FF801F7 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4DCAAB687; Fri, 7 Aug 2020 16:04:44 +0000 (UTC) Date: Fri, 07 Aug 2020 18:04:26 +0200 Message-ID: From: Takashi Iwai To: Alexander Giese Subject: Re: [HDAudio][ALC285] Native speaker support for HP Spectre x360 15-eb0xxx In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" On Fri, 07 Aug 2020 15:05:12 +0200, Alexander Giese wrote: > > Hello alsa-devel-team, > > I have a problem with the built-in speakers on the 2020 model of the > hp-spectre. From my unexperienced point of view, the audio sinks are > correctly identified and therefore I tried tweaking the GPIO pins with > success. > > Information from alsa-info is here: > http://alsa-project.org/db/?f=c8ee13e52fd6b2377573a7123c2887fe4d59c917 > > When I use hda-verb with the following parameters 2 of 4 of my > built-in speakers start working: > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02 (or 0x04) > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01 > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x01 So this means that GPIO pin#0 (0x01) is the amp, and it needs to be cleared. > In addition, my mute-mic-led on the keyboard glows when: > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01 (or 0x02) > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x04 > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04 And this means GPIO pin#2 being the mic-mute LED, inverted (0=on, 1=off). To check the behavior, try the following: hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x01 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x00 this should enable the speaker, and the succeeding call hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01 turns off the speaker. Also, hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x04 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x04 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x00 turns on the mic-mute LED, and the succeeding call hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04 turns off the LED. If above is the confirmed, you can manage both in a shot by hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x05 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x05 hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04 will turn on the speaker but off the LED, and hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x05 will turn on both speaker and LED. And, doesn't the machine have the playback mute LED? Usually it's controlled with the GPIO, too, but this case > Since I do not understand how the GPIO-settings are integrated and > applied in the upstream software for corresponding models, I would > very much appreciate any help to get this to work out of the box in > future releases so I do not have tweak my system all the time and > others can benefit as well. > > Any suggestions on getting all 4 speakers to work or the > mute-volume-led to glow are very much welcome alike! The surround/bass speaker is often more difficult. We need either the contact to the vendor or the reverse engineering. Takashi