From patchwork Thu Aug 20 23:32:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Curtis Malainey X-Patchwork-Id: 11727187 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 8FF82722 for ; Thu, 20 Aug 2020 23:33:19 +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 7BB142072D for ; Thu, 20 Aug 2020 23:33: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="gzS4Buk5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="bd5MBqTu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BB142072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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 84D21167D; Fri, 21 Aug 2020 01:32:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 84D21167D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1597966396; bh=IzG2252/GtmYR2U3KHYvq2rpb+U8NbK5RUGLzOodfpE=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=gzS4Buk56D/Rs0b4WQWaNiZSwHI3TID7sr6SgogNLtvH1AUs0tMMCzNYbC0iAcOA4 5CVBwuhB9rxm5SWeGfes2hyPaQJKnMJU3Y1id8MymNSumHuToEhognUDUcSPeH5SVA raV78mw/oWqNxbueRSiJYCCWFSYtfKg2YS41z4XY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E8302F800D3; Fri, 21 Aug 2020 01:32:30 +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 D13C9F8023F; Fri, 21 Aug 2020 01:32:27 +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,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 111FBF800D3 for ; Fri, 21 Aug 2020 01:32:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 111FBF800D3 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="bd5MBqTu" Received: by mail-pj1-x1035.google.com with SMTP id nv17so7517pjb.3 for ; Thu, 20 Aug 2020 16:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oHRUaXVxFTwOM/ib33v9O2zJFH8XkU6FcMZ3065ZAnE=; b=bd5MBqTuXT891F0ZO2St+ccmRXmL6vB8zWdxaQ9Yo0srssHXevWXdnFfw9mA80DdB2 /6q1aLZTTyoxzfctmqcJSeMibeVgv8TzdD3WOroHZTDiK2EqVAUySCgfln/awjOGY66x m7MhEnX5N2IPtWSIgmz4TnDsd/equMzbWlvPY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oHRUaXVxFTwOM/ib33v9O2zJFH8XkU6FcMZ3065ZAnE=; b=nWob5x4adrU1KoJijxU9f/5DzyE+BxLCJB0WK836fdO01alRQS4vHIIcK1WkSqY3XT IYwR3ne5HcON7Gs8N5T/J7RNGeeBdTrXqapVYQ+Y/aiyquACm/dScg7P8T65wCTD0Eqk LXe6iWthFjAHD7jznNz+m43uMZDHMvv5rUaOokm6oq73QbWjdwqTqOBbCxD+iGLLqLWj P0D+svo+c2+TNYSPSmYFaVUUX6WS7nSTu80VBV1TiLaWqAax7NYeKiFdAPuep3A6oqxb OSDcItqdDQ4L865q/b9l7zifehhLh4FKtgeLitGHfQpDAItIapktmZbt0oQEbBVmKbX+ BuBQ== X-Gm-Message-State: AOAM532y9b44m4XGOEtFZd5xapRYhsxVQctmXtZbnzLepnEHiWgjOf/z QWsM9E8p+FTlG/nM2VKMqt5WPC/o4u3N6Rw= X-Google-Smtp-Source: ABdhPJzlRkIwsZo1jjq4KU07iXLGV99n/PDyupimpGDtwW+5WQeEeuW2hBOPoRg+PPQeou2vgbnbFw== X-Received: by 2002:a17:90b:784:: with SMTP id l4mr141635pjz.96.1597966336215; Thu, 20 Aug 2020 16:32:16 -0700 (PDT) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:2f18]) by smtp.gmail.com with ESMTPSA id lk16sm6297pjb.13.2020.08.20.16.32.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Aug 2020 16:32:15 -0700 (PDT) From: Curtis Malainey To: alsa-devel@alsa-project.org Subject: [PATCH 1/2] ucm: Add JackSwitch definition Date: Thu, 20 Aug 2020 16:32:04 -0700 Message-Id: <20200820233205.505925-1-cujomalainey@chromium.org> X-Mailer: git-send-email 2.28.0.297.g1956fa8f8d-goog MIME-Version: 1.0 Cc: tiwai@suse.de, Curtis Malainey 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" Some codecs can differentiate headsets based on the number of rings. Should we choose to differentiate the config we will need to be able to select based on the jack event code. Signed-off-by: Curtis Malainey --- include/use-case.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/use-case.h b/include/use-case.h index 2363c3ed..80148a7b 100644 --- a/include/use-case.h +++ b/include/use-case.h @@ -386,6 +386,9 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr, * to e.g. automatically mute speakers when headphones are plugged in, * but that's application policy configuration that doesn't belong * to UCM configuration files. + * - JackSwitch + * - Represents the jack switch value for this device. Value is a base 10 + * value of a switch code in input_event_codes.h * - MinBufferLevel * - This is used on platform where reported buffer level is not accurate. * E.g. "512", which holds 512 samples in device buffer. Note: this will From patchwork Thu Aug 20 23:32:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Curtis Malainey X-Patchwork-Id: 11727189 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 53FBE722 for ; Thu, 20 Aug 2020 23:34:11 +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 DB6312072D for ; Thu, 20 Aug 2020 23:34:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="S9dp4VI9"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="n0OpmzaD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB6312072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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 5B750168A; Fri, 21 Aug 2020 01:33:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5B750168A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1597966449; bh=LB7KLnCW/f+QuSvL44ykIEwDv2XPD6yO7+DY2wFZTQI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=S9dp4VI9zut+IxnyNv52f61tK5zBF4IVWTz8HslJuplixmP9lPcmGumueW910UQDm 813NbKQLzWJULgu61Ov3fth0UTO2/XsvtVdK8KmCRR5jZcmvMJz74jFjo78J0hwlkW qAMVYa2AeLFrkVCi3WciQwbKEIV9QQpMlmWbsZIA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4B6DEF8023F; Fri, 21 Aug 2020 01:32:36 +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 940FBF80228; Fri, 21 Aug 2020 01:32:29 +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,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 333ECF800C0 for ; Fri, 21 Aug 2020 01:32:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 333ECF800C0 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="n0OpmzaD" Received: by mail-pf1-x443.google.com with SMTP id r11so129842pfl.11 for ; Thu, 20 Aug 2020 16:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GrxfLeGvsSt1Wqcy3iA/GakyPdRtEsONZ+QrOlebZzc=; b=n0OpmzaD5VpgeV7vXdSP8/pkwN21AxSsJSSwXTLCZ+8FuIhSC2FcU/2Ou/ckTA6hy+ 2rTIcCxeJvFC1EH1MWojiauV0ZdLqm/1DHgDQFJaQUlHKRPhJP7x1pdS61YCqKA9xPUu xz4pAIFycqUdtv0sH8rx9RUxq/7sQVbxQGNzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GrxfLeGvsSt1Wqcy3iA/GakyPdRtEsONZ+QrOlebZzc=; b=MHEAJatFr3Y1H6QTLZiVDmtQ+o3YRBWCNtrOLLLo0g2AJO29avKozwbbs6avf93ox6 UcaIMgOqs4IVbm7OfZLr//FZRNIQ3gtESNDMvXvE11OjxeOVFjVryRrYiwZ83F55NRKV h5lKGErB5CJChu+D8KhCp9ptFqgjlICFCvE80fqIlEPhVeTFVXLPV3FP2BVQrcq6RBjd dI5ulF4QVc7t1KfPD8KXL5UhW3fuzKdIGsh1Zxxitl7+sJKyWRRyjuJQ+pGAh/ltAam3 cluvfocp4xUuesk1OHL/zzn6OMX6sOUGhFp3XoF1IILNYfr8ltJxJihsHRvfOf5FSN9L OFOQ== X-Gm-Message-State: AOAM532fY0Yuegut/raLQFE1cseMqD9gkLDqo0oEBODfp4fRGbeMSiNu /7GgUJ7QgYEjh/PB70/C1BQNHNyR6z7nfPY= X-Google-Smtp-Source: ABdhPJyl2WXL+6InH7+b7YW1IndvMgKQb9g46+3Wjago0n3lbxlZW+6RXYgBG0/tj+bCdzBWMzFODQ== X-Received: by 2002:a62:1b81:: with SMTP id b123mr173927pfb.149.1597966340328; Thu, 20 Aug 2020 16:32:20 -0700 (PDT) Received: from localhost ([2620:15c:202:201:7220:84ff:fe09:2f18]) by smtp.gmail.com with ESMTPSA id x23sm174471pfi.60.2020.08.20.16.32.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Aug 2020 16:32:19 -0700 (PDT) From: Curtis Malainey To: alsa-devel@alsa-project.org Subject: [PATCH 2/2] ucm: add DmaPeriodMicrosecs Date: Thu, 20 Aug 2020 16:32:05 -0700 Message-Id: <20200820233205.505925-2-cujomalainey@chromium.org> X-Mailer: git-send-email 2.28.0.297.g1956fa8f8d-goog In-Reply-To: <20200820233205.505925-1-cujomalainey@chromium.org> References: <20200820233205.505925-1-cujomalainey@chromium.org> MIME-Version: 1.0 Cc: tiwai@suse.de, Curtis Malainey 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" Add ucm value to allow userspace to set sane values for platforms that default to be configs. Signed-off-by: Curtis Malainey --- include/use-case.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/use-case.h b/include/use-case.h index 80148a7b..94992cd4 100644 --- a/include/use-case.h +++ b/include/use-case.h @@ -358,6 +358,10 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr, * - CaptureMasterType * - type of the master volume control * - Valid values: "soft" (software attenuation) + * - DmaPeriodMicrosecs + * - Set DMA period us. Used to correct when system defaults to values too + * large which cause initial noise. Value is passed to + * snd_pcm_hw_params_set_period_time_near. * - EDIDFile * - Path to EDID file for HDMI devices * - JackCTL