From patchwork Sun Oct 11 20:22:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 269485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4AA5C433E7 for ; Sun, 11 Oct 2020 20:24:23 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3328520657 for ; Sun, 11 Oct 2020 20:24:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="qU733QPl"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U4O5kX9f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3328520657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 360BF1674; Sun, 11 Oct 2020 22:23:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 360BF1674 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602447860; bh=VZ0HtrDd0Nj+SWN/E0RIFOpZI6YIDwonjFIswMyRjMY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qU733QPliYUsG9Gx0iF/8zmNiXR81mZFbVj3b3vDAVA6scXlloFXnV9VAMw7xEYoO rfBJu+/QfSgaCAfz/CGdG4ih7733Y1BZDaBvh96FACME65d0GZSlMl0EaonZ1lurny vBiM8WecTqsD493i7Y2zbiUrVmbqQ/oXRVv8Jhpw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C2F9FF801DA; Sun, 11 Oct 2020 22:22:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 47728F80247; Sun, 11 Oct 2020 22:22:44 +0200 (CEST) Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 34D9DF80148 for ; Sun, 11 Oct 2020 22:22:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 34D9DF80148 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U4O5kX9f" Received: by mail-qk1-x743.google.com with SMTP id 140so14323960qko.2 for ; Sun, 11 Oct 2020 13:22:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PAK5kacH2+ECsZKBJRcAW2rWTDohVNDq66jg71dHghQ=; b=U4O5kX9f3gpRV0fc4KOkBhcF9I7pqXyR6K58/wgl8VCUs93mzrs9lgBy6Ibx160kbr ACqBpPToCs/k7E1Cue9fXd4uAZ7XB/dhhom8hKkoBoNhSxJTm12p0+V9519NEOpc3M3R 6aV/prgYt1M4w7Xmxq0PPjyvbvhO0o1YbMkLqTL3co4z22piCyCUhwftUcK93+NWldGG UnJNQzC+IT9IdjJ9+xg/QUGwHH1pAx8ucxswGPCS7n8PnccOgqTIAP/eLWIVOJnJtjiA 2HDQjDb9GkdnBQUJB8pISuZUFgJtbii1XyOwax9SSirfhC+le71D28ypynK6qwz7dBwx dtYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PAK5kacH2+ECsZKBJRcAW2rWTDohVNDq66jg71dHghQ=; b=hTxB0aYACXabV+mbOAAKWKsSH9UTQFcse1z2jDP0HQ8Kw8vacvXepcdWv7bPJMXMED JFKH4XmqOVUn9gg0v31mazWX9vtc0OEhMhIieTpXdlkP/9hSy6ciASF/24SA6guToLiw 3j7COrN8Huq2IFF+i4h2sAW/vJQVFfxRzTzNOZ2EXG1rDIjYW5/4MynG4qdBqwHjMy/L pn6g/m9vNEU19f6dspwLtC/+qDa4EwdeZcO1yP9pDlsbefuTOtAy0AMjXV2O17JRgrPB 5Q8JGLYyk4jwgzjngVkFy/udM7K6zs+kq+1UuiHfj2AkylvKHTW7UlOa3huP46P9hS4T 7MAw== X-Gm-Message-State: AOAM530Lng+hBkUmhwKw7JAwSCfotd7gp6gdXNmZFRZSWgKDWFweA56n 8z0DfbodLgVqfr3CW7dyxss= X-Google-Smtp-Source: ABdhPJwt37SzU2kQdUwfsStrr9yOz3XAywRLMUklGfBEmjQOy0HBbeVdHGOyC5cLOn0Ngt5pXbe0WQ== X-Received: by 2002:a37:5941:: with SMTP id n62mr6789479qkb.402.1602447755176; Sun, 11 Oct 2020 13:22:35 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:34 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params Date: Sun, 11 Oct 2020 22:22:11 +0200 Message-Id: <20201011202224.47544-2-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, Samuel Holland , linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" As slots and slot_width can be set manually using set_tdm(). These values are then kept in sun4i_i2s struct. So we need to check if these values are set or not. This is not done actually and will trigger a bug. For example, if we set to the simple soundcard in the device-tree dai-tdm-slot-width = <32> and then start a stream using S16_LE, currently we would calculate BCLK for 32-bit slots, but program lrck_period for 16-bit slots, making the sample rate double what we expected. To fix this, we need to check if these values are set or not but as this logic is already done by the caller. Avoid duplicating this logic and just pass the required values as params to set_chan_cfg(). Suggested-by: Samuel Holland Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index f23ff29e7c1d..bfbd4207d075 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -162,8 +162,9 @@ struct sun4i_i2s_quirks { unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *); s8 (*get_sr)(const struct sun4i_i2s *, int); s8 (*get_wss)(const struct sun4i_i2s *, int); - int (*set_chan_cfg)(const struct sun4i_i2s *, - const struct snd_pcm_hw_params *); + int (*set_chan_cfg)(const struct sun4i_i2s *i2s, + unsigned int channels, unsigned int slots, + unsigned int slot_width); int (*set_fmt)(const struct sun4i_i2s *, unsigned int); }; @@ -399,10 +400,9 @@ static s8 sun8i_i2s_get_sr_wss(const struct sun4i_i2s *i2s, int width) } static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, - const struct snd_pcm_hw_params *params) + unsigned int channels, unsigned int slots, + unsigned int slot_width) { - unsigned int channels = params_channels(params); - /* Map the channels for playback and capture */ regmap_write(i2s->regmap, SUN4I_I2S_TX_CHAN_MAP_REG, 0x76543210); regmap_write(i2s->regmap, SUN4I_I2S_RX_CHAN_MAP_REG, 0x00003210); @@ -419,15 +419,11 @@ static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, } static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, - const struct snd_pcm_hw_params *params) + unsigned int channels, unsigned int slots, + unsigned int slot_width) { - unsigned int channels = params_channels(params); - unsigned int slots = channels; unsigned int lrck_period; - if (i2s->slots) - slots = i2s->slots; - /* Map the channels for playback and capture */ regmap_write(i2s->regmap, SUN8I_I2S_TX_CHAN_MAP_REG, 0x76543210); regmap_write(i2s->regmap, SUN8I_I2S_RX_CHAN_MAP_REG, 0x76543210); @@ -452,11 +448,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, case SND_SOC_DAIFMT_DSP_B: case SND_SOC_DAIFMT_LEFT_J: case SND_SOC_DAIFMT_RIGHT_J: - lrck_period = params_physical_width(params) * slots; + lrck_period = slot_width * slots; break; case SND_SOC_DAIFMT_I2S: - lrck_period = params_physical_width(params); + lrck_period = slot_width; break; default: @@ -492,7 +488,7 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, if (i2s->slot_width) slot_width = i2s->slot_width; - ret = i2s->variant->set_chan_cfg(i2s, params); + ret = i2s->variant->set_chan_cfg(i2s, channels, slots, slot_width); if (ret < 0) { dev_err(dai->dev, "Invalid channel configuration\n"); return ret; From patchwork Sun Oct 11 20:22:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 284619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BD5CC43457 for ; Sun, 11 Oct 2020 20:24:59 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE10A215A4 for ; Sun, 11 Oct 2020 20:24:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="bqolA0Oc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vKGegJ3M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE10A215A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E13521667; Sun, 11 Oct 2020 22:24:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E13521667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602447897; bh=2NJWIOs2rHJFOm1HzOsGOpehgaWl21X1bH/qQ/wFW2U=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=bqolA0OcyghcA41P3PYVz096xqYrH9/CaryzHPskMPMCXM6e9BB7TvPgXEvt7IHHp tr8f++OccTKN7UoMd8qO3tGa5UApEeFlQJrXnUG1I3t3wkTllWoRXktII+xoAK0C7H eowZTZghAkCPylwZAFVUeQiY7KM1BNYAgKPWVWuM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C3A10F8025F; Sun, 11 Oct 2020 22:22:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F3E02F80260; Sun, 11 Oct 2020 22:22:46 +0200 (CEST) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 64951F80228 for ; Sun, 11 Oct 2020 22:22:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 64951F80228 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="vKGegJ3M" Received: by mail-qk1-x742.google.com with SMTP id b69so16038340qkg.8 for ; Sun, 11 Oct 2020 13:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PuoTVUSXpuIyvjStVJt+n8M2c23/+OzragQ7JT1d9Qw=; b=vKGegJ3M4WlCm33TGFvtmg9/bZ+awZFtRJzmdNNpmqvCF9PEQVQNfBnV0kIIsDIEQO HbwhZ8fhlXN1Xi0bWwBwCD47yQL1TfRON1jcdZyrKqpwUSGJDLpBR8q+4A5/PJYUd/UE 2tvWif2fGhlNWiPcsBn/L8RPjq9PYuLMW1S1fKdt4O3DTjK1YHbOAr+0ni0Pa64/J/9S ps0SIXidLk4DqekPspm5SPvQ+hKJmG2S6pulejMQn+cnr00rsHZMikZlvp2I+nMsdcHh v3CEn1AtqRNWXoImDICbmbMHRwtEr4u3bYBpMNlALWFoOz2Jf0ql7/jredcqj132B7r7 SRsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PuoTVUSXpuIyvjStVJt+n8M2c23/+OzragQ7JT1d9Qw=; b=o6QUbcw+IyD04hUX/HGE9RmzdZddchH6THOyebH9MUtYWEBGzClA+OOk3D3MRQ1ZqU Uj4t7K7VV72WorVtwZubNrSgqClB+MNc4HzeVMG6rzXg+CeGSi4eaiXXmjNIqI3YFvFW vuLrNfH9PAF4pNJa8y+ux8q66ED5kEnLv05vjDoACUev93By9ehLVSGfQAVPNLUDsMvo NOlsRhLBKiLafDETxs1WAycB3AdTqrNiiMRw1cixQnOsXzt1gfdr4Dm1Cl8dDEppg3S/ CvUZcz3OaiA31dZr8457rOWhwpmA5nXczA3Z1oDtbnFWmXpT98668ZQI7OLe/fhlGmMl kfEg== X-Gm-Message-State: AOAM5324Xt6OLCvnYxh4qjWHOFrLnWGARnC89IBpac/MwjYn7vcvPJ85 fuNvAG/E8dSx6SPxSglmcmc= X-Google-Smtp-Source: ABdhPJw17YejgzV9mSLlyjSFM7yd2OxVck63PnhIwVO81/jZwsGIZLpL1GB6TNfvoJw/tiM/yv7S8Q== X-Received: by 2002:a05:620a:486:: with SMTP id 6mr6999077qkr.145.1602447758009; Sun, 11 Oct 2020 13:22:38 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:37 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 02/14] ASoC: sun4i-i2s: Add support for H6 I2S Date: Sun, 11 Oct 2020 22:22:12 +0200 Message-Id: <20201011202224.47544-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Jernej Skrabec H6 I2S is very similar to that in H3, except it supports up to 16 channels. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 222 ++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index bfbd4207d075..1f577dbc20a6 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -124,6 +124,21 @@ #define SUN8I_I2S_RX_CHAN_SEL_REG 0x54 #define SUN8I_I2S_RX_CHAN_MAP_REG 0x58 +/* Defines required for sun50i-h6 support */ +#define SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK GENMASK(21, 20) +#define SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset) ((offset) << 20) +#define SUN50I_H6_I2S_TX_CHAN_SEL_MASK GENMASK(19, 16) +#define SUN50I_H6_I2S_TX_CHAN_SEL(chan) ((chan - 1) << 16) +#define SUN50I_H6_I2S_TX_CHAN_EN_MASK GENMASK(15, 0) +#define SUN50I_H6_I2S_TX_CHAN_EN(num_chan) (((1 << num_chan) - 1)) + +#define SUN50I_H6_I2S_TX_CHAN_MAP0_REG 0x44 +#define SUN50I_H6_I2S_TX_CHAN_MAP1_REG 0x48 + +#define SUN50I_H6_I2S_RX_CHAN_SEL_REG 0x64 +#define SUN50I_H6_I2S_RX_CHAN_MAP0_REG 0x68 +#define SUN50I_H6_I2S_RX_CHAN_MAP1_REG 0x6C + struct sun4i_i2s; /** @@ -470,6 +485,60 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, return 0; } +static int sun50i_h6_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, + unsigned int channels, unsigned int slots, + unsigned int slot_width) +{ + unsigned int lrck_period; + + /* Map the channels for playback and capture */ + regmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP0_REG, 0xFEDCBA98); + regmap_write(i2s->regmap, SUN50I_H6_I2S_TX_CHAN_MAP1_REG, 0x76543210); + regmap_write(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_MAP0_REG, 0xFEDCBA98); + regmap_write(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_MAP1_REG, 0x76543210); + + /* Configure the channels */ + regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL(channels)); + regmap_update_bits(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL(channels)); + + regmap_update_bits(i2s->regmap, SUN8I_I2S_CHAN_CFG_REG, + SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM_MASK, + SUN8I_I2S_CHAN_CFG_TX_SLOT_NUM(channels)); + regmap_update_bits(i2s->regmap, SUN8I_I2S_CHAN_CFG_REG, + SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM_MASK, + SUN8I_I2S_CHAN_CFG_RX_SLOT_NUM(channels)); + + switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_DSP_A: + case SND_SOC_DAIFMT_DSP_B: + case SND_SOC_DAIFMT_LEFT_J: + case SND_SOC_DAIFMT_RIGHT_J: + lrck_period = slot_width * slots; + break; + + case SND_SOC_DAIFMT_I2S: + lrck_period = slot_width; + break; + + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, + SUN8I_I2S_FMT0_LRCK_PERIOD_MASK, + SUN8I_I2S_FMT0_LRCK_PERIOD(lrck_period)); + + regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_EN_MASK, + SUN50I_H6_I2S_TX_CHAN_EN(channels)); + + return 0; +} + static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) @@ -695,6 +764,108 @@ static int sun8i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, return 0; } +static int sun50i_h6_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, + unsigned int fmt) +{ + u32 mode, val; + u8 offset; + + /* + * DAI clock polarity + * + * The setup for LRCK contradicts the datasheet, but under a + * scope it's clear that the LRCK polarity is reversed + * compared to the expected polarity on the bus. + */ + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_IB_IF: + /* Invert both clocks */ + val = SUN8I_I2S_FMT0_BCLK_POLARITY_INVERTED; + break; + case SND_SOC_DAIFMT_IB_NF: + /* Invert bit clock */ + val = SUN8I_I2S_FMT0_BCLK_POLARITY_INVERTED | + SUN8I_I2S_FMT0_LRCLK_POLARITY_INVERTED; + break; + case SND_SOC_DAIFMT_NB_IF: + /* Invert frame clock */ + val = 0; + break; + case SND_SOC_DAIFMT_NB_NF: + val = SUN8I_I2S_FMT0_LRCLK_POLARITY_INVERTED; + break; + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT0_REG, + SUN8I_I2S_FMT0_LRCLK_POLARITY_MASK | + SUN8I_I2S_FMT0_BCLK_POLARITY_MASK, + val); + + /* DAI Mode */ + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_DSP_A: + mode = SUN8I_I2S_CTRL_MODE_PCM; + offset = 1; + break; + + case SND_SOC_DAIFMT_DSP_B: + mode = SUN8I_I2S_CTRL_MODE_PCM; + offset = 0; + break; + + case SND_SOC_DAIFMT_I2S: + mode = SUN8I_I2S_CTRL_MODE_LEFT; + offset = 1; + break; + + case SND_SOC_DAIFMT_LEFT_J: + mode = SUN8I_I2S_CTRL_MODE_LEFT; + offset = 0; + break; + + case SND_SOC_DAIFMT_RIGHT_J: + mode = SUN8I_I2S_CTRL_MODE_RIGHT; + offset = 0; + break; + + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, + SUN8I_I2S_CTRL_MODE_MASK, mode); + regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset)); + regmap_update_bits(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_SEL_REG, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET_MASK, + SUN50I_H6_I2S_TX_CHAN_SEL_OFFSET(offset)); + + /* DAI clock master masks */ + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBS_CFS: + /* BCLK and LRCLK master */ + val = SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT; + break; + + case SND_SOC_DAIFMT_CBM_CFM: + /* BCLK and LRCLK slave */ + val = 0; + break; + + default: + return -EINVAL; + } + + regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, + SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT, + val); + + return 0; +} + static int sun4i_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) { struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai); @@ -975,6 +1146,22 @@ static const struct reg_default sun8i_i2s_reg_defaults[] = { { SUN8I_I2S_RX_CHAN_MAP_REG, 0x00000000 }, }; +static const struct reg_default sun50i_h6_i2s_reg_defaults[] = { + { SUN4I_I2S_CTRL_REG, 0x00060000 }, + { SUN4I_I2S_FMT0_REG, 0x00000033 }, + { SUN4I_I2S_FMT1_REG, 0x00000030 }, + { SUN4I_I2S_FIFO_CTRL_REG, 0x000400f0 }, + { SUN4I_I2S_DMA_INT_CTRL_REG, 0x00000000 }, + { SUN4I_I2S_CLK_DIV_REG, 0x00000000 }, + { SUN8I_I2S_CHAN_CFG_REG, 0x00000000 }, + { SUN8I_I2S_TX_CHAN_SEL_REG, 0x00000000 }, + { SUN50I_H6_I2S_TX_CHAN_MAP0_REG, 0x00000000 }, + { SUN50I_H6_I2S_TX_CHAN_MAP1_REG, 0x00000000 }, + { SUN50I_H6_I2S_RX_CHAN_SEL_REG, 0x00000000 }, + { SUN50I_H6_I2S_RX_CHAN_MAP0_REG, 0x00000000 }, + { SUN50I_H6_I2S_RX_CHAN_MAP1_REG, 0x00000000 }, +}; + static const struct regmap_config sun4i_i2s_regmap_config = { .reg_bits = 32, .reg_stride = 4, @@ -1002,6 +1189,19 @@ static const struct regmap_config sun8i_i2s_regmap_config = { .volatile_reg = sun8i_i2s_volatile_reg, }; +static const struct regmap_config sun50i_h6_i2s_regmap_config = { + .reg_bits = 32, + .reg_stride = 4, + .val_bits = 32, + .max_register = SUN50I_H6_I2S_RX_CHAN_MAP1_REG, + .cache_type = REGCACHE_FLAT, + .reg_defaults = sun50i_h6_i2s_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(sun50i_h6_i2s_reg_defaults), + .writeable_reg = sun4i_i2s_wr_reg, + .readable_reg = sun8i_i2s_rd_reg, + .volatile_reg = sun8i_i2s_volatile_reg, +}; + static int sun4i_i2s_runtime_resume(struct device *dev) { struct sun4i_i2s *i2s = dev_get_drvdata(dev); @@ -1160,6 +1360,24 @@ static const struct sun4i_i2s_quirks sun50i_a64_codec_i2s_quirks = { .set_fmt = sun4i_i2s_set_soc_fmt, }; +static const struct sun4i_i2s_quirks sun50i_h6_i2s_quirks = { + .has_reset = true, + .reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG, + .sun4i_i2s_regmap = &sun50i_h6_i2s_regmap_config, + .field_clkdiv_mclk_en = REG_FIELD(SUN4I_I2S_CLK_DIV_REG, 8, 8), + .field_fmt_wss = REG_FIELD(SUN4I_I2S_FMT0_REG, 0, 2), + .field_fmt_sr = REG_FIELD(SUN4I_I2S_FMT0_REG, 4, 6), + .bclk_dividers = sun8i_i2s_clk_div, + .num_bclk_dividers = ARRAY_SIZE(sun8i_i2s_clk_div), + .mclk_dividers = sun8i_i2s_clk_div, + .num_mclk_dividers = ARRAY_SIZE(sun8i_i2s_clk_div), + .get_bclk_parent_rate = sun8i_i2s_get_bclk_parent_rate, + .get_sr = sun8i_i2s_get_sr_wss, + .get_wss = sun8i_i2s_get_sr_wss, + .set_chan_cfg = sun50i_h6_i2s_set_chan_cfg, + .set_fmt = sun50i_h6_i2s_set_soc_fmt, +}; + static int sun4i_i2s_init_regmap_fields(struct device *dev, struct sun4i_i2s *i2s) { @@ -1329,6 +1547,10 @@ static const struct of_device_id sun4i_i2s_match[] = { .compatible = "allwinner,sun50i-a64-codec-i2s", .data = &sun50i_a64_codec_i2s_quirks, }, + { + .compatible = "allwinner,sun50i-h6-i2s", + .data = &sun50i_h6_i2s_quirks, + }, {} }; MODULE_DEVICE_TABLE(of, sun4i_i2s_match); From patchwork Sun Oct 11 20:22:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 269484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54073C433E7 for ; Sun, 11 Oct 2020 20:25:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A33802145D for ; Sun, 11 Oct 2020 20:25:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="BfgWttcn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="viDAZe4T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A33802145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E24BC1669; Sun, 11 Oct 2020 22:24:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E24BC1669 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602447919; bh=8E/YBwacHbW1RXXd+Te5ViurSv0InxBOazmbEC8tt44=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BfgWttcnVHzAoGU2IYmOyxQEZDCYsA88A1/SfIX9uxQINd29GJ+T7SVAtmm4SRk4e r3s4q5EKkW5BfHmPCy+I6BTNB3YFy8tFVAidIn4ZwSTO60htJGU1x76rwOIUH4EKBJ QbPS2x0nTWCV0ldmtxMexaPjP90Pp/yo8Ae0B6b0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C7C75F8027B; Sun, 11 Oct 2020 22:22:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4ED4FF8027B; Sun, 11 Oct 2020 22:22:50 +0200 (CEST) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 10AA5F8013C for ; Sun, 11 Oct 2020 22:22:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 10AA5F8013C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="viDAZe4T" Received: by mail-qk1-x741.google.com with SMTP id c2so16016748qkf.10 for ; Sun, 11 Oct 2020 13:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ea2bMDY+7Atak4iYHdqvWHBnQ1Tr+61Ua/grysCoKFo=; b=viDAZe4TMWEol4DAJzWCfa6i/wuSbOyc/in/X1txkZUzrqm9Ose0DRvE7Q8Pgz6Bo1 Rk4NchWulvwKBTrPlj86iVV8JvIO6Ks8n8yzIwBCI+O0/ZBMvo0c7MZL3mqp39apBEz9 D8QyVt5Eo4sWoy0VlVDSAmg73gSsHsERuHNHdHqxzgh7CwRaErLMQy4ZUG9ALszimNw6 vJhjODhex4JjjXg9bDPdwoAdLuEBv81CWs7QzEFDCpKe0kHkD3RK8LZs0NjGZX6f2leM X4tzuOCWRhwDGbkesUSdzW6R4MCwyNMt0RXGI6XJSnNxLnjEXY7z0WUEUCbad2ncYrhT rUfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ea2bMDY+7Atak4iYHdqvWHBnQ1Tr+61Ua/grysCoKFo=; b=fN0FEX1tXzR+RzWAJdN7eragNzGWiwOwMalodsxjmqJx0AN+vQMt+TwUcaYGEaYhXs ojzMITZte9BMCFzyXbSF9pLNGUp5RgOd8Mrd/n8ULJ9i8v8Tz0cUpMXX1Y9EiIc7QIip 8aMo79idry0HjtmJYDlVR62EDACKKjApUVhdKffk2TNbQ9N/ZcBh1Mqq32xPKMScY2hU oj777tFLUTxh4Qk70em3Wh+8IrpH2jI9rH/qhQ4FCwD3GhT7LmOtadjQjl3HFRTdGadp 7/69zuixvrg1R8qihMdI2f/z2YodtlmsbtjZakbdqC9cB8oaowIYpJe+mTmUxozg78Df hiIw== X-Gm-Message-State: AOAM5317qVbFbsLZcu0Z1f8SPIYoB1PwgKDm3f8cqJ/efZ/MQl+Lv+wb y5JyQTocYQOwPFN7DMyThZE= X-Google-Smtp-Source: ABdhPJxlKKKEsMVcozlozKKv5SKcqI62kC61EAd/GfvQBlf1yWRaMfjo0s9NSo2xkXj6XjwtuLv2QQ== X-Received: by 2002:a37:7286:: with SMTP id n128mr7136938qkc.423.1602447760882; Sun, 11 Oct 2020 13:22:40 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:40 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 03/14] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit Date: Sun, 11 Oct 2020 22:22:13 +0200 Message-Id: <20201011202224.47544-4-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" We are actually using a complex formula to just return a bunch of simple values. Also this formula is wrong for sun4i when calling get_wss() the function return 4 instead of 3. Replace this with a simpler switch case. Also drop the i2s params which is unused and return a simple int as returning an error code could be out of range for an s8 and there is no optim to return a s8 here. Fixes: 619c15f7fac9 ("ASoC: sun4i-i2s: Change SR and WSS computation") Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 69 +++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 1f577dbc20a6..f1fdb9a0ba54 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -175,8 +175,8 @@ struct sun4i_i2s_quirks { unsigned int num_mclk_dividers; unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *); - s8 (*get_sr)(const struct sun4i_i2s *, int); - s8 (*get_wss)(const struct sun4i_i2s *, int); + int (*get_sr)(unsigned int width); + int (*get_wss)(unsigned int width); int (*set_chan_cfg)(const struct sun4i_i2s *i2s, unsigned int channels, unsigned int slots, unsigned int slot_width); @@ -381,37 +381,56 @@ static int sun4i_i2s_set_clk_rate(struct snd_soc_dai *dai, return 0; } -static s8 sun4i_i2s_get_sr(const struct sun4i_i2s *i2s, int width) +static int sun4i_i2s_get_sr(unsigned int width) { - if (width < 16 || width > 24) - return -EINVAL; - - if (width % 4) - return -EINVAL; + switch (width) { + case 16: + return 0; + case 20: + return 1; + case 24: + return 2; + } - return (width - 16) / 4; + return -EINVAL; } -static s8 sun4i_i2s_get_wss(const struct sun4i_i2s *i2s, int width) +static int sun4i_i2s_get_wss(unsigned int width) { - if (width < 16 || width > 32) - return -EINVAL; - - if (width % 4) - return -EINVAL; + switch (width) { + case 16: + return 0; + case 20: + return 1; + case 24: + return 2; + case 32: + return 3; + } - return (width - 16) / 4; + return -EINVAL; } -static s8 sun8i_i2s_get_sr_wss(const struct sun4i_i2s *i2s, int width) +static int sun8i_i2s_get_sr_wss(unsigned int width) { - if (width % 4) - return -EINVAL; - - if (width < 8 || width > 32) - return -EINVAL; + switch (width) { + case 8: + return 1; + case 12: + return 2; + case 16: + return 3; + case 20: + return 4; + case 24: + return 5; + case 28: + return 6; + case 32: + return 7; + } - return (width - 8) / 4 + 1; + return -EINVAL; } static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, @@ -574,11 +593,11 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, } i2s->playback_dma_data.addr_width = width; - sr = i2s->variant->get_sr(i2s, word_size); + sr = i2s->variant->get_sr(word_size); if (sr < 0) return -EINVAL; - wss = i2s->variant->get_wss(i2s, slot_width); + wss = i2s->variant->get_wss(slot_width); if (wss < 0) return -EINVAL; From patchwork Sun Oct 11 20:22:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 284618 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98529C433E7 for ; Sun, 11 Oct 2020 20:25:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B4CD32145D for ; Sun, 11 Oct 2020 20:25:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="EIXqoen5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ibJHGgWN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4CD32145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E27951680; Sun, 11 Oct 2020 22:25:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E27951680 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602447953; bh=yoVx1lxz9kEI3sYp81eehK2eyHkplLu9tgRB2xBU/Tw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EIXqoen5VmxPiGLq8DDHlMlfbPeY871/TlKRKtBy/ZcvqsGBAx5TVIdB4Op0nvXPp Y2ylrSw6BsJFcgG+RC5hCYfaQTWaioZLNfTXrz6DUVDVCcm+8s0cvVmsKcri1pyLEk +5TvLAiP1+I8frGH3lGbrEZXumvlz4PbRvBhZ4jM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9CE49F80289; Sun, 11 Oct 2020 22:22:54 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DA875F80289; Sun, 11 Oct 2020 22:22:52 +0200 (CEST) Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B0AD3F8025A for ; Sun, 11 Oct 2020 22:22:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B0AD3F8025A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ibJHGgWN" Received: by mail-qv1-xf43.google.com with SMTP id cv1so7509140qvb.2 for ; Sun, 11 Oct 2020 13:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ej9LaMzdEDJzAv73zOk0RleDj1ZozYjS69cI8rWWfxc=; b=ibJHGgWNe58D+ZWWll+jyrm/aFvW8UbvR7UWQl8ZKfmiHCbfTmMkrhu5sirtDTBRnG sknip4P9927xR3HdHyeQKHK31qz5GsK/7+RQ27E0ib0HOJIhC0CD6p/c0tSLOEsDJrhP UTBEusoitsD6au7M6sKUx1BpmHrIooiDaH3S8qdWECF/Ut2hhXURTw10ZR5Sv5aevuN6 n2t67HXwSk6Tw7PCINGWbNZEt+TZaABIY7/KGT9ovV490HXqsneu8u9aubLnheiUjrWA kX279bsxByyzpa84RZl4FabqxhgN7MyGd4JCEpBHZtIom3aOe/ZP5aWcxDRUBN4Hsu8k Nh9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ej9LaMzdEDJzAv73zOk0RleDj1ZozYjS69cI8rWWfxc=; b=Y1xJNLIfcnVJP47stZJpvS2tGXzq3pgJCM5DdBSfNvsvSR1KYU/pIBOxAbxerbSH8Q Ac7Sed5U+G6ZNiokH81MBOCDdyInd1se4ou+2WD9k5PaOzynVDDJtYV7Efc9b6H4lP4M DarxgqTUAoiUD8kFROhulVPknTrb7G2Y0UgJckL6e58vnaPbXDRZKu5tg6eJIUePN8FR 38+dzHPfBQqPDU7fk017pr4BuJbIaDTC3yvqDrp34paLw/G+oJDEkhvDShb+xTC1QUQU e7EdoJCiC0ueNnYYpj2IoIbJizKcTxwg27Yv7VhmahimeQPkRwWi4/eqLCIYeMXTzHFu m+vw== X-Gm-Message-State: AOAM5324/cLNSAPZjDeXDXsyzXHu94ZTo+2tdQ59rvEUq7fdm+8xJg9n V7+jCgCHzy5qXiYijuN19II= X-Google-Smtp-Source: ABdhPJwxyTc2lV7O80r6JC3IOUNs/0lfy1N96E6phkDM0nOjdIK2iS8nTr/v+HmLPeNRuwsV9hPPkA== X-Received: by 2002:ad4:4105:: with SMTP id i5mr17777300qvp.47.1602447763738; Sun, 11 Oct 2020 13:22:43 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:43 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 04/14] ASoC: sun4i-i2s: Set sign extend sample Date: Sun, 11 Oct 2020 22:22:14 +0200 Message-Id: <20201011202224.47544-5-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Marcus Cooper On the newer SoCs such as the H3 and A64 this is set by default to transfer a 0 after each sample in each slot. However the A10 and A20 SoCs that this driver was developed on had a default setting where it padded the audio gain with zeros. This isn't a problem while we have only support for 16bit audio but with larger sample resolution rates in the pipeline then SEXT bits should be cleared so that they also pad at the LSB. Without this the audio gets distorted. Set sign extend sample for all the sunxi generations even if they are not affected. This will keep consistency and avoid relying on default. Signed-off-by: Marcus Cooper Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index f1fdb9a0ba54..0b242f4615fe 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -48,6 +48,9 @@ #define SUN4I_I2S_FMT0_FMT_I2S (0 << 0) #define SUN4I_I2S_FMT1_REG 0x08 +#define SUN4I_I2S_FMT1_REG_SEXT_MASK BIT(8) +#define SUN4I_I2S_FMT1_REG_SEXT(sext) ((sext) << 8) + #define SUN4I_I2S_FIFO_TX_REG 0x0c #define SUN4I_I2S_FIFO_RX_REG 0x10 @@ -105,6 +108,9 @@ #define SUN8I_I2S_FMT0_BCLK_POLARITY_INVERTED (1 << 7) #define SUN8I_I2S_FMT0_BCLK_POLARITY_NORMAL (0 << 7) +#define SUN8I_I2S_FMT1_REG_SEXT_MASK GENMASK(5, 4) +#define SUN8I_I2S_FMT1_REG_SEXT(sext) ((sext) << 4) + #define SUN8I_I2S_INT_STA_REG 0x0c #define SUN8I_I2S_FIFO_TX_REG 0x20 @@ -678,6 +684,7 @@ static int sun4i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, } regmap_update_bits(i2s->regmap, SUN4I_I2S_CTRL_REG, SUN4I_I2S_CTRL_MODE_MASK, val); + return 0; } @@ -780,6 +787,11 @@ static int sun8i_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT, val); + /* Set sign extension to pad out LSB with 0 */ + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT1_REG, + SUN8I_I2S_FMT1_REG_SEXT_MASK, + SUN8I_I2S_FMT1_REG_SEXT(0)); + return 0; } @@ -882,6 +894,11 @@ static int sun50i_h6_i2s_set_soc_fmt(const struct sun4i_i2s *i2s, SUN8I_I2S_CTRL_BCLK_OUT | SUN8I_I2S_CTRL_LRCK_OUT, val); + /* Set sign extension to pad out LSB with 0 */ + regmap_update_bits(i2s->regmap, SUN4I_I2S_FMT1_REG, + SUN8I_I2S_FMT1_REG_SEXT_MASK, + SUN8I_I2S_FMT1_REG_SEXT(0)); + return 0; } From patchwork Sun Oct 11 20:22:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 284617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B245C433DF for ; Sun, 11 Oct 2020 20:26:48 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 92AC12145D for ; Sun, 11 Oct 2020 20:26:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Pbm7pU6g"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IyS1xQwe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92AC12145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DA274167D; Sun, 11 Oct 2020 22:25:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DA274167D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448005; bh=VbaJ/GhQ+7eiMd2/GZRdXWjlLv07LNVYOadz4G8eKEc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Pbm7pU6gCIh18kMd8WPNCchZgGnxmGD/ch6mwmk0CnhUynaPGywIh93qouBCol6MC 1NVcKQjFtm6Eu98a430VlZ1mV9Z+nCANhILnZzS6GBuKtRk1jqkJUXnXjOIsCOsyEB mDWbWSBl17RS5QVmksWDcvyCS2XVryrHyGJfUHck= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A7434F8029A; Sun, 11 Oct 2020 22:23:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B60BBF8028E; Sun, 11 Oct 2020 22:22:54 +0200 (CEST) Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 984B4F80260 for ; Sun, 11 Oct 2020 22:22:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 984B4F80260 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IyS1xQwe" Received: by mail-qv1-xf41.google.com with SMTP id t6so3383497qvz.4 for ; Sun, 11 Oct 2020 13:22:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X6foTdNByYaza+7IioC5Au+dQ6O1jD1KqRZFfbjoYWg=; b=IyS1xQweqtX7I7JqvRg2RP8mWx2QwzjtmI9o5PT8TY3EyXm5m+AhdZV8JyiEnRfj+C SQXu8zpe8zE/rjyALoawdUk2XiW070CIgVf+rojhN9sq2vbPHwPwMCFDfTkKrZxPf0pf FHnN2JVCP3rlT1ZSFjUgDXHZ3kGk7ZfgI9J70NuBV+R7H6orPbErWEGODJFUbdqnPWN5 FjFKLBsRvYbECj/5LjRVLy/7pPAi+nB0Vu1e40h9dBoc/bSke8FSLbbyQuNH3EY5vNJB 9EQjj1Tu24/533R2j0HvHo3yRw8Qka3QAM7j0MbMhWPN+8UwdZkezRz1CzXOPYBAVUva n5tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X6foTdNByYaza+7IioC5Au+dQ6O1jD1KqRZFfbjoYWg=; b=e5BIP15E2ynXdUuWExU7KSVcEhvg2WEg1hiXXskFWeSqbXP4ItcE4kbG5qfZAljzmq 0SKzEwWCmSHZNK8iF65UZbRbREGuGAi2Uz22L5WbnCloS8WZvmVdDa4AMvASQqt7f5/H GRACPRXop+qujGm3sbKy2F1YvY0Dizk9zSgFNAva9SEShr+GVVC/ck53hPy/Az9QQMU5 mPk//3MYY9nGAiTvzxF+dE2O4J9otnMOQJNgVBW7/pq8CX0G/mIP+v9RAuLIm1JK3cuf lvhaF3xlc7sv9gFGrtiIMtByAHrUuQ+KahzQ4bIRZj9Maf5xb82sczsz5KLP5DMA3Iui 3x1Q== X-Gm-Message-State: AOAM53312RqHdoHl19lrGtnD8pT7lsJYgSRuzcfjc27fDR2oo9Vs5IRa d9Seubez2fKxV1BZZx5uxgM= X-Google-Smtp-Source: ABdhPJx+NO8hs3nQcTr1w1RkQ757q0aA38ZZh4DW7nzWF80tK2zH2HXQsw2IZdsZOYXzR6xqYtxNig== X-Received: by 2002:a05:6214:153:: with SMTP id x19mr3061824qvs.50.1602447766535; Sun, 11 Oct 2020 13:22:46 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:45 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 05/14] ASoc: sun4i-i2s: Add 20 and 24 bit support Date: Sun, 11 Oct 2020 22:22:15 +0200 Message-Id: <20201011202224.47544-6-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Marcus Cooper Extend the functionality of the driver to include support of 20 and 24 bits per sample. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 0b242f4615fe..d5eba58ff207 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -592,6 +592,9 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, case 16: width = DMA_SLAVE_BUSWIDTH_2_BYTES; break; + case 32: + width = DMA_SLAVE_BUSWIDTH_4_BYTES; + break; default: dev_err(dai->dev, "Unsupported physical sample width: %d\n", params_physical_width(params)); @@ -1073,6 +1076,10 @@ static int sun4i_i2s_dai_probe(struct snd_soc_dai *dai) return 0; } +#define SUN4I_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S20_LE | \ + SNDRV_PCM_FMTBIT_S24_LE) + static struct snd_soc_dai_driver sun4i_i2s_dai = { .probe = sun4i_i2s_dai_probe, .capture = { @@ -1080,14 +1087,14 @@ static struct snd_soc_dai_driver sun4i_i2s_dai = { .channels_min = 1, .channels_max = 8, .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = SUN4I_FORMATS, }, .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 8, .rates = SNDRV_PCM_RATE_8000_192000, - .formats = SNDRV_PCM_FMTBIT_S16_LE, + .formats = SUN4I_FORMATS, }, .ops = &sun4i_i2s_dai_ops, .symmetric_rates = 1, From patchwork Sun Oct 11 20:22:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 269483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9812C433DF for ; Sun, 11 Oct 2020 20:26:19 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F33F12145D for ; Sun, 11 Oct 2020 20:26:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Djs7jtdJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="huxRfQy1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F33F12145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3FF901664; Sun, 11 Oct 2020 22:25:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3FF901664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602447977; bh=B/4mO1NZ+vxnJArUurTBkOOdOOiBkbjKczb26OhvNto=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Djs7jtdJ58LFwIrRMP5uHi3DG96l9j/QJeO8sthDC5bWs72Z4aSf/KOTzKKYWrcE6 CIk0oai8PzEvw6Kwjchf+fuHOWn7NaaKWlZVdW3IMKPJwt9dfD+VYu5vnx/x8SBjLe l0I1CVLLeucP/tZOUD09PCr5UJ6B9gxb9I0r/0Es= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 83ED1F80297; Sun, 11 Oct 2020 22:22:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B09F0F8028A; Sun, 11 Oct 2020 22:22:53 +0200 (CEST) Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com [IPv6:2607:f8b0:4864:20::f41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B4F9FF80279 for ; Sun, 11 Oct 2020 22:22:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B4F9FF80279 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="huxRfQy1" Received: by mail-qv1-xf41.google.com with SMTP id cv1so7509201qvb.2 for ; Sun, 11 Oct 2020 13:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Qc7Gl1pDl54reD6hY+CiR+N1U9m+7coVho5OHQ+G7Yo=; b=huxRfQy1nVMvnp7b6tJdyCptvLU/nlZoB4Y54X8r9LvWMldLOYTlBfEwzRu6sYIxis vW7fgNZmOgEoK4/sZtcJjcOkDV+45rgPmtghqzSdv1YnF0SzkrwRAxpxRE0WszBpUIuJ pk3TMt0Il8Crua4I5YrahTiUZlcXOzQE2iZBaEPsfR42vu3O+4qIFXTx9TkQsg8w2PHY C32A/UXRIsmtwXtMxCFDkp2Vaj5MymUL0TRyK/G2dCCyMaPdurQM+C+9Ehi2DzPftZuu D7Mzl41zNAKomwG+5V6QQsJmODTNlZE3snaP7iYDVTQSUhv/nL0vWFdIdNwt98SmpIBX y4hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Qc7Gl1pDl54reD6hY+CiR+N1U9m+7coVho5OHQ+G7Yo=; b=sf13BbQzSfw8qqRyHjvm66rmhRb0GXWxhiFsS3l+GKb5o48tDHMTJriiDt4QqltnK9 8oI0O2Gc8P3CWidmlkOMw9boDzP2Jgxe3csdCaelFkwX9iecP9y1FXe28wDTCDo2GPFX PtFdCSXFRVCx8KsafNfnIci5M4aZvMqL3g8pSqitegG4ziqmcVSSQTmK9HWSPHVbdweg +DN4ebLvy0W77WyOVpcuIeXF5lzNN9WTsheqWRR/A+jPkDaFhZsAkydeU7FFI14ua47m nxUutUj9tPaHSyl35qzUm+zaz3oU0/JlGotBZ7QprW5V2appZp9t9AOnwieOJdlkg0+b jBEg== X-Gm-Message-State: AOAM533aimLiuLSUG2YYFJBIeI04M0Vrd7t3QEiN0E2pwV+NTzbeoUy7 3mtZkq4UWqu8SvaY0l9RMSA= X-Google-Smtp-Source: ABdhPJwt/1LkDKNRn2qBy0MTm6ZGT2I7f49RSR1PoNRrozMbVyyczsSoLMl4C5nqm3BaMjH3bC2K/Q== X-Received: by 2002:a0c:cc0d:: with SMTP id r13mr16175026qvk.6.1602447769387; Sun, 11 Oct 2020 13:22:49 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:48 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 06/14] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Sun, 11 Oct 2020 22:22:16 +0200 Message-Id: <20201011202224.47544-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The FIFO TX reg is volatile and sun8i i2s register mapping is different from sun4i. Even if in this case it's doesn't create an issue, Avoid setting some regs that are undefined in sun8i. Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index d5eba58ff207..3fc0bd818539 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1154,12 +1154,19 @@ static bool sun8i_i2s_rd_reg(struct device *dev, unsigned int reg) static bool sun8i_i2s_volatile_reg(struct device *dev, unsigned int reg) { - if (reg == SUN8I_I2S_INT_STA_REG) + switch (reg) { + case SUN4I_I2S_FIFO_CTRL_REG: + case SUN4I_I2S_FIFO_RX_REG: + case SUN4I_I2S_FIFO_STA_REG: + case SUN4I_I2S_RX_CNT_REG: + case SUN4I_I2S_TX_CNT_REG: + case SUN8I_I2S_FIFO_TX_REG: + case SUN8I_I2S_INT_STA_REG: return true; - if (reg == SUN8I_I2S_FIFO_TX_REG) - return false; - return sun4i_i2s_volatile_reg(dev, reg); + default: + return false; + } } static const struct reg_default sun4i_i2s_reg_defaults[] = { From patchwork Sun Oct 11 20:22:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 284616 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CC79C433DF for ; Sun, 11 Oct 2020 20:27:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C8ADD206B6 for ; Sun, 11 Oct 2020 20:27:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="JnCBSqRk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d59DH9WL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8ADD206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4C0EB1690; Sun, 11 Oct 2020 22:26:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4C0EB1690 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448057; bh=GX/IVuA3uq8z+/cEd0kuKYVWPhSzAbhAmplNqT7o1nE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JnCBSqRkMqesNqFyoBGB8kWguA0SqBNhsBItLhBtYmZBTUI6xh5DeBo+hiVJ4ZzDt TfzhhjxnEdm1Bj4zbsAM5bA9nJydulzJZM5E1qSb3pwhGPgSmyUasy86QKjnZQx67v WXQC1ZVL3tpyjq3dkU6wufbY93YIxfFZm4vqyJ9g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7A3CBF802C3; Sun, 11 Oct 2020 22:23:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 88970F80298; Sun, 11 Oct 2020 22:22:59 +0200 (CEST) Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C3AEFF8025A for ; Sun, 11 Oct 2020 22:22:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C3AEFF8025A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d59DH9WL" Received: by mail-qk1-x741.google.com with SMTP id k9so1797479qki.6 for ; Sun, 11 Oct 2020 13:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8+oP++IDX+TWr9W8oZTbwkkM6rISpxgkl78X/PIuT+s=; b=d59DH9WLcL+dOgLluVb9q429BtG4LALyLEUJQb+dDs/SB3Brrb/Yur83xfyq4UAiTe O5TGgXf4cySYKPIO3eo6FvB/jhuVmKM4JKUsTMIbyyTof7lJaCBNJTtqeENQ6la5WvBB 67WYBAizr3w45CndFLFp9EOuLnOQaFwCcl5DVcwAX4pUA6Ur4Dbc0xSN9WKzLn2DICvQ OcYtMs2vp5Dodz5uhIrqbCQQp7I8vPmq8XQkq7e57ZExLaYif4Kaxw6ePhrPsyfPziTy +cMggT3vrXmy7C1AhgdWZ1B1GO+PCbxSybWHrLmb9GVUx67hhsmKh87bo7nXpok/qJgv NOVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8+oP++IDX+TWr9W8oZTbwkkM6rISpxgkl78X/PIuT+s=; b=X347LDWbyAxxGNQ3zEa2BMRSQ6Wx57wAbW2pWVu+vMgQkQKizhGvfVG26n7eE7roCE Np6WuIXoNNTVYp5ItohU4NSatRuQdaUQv4ITXFqUG37w333lrqBW9UxCoScbtkQbH274 Q+3SS8mxiDYrWy1Q54rkJq009fOcCD4YTugHLw8SHgcbYmYUbMYPoK6rWfxZDic3B6UD PIZ0OWTJNM+TfsjpWGEKkXfc6yWJmN/TO0jU8CC52b+eUdkWcmkAG0haA3h64CgSt6wp FwOz2Z0jj1hmTV/w7mTlHzKAHtl9yWBOzOTDmGiIZ1ZvRUwSTjmZOmzA17b+4rnlMbnA AJ5Q== X-Gm-Message-State: AOAM531e7mh9/PeMOriyUlp1tIcAjgYJFo84PXM6qG4TJ7fX0XCOnw9N I7wJfeXGl/s0ALTd9IVUKU0= X-Google-Smtp-Source: ABdhPJwpkzOPa3fw7jDMn1v4AWa/1gBNcuwFcYb4ee8gA8XqsjEiJRn4mAIBI04Z9pSC2wW7MVi5lg== X-Received: by 2002:a37:a9c9:: with SMTP id s192mr7124715qke.128.1602447772374; Sun, 11 Oct 2020 13:22:52 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:51 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 07/14] ASoC: sun4i-i2s: Fix setting of FIFO modes Date: Sun, 11 Oct 2020 22:22:17 +0200 Message-Id: <20201011202224.47544-8-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, Samuel Holland , linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Samuel Holland Because SUN4I_I2S_FIFO_CTRL_REG is volatile, writes done while the regmap is cache-only are ignored. To work around this, move the configuration to a callback that runs while the ASoC core has a runtime PM reference to the device. Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 3fc0bd818539..e7b9dcbf82db 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -588,6 +588,13 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, return ret; } + /* Set significant bits in our FIFOs */ + regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, + SUN4I_I2S_FIFO_CTRL_TX_MODE_MASK | + SUN4I_I2S_FIFO_CTRL_RX_MODE_MASK, + SUN4I_I2S_FIFO_CTRL_TX_MODE(1) | + SUN4I_I2S_FIFO_CTRL_RX_MODE(1)); + switch (params_physical_width(params)) { case 16: width = DMA_SLAVE_BUSWIDTH_2_BYTES; @@ -916,13 +923,6 @@ static int sun4i_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) return ret; } - /* Set significant bits in our FIFOs */ - regmap_update_bits(i2s->regmap, SUN4I_I2S_FIFO_CTRL_REG, - SUN4I_I2S_FIFO_CTRL_TX_MODE_MASK | - SUN4I_I2S_FIFO_CTRL_RX_MODE_MASK, - SUN4I_I2S_FIFO_CTRL_TX_MODE(1) | - SUN4I_I2S_FIFO_CTRL_RX_MODE(1)); - i2s->format = fmt; return 0; From patchwork Sun Oct 11 20:22:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 269482 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB0E7C433DF for ; Sun, 11 Oct 2020 20:27:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 060762145D for ; Sun, 11 Oct 2020 20:27:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="ax+baWg4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EDKH1w+P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 060762145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2FAFC168C; Sun, 11 Oct 2020 22:26:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2FAFC168C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448030; bh=B492S0gbzMVEt7zK+0CeVGTw6bnlEScnnoe5BJP0QfA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ax+baWg4pArmc98AaYhTOGD9Qg2MABogHwJ15h2fmvQXJKnpEBr7u/dcUUTRJNUcM s1OPdOtPRflroIPSRR1aQC983uk0kpsP4LBZASm67NL2nVoJe3uxXPBwc5xpUVzkQ3 SC7PAAO1kCTzqlcQ1ADJh1ZHoYVwY8GBOylx9PL4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9B083F802B0; Sun, 11 Oct 2020 22:23:02 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 46CFFF80297; Sun, 11 Oct 2020 22:22:59 +0200 (CEST) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B7245F8028F for ; Sun, 11 Oct 2020 22:22:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B7245F8028F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EDKH1w+P" Received: by mail-qk1-x742.google.com with SMTP id z6so16077724qkz.4 for ; Sun, 11 Oct 2020 13:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pwVmd8q6/xF4Z/iHMmW565olMdZiqSSZzSQVJZEvMNY=; b=EDKH1w+PS9wgUBgnG0c+as4kzQfgC0b2YG2vs2aDcGRzieVlYK7mytge/Y3MduSU26 3Su8uO457kYU1XSQUHt5UWkmV5p8TS2YHH/4o78R4oSNJXO5YDKoIH0TbqRuFvpD1yys kTvGH41n0Fp1mqMSwIoUyPS+u1AtJ0VfgT9d0JU29RZ/D6RdFs6PfzOCAwlhxMx2/Ip8 tEUHdgWlSGncnaQxR/fcDlMwHr1MISd2TGniZnLY6wVDwCCUEVVRXytjcMfIG/4kfQdQ YWXmwG/Q9/5u2/yTRDHKhcaNFjpz9jlkRozeS8Pd4xyFlsjlFmXIq+Ld+S/0mVOVRhBH f1Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pwVmd8q6/xF4Z/iHMmW565olMdZiqSSZzSQVJZEvMNY=; b=H3Q5J49C6DfkiHBWxPnJA5hLrTa7njhc7nYcW3XtrvgGFs5DeCX88vgK8AxsUG1X++ 32GgM8UWVSiGRhxUEsSd60IE+dh0ZO4me31+zLmymzq51KZBWfe5TXaSOquCElYa4fvA cEXh/A6jMDgmkTtsSYKonedn7LvpuqzlVl6JuYk8+rAzUsxaST2d+FxvoBUjFe4JRgxu lgor30Uo/3QtI6B5UQXB1BeJnDCSZi8RCp8sgFpMHBIc6gO2fVpaP1RJUHM3BozdDXpA Q1mcEAICROg3PzMv9cmlbFoflkM2wYCrMwAbC4P5WGOYpu9HpIifom56Y+JJW5nenPLQ F6PQ== X-Gm-Message-State: AOAM530Kkat15If5766S8ktm8CNr0xrT6XcvYdGu3PPipBFPuWZP3Hfs u9fjth0QOmbKvgE0ixJkdyo= X-Google-Smtp-Source: ABdhPJwma7ATFj/LYHPNUv+5n9rjXATsJjvZSlxf7Dw7uRa+RqRYE9uSqoaU1C2eBCR3dxYMZttPuw== X-Received: by 2002:a37:6285:: with SMTP id w127mr7282847qkb.454.1602447775138; Sun, 11 Oct 2020 13:22:55 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:54 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 08/14] ASoC: sun4i-i2s: fix coding-style for callback definition Date: Sun, 11 Oct 2020 22:22:18 +0200 Message-Id: <20201011202224.47544-9-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Checkpatch script produces warning: WARNING: function definition argument 'const struct sun4i_i2s *' should also have an identifier name. Let's fix this by adding identifier name to get_bclk_parent_rate() and set_fmt() callback definition. Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index e7b9dcbf82db..b2923d4c03af 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -180,13 +180,13 @@ struct sun4i_i2s_quirks { const struct sun4i_i2s_clk_div *mclk_dividers; unsigned int num_mclk_dividers; - unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *); + unsigned long (*get_bclk_parent_rate)(const struct sun4i_i2s *i2s); int (*get_sr)(unsigned int width); int (*get_wss)(unsigned int width); int (*set_chan_cfg)(const struct sun4i_i2s *i2s, unsigned int channels, unsigned int slots, unsigned int slot_width); - int (*set_fmt)(const struct sun4i_i2s *, unsigned int); + int (*set_fmt)(const struct sun4i_i2s *i2s, unsigned int fmt); }; struct sun4i_i2s { From patchwork Sun Oct 11 20:22:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 269481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56FECC433E7 for ; Sun, 11 Oct 2020 20:28:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F5B020776 for ; Sun, 11 Oct 2020 20:28:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="qn2ZNCGe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f3tVxWzu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F5B020776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F19FC1684; Sun, 11 Oct 2020 22:27:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F19FC1684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448096; bh=BewnauDF/pdfaMjQKVYly+KokETkb3wOlXv4OXrcmmA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qn2ZNCGerRR4Tm2cPImCliJ/svxKOiKOeCCbvcsCDMZEuM160Jgxx0r4HAVh1HXcs tO+f1GF0dsg0UszP6DKsQ98BMQP5kU6goHv+PQpZNNc9AoZu7O6G0XTpi3OFiuH4J5 PwY6Fk0LCVnBhv+xni0qDDtgKncm+WTZoKJCGve4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EAEE6F802EC; Sun, 11 Oct 2020 22:23:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 40132F802C3; Sun, 11 Oct 2020 22:23:03 +0200 (CEST) Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 110CBF802A2 for ; Sun, 11 Oct 2020 22:23:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 110CBF802A2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f3tVxWzu" Received: by mail-qk1-x743.google.com with SMTP id q63so16070154qkf.3 for ; Sun, 11 Oct 2020 13:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oVJ/FVhCtH2Sw1ZFhzCNscPSk9Fte7d6nvWFGpvDBLs=; b=f3tVxWzuTZPM69wGJy32/sd4H9TTipQy1StiEG6HQgLlulOLuyLEVUcmr8ttGqLIYt IKGsj7o92pXBr1lHUWODiBZ0fw9P54JZbaB2fpfL3nOohglPuk6UgqUJfT8zUWl1ZgVZ 0DWWaC/1eZD1zFUZprA7ZXOPpCiLLkpXleeEgnqwxuJrP4U6BU+q/1eUiZb2Z0ulwXN/ vKxWNPAcCCIr9NJx1zhbvb9DYKhuhTwW5kQSUDlRjNh+Q2b5wvUYyQbdhSnFIJTHGieF MpM1XV6VLHyquwy/vmb9k6LuulmBvxUbGkeqYxk2YdLE0qfQaQCwMqdry1vAZ1VPDbFg hXfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oVJ/FVhCtH2Sw1ZFhzCNscPSk9Fte7d6nvWFGpvDBLs=; b=S6hCDxOvYV1ypDchEIGAdnHUUmFcO6wR5Y3pL8dr0m/DnXHJONmPQVkjRgE+5xJlqY 96RGu0WD3/UyAzESi1aVy0Qy+b4H6IIx5kBh9f6Ag5iNPYltpQOqUw+C99CMvt+7tcdJ HAoTKurQwktSA0P567CFYP8Cn/TlHl+vZeNiCJPPcmj8C21qokev0aI1ibNurqhoFN9X 8cNpEuKgYPemMmxRiiS7wKVmstLkD5I+ddhDnXRT6nHLqMYbgAIqlPR/ZkoAjtawdMOx 1kyAtNYWrEVjj5Zr3qXCjY40iLi6JTR2VnjarQozzSB8t5CG0BjGs9H9P/9fAfm/fhXC D1RA== X-Gm-Message-State: AOAM533w29Kx1u0MQa6zkOQpV0i/a0eZB11qMCSSFHycDLkK9K4H4R9h ggTRUBqSiVR5nHIh3ig8yQ4= X-Google-Smtp-Source: ABdhPJzHlhqV1xCQ0Op9gkdvmwU8yERM86DpAL4NgRdRLBxtYG5F0hRVc5gwImajV4zjbtoH3PUeCg== X-Received: by 2002:a37:a2cd:: with SMTP id l196mr6644348qke.201.1602447778306; Sun, 11 Oct 2020 13:22:58 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:22:57 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 09/14] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible Date: Sun, 11 Oct 2020 22:22:19 +0200 Message-Id: <20201011202224.47544-10-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, Rob Herring , linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Jernej Skrabec H6 I2S is very similar to H3, except that it supports up to 16 channels and thus few registers have fields on different position. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml index 112ae00d63c1..606ad2d884a8 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml @@ -24,6 +24,7 @@ properties: - items: - const: allwinner,sun50i-a64-i2s - const: allwinner,sun8i-h3-i2s + - const: allwinner,sun50i-h6-i2s reg: maxItems: 1 @@ -59,6 +60,7 @@ allOf: - allwinner,sun8i-a83t-i2s - allwinner,sun8i-h3-i2s - allwinner,sun50i-a64-codec-i2s + - allwinner,sun50i-h6-i2s then: required: From patchwork Sun Oct 11 20:22:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 284615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46693C433E7 for ; Sun, 11 Oct 2020 20:28:37 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9453B20776 for ; Sun, 11 Oct 2020 20:28:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="cJPMYI/F"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ju9mLKlx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9453B20776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 12757166E; Sun, 11 Oct 2020 22:27:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 12757166E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448115; bh=jByL7wceUKemAIpsigGbzjkZTh11zuZWY1O+VcfPAy4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cJPMYI/FHTKv1ATOUqGUUfImOyEoxxm6Jhv5Fy06/iJ0GMx/M/amyHBmk+CSAazrs tJHkH1+t2IGpd9SuzCgtAlIocewyQwh/dPQJg+Y2LPIRTImuECT78gLA7npN3i7CF/ /sm2AbCMxUD9V90uhARrO+Fx13EBpNVtBXK48l9U= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 157FCF802FE; Sun, 11 Oct 2020 22:23:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7E810F802FD; Sun, 11 Oct 2020 22:23:10 +0200 (CEST) Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 72C93F802E9 for ; Sun, 11 Oct 2020 22:23:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 72C93F802E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ju9mLKlx" Received: by mail-qt1-x844.google.com with SMTP id o21so12251335qtp.2 for ; Sun, 11 Oct 2020 13:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QarSYS8sybXOFMHVXdp4I9fWDCgninS8jZ0IjR0OesA=; b=ju9mLKlxw3juAmmBojbjHkfWaM40AnQp8UPcKR9h96fhqKzOMqWwGnEZDID6DR3PD6 3gBk2vYF5hAInG8yvPmtrvzRw8MuT0lrDz2FL2DR6SZEgwEP9iCafq4D4qvEbu9ldojS DnA4PLUF4rSo2VWOz0oYvZTA3zDqlBH2kTKiWoJeiZE/lVuyJl3AUDGcGWAd2zQHdFnU RJkKwEHgxhqfgIelq7/a5fbtsxW26zxGBKcq2Tf6gr195EEZ8pcjuPKN+2QRdVfvpjuP K19DhIDCCKBs7ovkKovNi44F1XMdot+Cod7tZcKXx50zZ7oftOgeMQl+TxAsEeoJVEO6 xzAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QarSYS8sybXOFMHVXdp4I9fWDCgninS8jZ0IjR0OesA=; b=NYyOUXvV3CcsBH/XbaotH0/ezQYcfqmevURj26Pt1KBP1Fz7uPgHxqMGyipf+eLh47 O0DMqgL3k/a01SBaa0dWmqlmWuf+YbDUT3RL5Si+nQY6ykiMvT6iAFExjXNhcBpqCn2S mK+XD29vLpSIsjX0IMjZf43BxfDZFMnIL6in0aOtpdbaYp7nL0sfAPFEc2n5b8c7JsTb cdMmgybCUupn6a0A3yUHGx36JBiTnDIqmomna42F8X+v/4ZzVWXFGdLcMIPsSr3Em2Pl 5phbXQN45e0GiRFexvTqDvq/8kKHwXLc1egPRXc+PvS5q34O8nVzwgfD8ARlpT9kDIfW Y94w== X-Gm-Message-State: AOAM531w7k+2yNC+sb5+NtUoDPY8wYdce+wYf5EGrKvx48c5hIRtf8xy E9+yIEB9/zRt8R9LPE7Cbpk= X-Google-Smtp-Source: ABdhPJzAzixTgaSYROUXiXsGI/6tpDiPOrHpKW9piKnWZsPwlY75HYWNTT8pImJzm8bNjZpPZSTOqw== X-Received: by 2002:ac8:3857:: with SMTP id r23mr7488303qtb.236.1602447781194; Sun, 11 Oct 2020 13:23:01 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:23:00 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 10/14] arm64: dts: allwinner: h6: Add I2S1 node Date: Sun, 11 Oct 2020 22:22:20 +0200 Message-Id: <20201011202224.47544-11-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Jernej Skrabec Add Allwinner H6 I2S1 node connected to HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 28c77d6872f6..d915aeb13297 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -609,6 +609,19 @@ mdio: mdio { }; }; + i2s1: i2s@5091000 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun50i-h6-i2s"; + reg = <0x05091000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2S1>, <&ccu CLK_I2S1>; + clock-names = "apb", "mod"; + dmas = <&dma 4>, <&dma 4>; + resets = <&ccu RST_BUS_I2S1>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + spdif: spdif@5093000 { #sound-dai-cells = <0>; compatible = "allwinner,sun50i-h6-spdif"; From patchwork Sun Oct 11 20:22:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 269480 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27487C433E7 for ; Sun, 11 Oct 2020 20:29:12 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6716720776 for ; Sun, 11 Oct 2020 20:29:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="bZr21zRb"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Dtd8EF3H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6716720776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C81271672; Sun, 11 Oct 2020 22:28:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C81271672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448149; bh=TlaKVXdkaBmec4tXS1T9gPnftMPH3PL+xEeJCkQRjjE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=bZr21zRbT0tw4XE14not51zcxkLHjPiEeYD32fu40x5Pf6xv1AMV4gC4IlhKN0kit Hx9SJnoVqRdAY9zTOddXYlDkBMjr+QC3IGSe602p/7Qg11NZfW4sw7Ths6lHl9Cg2T OL7T9bWvTHlOXGPXN4m6i0PhlZVZ+iZnJbZc91NE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9F5F8F80303; Sun, 11 Oct 2020 22:23:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5C09BF80304; Sun, 11 Oct 2020 22:23:12 +0200 (CEST) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F35C5F802F7 for ; Sun, 11 Oct 2020 22:23:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F35C5F802F7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Dtd8EF3H" Received: by mail-qt1-x841.google.com with SMTP id e6so2321329qtw.10 for ; Sun, 11 Oct 2020 13:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8Id6RP1VS5hXJUMhUzwY34yVBORZ0nCdjPMNOwgBnW8=; b=Dtd8EF3HlfRs4MWa79LdCfJPJtUWqor9o0qiwofUy20/ORQGpQR3CoJUFr9p/A7v2z zPvQvVJyt2qvBwncJvzqdVGCtOv00Buc9jPUd4mI1b1QxYD0P9W1A9J2kLIsz6WbjKAl o4Z7/qzj7k1A4XAF5IOots4VKRPz7dwVOPJKBvNa57qe83uctt7jhI7J4pv4kIwuy282 iAaAVtl/e2drs19Vlap3WYuJMIp6mshZV12RL3dvI0+7zfL+RZtGuLPlsEIM5LebDYO/ 0UZRyPh0diQFxaPHHDdvt1Rror0wcjrrQ1R+vGf2qA9kigcq1LZGRgDieSxsC2XCbDUx Kd0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8Id6RP1VS5hXJUMhUzwY34yVBORZ0nCdjPMNOwgBnW8=; b=J8n7CDbFH5uF0p1Jz5SbCg3Bw6S6yUV+bn8PaqiqujaGkyZSMQg6nn0rXagD3qxDSq dX4nKnoOBL0vgLhMfOmTr743+UHu0SVqzwt+hnd+mIHU+JAg7XqfI0+PxyP8UkKeZ3Sg VGvZdZd7EdV3XfzfZkN00jDGLWg3kYBHyVm2SJj3AVNoAqE8cho71DaYBHqK2QyKbXVp XfAynBpHxjPApdV5/GFK1o3yUz2vQA/y1p0BCPT7Ec2NEnrQ40Cc9MFciNMGGRPlH7a+ wYEL1ty2+Ng0GVekIvdTYAmgV6CFpNU94LJRgz92EMguHz7zjhSJoyxjYVSlrXvWnSTO 1AJA== X-Gm-Message-State: AOAM530B3gL+gZ84/e3NKkSGHvSwL7cLyf0DXSW1cGcjwpfCqMXh+4cy jxd1KyHeWxKUTJ66IzR/Ymk= X-Google-Smtp-Source: ABdhPJxSEC9EpSHrro+wVXZqDV6OF6pY8xh6pzPC7pTckykvjI3LVHpwb+CsEvR7xNuEo/WfmLQEIg== X-Received: by 2002:ac8:4808:: with SMTP id g8mr7039187qtq.18.1602447784085; Sun, 11 Oct 2020 13:23:04 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.23.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:23:03 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 11/14] arm64: dts: allwinner: a64: Add I2S2 node Date: Sun, 11 Oct 2020 22:22:21 +0200 Message-Id: <20201011202224.47544-12-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Marcus Cooper Add the I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index dc238814013c..51cc30e84e26 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -846,6 +846,20 @@ i2s1: i2s@1c22400 { status = "disabled"; }; + i2s2: i2s@1c22800 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun50i-a64-i2s", + "allwinner,sun8i-h3-i2s"; + reg = <0x01c22800 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; + clock-names = "apb", "mod"; + resets = <&ccu RST_BUS_I2S2>; + dma-names = "rx", "tx"; + dmas = <&dma 27>, <&dma 27>; + status = "disabled"; + }; + dai: dai@1c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun50i-a64-codec-i2s"; From patchwork Sun Oct 11 20:22:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 284614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68F0AC433DF for ; Sun, 11 Oct 2020 20:29:33 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A959E215A4 for ; Sun, 11 Oct 2020 20:29:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="QFaj8zwB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E1MPRRzY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A959E215A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F3796169A; Sun, 11 Oct 2020 22:28:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F3796169A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448171; bh=AXOHei2Mu6ayb6Fmra9I8TA1n6yKChVv2ArqTdKSHL0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QFaj8zwBYFnN43PS358tbbda/+f23gVr1hMxYf9OymLpcv1VseVf/Is+R89E2WFch oTwESFhrJufsTMEa9xUhfEyUzBQU2ZGqbefvPE+m5byDUvyCguQc04Eq74yj5ElvDY ViCQQHg8H+y95TdjyIDmZrJFD7eTL+r3+g3M+Ibw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A23D1F80305; Sun, 11 Oct 2020 22:23:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C85F3F80303; Sun, 11 Oct 2020 22:23:12 +0200 (CEST) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 05FEBF802E9 for ; Sun, 11 Oct 2020 22:23:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05FEBF802E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E1MPRRzY" Received: by mail-qt1-x843.google.com with SMTP id e6so2321377qtw.10 for ; Sun, 11 Oct 2020 13:23:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KmIaDgGE58XyP65chgC3iPI5GCq1dVupIq3PDHXzLnk=; b=E1MPRRzYIZ0aDki51ehofhrFm0Z1ux7C0kpocp/M+H9BhF/SlNPQ+jvdyfcPL9eLVi 5j8UE6I0kCIaDZ1ewOz7jYzt4PjZ63iIaik8J12Dsfh+sOlxx4EYCdkN82YfM5D2zy9Q W+xgyiYdn/D2X+EVly5WW5zrYT3RT6j5NFQgvjU7cgRcv9ym44zGZowtvgC+nIgOOeH9 hj+7MW8N0jpHS3148x3RGsq/0/CkxoF6TuhukEXkGW1VfxFgK2BZjFXHvEmfYKSEJWH1 Pa/KLyV1h5iUbXQT0oGVqh7RlDWoQyU034X3Vvk/QQjwQqUwIceJ3sYvkuAkebF7G5Nt 3zRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KmIaDgGE58XyP65chgC3iPI5GCq1dVupIq3PDHXzLnk=; b=orWEmvT+mYwGLXEpKWWbb2jSsuzo5f4jQ73Ee7oSUakusSScTbWiUjS+yuTCv6HtNu KF0SVrtn8sxl9OYkQ/WmeYmCMUfuPEf/NJ7YsDfoh9ZUWxywJhxym3dP0lsm2pKciMcI gxNpw9oe20dWcp2CH2XTAoX/LDhcXBPx7qJiI2R+fNhsHc8dAuREhjXcpY6Hvg+M7D1K 7/DPox6h2K+D2UeR1une76xj65djgP6fuM8WeQaAhSv2NdoOpoQm/AzdNj8hNrXdKdeB mL22oH89DHj8jgc5oH4h0MI5G2BA/eE+bOELutPlBj/19LGz+NRRSFCexW/yqJwen8vC sEVA== X-Gm-Message-State: AOAM533td2DL+K4ZXirfLdL8cZAB8ooPDYtaDfEkEEuhBdiiky4cWmsJ J6GJNPWtfYVl373dId1fZ38= X-Google-Smtp-Source: ABdhPJxhdeNH575/RufpVe+3KodyGx2Vfirr3hdmfoXYz448UP5h87uNHm7gqw2mfihQmAbA/mA59g== X-Received: by 2002:ac8:e8c:: with SMTP id v12mr6980888qti.329.1602447786934; Sun, 11 Oct 2020 13:23:06 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.23.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:23:06 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 12/14] arm64: defconfig: Enable Allwinner i2s driver Date: Sun, 11 Oct 2020 22:22:22 +0200 Message-Id: <20201011202224.47544-13-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Enable Allwinner I2S driver for arm64 defconfig. Signed-off-by: Clément Péron --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 63003ec116ee..9a3c3bbe60e4 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -696,6 +696,7 @@ CONFIG_SND_SOC_ROCKCHIP_RT5645=m CONFIG_SND_SOC_RK3399_GRU_SOUND=m CONFIG_SND_SOC_SAMSUNG=y CONFIG_SND_SOC_RCAR=m +CONFIG_SND_SUN4I_I2S=m CONFIG_SND_SUN4I_SPDIF=m CONFIG_SND_SOC_TEGRA=m CONFIG_SND_SOC_TEGRA210_AHUB=m From patchwork Sun Oct 11 20:22:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 269479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 648C1C433E7 for ; Sun, 11 Oct 2020 20:30:04 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AAAAA20776 for ; Sun, 11 Oct 2020 20:30:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="QnjUNsUh"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rAX9LyBh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AAAAA20776 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 24B4B1696; Sun, 11 Oct 2020 22:29:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 24B4B1696 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448202; bh=Ue8qZnMFUZeo20dwZRs7/u0dyXcxW17dx1xrato0Uuw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QnjUNsUhGA6LOsB8a0OGGWqtjMr2FTv4XYx7eL8Ps4ICnt6ZjhgzKxtUC1q59aiIK 9syHdjwlDL8HQkZyIPVDHRymOSaeYRVU+GsFsH8dUhrZB8QlqYcVEdWLTgbYrRV3aD 8I4FTG558lkZfIlOxH4Btz8/twbShZKxGAviMKG4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 65CEEF80316; Sun, 11 Oct 2020 22:23:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30430F80304; Sun, 11 Oct 2020 22:23:14 +0200 (CEST) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E84BEF802F9 for ; Sun, 11 Oct 2020 22:23:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E84BEF802F9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rAX9LyBh" Received: by mail-qt1-x841.google.com with SMTP id c5so12244985qtw.3 for ; Sun, 11 Oct 2020 13:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lryb+OP/I/Ms7egySRuAjr25d3wKcdnJ3fbOd1ZGv1M=; b=rAX9LyBhQRjGuVquLmVQLXPeCqbM+PKvTpqudvQ8odySOCoDSzcLV3hKt+GDznepfJ bmA4KDaC4rF1pzAjhPCwKfH6J5pZC4fgHvitjewrVIXZuBY1q5Qe46HcWsWNMv7U0LeA oq3Don423DuBS7WMcNwRD1JFfHYnYPS9zNIdElxDMD/9ioFeG5NA9K+/usHSLSKluTc+ jgT1HqRK5BqqoC+bt622kZRwMJGnxpstA1NbRaJKnQYdQWD78QsHrXBJyecAkq8pVx5O IuQ9L3x9/Dks2/kUJSkmWH0ucrpvqpQjy9+SyPBgtlQz9Ugqz3cFIXIteSABTuwS78Bn BZ+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Lryb+OP/I/Ms7egySRuAjr25d3wKcdnJ3fbOd1ZGv1M=; b=W65C4XjcZNndKcg8OMYswUD6CaXPU1VTka9vlGvG6JX/DsRiiOH+PTD01JEbxa4XqF p64hviYy83P9qP1RGJkySOULeHcY221XFU9n9JHGACYNWBdlZQRwwQg/YKlw2Vl/+yCe qGdi45DnFSBRAUWs63ywURSNObTvZ2YAgcwcvsn/SCXekH770MTgN382/zpRtYXQcizp 5H0If1mCUO3xg0k6uyubcHDUPb0B5c5GsmOx8mDDAIDxEg46fhfpw6GRJTroFV31miYF KhEvCyQZvFKJobbI1N/5TEpFB/p4VvYsEdp/3c1kSqE+upuOgdQIu1Tbu6Km2LUq6X+R QLdA== X-Gm-Message-State: AOAM533KYi47+/b1YZUK1gqXBB/xPkkYwECC2czYlgTXSjeD0uZQXukz XUFlvsE7pHPLgJ5/XXpB8jVlEuAOnZ+Oog== X-Google-Smtp-Source: ABdhPJxWrxt2WnMT3nzMt+0sTbhfP+3jSHNUCya8daPb6HIY1AaWF6DkniHZhmrpgU6CmjRHq0GB1Q== X-Received: by 2002:ac8:6945:: with SMTP id n5mr7111000qtr.202.1602447789800; Sun, 11 Oct 2020 13:23:09 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:23:09 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 13/14] dt-bindings: sound: sun4i-i2s: Document H3 with missing RX channel possibility Date: Sun, 11 Oct 2020 22:22:23 +0200 Message-Id: <20201011202224.47544-14-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, Rob Herring , linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Like A83T the Allwinner H3 doesn't have the DMA reception available for some audio interfaces. As it's already documented for A83T convert this to an enum and add the H3 interface. Acked-by: Rob Herring Signed-off-by: Clément Péron --- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml index 606ad2d884a8..a16e37b01e1d 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml @@ -70,7 +70,9 @@ allOf: properties: compatible: contains: - const: allwinner,sun8i-a83t-i2s + enum: + - allwinner,sun8i-a83t-i2s + - allwinner,sun8i-h3-i2s then: properties: From patchwork Sun Oct 11 20:22:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= X-Patchwork-Id: 284613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CA78C433DF for ; Sun, 11 Oct 2020 20:30:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D1B012145D for ; Sun, 11 Oct 2020 20:30:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="A1gkMEoW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HA9IN0Pm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1B012145D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E7B91667; Sun, 11 Oct 2020 22:29:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E7B91667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1602448237; bh=pw5d5FnpqjZkbkA6Eq0B4iPgdRDJ2Ul2OuXptuDJGmU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=A1gkMEoW5ZF3v2y6HAJltrGKBYMubCP3p8Lqpb1XB28JvEcKgQbPwygmcrAIKJ3WC 7K5x6KyssY2svMsK8wIEv4QO9ZU5Sr2UA9yYNgyJOR5vcrt9PRJoCQz8D7tSNl75/L L3N1voZWtRhG8UmV4apImtM8QKbc+zQUSuBjSphw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9E220F80332; Sun, 11 Oct 2020 22:23:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3FBC4F80317; Sun, 11 Oct 2020 22:23:16 +0200 (CEST) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D8A5EF80308 for ; Sun, 11 Oct 2020 22:23:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D8A5EF80308 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HA9IN0Pm" Received: by mail-qk1-x742.google.com with SMTP id 140so14324826qko.2 for ; Sun, 11 Oct 2020 13:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q/UCGl1ZdUoHsUHtTTTH+r1dTXLa/BTl7CcT5LFzhtQ=; b=HA9IN0PmUIZofBmTY8XvM87K5i7WJRyPJNkD39W9ybemEznUZKpNd0xzHGhhPAOiT9 DHTKBnGOqKa/SkKM+1cJzlnIGgimA6K3F3Gx42VPCslyfDapMd3k2EgEfj5dmfo6QQqo +Q0xOJVyFuNyNdcz74o/yAQhxVZMKXsSE66TGAdzBUstfB/2qb9CTskoB0oiyfcFSwGH ZZAZHYBZfluBZJrAs3dB+jewhpOy9cSOHAVdEXrMmzq8UFNNJxws0B97GQKuxSm6mFa1 XwdAU8mW98pxQQs/vZOX/jarzAuXsID5l/mGzLOtAmWXiTCMPau1SUccSHOa3hNMellE JkYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q/UCGl1ZdUoHsUHtTTTH+r1dTXLa/BTl7CcT5LFzhtQ=; b=AaIKiJtwarYb4tK02Hhqqu9pSQIIwlW70L6azX0Yz2yNVjOp2vyMfSxm2vsJy8bW3C pAIwOzGUJBqLjqBZQzXjrAmUTX84wqODPz2Mlg9zXNp4mp2jsokJNcQlm/u79Nc7y4G+ Elg7GZYtWjUI0H9NtrGzucnoSYe/W9zwusnT9zNuhI+KMr44MS/bAjSAl002IRjQMFNt yirfrj5ay7+YVHr+t68GRErjEGgm5RAO7MqfwKTCFCAhjw2nmy1XJ6WWAkbyo3DvxwMK K7dK2bCr56KMSAjfK7PcGPz0PZ/VARVuOPcDOwIWpvQMcVpGJVLTw/wpQ6jg7ItRmPM3 3hiQ== X-Gm-Message-State: AOAM531nzC9Q/QJwKBogk9EYWXhCTLCKKqY+i5I9eTp5wiAZH23ZO30N X7R18yVWx4ax6Y+aGB+XQEs= X-Google-Smtp-Source: ABdhPJws5vyyslF2xzy4sBp8tTEWCRLz+Qwa9ZngcFbttqK5qxibjMacG+/w6rE7cqSZt5jDOfdWUQ== X-Received: by 2002:a37:7286:: with SMTP id n128mr7137973qkc.423.1602447792683; Sun, 11 Oct 2020 13:23:12 -0700 (PDT) Received: from clement-Latitude-7490.numericable.fr (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id c72sm2987778qkg.56.2020.10.11.13.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 13:23:12 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v7 14/14] arm: dts: sunxi: h3/h5: Add I2S2 node Date: Sun, 11 Oct 2020 22:22:24 +0200 Message-Id: <20201011202224.47544-15-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201011202224.47544-1-peron.clem@gmail.com> References: <20201011202224.47544-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, Jernej Skrabec , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Takashi Iwai , Marcus Cooper , linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Marcus Cooper Add H3/H5 I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 22d533d18992..9be13378d4df 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -662,6 +662,19 @@ i2s1: i2s@1c22400 { status = "disabled"; }; + i2s2: i2s@1c22800 { + #sound-dai-cells = <0>; + compatible = "allwinner,sun8i-h3-i2s"; + reg = <0x01c22800 0x400>; + interrupts = ; + clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>; + clock-names = "apb", "mod"; + dmas = <&dma 27>; + resets = <&ccu RST_BUS_I2S2>; + dma-names = "tx"; + status = "disabled"; + }; + codec: codec@1c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun8i-h3-codec";