From patchwork Sun Jun 28 17:44:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 11630247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90E3E912 for ; Sun, 28 Jun 2020 17:46:18 +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 28A702053B for ; Sun, 28 Jun 2020 17:46:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rEI1UUGZ"; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MpHWeD2F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28A702053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 B3E661661; Sun, 28 Jun 2020 19:45:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B3E661661 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1593366376; bh=1OYHH4hgp6XwABbmblX+yXfDTFRkJ6JBS0gnP8GoPrE=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=rEI1UUGZwrmpg0AbPR8qdycsywsBh23wMSiCzdgXJZEx3ddPDfGewVByk5/dzbnnk pl+4Jn91WiHUeEXxLSo5SKI7j6G7gycW6Y5OdqaG7XK3xELZ2wzqtHOHCQQRKjtoHj OF8DmZkMXXa/iH7ZiMIUXSmPtqq6Qg/vQeJV+5Rs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E15ADF80252; Sun, 28 Jun 2020 19:44:37 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5C08AF800F0; Sun, 28 Jun 2020 19:44:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=disabled version=3.4.0 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DFB3AF80096 for ; Sun, 28 Jun 2020 19:44:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DFB3AF80096 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MpHWeD2F" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593366267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TcRg8noYX3LRRpmJuAI8PkbTVW5bTGE9P47wLwTouFM=; b=MpHWeD2FUJeTlSTfV1jcOlAveCp6rCQHYAovGcuhWAykjgjiNr+D1udRy2nRgt8T054L93 4DhARCEctyrYzekcimF5UYxQkr2lZYVvBWGnSebbCMwMIRi9Ra1clDL3+NWzGrqvrVV4k6 OQmhIJGqvLvXsJjkDpppX96hRCO8p3o= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-6QOoImEfOAeIN_ZztXDgng-1; Sun, 28 Jun 2020 13:44:24 -0400 X-MC-Unique: 6QOoImEfOAeIN_ZztXDgng-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F126A80183C; Sun, 28 Jun 2020 17:44:23 +0000 (UTC) Received: from x1.localdomain.com (ovpn-112-41.ams2.redhat.com [10.36.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0FE705D9D3; Sun, 28 Jun 2020 17:44:22 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela , alsa-devel@alsa-project.org Subject: [PATCH alsa-lib 1/5] Fix invalid "Regex" Type in various Condition blocks Date: Sun, 28 Jun 2020 19:44:17 +0200 Message-Id: <20200628174421.115133-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede 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" Regex is not a valid Condition type, using it leads to errors like these: ALSA lib ucm_cond.c:300:(if_eval) unknown If.Condition.Type ALSA lib main.c:983:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -22 alsaucm: error failed to open sound card cht-bsw-rt5672: Invalid argument Replacing it with "RegexMatch" fixes this. Signed-off-by: Hans de Goede --- ucm2/cht-bsw-rt5672/HiFi.conf | 4 ++-- ucm2/chtnau8824/HiFi.conf | 2 +- ucm2/chtrt5645/HiFi.conf | 6 +++--- ucm2/sof-soundwire/sof-soundwire.conf | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ucm2/cht-bsw-rt5672/HiFi.conf b/ucm2/cht-bsw-rt5672/HiFi.conf index 394e45d..dc8ddd5 100644 --- a/ucm2/cht-bsw-rt5672/HiFi.conf +++ b/ucm2/cht-bsw-rt5672/HiFi.conf @@ -9,7 +9,7 @@ Define.HeadsetMic "yes" If.cfg-dmic1 { Condition { - Type Regex + Type RegexMatch String "${CardLongName}" Regex "(SoMeThInK1)" # fixme! } @@ -21,7 +21,7 @@ If.cfg-dmic1 { If.cfg-dmic2 { Condition { - Type Regex + Type RegexMatch String "${CardLongName}" Regex "(LENOVO.*ThinkPad8)" } diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf index 6b7624d..3ccd6b1 100644 --- a/ucm2/chtnau8824/HiFi.conf +++ b/ucm2/chtnau8824/HiFi.conf @@ -2,7 +2,7 @@ Define.Speaker "Speaker" If.cfg-mspk { Condition { - Type Regex + Type RegexMatch String "${CardLongName}" Regex "(cube-i1_TF|PIPO-W2S)" } diff --git a/ucm2/chtrt5645/HiFi.conf b/ucm2/chtrt5645/HiFi.conf index fb8636d..5d0e3bf 100644 --- a/ucm2/chtrt5645/HiFi.conf +++ b/ucm2/chtrt5645/HiFi.conf @@ -4,7 +4,7 @@ Define.DigitalMic "" If.cfg-dmic1 { Condition { - Type Regex + Type RegexMatch String "${CardLongName}" Regex "(ASUSTeK.*T100HAN|ASUSTeK.*T101HA)" } @@ -16,7 +16,7 @@ If.cfg-dmic1 { If.cfg-dmic2 { Condition { - Type Regex + Type RegexMatch String "${CardLongName}" Regex "(LENOVO.*LenovoMIIX320|MEDION.*Wingman)" } @@ -28,7 +28,7 @@ If.cfg-dmic2 { If.cfg-mspk { Condition { - Type Regex + Type RegexMatch String "${CardLongName}" Regex "(gpd-win-pocket-rt5645|TECLAST-X80Pro)" } diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index fe43d5f..2ba44be 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -38,7 +38,7 @@ DefineRegex { If.hs_init { Condition { - Type Regex + Type RegexMatch Regex "(rt5682|rt700|rt711)" String "${var:HeadsetCodec1}" } @@ -47,7 +47,7 @@ If.hs_init { If.mic_init { Condition { - Type Regex + Type RegexMatch Regex "(rt715)" String "${var:MicCodec1}" } From patchwork Sun Jun 28 17:44:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 11630245 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0DA0912 for ; Sun, 28 Jun 2020 17:45:26 +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 D54422053B for ; Sun, 28 Jun 2020 17:45:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="RMnL0fFN"; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fEC1Y2lM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D54422053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 DF0911658; Sun, 28 Jun 2020 19:44:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DF0911658 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1593366323; bh=Tj/fAdzMYrAERD51PwMWVDFXaCxo/hmqMcsTxE9tN9o=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RMnL0fFNCmL5cus0V9I6Rl50n8gNklA0NhKjqbq4ln3mOOaXFrLllI3BEb7d4/PQm 9r8iAjCfH9VnQKR6ZLF3vdu8cjun1gDB9hXVujYPjbOEsY29aotcKI53G0n81zax3g DdQf0aZ9hWLvrJwW/Jq+wNFqae5VVUj1LHwdFl1k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 51415F8022D; Sun, 28 Jun 2020 19:44:35 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 406A9F80253; Sun, 28 Jun 2020 19:44:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=disabled version=3.4.0 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CF0D3F800F0 for ; Sun, 28 Jun 2020 19:44:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CF0D3F800F0 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fEC1Y2lM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593366268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yznV5aNZpOrT3dB2YIHfyazf6N1XRQmxi3JUsN1C7iw=; b=fEC1Y2lMnUvgURiVJATk9vcoBDUVpv+C2F5NxPRCT8x+R0AmXNc4ZbE5YA7PqsKyS2NUlH YjKKHceQ9IX4iCMwOp3hMBP4VKEYPTSRLDEtvz8coz7HIpLNJ6WKu8xPRbdihH7s+w5IMi Dlfp6217ZTa0cV5jgrBv2//D6graXhk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-151-LHeZQBUOPuGFzKHkRoI_dQ-1; Sun, 28 Jun 2020 13:44:26 -0400 X-MC-Unique: LHeZQBUOPuGFzKHkRoI_dQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 77AED7BAC; Sun, 28 Jun 2020 17:44:25 +0000 (UTC) Received: from x1.localdomain.com (ovpn-112-41.ams2.redhat.com [10.36.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41DAD5D9D3; Sun, 28 Jun 2020 17:44:24 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela , alsa-devel@alsa-project.org Subject: [PATCH alsa-lib 2/5] cht-bsw-rt5672: Add Lenovo Miix 2 10 specific configuration Date: Sun, 28 Jun 2020 19:44:18 +0200 Message-Id: <20200628174421.115133-2-hdegoede@redhat.com> In-Reply-To: <20200628174421.115133-1-hdegoede@redhat.com> References: <20200628174421.115133-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede 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" By default the cht-bsw-rt5672 config lets the user figure out if a device has a Mono spaker or Stereo speakers and which DMIC input is used. Since this is not very user-friendly we do regex matches on the DMI derived longname to automaticaly select the right options (and to only advertise those options). This commit adds support for automatically selecting the right options on the Lenovo Miix 2 10 tablet. Since this is the first device for which we do longname matching using a DMIC on DMIC1, this also fixes a fixme :) Signed-off-by: Hans de Goede --- ucm2/cht-bsw-rt5672/HiFi.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucm2/cht-bsw-rt5672/HiFi.conf b/ucm2/cht-bsw-rt5672/HiFi.conf index dc8ddd5..94de7db 100644 --- a/ucm2/cht-bsw-rt5672/HiFi.conf +++ b/ucm2/cht-bsw-rt5672/HiFi.conf @@ -11,7 +11,7 @@ If.cfg-dmic1 { Condition { Type RegexMatch String "${CardLongName}" - Regex "(SoMeThInK1)" # fixme! + Regex "(LENOVO.*LenovoMiix210)" } True { Define.MonoSpeaker "" From patchwork Sun Jun 28 17:44:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 11630249 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 671D4913 for ; Sun, 28 Jun 2020 17:47:07 +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 F2A9C20772 for ; Sun, 28 Jun 2020 17:47:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="tjds2/oX"; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H5a6f2fI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2A9C20772 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 E7E691685; Sun, 28 Jun 2020 19:46:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E7E691685 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1593366425; bh=EATHoULJrE6/XF89BbGJdousPDC0UeUO1tMry5YDs3k=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tjds2/oXm/hlW7pXysgydzIum3UpstkRxdldZRVl2hVJeOc5MON6WTmGXRoa2KRKU 4c4LUGOYpT6mDC9ZeRWjXvi8mmMdabFdasUxJmDecny2zC/JVXQihexhizHRFUXlu3 LdMbz1h2eNQCg3LN9FPU/GU9+ekSGOFlFwf/pQNs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 86A44F80096; Sun, 28 Jun 2020 19:44:41 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id D53D6F800F0; Sun, 28 Jun 2020 19:44:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=disabled version=3.4.0 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id EEC0AF800E8 for ; Sun, 28 Jun 2020 19:44:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EEC0AF800E8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="H5a6f2fI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593366269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PXMJHfA7mGR8OF6QjiFnJTIObwW3Ga7V2OHP8q3xFfc=; b=H5a6f2fIuFc4a/yYb0H4lMumSfcoSpjEndaITOsjtW5r7plIbBvXtgvn1qIjbf8hhWS0jt 5kOtL0Y23wpgPdGm0Ma4fspJIj43Y9MwGigmEJQMKFXzwheYEDcF/1TssCIAVFpDd9BUJs hpEgHneCYQ8lY5AiiseyZcfXzrUj7Mw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-89-RkUmkuv4MC6k_8ezHokbWQ-1; Sun, 28 Jun 2020 13:44:27 -0400 X-MC-Unique: RkUmkuv4MC6k_8ezHokbWQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 81437802ED4; Sun, 28 Jun 2020 17:44:26 +0000 (UTC) Received: from x1.localdomain.com (ovpn-112-41.ams2.redhat.com [10.36.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id BB58F5D9D5; Sun, 28 Jun 2020 17:44:25 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela , alsa-devel@alsa-project.org Subject: [PATCH alsa-lib 3/5] cht-bsw-rt5672: Add Lenovo ThinkPad 10 specific configuration Date: Sun, 28 Jun 2020 19:44:19 +0200 Message-Id: <20200628174421.115133-3-hdegoede@redhat.com> In-Reply-To: <20200628174421.115133-1-hdegoede@redhat.com> References: <20200628174421.115133-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede 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" The Lenovo ThinkPad 10 (first gen) has stereo speakers and the stereo DMICs in the top-edge of the tablet are connected to DMIC1. Add a RegexMatch for this, so that users do not have to select the right settings manually. Signed-off-by: Hans de Goede --- ucm2/cht-bsw-rt5672/HiFi.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucm2/cht-bsw-rt5672/HiFi.conf b/ucm2/cht-bsw-rt5672/HiFi.conf index 94de7db..5e5f78f 100644 --- a/ucm2/cht-bsw-rt5672/HiFi.conf +++ b/ucm2/cht-bsw-rt5672/HiFi.conf @@ -11,7 +11,7 @@ If.cfg-dmic1 { Condition { Type RegexMatch String "${CardLongName}" - Regex "(LENOVO.*LenovoMiix210)" + Regex "(LENOVO.*LenovoMiix210)|(LENOVO.*ThinkPad10)" } True { Define.MonoSpeaker "" From patchwork Sun Jun 28 17:44:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 11630251 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 35DE6913 for ; Sun, 28 Jun 2020 17:47:40 +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 BFB8420772 for ; Sun, 28 Jun 2020 17:47:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="qTcJmh14"; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G/l2AE2W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFB8420772 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 4B5751663; Sun, 28 Jun 2020 19:46:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B5751663 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1593366458; bh=3vLHdtbe8I6wc5piqoGw6Z0Rat4Ovta3EIrg+BzEkzU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qTcJmh14iGtI9lUKNL+BHJPWK6jw7b92ttVJW/DYquGAjd8pusFXB0Lfy36tI3UJK wirLfsgXbLRrsl6aqoR1WX5SmvnRWOsr2VvyDdrTuljWi9d3PWhlTHVk+RPiFqpXjp RSinXGwk17RC/4r0Wfd4Zb+GSUECnZYMw44NGIcQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9A5F8F802A9; Sun, 28 Jun 2020 19:44:42 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4ADE6F800E8; Sun, 28 Jun 2020 19:44:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=disabled version=3.4.0 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CF8C7F8022D for ; Sun, 28 Jun 2020 19:44:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CF8C7F8022D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G/l2AE2W" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593366270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eAwEwJJjupzTaezwR7yIngNVexOZCOWPArujMLd3zbc=; b=G/l2AE2Wu548jo+zC+qC75+1u5kdeyUiBZpvOzrKm2eUKJnyTaO48i+81I4UpIwKU3zgjw JRJs+6/R33cPzLnuXsigjUFZm3GPNEcfVKsp+kZYUKUp6F/sEk4wlZ8coR4vQeolez5Tsx K7CvtgkhIMJEEBkKywgsGfbWzhTCtGE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-355-WvJaUwNfNTCR8LnGThZmPg-1; Sun, 28 Jun 2020 13:44:28 -0400 X-MC-Unique: WvJaUwNfNTCR8LnGThZmPg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 88E691800D42; Sun, 28 Jun 2020 17:44:27 +0000 (UTC) Received: from x1.localdomain.com (ovpn-112-41.ams2.redhat.com [10.36.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id C51005D9D5; Sun, 28 Jun 2020 17:44:26 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela , alsa-devel@alsa-project.org Subject: [PATCH alsa-lib 4/5] cht-bsw-rt5672: Boost ADC volume a bit Date: Sun, 28 Jun 2020 19:44:20 +0200 Message-Id: <20200628174421.115133-4-hdegoede@redhat.com> In-Reply-To: <20200628174421.115133-1-hdegoede@redhat.com> References: <20200628174421.115133-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede 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" Both the DMICs and the headset mic are quite soft, even with the 20 dB IN1 boost we already congfigure for the headset. This commit sets the ADC Boost gain (range 0-3) to 1 = 12 dB, which makes the volume a lot better. The next step of the ADC Boost gain setting is 24 dB which is a bit too much. This has been tested with both the builtin DMIC and with a headset mic on the following devices: Lenovo Miix 2 10 Lenovo Thinkpad 8 Lenovo Thinkpad 10 (gen 1) Signed-off-by: Hans de Goede --- ucm2/codecs/rt5672/EnableSeq.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ucm2/codecs/rt5672/EnableSeq.conf b/ucm2/codecs/rt5672/EnableSeq.conf index a19a982..ddfb1c7 100644 --- a/ucm2/codecs/rt5672/EnableSeq.conf +++ b/ucm2/codecs/rt5672/EnableSeq.conf @@ -30,6 +30,11 @@ EnableSequence [ cset "name='ADC Capture Volume' 47" cset "name='ADC Capture Switch' on" + # Both the DMICs and the headset mic (even with the 20 dB boost below) + # are quite soft, set the ADC Boost gain (range 0-3) to 1 = 12 dB the + # next step is 24 dB which is a bit too much + cset "name='STO1 ADC Boost Gain Volume' 1" + # Headset mic is quite soft, boost it a bit, 1 = 20dB which is the first # available boost step cset "name='IN1 Boost Volume' 1" From patchwork Sun Jun 28 17:44:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 11630253 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B10E912 for ; Sun, 28 Jun 2020 17:47:59 +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 2227E2053B for ; Sun, 28 Jun 2020 17:47:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="s8d1J3SE"; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="K40VvFJJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2227E2053B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 B2B85168A; Sun, 28 Jun 2020 19:47:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B2B85168A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1593366477; bh=jRsGpx8tg7cQXB83P98wymo3DSoHLF8xNtfyJx2u0X8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=s8d1J3SE/fjKmxqHvWwFSQK7tkffxMqacIZDr1YeqL6tCn/OW/d1wM+4TyxTFdpZM Sg+grEAVQNT2FRRgr0G0bz4oUsCemiqs/RwRNQK0fGXuNsgOU32oHrY21xVUrLE/7P S6HSjS9r2PGBdGKmrOHIAzjv9a4Xe9ZIKgeuuOaI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A8078F802BD; Sun, 28 Jun 2020 19:44:43 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id BAD1EF80253; Sun, 28 Jun 2020 19:44:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=disabled version=3.4.0 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 71B1EF800F0 for ; Sun, 28 Jun 2020 19:44:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 71B1EF800F0 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="K40VvFJJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593366272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WWGm3198Dm1xpe7bsa+BO7zUZICM0e3RFV6MlnJGjck=; b=K40VvFJJWg74J63perAfEZ4eZ4uNPMfw1NEeSiPHuB2+bAbLsFU/r9gFaIPkSosJKpUyZF eVcGIIswBGrv/fT29TMk/c5XLDa772wvIMWTHbIUpKLYFOVQ9muW3THef4afqmv6KxfaWP 4P6B0fPA+W+igPXW2Dsc0H655HXJWDY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-jNqGG7BmPtaKiRTJGlLRLg-1; Sun, 28 Jun 2020 13:44:29 -0400 X-MC-Unique: jNqGG7BmPtaKiRTJGlLRLg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9053580183C; Sun, 28 Jun 2020 17:44:28 +0000 (UTC) Received: from x1.localdomain.com (ovpn-112-41.ams2.redhat.com [10.36.112.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id CCEB95D9D5; Sun, 28 Jun 2020 17:44:27 +0000 (UTC) From: Hans de Goede To: Jaroslav Kysela , alsa-devel@alsa-project.org Subject: [PATCH alsa-lib 5/5] chtrt5645: Restore stereo sound output when switching from MonoSpeaker to Headphones Date: Sun, 28 Jun 2020 19:44:21 +0200 Message-Id: <20200628174421.115133-5-hdegoede@redhat.com> In-Reply-To: <20200628174421.115133-1-hdegoede@redhat.com> References: <20200628174421.115133-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: Hans de Goede 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" Commit fe3b0bdc2f43 ("chtrt5645: merge all possible configurations to HiFi.conf") missed the part of the removed HiFi-mono-speaker-analog-mic.conf file which restores stereo mixing (instead of mixing left + right to the left DAC mixer output) when switching from the mono speaker setup to the headphones output. This was causing both left and right channels to only be played on the left ear of the headphones. This commit fixes this. Fixes: fe3b0bdc2f43 ("chtrt5645: merge all possible configurations to HiFi.conf") Signed-off-by: Hans de Goede --- ucm2/chtrt5645/HiFi.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ucm2/chtrt5645/HiFi.conf b/ucm2/chtrt5645/HiFi.conf index 5d0e3bf..10b0a1c 100644 --- a/ucm2/chtrt5645/HiFi.conf +++ b/ucm2/chtrt5645/HiFi.conf @@ -93,6 +93,11 @@ SectionDevice."Speaker" { cset "name='Stereo DAC MIXL DAC R1 Switch' 1" cset "name='Stereo DAC MIXR DAC R1 Switch' 0" ] + DisableSequence [ + # Undo monospeaker mixing + cset "name='Stereo DAC MIXL DAC R1 Switch' 0" + cset "name='Stereo DAC MIXR DAC R1 Switch' 1" + ] } }