From patchwork Mon Jun 18 11:59:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 138895 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp3863782lji; Mon, 18 Jun 2018 05:00:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKITkWzvsCV2Aj8L3DQ8A5cHGD8lez4gNRhlFA0Ul8I9IlpRArMpdKGIFvZ7yEMqr3fM4Ldp X-Received: by 2002:a5d:4206:: with SMTP id n6-v6mr10073599wrq.13.1529323207020; Mon, 18 Jun 2018 05:00:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529323207; cv=none; d=google.com; s=arc-20160816; b=dLQ4bY3FtP3rsINC5pMMPUOUGLDdAd0bUbsKQ8KASv+g4koPjpKQi1Y/ZnRGiBilkP Hm6oXGHEcWP/4dfS4i1yUyZ9P2YPnmzbHBhJFUPvkvVNWXRQnjIyo5ZMExAfvjrWoV/h L+UPG5EqF2D4dlSX7salTY66CWamtOv6NNxuQHe1x4xp4plk3Etjr68Xfy8JCBHviUL2 64gYl5t/Krv6u+dN45RDkwVVmsAi+NN/V0QHpXxC7KwGL/vUqd3GLANu0orVfnMQxj9K Ys2NC646J3KDFrLyYqw6LoRQDPAgduu+xsL4vdDygrP7tKg1xVf3v89KTRHxWfN+4wnJ OkWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=rB+Cs2Rn5E4mv/no89i85NKHY4f7LIL946CuR4LgM9k=; b=AkuSn9a55P0qoOSdGDEu1Vn1cMEsUQCZSjNysrpSh0uh7x5bJ7iwzZ/Z6KhLmtPYND 3qpdJR+OWwy94op+hXqH2oNTJjTwGOziTcgg1H+Gk4VqbWbZvtErscWvN9R0LklsJlkp 9VMwdEgGjQ2nQHCxvfXUntxWIXPkFb/yVZ9sLLMoRMBK7nV+bZItxhjzn5R0j3wsGSQF R3aEUbC0QHik22LnL9GA3z//SGFQlCyB+nuXmks3KuZsa/ezAF2BiGPW0DzU03mSzKo5 5H8dtlsy8Bx1JtCmcJUCmBYQ4VZhYMmkJvIecVB7HdHWSOcSMEw7AYxV998r4ol7jLO6 q89g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=rQNd4nYr; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id g90-v6si7089885wmc.5.2018.06.18.05.00.06; Mon, 18 Jun 2018 05:00:07 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=rQNd4nYr; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9E8AE267647; Mon, 18 Jun 2018 14:00:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 701F426760F; Mon, 18 Jun 2018 13:59:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id F11CB2675D5 for ; Mon, 18 Jun 2018 13:59:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=UOk5+30kYEyT7YjnQdZj1jbTXJcg/ayvNy+Bsk57o1o=; b=rQNd4nYrN3cr KKISVibfA91RPDaAs2ifbX/NjRcl+2oQqz90oDGOqT+K0riFiGJz5citn/ziipk/I6uLnmImDopd+ A4ssVqpC+VIpKWpi0CyPY9c0f7OVWiRC3d0tSJ/AS/kxbGt+7nLVu/DT/8jMp5yuRDsQ28A0wBO7K xTKJE=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fUsp6-0007wa-Kc; Mon, 18 Jun 2018 11:59:52 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fUsp6-0008RD-6w; Mon, 18 Jun 2018 12:59:52 +0100 From: Mark Brown To: Steven Eckhoff In-Reply-To: Message-Id: Date: Mon, 18 Jun 2018 12:59:52 +0100 Cc: Liam Girdwood , alsa-devel@alsa-project.org, Mark Brown , linux-kernel@vger.kernel.org, Takashi Iwai Subject: [alsa-devel] Applied "ASoC: TSCS42xx: Add headphone auto switching" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: TSCS42xx: Add headphone auto switching has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 53af408cd9f2d1c66bc081c1d82797bfe44af3e5 Mon Sep 17 00:00:00 2001 From: Steven Eckhoff Date: Mon, 4 Jun 2018 15:47:02 -0500 Subject: [PATCH] ASoC: TSCS42xx: Add headphone auto switching Add headphone auto switching controls Signed-off-by: Steven Eckhoff Signed-off-by: Mark Brown --- sound/soc/codecs/tscs42xx.c | 6 ++++++ sound/soc/codecs/tscs42xx.h | 8 ++++++++ 2 files changed, 14 insertions(+) -- 2.17.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/tscs42xx.c b/sound/soc/codecs/tscs42xx.c index 5d596e4dab0c..7396a6e5277e 100644 --- a/sound/soc/codecs/tscs42xx.c +++ b/sound/soc/codecs/tscs42xx.c @@ -647,6 +647,12 @@ static const struct snd_kcontrol_new tscs42xx_snd_controls[] = { /* Mic Bias */ SOC_SINGLE("Mic Bias Boost Switch", 0x71, 0x07, 1, 0), + /* Headphone Auto Switching */ + SOC_SINGLE("Headphone Auto Switching Switch", + R_CTL, FB_CTL_HPSWEN, 1, 0), + SOC_SINGLE("Headphone Detect Polarity Toggle Switch", + R_CTL, FB_CTL_HPSWPOL, 1, 0), + /* Coefficient Ram */ COEFF_RAM_CTL("Cascade1L BiQuad1", BIQUAD_SIZE, 0x00), COEFF_RAM_CTL("Cascade1L BiQuad2", BIQUAD_SIZE, 0x05), diff --git a/sound/soc/codecs/tscs42xx.h b/sound/soc/codecs/tscs42xx.h index 814c8f3c4a68..6b3a21081635 100644 --- a/sound/soc/codecs/tscs42xx.h +++ b/sound/soc/codecs/tscs42xx.h @@ -34,6 +34,7 @@ enum { #define R_DACSR 0x19 #define R_PWRM1 0x1A #define R_PWRM2 0x1B +#define R_CTL 0x1C #define R_CONFIG0 0x1F #define R_CONFIG1 0x20 #define R_DMICCTL 0x24 @@ -1110,6 +1111,13 @@ enum { #define RV_PWRM2_VREF_DISABLE \ RV(FV_PWRM2_VREF_DISABLE, FB_PWRM2_VREF) +/****************************** + * R_CTL (0x1C) * + ******************************/ + +/* Fiel Offsets */ +#define FB_CTL_HPSWEN 7 +#define FB_CTL_HPSWPOL 6 /****************************** * R_CONFIG0 (0x1F) *