From patchwork Thu Jul 20 12:23:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 108328 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2063760qge; Thu, 20 Jul 2017 05:26:42 -0700 (PDT) X-Received: by 10.28.107.209 with SMTP id a78mr2053980wmi.143.1500553602257; Thu, 20 Jul 2017 05:26:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500553602; cv=none; d=google.com; s=arc-20160816; b=lZPbXu6oCysuleNdaatSK1W1YBioVV3L5xqED5hzLZGJPT0GI4wfyhW1o5FUz2kMFg p2HucQx3jFRxqmwRb5nj1a59PWl4eS8WTWLy1ZPTm73BnZKHqjl1TeAISvM85UvFO5YU pNuhafjBNlD+GmvN/lzt9vhX3JNggpT2fb4GDVMYWnFmmG1Bck5UQ8XfqysiLqmeS567 E9KaGhLHVzsSDgsik39Cth+ZXcAINdqlYcnfrL8en1+OO2cJFEIt6ll8hcj4tUAAx89J iwmMGlLZGzHs3KeYrfNewK8NUPfM5kxWyQ81LJ8gtyMrEQzqTJ0KsdgUo4aOmB9sl0Kj VHGA== 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 :delivered-to:arc-authentication-results; bh=DznsLw39AadMnypa/ZyeLN0EGlhihkqUyHXI3thyQQ4=; b=HZoOIrE8tCn/CSN8YJRjAQSMHxk35YkoDX8gsxQs9bfj7SLw3wPaDLV7PtUSJ3pyf0 vkFnzGulH73r3zkILJScz6YgiDvVUMOTsMIF5P5g/a9k5A/UGv8QrbH91YPGqq3qS2Tb ybsnwDWyUir/J9gMUtte95QB9AnFDBRBWEfi7kPpCie7xs2pKToY3uc0KT5S4A873eC3 poeI4IUqVUpU+Ugearm6y5niLW8RnxWSphsSLGQjIpsc+Uuvej9SzvnQyskAMTF6/oLV k8lOC0pnGBCBv1SRa/daBY0gA3Y3jhmZLsH3LODjXLP6B5gGEixXuiYwKQRwAHnnakna IsHA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id k60si5837556wrc.52.2017.07.20.05.24.36; Thu, 20 Jul 2017 05:26:42 -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; 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 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D4126266CC0; Thu, 20 Jul 2017 14:24:25 +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 74445266CC9; Thu, 20 Jul 2017 14:23:52 +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.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mezzanine.sirena.org.uk (mezzanine.sirena.org.uk [106.187.55.193]) by alsa0.perex.cz (Postfix) with ESMTP id 516E5266CC0 for ; Thu, 20 Jul 2017 14:23:47 +0200 (CEST) Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1dYAUN-0007tq-Nk; Thu, 20 Jul 2017 12:23:34 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1dYAUK-00012a-R6; Thu, 20 Jul 2017 13:23:28 +0100 From: Mark Brown To: Bard Liao In-Reply-To: <1500527271-11188-3-git-send-email-bardliao@realtek.com> Message-Id: Date: Thu, 20 Jul 2017 13:23:28 +0100 X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Cc: oder_chiou@realtek.com, jack.yu@realtek.com, alsa-devel@alsa-project.org, lars@metafoo.de, lgirdwood@gmail.com, broonie@kernel.org, shumingf@realtek.com, zhongan@pinecone.net, flove@realtek.com Subject: [alsa-devel] Applied "ASoC: rt5665: add clock sync control for master mode" 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: rt5665: add clock sync control for master mode has been applied to the asoc tree at git://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 8bfa426845419d1fe895fc5668ab29b3a0c36c85 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Thu, 20 Jul 2017 13:07:51 +0800 Subject: [PATCH] ASoC: rt5665: add clock sync control for master mode We can sleect the i2s clock source for each i2s bus in master mode. The choice is depended on the HW design and the use case. Signed-off-by: Bard Liao Signed-off-by: Mark Brown --- sound/soc/codecs/rt5665.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.13.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c index ef27561c4993..7e64b25f8585 100644 --- a/sound/soc/codecs/rt5665.c +++ b/sound/soc/codecs/rt5665.c @@ -1381,6 +1381,16 @@ static void rt5665_jack_detect_handler(struct work_struct *work) mutex_unlock(&rt5665->calibrate_mutex); } +static const char * const rt5665_clk_sync[] = { + "I2S1_1", "I2S1_2", "I2S2", "I2S3", "IF2 Slave", "IF3 Slave" +}; + +static const struct soc_enum rt5665_enum[] = { + SOC_ENUM_SINGLE(RT5665_I2S1_SDP, 11, 5, rt5665_clk_sync), + SOC_ENUM_SINGLE(RT5665_I2S2_SDP, 11, 5, rt5665_clk_sync), + SOC_ENUM_SINGLE(RT5665_I2S3_SDP, 11, 5, rt5665_clk_sync), +}; + static const struct snd_kcontrol_new rt5665_snd_controls[] = { /* Headphone Output Volume */ SOC_DOUBLE_R_EXT_TLV("Headphone Playback Volume", RT5665_HPL_GAIN, @@ -1446,6 +1456,11 @@ static const struct snd_kcontrol_new rt5665_snd_controls[] = { SOC_DOUBLE_TLV("STO2 ADC Boost Gain Volume", RT5665_STO2_ADC_BOOST, RT5665_STO2_ADC_L_BST_SFT, RT5665_STO2_ADC_R_BST_SFT, 3, 0, adc_bst_tlv), + + /* I2S3 CLK Source */ + SOC_ENUM("I2S1 Master Clk Sel", rt5665_enum[0]), + SOC_ENUM("I2S2 Master Clk Sel", rt5665_enum[1]), + SOC_ENUM("I2S3 Master Clk Sel", rt5665_enum[2]), }; /**