From patchwork Wed May 23 08:38:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 136636 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp611278lji; Wed, 23 May 2018 01:38:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpJRz7YNoJaUVGcU4FxX2Uj7AtJF+xZLeTyquKpztMSekI6LnQuvrX2PHOgldsqMMwXvsGs X-Received: by 2002:adf:e5d0:: with SMTP id a16-v6mr1327703wrn.190.1527064720163; Wed, 23 May 2018 01:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527064720; cv=none; d=google.com; s=arc-20160816; b=voS6Ku4c+lQ3Io1c2H+C/cV4BUhNXj+IhkoHNoDDX0LQQlEVXTAjwCsiZKRTbFMoH7 2pQ1/aJn+vQO82nFXOC3cGvLLvtHjBf0IMAZZ+KsTZU3eBv1m40CcDnDhV2Y+Sbfl+NQ G/0x7vCquuw97wyyRhxywfGroBdIcX9sE7gxgJqbfnPQpdLVKZhO+edy499gRNeE386Q vLz0TrERiDcgGKqgmx4TzQ4tGvfwUVV4p4u06JcKfyh0+8svHx+iRunLePw0P3xsEh0p xOicZ0iFljBsia4xqUwszdEsCbwIvTlXZNx2AbupQLYH7yTgjhuFAce2OzrIYiI1nxPq mQPQ== 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=4jpUr7y37cM2C7tyUzkeBrjw/o31bf+qZ/qW4G2DkSY=; b=R5Tytgf6fLvRDmKCCmUCUxUocj2pERZYBe4ZRH3Qdj7y7qKqtQ4m+RH9YCTIwd0vOM oWOEfHsgve5a8kYZGTTfgo9BZAJPg7KF7FVtgLNXZHbulSq9HhsHdJXzBkEqNYRVZwvV /fYY+3NYWlSALzLtM6y5O+sN+mWcOmhvT4mw29GbnCdFEDjibAZm7vpt1+rQwRfwlXCH MGY+R5ouN7Q5Zm3cLluGby2fvTPEyCRwtfLKFrZgCFwS6Qpnow9fu9vbe/meoI82ZJ0p gRyc1qwWWW3ze8nPYWROzCV8HY65CWbhYrwVsCoYNi40SQogdJSOU/hYRYzKDqrajjA+ 1D0w== 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=QPQp8s5V; 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 c62-v6si1421463wmi.151.2018.05.23.01.38.39; Wed, 23 May 2018 01:38:40 -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=QPQp8s5V; 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 E1EB726736C; Wed, 23 May 2018 10:38:34 +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 24B982671EE; Wed, 23 May 2018 10:38:32 +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 0C4342671D2 for ; Wed, 23 May 2018 10:38:27 +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=c3b5bu18TTDqQSbumS1UvNNEB9Kjyuyvhgd3Bp2pFJQ=; b=QPQp8s5VPgrR mZ2r2pza2yVYjlLFq+cxbeDEQYKxAyQJBb+P2XuIGaUYMIOJHiEnuATvktUYbBfa6wbtu6K5oBDj0 6oRul4R80BPqTOjsvlQhiqyNZMe+M7Zl23huS1iupG6iu+1EYgktV9YjOcr46bq7xusP9KwlZscyT HcgJY=; 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 1fLPHr-0003AE-N5; Wed, 23 May 2018 08:38:23 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1fLPHr-00014N-8h; Wed, 23 May 2018 09:38:23 +0100 From: Mark Brown To: Lin Huang In-Reply-To: Message-Id: Date: Wed, 23 May 2018 09:38:23 +0100 Cc: Chris Zhong , alsa-devel@alsa-project.org, Mark Brown Subject: [alsa-devel] Applied "ASoC: rockchip: cdn-dp sound output use spdif" 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: rockchip: cdn-dp sound output use spdif 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 b18c6c3c7768b7b81c2250bbccd0c3c0aed6b71f Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Tue, 22 May 2018 16:53:42 +0800 Subject: [PATCH] ASoC: rockchip: cdn-dp sound output use spdif some monitors care about the parity bit in the sub-frame of I2S, but the cdn-dp always set this bit to "1", so these monitors do not have sound output if use i2s, use spdif can fix this issue. Signed-off-by: Chris Zhong Signed-off-by: Lin Huang Signed-off-by: Mark Brown --- sound/soc/rockchip/rk3399_gru_sound.c | 46 +-------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) -- 2.17.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index 9a10181a0811..f184168f9a41 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -220,45 +220,6 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd) return 0; } -static int rockchip_sound_cdndp_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) -{ - struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - struct snd_soc_dai *codec_dai = rtd->codec_dai; - int mclk, ret; - - /* in bypass mode, the mclk has to be one of the frequencies below */ - switch (params_rate(params)) { - case 8000: - case 16000: - case 24000: - case 32000: - case 48000: - case 64000: - case 96000: - mclk = 12288000; - break; - case 11025: - case 22050: - case 44100: - case 88200: - mclk = 11289600; - break; - default: - return -EINVAL; - } - - ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk, - SND_SOC_CLOCK_OUT); - if (ret < 0) { - dev_err(codec_dai->dev, "Can't set cpu clock out %d\n", ret); - return ret; - } - - return 0; -} - static int rockchip_sound_dmic_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -293,10 +254,6 @@ static const struct snd_soc_ops rockchip_sound_da7219_ops = { .hw_params = rockchip_sound_da7219_hw_params, }; -static const struct snd_soc_ops rockchip_sound_cdndp_ops = { - .hw_params = rockchip_sound_cdndp_hw_params, -}; - static const struct snd_soc_ops rockchip_sound_dmic_ops = { .hw_params = rockchip_sound_dmic_hw_params, }; @@ -323,8 +280,7 @@ static const struct snd_soc_dai_link rockchip_dais[] = { [DAILINK_CDNDP] = { .name = "DP", .stream_name = "DP PCM", - .codec_dai_name = "i2s-hifi", - .ops = &rockchip_sound_cdndp_ops, + .codec_dai_name = "spdif-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, },