From patchwork Tue Jul 3 15:33:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 140982 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1307887ljj; Tue, 3 Jul 2018 08:34:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd88pFd2gNBu7Jc0Ex+YP2jUJO56UwcKyQFos09yTKMebA6T7SjC3TtGWajPnXPHyLA0DRa X-Received: by 2002:adf:b1d2:: with SMTP id r18-v6mr14594866wra.79.1530632047929; Tue, 03 Jul 2018 08:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530632047; cv=none; d=google.com; s=arc-20160816; b=l5LqrL6cHzRaYSVz5DS0O8AnYMkRmljZn8y7CxzE10ATxyQBl/Lv7n1MLLzL/Vi1c3 ihsrJMVefdLyZyBXk4NJv2rTfTlptMWIrQeyWa11h9qiz5quRe8fEYd9Z+reHhR29rkI GKb4WOjgg0Slp5I4c4c39njQauSRdtIpEW7pLf2vKyGW/jYjMc+CPaQdaoS2WAJGtOmg JYDu6o4blkDuDclfOE5vyGa8oJaTdihIZ/j00POShmNwH1LGlQHnpmKhzkwjPQmLxdGG sISHV4x7NOegGbrJMNdKdInqfslAC4Sb26JxIQNKYS9gDgy3INL1zcAqlTf15G/mw5Nb IoSw== 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=6G6D80TbYvld7jFAN7JiEhEWjDSyFFUGsAN84MKXwF4=; b=k9o68cHarStrYE114YkMdiC1s0eOoA29gr1WsAAypfbWrnEyWWRMYV0kLr6zw9Lgkj RRqNNpkFfJtwmDmmH1iuqDHCDrfEezSUbVn8I1zzziGqpWSPr848eriWrgp+Z0PIZHpS r3L9FpI5Do2TXTk9+aTmWhF/l4QZVX6ycboa+MsGbqbFh3rUxuJtzGb8tFSB2cvDvzL4 pstVnO9t+flbUr0kRHM0WVxJmLIqilSUz6iRnHRdiJa/GjJ3g6avk2pdZzezTxEhI/Kt 219RWuPmv99OOBStd2MQnKxac57eZ1CmjuTph0U39kYfHV8e0EcXdB5hHKgc7smffger JYYQ== 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=hBsql6gO; 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 p63-v6si1182811wmb.102.2018.07.03.08.34.07; Tue, 03 Jul 2018 08:34: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=hBsql6gO; 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 3019E267732; Tue, 3 Jul 2018 17:34:06 +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 A5D51267732; Tue, 3 Jul 2018 17:34:03 +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 F0C2B26771C for ; Tue, 3 Jul 2018 17:34:01 +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=QocwPLVb3IGJCt2m0lxuWia9vGj/xfmztjuF+qVgBME=; b=hBsql6gO4alV mhVyxAHshCLbfEVUDwClFi4OezAvhjttuIGN+1/YPtJrqBjymnqcVH9eczLC8utd3mHKx1VDApxDm DmQbejDhy8x0XMZtkFsFD+CMYwTyfUjvxE6r04daHUpJSKo0AjJKizU5jgkRmKjSS+GeJY1eMR9mG cfotI=; 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 1faNJX-0006A1-Ur; Tue, 03 Jul 2018 15:33:59 +0000 Received: from broonie by debutante with local (Exim 4.91) (envelope-from ) id 1faNJX-0003fk-FU; Tue, 03 Jul 2018 16:33:59 +0100 From: Mark Brown To: Jerome Brunet In-Reply-To: <20180703150600.17697-4-jbrunet@baylibre.com> Message-Id: Date: Tue, 03 Jul 2018 16:33:59 +0100 Cc: alsa-devel@alsa-project.org, Mark Brown , Liam Girdwood , linux-kernel@vger.kernel.org Subject: [alsa-devel] Applied "ASoC: es7134: add support for the es7154" 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: es7134: add support for the es7154 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 563c263248ff37dcd743549a0c0932fe2bf83980 Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Tue, 3 Jul 2018 17:06:00 +0200 Subject: [PATCH] ASoC: es7134: add support for the es7154 Add support for the es7154 which is basically an es7134 with an embedded power amplifier and lower maximum sample rate Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown --- sound/soc/codecs/es7134.c | 60 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) -- 2.18.0.rc2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/es7134.c b/sound/soc/codecs/es7134.c index 80f2936cefed..6d7bca7b78ca 100644 --- a/sound/soc/codecs/es7134.c +++ b/sound/soc/codecs/es7134.c @@ -33,6 +33,7 @@ struct es7134_clock_mode { }; struct es7134_chip { + struct snd_soc_dai_driver *dai_drv; const struct es7134_clock_mode *modes; unsigned int mode_num; const struct snd_soc_dapm_widget *extra_widgets; @@ -196,6 +197,7 @@ static const struct snd_soc_dapm_route es7134_extra_routes[] = { }; static const struct es7134_chip es7134_chip = { + .dai_drv = &es7134_dai, .modes = es7134_modes, .mode_num = ARRAY_SIZE(es7134_modes), .extra_routes = es7134_extra_routes, @@ -227,6 +229,61 @@ static const struct snd_soc_component_driver es7134_component_driver = { .non_legacy_dai_naming = 1, }; +static struct snd_soc_dai_driver es7154_dai = { + .name = "es7154-hifi", + .playback = { + .stream_name = "Playback", + .channels_min = 2, + .channels_max = 2, + .rates = (SNDRV_PCM_RATE_8000_48000 | + SNDRV_PCM_RATE_88200 | + SNDRV_PCM_RATE_96000), + .formats = (SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S18_3LE | + SNDRV_PCM_FMTBIT_S20_3LE | + SNDRV_PCM_FMTBIT_S24_3LE | + SNDRV_PCM_FMTBIT_S24_LE), + }, + .ops = &es7134_dai_ops, +}; + +static const struct es7134_clock_mode es7154_modes[] = { + { + /* Single speed mode */ + .rate_min = 8000, + .rate_max = 50000, + .mclk_fs = (unsigned int[]) { 32, 64, 128, 192, 256, + 384, 512, 768, 1024 }, + .mclk_fs_num = 9, + }, { + /* Double speed mode */ + .rate_min = 84000, + .rate_max = 100000, + .mclk_fs = (unsigned int[]) { 128, 192, 256, 384, 512, + 768, 1024}, + .mclk_fs_num = 7, + } +}; + +/* Es7154 has a separate supply for digital I/O */ +static const struct snd_soc_dapm_widget es7154_extra_widgets[] = { + SND_SOC_DAPM_REGULATOR_SUPPLY("PVDD", 0, 0), +}; + +static const struct snd_soc_dapm_route es7154_extra_routes[] = { + { "Playback", NULL, "PVDD", } +}; + +static const struct es7134_chip es7154_chip = { + .dai_drv = &es7154_dai, + .modes = es7154_modes, + .mode_num = ARRAY_SIZE(es7154_modes), + .extra_routes = es7154_extra_routes, + .extra_route_num = ARRAY_SIZE(es7154_extra_routes), + .extra_widgets = es7154_extra_widgets, + .extra_widget_num = ARRAY_SIZE(es7154_extra_widgets), +}; + static int es7134_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -245,13 +302,14 @@ static int es7134_probe(struct platform_device *pdev) return devm_snd_soc_register_component(&pdev->dev, &es7134_component_driver, - &es7134_dai, 1); + priv->chip->dai_drv, 1); } #ifdef CONFIG_OF static const struct of_device_id es7134_ids[] = { { .compatible = "everest,es7134", .data = &es7134_chip }, { .compatible = "everest,es7144", .data = &es7134_chip }, + { .compatible = "everest,es7154", .data = &es7154_chip }, { } }; MODULE_DEVICE_TABLE(of, es7134_ids);