Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4796207ybg; Tue, 29 Oct 2019 12:31:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqx27lJi9M0FQZDIgrpiVMbdeDS3ChKmsknxGxcvNb5HK2FPzMmmvyA5HBkay2rSpPuHdCXI X-Received: by 2002:a17:906:48c5:: with SMTP id d5mr5072504ejt.167.1572377471701; Tue, 29 Oct 2019 12:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572377471; cv=none; d=google.com; s=arc-20160816; b=X4L+MDFWBonfMqhGmZn9MwkECylcR8pq/YC4jAWyAsmV+RNTbCghQT4CT5EZIjnQcX 8+v3oo6b2e5rim3wEnBM0uBRZgDmehhL5yWl5AaHTjeALGW2rrTWhvOdZIZP1Soel2Y8 C3x8h9btYSx/LuBw8BJLkEE+wlUu+EcS7zeqFBlQALWmu5Z1rNWkQ0k+rPbn5fK7xZ6s 1DgEdN9kKowkO76e3eKtUPXhw2lyLHhuSzUOdIqI0HDCEoEqPvPyp950FxFzUVGz0jl2 cNPPBOu0ByE0/KXViD8tJgwC5Es1KgR1/QtifvRcrYoivJJ4De9WrwKzx4pohwTSLXUW QkcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=gocwTVPyr9YGkRj8qgx6LZT7QM+fVAHw/mMPk9/2Rwc=; b=EsGKwdKY4W+TW2Ot10D12dupPmMsQgC3rX99t+zXcELNyLHqgLtsHTK634vWpnBHpg JcPvn4H5F9PkvjU7ndgGMGBmIyNajR+fbiArnum5ktcJ2O67VYevT2kX8OZjpGux76Gn HJFkCzNRw3ZGc+YObGZ+tKRoKCxbXkfrHpvFkZXiAcrf7dtuMPF7JVW5fPYtf9REoAxz h1b21yIeRtdtRJcmtBMNo5pzO3zfZyPcXEA89gZm2U74Se9H/gr8KmnGM5lvtNqOQb99 QFdbf9+8d1kctlIhGl9lMbPqzzCk6Gn4MQtsxEtPzJybaynZews1Jj799nyaGK0fd2NY /uUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Y96UaNxA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si4542442ejx.107.2019.10.29.12.30.47; Tue, 29 Oct 2019 12:31:11 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=Y96UaNxA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388032AbfJ2M5V (ORCPT + 99 others); Tue, 29 Oct 2019 08:57:21 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:56868 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729253AbfJ2M5U (ORCPT ); Tue, 29 Oct 2019 08:57:20 -0400 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=gocwTVPyr9YGkRj8qgx6LZT7QM+fVAHw/mMPk9/2Rwc=; b=Y96UaNxA2UCU 9sO6W8Ov9V4FnBx+/WSu3KJDQQRGOfbGW7nOkiL0MFX35wrDiR+W0JMclAu6Sp6IkUP2WIF2v5Ldu fULf5zb3/tfdR3y9YRGwvmNOovJG/vx9KTD5axFXjzOsN+XjkcxhURE+RfI4sBESxtzVtzT42Gi0F oOIM8=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iPR3T-0002DH-QF; Tue, 29 Oct 2019 12:56:59 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 1BD202742157; Tue, 29 Oct 2019 12:56:59 +0000 (GMT) From: Mark Brown To: Cheng-Yi Chiang Cc: alsa-devel@alsa-project.org, Andrzej Hajda , Daniel Vetter , David Airlie , devicetree@vger.kernel.org, dgreid@chromium.org, dianders@chromium.org, dri-devel@lists.freedesktop.org, Hans Verkuil , Heiko Stuebner , Jaroslav Kysela , Jernej Skrabec , Jerome Brunet , Jonas Karlman , Laurent Pinchart , Liam Girdwood , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Mark Brown , Mark Rutland , Neil Armstrong , Rob Herring , Russell King , Takashi Iwai , tzungbi@chromium.org Subject: Applied "ASoC: rockchip_max98090: Add HDMI jack support" to the asoc tree In-Reply-To: <20191028071930.145899-5-cychiang@chromium.org> X-Patchwork-Hint: ignore Message-Id: <20191029125659.1BD202742157@ypsilon.sirena.org.uk> Date: Tue, 29 Oct 2019 12:56:59 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: rockchip_max98090: Add HDMI jack support has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.5 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 bf2f64ea6594066081b0d30b128fa4947e83e737 Mon Sep 17 00:00:00 2001 From: Cheng-Yi Chiang Date: Mon, 28 Oct 2019 15:19:28 +0800 Subject: [PATCH] ASoC: rockchip_max98090: Add HDMI jack support In machine driver, create a jack and let hdmi-codec report jack status. Signed-off-by: Cheng-Yi Chiang Link: https://lore.kernel.org/r/20191028071930.145899-5-cychiang@chromium.org Signed-off-by: Mark Brown --- sound/soc/rockchip/Kconfig | 3 ++- sound/soc/rockchip/rockchip_max98090.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sound/soc/rockchip/Kconfig b/sound/soc/rockchip/Kconfig index b43657e6e655..d610b553ea3b 100644 --- a/sound/soc/rockchip/Kconfig +++ b/sound/soc/rockchip/Kconfig @@ -40,9 +40,10 @@ config SND_SOC_ROCKCHIP_MAX98090 select SND_SOC_ROCKCHIP_I2S select SND_SOC_MAX98090 select SND_SOC_TS3A227E + select SND_SOC_HDMI_CODEC help Say Y or M here if you want to add support for SoC audio on Rockchip - boards using the MAX98090 codec, such as Veyron. + boards using the MAX98090 codec and HDMI codec, such as Veyron. config SND_SOC_ROCKCHIP_RT5645 tristate "ASoC support for Rockchip boards using a RT5645/RT5650 codec" diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c index 50ef9b8e7ce4..5c2504a465f4 100644 --- a/sound/soc/rockchip/rockchip_max98090.c +++ b/sound/soc/rockchip/rockchip_max98090.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -218,6 +219,25 @@ enum { DAILINK_HDMI, }; +static struct snd_soc_jack rk_hdmi_jack; + +static int rk_hdmi_init(struct snd_soc_pcm_runtime *runtime) +{ + struct snd_soc_card *card = runtime->card; + struct snd_soc_component *component = runtime->codec_dai->component; + int ret; + + /* enable jack detection */ + ret = snd_soc_card_jack_new(card, "HDMI Jack", SND_JACK_LINEOUT, + &rk_hdmi_jack, NULL, 0); + if (ret) { + dev_err(card->dev, "Can't new HDMI Jack %d\n", ret); + return ret; + } + + return hdmi_codec_set_jack_detect(component, &rk_hdmi_jack); +} + /* max98090 dai_link */ static struct snd_soc_dai_link rk_max98090_dailinks[] = { { @@ -237,6 +257,7 @@ static struct snd_soc_dai_link rk_hdmi_dailinks[] = { { .name = "HDMI", .stream_name = "HDMI", + .init = rk_hdmi_init, .ops = &rk_aif1_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, @@ -259,6 +280,7 @@ static struct snd_soc_dai_link rk_max98090_hdmi_dailinks[] = { [DAILINK_HDMI] = { .name = "HDMI", .stream_name = "HDMI", + .init = rk_hdmi_init, .ops = &rk_aif1_ops, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, -- 2.20.1