From patchwork Fri Oct 30 14:46:35 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: 314700 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 C19E0C00A89 for ; Fri, 30 Oct 2020 14:48:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6BF092076E for ; Fri, 30 Oct 2020 14:48:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AYTrqqkC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726792AbgJ3OrE (ORCPT ); Fri, 30 Oct 2020 10:47:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726779AbgJ3OrD (ORCPT ); Fri, 30 Oct 2020 10:47:03 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D85E0C0613D4; Fri, 30 Oct 2020 07:47:02 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id k27so6852920oij.11; Fri, 30 Oct 2020 07:47:02 -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=WLJXPtjTNSugnrrI4n/vT0cn/oCNnN/c4HbxdKvwJMI=; b=AYTrqqkCTFZ13V0uwZeUgAsQFWspiIzE2Teact5kpugvXy5SI1L6T+/iRuTjN7bO5y Kwqy+Px9klnbI3jvNzDn21DBz2L46Nt0GIRyuKk3Jy1sTiQneK/DlCeuPza3hEmJWyId e1MrLpq+Vn9ysEGn1Q67oMLw5HsnFA/w5ZmoNZDF6YMKz7GmYbyWKcyS+AMztGQ/Rq3I pX3ZjrkC9bxNzvtViIWBWn9nNDYfcQUyGVXVb8SVJWYESaE8cKUxEyoVFaBXGsU0Nh+c 4zebUkfhlby2BFOpqOdComH389TABZEmr1ZUwHA58a5dkL355t+bA65K+P3LSj+mN+uE 6W0Q== 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=WLJXPtjTNSugnrrI4n/vT0cn/oCNnN/c4HbxdKvwJMI=; b=YRGzSQ/UfA4IrLXWBtq4nhgEau4yLs12d2gzRJM6KhVxSJUCyrP1fyIY7VxL3+vcOK 6JuT6v6fG3R4SZo5n1bG5i5Qq04zWLWrq2cwaXchFw6cEXvLxCJEZg9UKVX8LiSQ4U2O 6HqLeyJWPirqiGJHT0CRlvzx8DQfbUsyDVMV1+BpkOwXUk2qYtHLNdSaKdE+WXKIdiAE Xg9JXnTgXu3CVBE4GKKHhhHSlK0t9D6zcfPILq4GKgxP9xt73xuG/4/q4bmDv7JqceQJ SmBEOd+Dag9F/ihUqLPHXgS1xSndvTtYNH4A7JRoO6myziPI+yw6Jcx3SZcxn+jJyUeS tcBQ== X-Gm-Message-State: AOAM5301EfGTPbYCdvNrnpJOpvuy5zVdGTRgl1WK9DPgae2XqxKKbses nf/+JdX89lOQNP8wB/FKsGQ= X-Google-Smtp-Source: ABdhPJzb2QcoBWs+YPaug81YlGbLCnvHC+1aQngHoxi68YJ1C7dZrfC6XcD2h36AG4aG6tAvSpBKEA== X-Received: by 2002:aca:7210:: with SMTP id p16mr1934022oic.77.1604069222095; Fri, 30 Oct 2020 07:47:02 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:01 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , Samuel Holland Subject: [PATCH v10 02/15] ASoC: sun4i-i2s: Change set_chan_cfg() params Date: Fri, 30 Oct 2020 15:46:35 +0100 Message-Id: <20201030144648.397824-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 Acked-by: Maxime Ripard Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index a994b5cf87b3..4ff2068779fd 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -162,8 +162,15 @@ 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 *); + + /* + * In the set_chan_cfg() function pointer: + * @slots: channels per frame + padding slots, regardless of format + * @slot_width: bits per sample + padding bits, regardless of format + */ + 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 +406,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 +425,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); @@ -450,13 +452,13 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, switch (i2s->format & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_DSP_A: case SND_SOC_DAIFMT_DSP_B: - lrck_period = params_physical_width(params) * slots; + lrck_period = slot_width * slots; break; case SND_SOC_DAIFMT_LEFT_J: case SND_SOC_DAIFMT_RIGHT_J: case SND_SOC_DAIFMT_I2S: - lrck_period = params_physical_width(params); + lrck_period = slot_width; break; default: @@ -482,7 +484,9 @@ static int sun4i_i2s_hw_params(struct snd_pcm_substream *substream, unsigned int word_size = params_width(params); unsigned int slot_width = params_physical_width(params); unsigned int channels = params_channels(params); + unsigned int slots = channels; + int ret, sr, wss; u32 width; @@ -492,7 +496,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 Fri Oct 30 14:46:37 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: 314701 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 DF278C4363A for ; Fri, 30 Oct 2020 14:48:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8436C20727 for ; Fri, 30 Oct 2020 14:48:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="g/nRHam1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbgJ3OrK (ORCPT ); Fri, 30 Oct 2020 10:47:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726814AbgJ3OrJ (ORCPT ); Fri, 30 Oct 2020 10:47:09 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD7D4C0613D2; Fri, 30 Oct 2020 07:47:08 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id m128so6871658oig.7; Fri, 30 Oct 2020 07:47: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=5dXPwP3nPMsD1MvZsFZgKNVn/8P2UAXunD7d2xZR25E=; b=g/nRHam1RQHr+gi1IiHlz4fz+p2vaeEcHpT3i2oFxSI5vKJY61ZwIEJK0feGAc9h30 n1QyytLVq7cMQHbh1/vFuqqEmwg0Denm5XepQrQZdmH5b1uphiWbL5judK25RKliemxz uEiy2hTB7BIEEVIi9+vxK08teTYBa+ZdqklX1E+ZSV6mcevsYA+IVvOzXu4PKthpli8q CLCtI1s5ILYFXGPJsQwG7C9dkMXWxLUnVwgHD8QaS4iM+LgxzoC650NUvdxKd6lL9jf7 4AGQRFPTM/YGqRj0iNFaUZJEvAeKL1v7usVgTNYDZSd+PANjelalbDJExcUrb9BHo5Fv SALA== 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=5dXPwP3nPMsD1MvZsFZgKNVn/8P2UAXunD7d2xZR25E=; b=XSfKaRjpNnxV7u9F6eIdZu0VCiBjscfTDZx96nWRq0yE0VFb0gh80FTW7nZYNb2T3u Vhj0ACLPaCM2LVJrfKlWRQ06xy5DmARQmdet5ac3VLVWLYnYmGAKvjEQ7wVBjFmiQXHX e9ItU2MkbJd9x0ob97hkxmP5Q1798s9BMxxJ1FojOgURcuAE/jQXoXtHkgmFd0WxJe22 AJ7CclkoaU+tkNOHk66cyj4fjMEnNhNyHmLLsYw8FTzc9nosOTF2c9xqjyc5CNFXMbcs fUCGQ1ZT+Vf8DTVooEh0MUwd5LIemgWV2Dwes7EwHB3juRJNNhzMjL7qynz+fEpCc2nb ltTA== X-Gm-Message-State: AOAM533WuHKQQNNu5Ncfj3HeO8M7uw6DUV/fkdYG8cGALA6iFz5XdIj+ KFvvn51oRH6VNOhPmA9gcus= X-Google-Smtp-Source: ABdhPJw9UfyKv2OLKutMa77IpODhqsnntbYeKFty3IdsnEA5PjFgRI0GbmcVqu+ZY8GPiIIv+X71kg== X-Received: by 2002:a05:6808:6c8:: with SMTP id m8mr1825933oih.36.1604069228048; Fri, 30 Oct 2020 07:47:08 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:07 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= Subject: [PATCH v10 04/15] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit Date: Fri, 30 Oct 2020 15:46:37 +0100 Message-Id: <20201030144648.397824-5-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 Acked-by: Maxime Ripard 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 24b3137afbc2..6ee9c2995b4f 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); /* * In the set_chan_cfg() function pointer: @@ -387,37 +387,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, @@ -582,11 +601,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 Fri Oct 30 14:46:39 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: 314706 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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=ham 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 759F9C4363A for ; Fri, 30 Oct 2020 14:47:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1926C22210 for ; Fri, 30 Oct 2020 14:47:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rEPruIXP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726891AbgJ3OrP (ORCPT ); Fri, 30 Oct 2020 10:47:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726881AbgJ3OrO (ORCPT ); Fri, 30 Oct 2020 10:47:14 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D830C0613D2; Fri, 30 Oct 2020 07:47:14 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id j21so5717621ota.13; Fri, 30 Oct 2020 07:47:14 -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=hVl8qXyL4uyE+bKvgQrUQIjmv0VmS+Xl5odcY5Z+CoI=; b=rEPruIXPTVXLfk67LDH5YCfgYBjZF5vIrUX5Tbnn9ls+c7uvOSpuBR/pxgWaM4eLSA uucxveJU5jrBrOSrMFqsyyhPBvcOeI4XyN2NmHddCtWdlLfsEopLtb5OqTayDGPTX3u4 xg7DRqPCiYusOR/daBojNeKKOYebXxUlXDcNxTita3qsSUKzL2+Yki2pnNB0D7/Dz0jQ 76XaRk7uZ4dpmNl5+4w5lFgXRRrf6+CidQu/MUSiiAZHf8JX5Cl+TjWzDmqDijky8nca UUtDE+1n1CYaGMkN6L/rs//PJWFax6Csj+ooUdl1J8mU9Hjds5ip3msnn/3Ki+Jjqiga Jp1w== 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=hVl8qXyL4uyE+bKvgQrUQIjmv0VmS+Xl5odcY5Z+CoI=; b=ulDqsF9PMtPVWDOxV/EX7GzXHRpWLv5XSLUq6CA3lByW4uI1AaGDG1SrAN3pW+Eos1 kG/2lPWN+swMnWUuR7uq4gMAUup/qXwnhXkzuHa1QJ625mIkL+Mllss0UwQCGHFBsMo7 s3ftchjiEqtnv5ePuerG5+a1oXNw4WN4dBAacAHeqTOtROz2YAlPxrSyYiVgXJRXstNC VlB5oTtvmJz1fo/K/GiGl/nnsfbGt6aMzHCT68q02gZhrC6iAm/ZCssglTV4FVYDyOQJ gfDEYgWf19wOjbBdToEU9o2YU2TzMOWTXcHzPc47l1ZLJe+duxQ0DnyNREAVKyp5LJ1c SMiw== X-Gm-Message-State: AOAM531WtdoZoqWZ0SkBFKUTjK1r6ZVHS27Wty9cG4zYH4AW1+iUb8sD jyLhsPXB/LicTNU+OT/fV/U3h8jSBTJo1Q== X-Google-Smtp-Source: ABdhPJyXk1sTONN1FzWWHkaULZ0gNYWaxtyOSeBBxR4VbPDIVIvSmhcinPoe5FOpCzGCuc0JWuo7/A== X-Received: by 2002:a9d:3d44:: with SMTP id a62mr1834140otc.254.1604069233998; Fri, 30 Oct 2020 07:47:13 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:13 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= Subject: [PATCH v10 06/15] ASoC: sun4i-i2s: Add 20 and 24 bit support Date: Fri, 30 Oct 2020 15:46:39 +0100 Message-Id: <20201030144648.397824-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 46e4da18c27f..786731191d90 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -600,6 +600,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)); @@ -1081,6 +1084,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 = { @@ -1088,14 +1095,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 Fri Oct 30 14:46:40 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: 314702 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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=ham 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 3E9C9C4741F for ; Fri, 30 Oct 2020 14:48:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D4ABC20727 for ; Fri, 30 Oct 2020 14:48:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JDTfsx/6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbgJ3OsM (ORCPT ); Fri, 30 Oct 2020 10:48:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726913AbgJ3OrT (ORCPT ); Fri, 30 Oct 2020 10:47:19 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D67C0613D2; Fri, 30 Oct 2020 07:47:17 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id d9so889657oib.3; Fri, 30 Oct 2020 07:47:17 -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=seaaLxuXC47KqE088aencrRQLeI5ux80vm71afqUdyA=; b=JDTfsx/667GOIoeFYPL8+ATV+JIP+HyQlZpIUdUyROlnl1laFM3ZrgazcxvxZ7z95C clBppZn1oOmwlHvERhmWPK9avsBm33h3wus6BFLujMt1WqDwO0UcENp8WkpCXHPJES6E gX3L6jK8L1QXL2AY8gagEA5kxWf26n0Hye3RM50qOy/LoyV7RoQ055PVTT6kqU+Arf14 E3gQ1UfR5p4ZS+kK+WdnAaxFXwri6m02swS5DPntXxrbWWZXIuoVQRJAjTFz05OozT7h +U5qggs/lDF8JmRVaO34plp1RY4RThzD4g4vt1mjvTnwEywxeQfGCjOrog15NPa7D7jD GbjA== 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=seaaLxuXC47KqE088aencrRQLeI5ux80vm71afqUdyA=; b=te+HOLreht/w0ROmZ1pKXN5cy/tWWWE8C3zjRiWtOG/dvjilrOXWJFnTfdlxKrZNam t5VpKVxgaKB7LJimYYEmvkJF8FJYU+uRmppjvfz9NqvKgWDaKj4OGNC0ZF39OwWRkOXd xsUQBzmf6YSCdsR5Fkvdvh725g72L/CI3i/xXBapk3jwxeskW7YQPer5cdT6smWKKRvE xsdKHcMB/vC79VUj/xabhFGgxP3WhaEwu4Y2twHfkyMuca21ZKpAUl8W44l9QBI7ILot 3rcaK69H4IE52uH8ObQiMsfgVzea/+B60607279uFLnsXe8Ex/qubsurwaXkR1GOzSey APLw== X-Gm-Message-State: AOAM531prvRCoFbgPSKFVoUgyIEZM89Pc/IzKfI9r4PACaDaYYT341+1 pr2f/C3wq+htlgPimjeD7Rc= X-Google-Smtp-Source: ABdhPJxb0Rgt0hrFUpPy/a6TWm63vy8fvs1PgpicFO1L/F9gNYJzJ+657M8+wq2gDmHjFHbdDHfXzQ== X-Received: by 2002:aca:ec92:: with SMTP id k140mr1933772oih.173.1604069237021; Fri, 30 Oct 2020 07:47:17 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:16 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= Subject: [PATCH v10 07/15] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Fri, 30 Oct 2020 15:46:40 +0100 Message-Id: <20201030144648.397824-8-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 786731191d90..003610c0badf 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1162,12 +1162,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 Fri Oct 30 14:46:42 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: 314703 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 AD31BC00A89 for ; Fri, 30 Oct 2020 14:47:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4200620825 for ; Fri, 30 Oct 2020 14:47:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OZyMXC1e" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbgJ3Ora (ORCPT ); Fri, 30 Oct 2020 10:47:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbgJ3OrY (ORCPT ); Fri, 30 Oct 2020 10:47:24 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1FF4C0613D2; Fri, 30 Oct 2020 07:47:23 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id 9so6883499oir.5; Fri, 30 Oct 2020 07:47:23 -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=A4cYQuVx6gToZbO7mEsQDDx46mIAsBCsMKfd9g+RrIE=; b=OZyMXC1ef5lE3Xj7EkCUy6rsYPbkXx5xYWfAEIIo5YWaZAjyY0ty+oL5VPwh+frYps bzoeey07n25DE9sLmK504tbhohR3dQ8NeDAEgqizrIBpVrk+oCyzQj23E1jwWtBGSFrB 96KJbb6Lf33uIZz0UUcgn0SXcTCD35x4ztoIxmHOPxya7IdwaqIcLi57zhwJ+dKo+mbU q8FiHpds5Uc7osGJ7DmnZFjhhryHJjvP/vzC2EycnbcCbBYRA9PgNrdnUCpqu+WK3KfF 2WItQzButAY+kednd5Ps2Ac5lplYO8BG9NSzvdxVTchu/t4ch/SBc69DvQThQC8Kdtmr TRZA== 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=A4cYQuVx6gToZbO7mEsQDDx46mIAsBCsMKfd9g+RrIE=; b=ugDnMeqDdC3rAjCJsa0VY5ZQJ7Y7U21oIZu6NzEPYjq9Lk1zkb+IQ1eN273/YtYfFL U3qZKExLPYqJziJamMzQpIuDXU2cn5KCfOlkdZXh1ZW0i8V71vhhJ7TZohXanBloCpRE PVS+V/CJWrrBdYfxb+4a4NNz1rQDKtkjw33dxNzZPMvKKzBwht5x6AgGxow/T9irwTZX 6GpXftiCUKEeaYYF3+dDNWx1rVeNi15QQG4hW/zdNJbsZk0q+mq6RAMFkX0nPo6cmh3w frEw6Jt6bLgB4PfeNICOSXUgSNtA5vU7PWbqTNlhwc31uyrF4+jhGH5OJ05t5zatIqAR kU5g== X-Gm-Message-State: AOAM531DnwQVIbWdb1oYmCRx1RBXb2nCSxNuRyUlJMaJiYBQrAh+zzgE UdpICWJYDmYmmYxfXX+Frmk= X-Google-Smtp-Source: ABdhPJzrOWnh3LX5MzGR+X7zGa6JPDHD+fQTH83s8TF39Z3LXslaoMt/hLpsPrl7NryxcUkW3CpMOQ== X-Received: by 2002:a05:6808:915:: with SMTP id w21mr1236071oih.124.1604069243013; Fri, 30 Oct 2020 07:47:23 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:22 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= Subject: [PATCH v10 09/15] ASoC: sun4i-i2s: fix coding-style for callback definition Date: Fri, 30 Oct 2020 15:46:42 +0100 Message-Id: <20201030144648.397824-10-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 4f5cd850752d..4b8ca5be0a29 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -180,7 +180,7 @@ 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); @@ -192,7 +192,7 @@ struct sun4i_i2s_quirks { 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 Fri Oct 30 14:46:46 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: 314705 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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=ham 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 E835FC4363A for ; Fri, 30 Oct 2020 14:47:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 883C920724 for ; Fri, 30 Oct 2020 14:47:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HAg/Wot2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727002AbgJ3Orh (ORCPT ); Fri, 30 Oct 2020 10:47:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726955AbgJ3Orf (ORCPT ); Fri, 30 Oct 2020 10:47:35 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7943FC0613D2; Fri, 30 Oct 2020 07:47:35 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id z16so576976otq.6; Fri, 30 Oct 2020 07:47:35 -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=DcxJttVJPuefUSZyGyu/mOpEqxZT+d3F8rDRrStvw20=; b=HAg/Wot2lobXoMZzDzeRlBy6HiM7gf8w/Y1DibKsoL2Z1u5vu5Hle8J55reIPywx0g DxkAWrZtfKwvNLEPHpNeV0tTEkw5cS+BZFWaQ0W4R76s8RaroOFFPbexCEGAuwQQR9aa 57JHr1i3T2Mw12C3JHLO09zgWzw0oDIgisNRqz4OwPhX7OeChhkToLGN49IOC9w2eGHQ Sc15BZ5CS04UhFSFpH34rOxANPGJ4NRHXKYmRbbeEr3BkSSbGZYFuREJpeWsXXMTwvgs 1T6osRQ4wMlGruHHruI1zlnUitA+VfP1JXdKj6m8cRcK+N2xKl6VGy70mm1PdKRBkBmV 5TnA== 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=DcxJttVJPuefUSZyGyu/mOpEqxZT+d3F8rDRrStvw20=; b=VNvUMnSDNe27u22i2v1g88bYZelTJ9G17kc0oAfp4kdVyPexNkyMhtpzcnQgOPjHst gi/qoax6VC6nPbB+B2OT9TbXDKsdTi3OKohb6aIamHgHgHGr6W3RrtBhFadoCcSNJrt4 Z37BcKaEMx29uEMddPkYc3ieQIF+rL4F6QMx+A3E53EBU8qbaXIwU5Vr8tM9x8PZ3KCg CiCTCvNeztoqn0m6g4/J8Xt8DWnxb5WhmU96iZVZl+KkB7idteDio/PExONMnpRr+rS2 iYjXBE6QVMAvYJut70DvptKxNmjQoxSwsRH5b42RNgxc2zL4vxo7NcGYTtj8E2AWQfH+ 9gpg== X-Gm-Message-State: AOAM5311wecrPdI2Tp4jGphGBreBA3S8i+fHVHLB8iVzVqxLtrDrtAIU 2Kjw79pbxSR3AnQtx7P8loM= X-Google-Smtp-Source: ABdhPJxn9qZf+LM4hk27YO0jHAmOCxZs1cQgIQXn2jsLewVxXPBD1fXNRtSew9+I9GVm6X0MmGEJhg== X-Received: by 2002:a9d:1c7:: with SMTP id e65mr2089985ote.22.1604069254826; Fri, 30 Oct 2020 07:47:34 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:34 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= Subject: [PATCH v10 13/15] arm64: defconfig: Enable Allwinner i2s driver Date: Fri, 30 Oct 2020 15:46:46 +0100 Message-Id: <20201030144648.397824-14-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Enable Allwinner I2S driver for arm64 defconfig. Acked-by: Chen-Yu Tsai 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 17a2df6a263e..3f89f427a355 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -706,6 +706,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 Fri Oct 30 14:46:47 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: 314704 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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 C8054C55178 for ; Fri, 30 Oct 2020 14:47:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EABE20727 for ; Fri, 30 Oct 2020 14:47:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TyBDGJ3w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727025AbgJ3Orj (ORCPT ); Fri, 30 Oct 2020 10:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727020AbgJ3Ori (ORCPT ); Fri, 30 Oct 2020 10:47:38 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99E2EC0613D2; Fri, 30 Oct 2020 07:47:38 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id f37so5728619otf.12; Fri, 30 Oct 2020 07:47:38 -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=TyBDGJ3wIylb4gjlBDCtDtpfP+nJ9PmgmGbLZ3Dm2jAdxrwElvjrd+tFDAnXq4oqde huO6S08fJ6TysELD2fXV5zwyVIWZIxCPY2ouO0Qn3YXaWWXJr9Wc8l/ADvFNnKouDhue ivafVtR0gqzjl9DwS8zd2fB0J/z4Ne52OsYn6taeFk7KlrJcDZLkZO6fuO5+XiBRRsjJ 1XddmUpBqrzgRwjiaBGI06A11Wa57MrTimVbOvsZmm8D1MNPuhcynjxI/GD5T33vuy2z iwuRn35R4S8dxT3gCuZQTbant7/D40rAuv+/ve60CuV6zrmvuYsoOkfqp7QzwDjIV3dX 6J8Q== 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=tu06+K7yrCQ0gaUKNMTdYDVh8Caw5KyDGM7Ru6dhAf0iE+KWYjZmv3UuWolzr+LeIw Dm+rPrYc3rl0ByA22hcNJbcCr5bQrjt/A4am2sE4xP4WV8yDhN/4prMuIo0ekJ5HZgmx VTTni2TlERW6M+OB8poQS8MiWjFGpf8nsskt+tpQW8wLpJr+5DceoXGjUUtYmaWsrSFp +2T7Z5BW2A6sWlVyTyF/J4uCrGNsaEFm8VFK+7GS4YvRluW8ThrFwTe/unPSjtU+Yr0R ba7xnW2H4UiCyUvaYgYVc5ltPwW0tLbXiB2puYAf5X2wIZVLUd4eZyc0WuBU2y/Odruk 5E+Q== X-Gm-Message-State: AOAM533TMjfcZ8SLQfmZIm5bDPH33nJbPHgcRHktoY4Sg6vVSO0DS3XC UapTXPgkF5S7a8mSLhNaPjo= X-Google-Smtp-Source: ABdhPJx/zMztCtP29RQZq2MUgF2cChnQA8L4sJ0hBJ9oMvypsiYMDKoZgstrh1rIdiCERnuM0cnt0g== X-Received: by 2002:a05:6830:154d:: with SMTP id l13mr2074653otp.61.1604069257953; Fri, 30 Oct 2020 07:47:37 -0700 (PDT) Received: from localhost.localdomain (213-245-241-245.rev.numericable.fr. [213.245.241.245]) by smtp.gmail.com with ESMTPSA id s20sm1462856oof.39.2020.10.30.07.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Oct 2020 07:47:37 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Cc: Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Jernej Skrabec , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= , Rob Herring Subject: [PATCH v10 14/15] dt-bindings: sound: sun4i-i2s: Document H3 with missing RX channel possibility Date: Fri, 30 Oct 2020 15:46:47 +0100 Message-Id: <20201030144648.397824-15-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201030144648.397824-1-peron.clem@gmail.com> References: <20201030144648.397824-1-peron.clem@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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: