From patchwork Sun Sep 27 19:28:53 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: 11802291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1ACBB112C for ; Sun, 27 Sep 2020 19:30:20 +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 D474C206E5 for ; Sun, 27 Sep 2020 19:30: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="sc61FtQY"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XjgZBK2M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D474C206E5 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 D94D518E9; Sun, 27 Sep 2020 21:29:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D94D518E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235014; bh=lUj4XAUCUpyxfxtPcQW1mXWWKe3jFfL8px8IFe8gnu8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sc61FtQYa1LsPketUcjQcOAFzhJbFmvU9lP5jEawrRtjBQ0A+CBOdiJq2hCfOBvEA yrq/mG/mW8TKvXSsE4Zv5J0MM0/Y29p09IT4ldl0QMprcE945vkTQedLAg0vSAGOWD t2RAivyEdf4VqrfC1SfM0SWSlHUeqn4v/OsehpNo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B7232F8022B; Sun, 27 Sep 2020 21:29:30 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id AECA3F8028F; Sun, 27 Sep 2020 21:29:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 1C22CF800DF for ; Sun, 27 Sep 2020 21:29:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C22CF800DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XjgZBK2M" Received: by mail-wr1-x443.google.com with SMTP id z4so9571416wrr.4 for ; Sun, 27 Sep 2020 12:29:22 -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=OyfHIE0qAhOjNCFNxAQ6O7ihABXSVqgxqKsK1DQfOYg=; b=XjgZBK2M1cUlt3D0plcopQaVRkhJC3WRcjSIMwCm/PMkn5cbAQD2SrKfXRGdAoJabx zdfRiRQN+9alvyChbeAqfVdbrJeFtAnCUucGvASrcjHPLWaZ/QyLOOufxdJgZ3oCtmSc 0Piyk2sDjWXjpEjlFYDyxB4/EWJWAEbHCryFeB7+xPmORXFjESTZrUzraAKzSN0PI8Fy 7Ud3pH8FxQWLDeTdalrlEH6ue9n++GwyLFO0r7IKi0rMpvuScwjYUnIGmOW+YKgHE9OR +Om3wlWhsHTRamSpjd5NbGFa19tafCPaHjVDIBKz42OFE603QcPMBrzwlTKWVjqju1IE ByGA== 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=OyfHIE0qAhOjNCFNxAQ6O7ihABXSVqgxqKsK1DQfOYg=; b=hbmSccT0k0jTH6Xx4uv3E3TuuspZsSAwhK3wr8n7tFmJ06jyiu2t82REPKzt4fY4/i QhRz4ZuqOY33cMheQYRNuF74ipFLZE2Xx8suDvDndmuLbycV/N2m4p8sBzb7JY5jWM1q sxx0hFpvVfyEEfo9I6DWwB6LwIU5PoaYM+Ga+kB4UdCFPfVVzno4EP6dklM9NwpbaniT 4t/i/fJjxNG8SATmLQWc7xY1A0j4wdXc9ndT/fgD2DuBFbOVKRU4UHh9t0+ckchWqXLf bFdHgIQPVYL2TUU4wC9C8T0LaI5rop9XRyKUB5KjheGUY2bZqpiusGhGsTisWRfRmTaA RlCA== X-Gm-Message-State: AOAM531m2KPwmmL+Ns9U9uJMP8AMPVkeVesvNxLETBtcXVJT0Hg8gkbl hu/9qRGSgKcmeWABJyw2IgI= X-Google-Smtp-Source: ABdhPJypHB/nVvJsThv5xw8CIcWqqQsPakBV+SlU4uMQhahm5SGPXu5E70m3mk8Olaqd04lK8chq4g== X-Received: by 2002:a5d:68d1:: with SMTP id p17mr14672759wrw.378.1601234958534; Sun, 27 Sep 2020 12:29:18 -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 n21sm6149609wmi.21.2020.09.27.12.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:17 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 01/20] ASoC: sun4i-i2s: Add support for H6 I2S Date: Sun, 27 Sep 2020 21:28:53 +0200 Message-Id: <20200927192912.46323-2-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Signed-off-by: Clément Péron Reviewed-by: Chen-Yu Tsai --- sound/soc/sunxi/sun4i-i2s.c | 224 ++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index f23ff29e7c1d..2baf6c276280 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; /** @@ -474,6 +489,62 @@ 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, + const struct snd_pcm_hw_params *params) +{ + 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, SUN50I_H6_I2S_TX_CHAN_MAP1_REG, 0x76543210); + 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 = params_physical_width(params) * slots; + break; + + case SND_SOC_DAIFMT_I2S: + lrck_period = params_physical_width(params); + 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) @@ -699,6 +770,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); @@ -979,6 +1152,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, @@ -1006,6 +1195,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); @@ -1164,6 +1366,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) { @@ -1333,6 +1553,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 Sep 27 19:28:54 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: 11802307 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99931112C for ; Sun, 27 Sep 2020 19:31:56 +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 1F7AF206E5 for ; Sun, 27 Sep 2020 19:31:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="aOGvhApJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="caGfsQcu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F7AF206E5 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 81B91192D; Sun, 27 Sep 2020 21:31:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 81B91192D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235114; bh=r6ixIKqEBUo6bDIn666BSbftaJK5hFJcf8ahEaUG60g=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aOGvhApJ0gvhxsSByM1jr2WXrUhMhLWnBRUrmgilqDhmHVkOh8XwbInYUawOxEBe5 IVrf9UpTXoFrFC8zhiOyqgzg8l2tGKclAQVVP7agZsL6H0O93uMj4/X2XkW29reRV4 f+SyOL2DRi2Uodto67KeSE1ds2bjZuI6TdUidgAU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D9C97F802E3; Sun, 27 Sep 2020 21:29:42 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3F95CF802D2; Sun, 27 Sep 2020 21:29:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 B8531F801F5 for ; Sun, 27 Sep 2020 21:29:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B8531F801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="caGfsQcu" Received: by mail-wm1-x341.google.com with SMTP id l15so3034585wmh.1 for ; Sun, 27 Sep 2020 12:29:24 -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=4lePnbJsWezK8RnHwYEENqDk89LB4Q2STBonc48dD/w=; b=caGfsQcujd7FlPqbJt4KLcdRSp2tfHMQOyRlbULHBb4IECIHT6LRTzTAZjWR3eqO+H EjdQc4CKML7/fvpql72/dMfSFEZ459//bmwVseDuwcXQWE6Yd1c9mJNY1vL01X8BSQXf y+mk0DTRKV07F/aCevv0lc9vyk9Tt7iH9egmvYKOyAfhRzgxM2oENK+51mhwUrjvD3by hIaoPc/ClE+lpVVJRgNm0YVaSyq8GGQ3Y0h2Qpu5Te4EcURwfTct+ICtG60BSShMSqCx rg2BIzO3Z4UFFQhFaZCzZV9S4HhVniIzow84IVYX8cqyMxLqnuY2pm8unIC/bidfeRJa 9bzg== 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=4lePnbJsWezK8RnHwYEENqDk89LB4Q2STBonc48dD/w=; b=teGq/9XU+facVGTxwopucBPWn9O4DFwXPEbVWeIZXUHVxmsRPpAtR15Z+VwQp7VUQI cgio3awZhStR/tYmfA3VtLGSRAPgD593XClIqqt6xVhDLbTzfzWd5yf9+a0HUoAB/hKE 0COI0EIYpUSBN7LhoS3jW21hwEejqr0f5mA/fZ3yBpsCsUgybTzr1KPsYQ8xp1r9NLVo xLAn4GTooE+kioE9Jm3/PuZRI+vPOhOADHVHDt9Kn7Yy/g6WvssqlHMgljfRmRmRo1Nj aM+SJ7y+FVBYaIsYUrH8eV/mIbNrnKmuHdQXcCpG70XeXjOz50MuAuexU5c1PHgWU428 xoUQ== X-Gm-Message-State: AOAM530nAvK0ltGrMKHRjgkOwTjrhJmsa5JFfloermTEZulgFkbEwWqB tniLV8O3lNKyJhxH+Mpl/KA= X-Google-Smtp-Source: ABdhPJxyWdxzWOe5nyLzsGgdejVxb9LmqmzUTe9sWMAvfaL/PoX5b/HoKKR2IYXVdjuKPCWM8HIptA== X-Received: by 2002:a1c:9ad0:: with SMTP id c199mr8101749wme.54.1601234959961; Sun, 27 Sep 2020 12:29:19 -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 n21sm6149609wmi.21.2020.09.27.12.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:19 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 02/20] ASoC: sun4i-i2s: Change set_chan_cfg() params Date: Sun, 27 Sep 2020 21:28:54 +0200 Message-Id: <20200927192912.46323-3-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 overwritter in case set_tdm() is called. Avoid to have this logic in set_chan_cfg(). Instead pass the required values as params to set_chan_cfg(). This will also avoid a bug when we will enable 20/24bits support, i2s->slot_width is not actually used in the lrck_period computation. Suggested-by: Samuel Holland Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index 2baf6c276280..0633b9fba3d7 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -177,8 +177,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); }; @@ -414,10 +415,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); @@ -434,15 +434,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); @@ -467,11 +463,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: @@ -490,15 +486,11 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, } static int sun50i_h6_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, SUN50I_H6_I2S_TX_CHAN_MAP1_REG, 0x76543210); regmap_write(i2s->regmap, SUN50I_H6_I2S_RX_CHAN_MAP1_REG, 0x76543210); @@ -523,11 +515,11 @@ static int sun50i_h6_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: @@ -563,7 +555,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 Sep 27 19:28:55 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: 11802319 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C86F139A for ; Sun, 27 Sep 2020 19:32:53 +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 66EA7206E5 for ; Sun, 27 Sep 2020 19:32:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="SEGByAph"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VpmgE9hK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66EA7206E5 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 C78D11931; Sun, 27 Sep 2020 21:32:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C78D11931 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235170; bh=LP+ukeao2wFWPrDmvkkQRi6TuTriSEE0BclSACp990k=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SEGByAphhP0B9+UR+TVNsY6r5lThwQoSWIXrSojrhw4QZliZqu3eIqABclc8vXgav T9MuBq6ho5hHWLx5qSIK1ulXVT/edEN7X8qn0hqvcQIqefiWUX3OoNvpNouVkF8ZX+ fRjzTWrJ0h8xX35Ge1hI/6dQsibGVUb1ihaMmEO0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AF660F800B5; Sun, 27 Sep 2020 21:29:49 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 336CDF802D2; Sun, 27 Sep 2020 21:29:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 40A9BF800B5 for ; Sun, 27 Sep 2020 21:29:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 40A9BF800B5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VpmgE9hK" Received: by mail-wm1-x344.google.com with SMTP id s13so4377609wmh.4 for ; Sun, 27 Sep 2020 12:29:25 -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=LfoOimVfCN8iFpUENEv9ik5I5IDM2MMc9g699qzOgnE=; b=VpmgE9hKsKx/id8FAUpypRINdZZZJDQA2g5lwliDvvPG9+wLh7mwSHeREEXM+3IGo6 JM4Zsn9otlHItLDUZVOeoSoYYSelVp8w6u84cVugy6ngjkiT0vVSotxMPshnjYhjQKce rsy3mzyWMgCzDJ/9o5OkR+MnDXsWjR6EBkFkRT5xUzbWShpRXN/kKk2IvkG+1yG7lCg8 5/QR7CLhtajvWc3epZeTnRoDNPjefVyXdAQUK08bHmvw4Mj5n1ais1esclJnVyskfSiy +bBKwryUU+zccngaYsykzxsW7MX72TzEyen+G0f+zx8+POtGMz4mDz0clZzuF+00Az8I rBSA== 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=LfoOimVfCN8iFpUENEv9ik5I5IDM2MMc9g699qzOgnE=; b=JQYanGvRGDfM7qfHTUNCq6cmJ9uhRRrk2VMCLIrBcbnLGlIk46XExXl3Uv7UO7FGgF J0kYFiGlbDFnXszysvfOpTV5ul4vgt3eHBtDDifEv+cINUn0i6OcMnFS/Onmuar7wlNL rOMDVQTVhe6BweWIQqvuUnsTqDIbOx2wGKsWDOwckVZL7quPB7pr3J6ZroGa+GIqnQVk f3TByadxLlK6p2p4F30ylaanvCIoFY45t/iszW66xopT6YUWO4nEJwqsqWVngYDEDehw 2Bw4Glfsrt6k0CvGiX6cb4AXb+hnubG4D0l26aihZd6LX4IgePKMMuWou94EsfHupOwf CsyA== X-Gm-Message-State: AOAM530e2soCd6YKm9kjsa7Ysl/0C9HO8haokSnPUzhfj0VHNV9Q2U+s TD1JAW5jL35RnVQ18sTUQPM= X-Google-Smtp-Source: ABdhPJw3iZIupzVBEAEZQV7hiP0OWDYQ3Rq8IdNg9/nxOE6mZ0V/lg0E7tgNoNIB3xWEaiYI1jaNUQ== X-Received: by 2002:a1c:6a14:: with SMTP id f20mr7949339wmc.81.1601234961223; Sun, 27 Sep 2020 12:29:21 -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 n21sm6149609wmi.21.2020.09.27.12.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:20 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 03/20] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit Date: Sun, 27 Sep 2020 21:28:55 +0200 Message-Id: <20200927192912.46323-4-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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. Signed-off-by: Clément Péron Reviewed-by: Chen-Yu Tsai --- 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 0633b9fba3d7..11bbcbe24d6b 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 0x0; + case 20: + return 0x1; + case 24: + return 0x2; + } - 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 0x0; + case 20: + return 0x1; + case 24: + return 0x2; + case 32: + return 0x3; + } - 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 0x1; + case 12: + return 0x2; + case 16: + return 0x3; + case 20: + return 0x4; + case 24: + return 0x5; + case 28: + return 0x6; + case 32: + return 0x7; + } - return (width - 8) / 4 + 1; + return -EINVAL; } static int sun4i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s, @@ -572,11 +591,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 Sep 27 19:28:56 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: 11802313 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F87E139A for ; Sun, 27 Sep 2020 19:32: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 2495721D95 for ; Sun, 27 Sep 2020 19:32:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="e6OogOyR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gei0Cili" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2495721D95 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 94B981686; Sun, 27 Sep 2020 21:31:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 94B981686 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235151; bh=w3Se1i0ln9IaTvFtx9Ktn4F+9Dhi4xvfdhzG9X9IyAE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=e6OogOyRFHcMjMvxzIjMwOXgiZEOCesmAHHe1NPYhPOkdHP7dcpM1IhtWMrlOM5F7 xnEg0yfsghYR/LioKhJBMDsPyAfROqr3MdG+oHR8G1c+a9UksGB3T5H+arAG0Da/lt Yhl+sdhBsi0v/MrJHWIyfMSLdmKYU7Q2s0QPmogQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D5684F802E9; Sun, 27 Sep 2020 21:29:46 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 42C03F801F5; Sun, 27 Sep 2020 21:29:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 59F68F8020C for ; Sun, 27 Sep 2020 21:29:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 59F68F8020C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gei0Cili" Received: by mail-wm1-x344.google.com with SMTP id w2so4398784wmi.1 for ; Sun, 27 Sep 2020 12:29:26 -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=ZsMT0CrEUbDwl+d5khTOYaGtUlOWn7Yi+9GLp9dBrZs=; b=gei0Cili4R4kTLkWnNRS5LS1Snz1H99u64OKPgiJCVtJPbMwQl9pR6qWMTQsaH/PgC 1rGHjXmIksEg5lBqJ585jkMIMz6Q2pGWdILg8YfcO5MduEXLdTee3gEfmTy8K74Z5aRv O68KaYgYFDHfQNx1ycz6Gu+WL+QCbinnvI64ODJUJ6EliM+gywZwSw0RJenpf8VAgK6T hylQp5/09retHIeeoctImxzV3MfS3wDQwjvlQEI22CdCpMJw8cklaa1Q58CYwNomcQpd 7/O7bF3stvBN+WpRoZuiqvG8M62hqt2NYprUPr/ojYk6Jm2KGuwq0vp8R+0n0ysmZPbR osIw== 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=ZsMT0CrEUbDwl+d5khTOYaGtUlOWn7Yi+9GLp9dBrZs=; b=EJS9/o+b7vc84FUmcNa1vL8qLT6OukeqaboejvCESoXmLN7VHVxIhZmLphvZufshsP CHt72n9FYAWaQjnBXzisuXuYRAaBLOsWVWcdd+HF6nl6rk0hEqjEst0p3Hw4iHMsZJOX PpjX1AQQXKrX8PpZSDBM8+wyoACuJQn0LiYLJ/LTDzlpL95a1JWSsS1YYBWQuL7vM29m AKbijmsBE3lHu/9/BgcTKd8AEsJbcZ9hGUHxr/de3aTwFvr5ItQ6eyLHNIHg5ukAU3gi kjW7BGD7ao57l8xpSwFNFtugE8bZvVXQ953OHxkroOyL9rkilvN8ZQ8WQOuku6qxLEop tG2A== X-Gm-Message-State: AOAM533Bfqn60SHTMQcL1kOIQvY9iWIjTNTUdZc2BpLWJPhaFT34+8Gs 24m2jJO2BJZffu7mQjBfexM= X-Google-Smtp-Source: ABdhPJzL20IuSoEos5Hr/m63YoY7P83YNnDH8cnMV0uhx/ViCSshnGfScEiigkftVS0N2E/abt+i4Q== X-Received: by 2002:a1c:9a10:: with SMTP id c16mr7591922wme.96.1601234962423; Sun, 27 Sep 2020 12:29:22 -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 n21sm6149609wmi.21.2020.09.27.12.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:21 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 04/20] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible Date: Sun, 27 Sep 2020 21:28:56 +0200 Message-Id: <20200927192912.46323-5-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Signed-off-by: Clément Péron Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai --- .../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 Sep 27 19:28:57 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: 11802341 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A25D81668 for ; Sun, 27 Sep 2020 19:35:17 +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 0466B221E5 for ; Sun, 27 Sep 2020 19:35:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="IWsRgMQk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rtzn+Paw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0466B221E5 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 5DE251AAF; Sun, 27 Sep 2020 21:34:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5DE251AAF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235315; bh=uqik9H8HsDWD5ZubXjn4BfWN3Etgvf034SG+MLEtjxo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IWsRgMQkygUDFyXzA4aLzZvlu4nx0P4WnpyjJvDOems5r+uk1hvjCpX6YbvR8+4VJ 6jBKOQ9Q/ZXnhGsRmlNx4bgwi7U8edUfAPEVVXnJkwlvj/SdTd9jOdr4p8Fi9aWcQj mGUMhQPb7IPURKRXuzmFkhvxawzha1A7HpBwjYGg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 22DBFF80308; Sun, 27 Sep 2020 21:30:02 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E2506F802E0; Sun, 27 Sep 2020 21:29:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 4DB2CF8022D for ; Sun, 27 Sep 2020 21:29:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4DB2CF8022D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Rtzn+Paw" Received: by mail-wm1-x342.google.com with SMTP id s13so4377705wmh.4 for ; Sun, 27 Sep 2020 12:29:27 -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=U836kMnIm9OVtnsGLVK3iz9PKF3eFCFtxxEFlUe/IkU=; b=Rtzn+PawsxJSG4C4aYy5ZxM24Z9N5/jaimpdUAYpG3Bhqd9xr8m769bY0+IQJ8IDNo ao7Ep1e8Is/jLDcNE/i17pLpEAOMcCOCbXLiulXHlyMER8griMBESWiRzrHzipY0VvNq 9S91j3Xb1sCOyZlbgRmH/b3spAvTDj7BiQ8mp35eLP0RMCaDroGNltMFoD4wHo+M39Ms HfrAXutwX1Qz7uOltoeGY9x8EN29AVYkhTwcbRyGoRxnQNbCAXZaa1By8E6cflVkRcHJ Ya9sVrhnGrWnyum2/uAJydI+GJFaaehbibN6DArKYIPwwqUprk7mnYqGRDxr2IMTh9tY 62hw== 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=U836kMnIm9OVtnsGLVK3iz9PKF3eFCFtxxEFlUe/IkU=; b=X4sLQClRL6um7p6GgSX0gY1MNevMegXWprheXMEnn9+50s1ZSWvPyDg9Te7ZqXusV9 aqYx9HT5cYEOAADQQwl2nVsYm0kpXT7tlypLIrX8S/YCa8DcdYb6ll3C4sBscu2ySM/n +cqSS1/2dnjaZiNUUj8vPQPi2WlUtSRnMX0kJXdxcPCZsQNdO8xHglhR8c6Nw6e6tqIH usHBGDPD+hrSZD6Vgp0DP6BFPD0XiWKLRR2RYbqB7vzVG0meM/8C0v0gqURZxZwmB/vL Te5UFuJSo5YBBRMg2O7CfWgGMcxskbX3O926wAf3/D54bFrWru3yFF0lTjfUjNDDUbhx 2lWw== X-Gm-Message-State: AOAM531QqUSafJ3KkFdkF8dxAeMv4dKmfCio/qy9FoVKm1RSQvFY9n2j r9uSyB1cYNmuPj2ahWRClC4= X-Google-Smtp-Source: ABdhPJyeq4LXFsGrus7Dw9iqjgtOE/MouNHW72Ax9iycW5Nb1eLOgqNecCcBkplo8oV5cUEXAOSebA== X-Received: by 2002:a1c:7c01:: with SMTP id x1mr7789147wmc.57.1601234963606; Sun, 27 Sep 2020 12:29:23 -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 n21sm6149609wmi.21.2020.09.27.12.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:22 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 05/20] ASoC: sun4i-i2s: Set sign extend sample Date: Sun, 27 Sep 2020 21:28:57 +0200 Message-Id: <20200927192912.46323-6-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Signed-off-by: Clément Péron Reviewed-by: Chen-Yu Tsai --- 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 11bbcbe24d6b..b31454eee43c 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 @@ -676,6 +682,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; } @@ -778,6 +785,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; } @@ -880,6 +892,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 Sep 27 19:28:58 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: 11802337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC38E139A for ; Sun, 27 Sep 2020 19:34:34 +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 5A169206E5 for ; Sun, 27 Sep 2020 19:34:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="aLhjh6hx"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LLJ61lga" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A169206E5 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 D2DAA192D; Sun, 27 Sep 2020 21:33:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D2DAA192D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235272; bh=c0Jmkle34lcelvv1AxYeXtRnxz1TEmNAwZTA+1Ou7jA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aLhjh6hxdihPb5Mnjzvp4BpoGCRGdoHTx3Q+lmguOY5b+l019rgEcqx5L8C2h4tPr 6KiJRtifEk+l2B7vY1a1ruzwSU560gb07lfrUJuxeuXLKxIYUO2Smnp78IEIVjmmXJ Jx1ggTBdX1FsGaMC73VWr453+To8B/npuBZDu/O0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 036F0F80305; Sun, 27 Sep 2020 21:30:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C32AF801DB; Sun, 27 Sep 2020 21:29:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 10457F801DB for ; Sun, 27 Sep 2020 21:29:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 10457F801DB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LLJ61lga" Received: by mail-wm1-x342.google.com with SMTP id q9so4396718wmj.2 for ; Sun, 27 Sep 2020 12:29:28 -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=JlxXAFB85DXviVVzU9snS3b51VMvFbEM+bK6288hNSg=; b=LLJ61lgaZTOMqpVlNPKwbccLGS/qKNP3TcbScbdHfhnJ57en1huY00FJx1oxE1n3LB 124K55B/1sRjka5yKE1J3I6Bx58rgfrPkKft9px1ggdQiNp1KYYH6mcOoSr13ZFI1Me8 NjNsx91mcPoB3s1koIWgwyg1jI2nX46eb+A383oA79ZuafsEv3KxKDGB2Ft5n5y52kAT Vbp7+spDWmRGv7zWxrdI8KJRymtbX6OF4cFQwwwBi8Xt2siPVqkJQMMR9LyGgf99g+eW bPaIaLUKmrj2trNfxDerkD8x9CzfwYQBI2WDsaE5rzUWF/QHzUTnHkJmu3/ybWAPMx5l piRg== 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=JlxXAFB85DXviVVzU9snS3b51VMvFbEM+bK6288hNSg=; b=Bij+Bsmg4EkdDb82/f5dV7tEdGn/3wMCvNFEsYGO5eFuwpZILKVJFxq0exxtTFXJVe Bv9F7cl++oru9d4vz6qBWRUociQsnRu0p9LNtO8fWs3IS5Ol4qYkZpC69QfjaGWrGdUH DkxaFm/z7bCYZfJTxjzoEXy2ZeTKY4g/N7S97FRWOeEo0iy91B+Q4KFyWbcp66EX003j O8esglu8iXRZ9oyLA5owRXgdnYAr0tfRizxTdENU8MMbensXADxd98WGCnVYfAhXjuBc 6XsD6yPpQko28Hk2SG6hNC4OgzqgtnV1TLEwNhRN2xJ8AOSwqiysce4EpN7gnXBNsbSI 8CXA== X-Gm-Message-State: AOAM530pOHHKp2LkxCc1Z00EanOCZvddLWCpBIZrY1iCzHaSZ05vvuHm Ij5e7GPGYNAcVVguzwfNN5Y= X-Google-Smtp-Source: ABdhPJzU+oCRv5cPGJT6Jhm1gGotghAHe7SKA1ZenbPaXNMkpCnPCWNF1TQAQSwhJCnE9s5ZUCum2A== X-Received: by 2002:a1c:e046:: with SMTP id x67mr7969163wmg.35.1601234964796; Sun, 27 Sep 2020 12:29:24 -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 n21sm6149609wmi.21.2020.09.27.12.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:24 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 06/20] ASoc: sun4i-i2s: Add 20 and 24 bit support Date: Sun, 27 Sep 2020 21:28:58 +0200 Message-Id: <20200927192912.46323-7-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Signed-off-by: Clément Péron Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai --- 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 b31454eee43c..60b2fec1bbe9 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -590,6 +590,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)); @@ -1071,6 +1074,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 = { @@ -1078,14 +1085,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 Sep 27 19:28:59 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: 11802351 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2EF46CA for ; Sun, 27 Sep 2020 19:36:54 +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 627652311C for ; Sun, 27 Sep 2020 19:36: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="YOUxDF0H"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m2gdLZ+4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 627652311C 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 67E5C1ADE; Sun, 27 Sep 2020 21:36:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 67E5C1ADE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235412; bh=JSYUuxqyR7L0JutcxKz9SrjvS6niDrE7O917SS8zhBE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YOUxDF0HH0xbVG3YAXtTR6C0nFyT/QgDt9lm8pXfy89IiEqzsKfwbzN/tHIpS38mw E4sE6QqZ1M+K2vjapchlxWfxy/Tqgm3UE1oe/9i90lRaVdgCezfW2sB4puq+533aH0 lez6raJLjb1txgzkIujHXx4zpbVaawIs7ewH22Jc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5DA83F80332; Sun, 27 Sep 2020 21:30:11 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B10C6F802EC; Sun, 27 Sep 2020 21:29:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 7F9CDF800B5 for ; Sun, 27 Sep 2020 21:29:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7F9CDF800B5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m2gdLZ+4" Received: by mail-wr1-x442.google.com with SMTP id t10so9582620wrv.1 for ; Sun, 27 Sep 2020 12:29:30 -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=403l/Us7aRgOIyQKfBkM8buNZnuotwhLbaKDtAVk4oo=; b=m2gdLZ+4J6yyiV2mG9DjdtecYFnEjhXB5woq2f3GfleRlGh8jgjTQR3nDIivt6V3qW VD0PFcB15gtUeUUkGjd6Gc/EfypLEHMqv5N/R4oJ+bBcgm9DG+OEQN+QVoNINrnxCp71 0HTO2vcjA3Lfvib+TSY8pfelrJGmbccbnfVffPEhuS5nnMoZdRjf/OL70wPpNHqb/qQe R/oBdSeoqTIoRjpGDY2goKYIYtFaATFk9rDKACViL8JUvBEJbjVjTL2DyQuf7inhKPKg qqkGy2eFokq4BvcLhvvOILJogY/gqpYOcWS9CwHID94pF7AQA1V5IPyajuXvbrqboxaQ OLlA== 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=403l/Us7aRgOIyQKfBkM8buNZnuotwhLbaKDtAVk4oo=; b=OW+F2lfZ1rJuCd/f7d9Xv1Q96DxJeUUxxTp70ZBVW3xpy4TiiDyhlzSFNEsK59WuYr uEPemUPQ+5Dl+xyRA5u/AdbSimcdlNX9su5vJ8DTBaGUHv9XvKpwDOB+UF+wDcBjpdMi NtKrM3URw3hsiJeZP85iJNuQzGfYSJyvimg4iHLjDcz7Bd4ND4sIZ/ST+tQQ3bw2zn1r sY5fveP1Q+Fr68sEZHn3gZax1ZOERzb/X3sul4aNUc4V9v22/PhGkl9fvrklsomed7P6 82jqFsI7Cibxjt3hwPfNIHnnRJdjGoQ71TQAJerAU9bkrfuF/lf4+wRrbeaTj6muPjjG 9twg== X-Gm-Message-State: AOAM5302gJdw/j0M85jV3k0NNrhMGdGb7C7vjkwKEmeFToUyHOXDcniQ wsK4MqyD/vVV83xteo/RLFc= X-Google-Smtp-Source: ABdhPJynrgzzn25/R/NZnQ/YXW4o8ysWoCGC0ENp2ON7akwtDALLDl6r/2CUcfYpIj7vCIdBjc2e2w== X-Received: by 2002:a5d:6886:: with SMTP id h6mr15683819wru.374.1601234965951; Sun, 27 Sep 2020 12:29:25 -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 n21sm6149609wmi.21.2020.09.27.12.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:25 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 07/20] ASoC: sun4i-i2s: Fix sun8i volatile regs Date: Sun, 27 Sep 2020 21:28:59 +0200 Message-Id: <20200927192912.46323-8-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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. Signed-off-by: Clément Péron Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai --- 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 60b2fec1bbe9..3f9110d70941 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1152,12 +1152,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 Sep 27 19:29:00 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: 11802327 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C51EF112C for ; Sun, 27 Sep 2020 19:33:34 +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 02B07206E5 for ; Sun, 27 Sep 2020 19:33:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="UaIU6Dy8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OAwisc7a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02B07206E5 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 6B9751AAF; Sun, 27 Sep 2020 21:32:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6B9751AAF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235212; bh=Ms8o1f0+5uqa9PFAdfwjqn7JZijvTTSa/9naGsS7rXg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UaIU6Dy8MZre4u3GpMyT/vJr3H11GiO9j6wgGYa7jKepgdMuFmYIEl4m0tjxHf4Jn lXsf2guzcN+czbkELa/sumX5x81c8zVToSZMeA8ftWhZdMeMoOUEr7cYFkRyeiYEW0 iqDrlFd3JBuK4p5PRn0QDeqggRPYhm+4UBPWHch4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 55208F802F7; Sun, 27 Sep 2020 21:29:53 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9197CF8028F; Sun, 27 Sep 2020 21:29:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 C46ADF800DF for ; Sun, 27 Sep 2020 21:29:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C46ADF800DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OAwisc7a" Received: by mail-wm1-x344.google.com with SMTP id v12so4627230wmh.3 for ; Sun, 27 Sep 2020 12:29:27 -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=Yae7P0Q6083dv69O1TuhnVIjdtmUZr4BtGd67cLDrDw=; b=OAwisc7aL0o8lIuJum3WM3sV9ofN665KoKM9NtgnT/G8zNo9Q9fgkMTuJqx1czeNc6 t1lx9xyjNwWHn8T8dqJm7/uG89/1NEjyVHD9C0S3HrqsKi5L5zwlxwMACbPvSgp6iWTd Dy0/3YjquAtjsMFUxepIlSBFuo+pWSSG5Rh7fyL016BPO28nT1wjpu5yHxRPxz8md0tG YT1lo3v6o7OkhuMsva3JMXgsP8srntNNyEWGRcq0GK6BaA9Q1dA9XquEzK6VS0a/uoI9 M6QVFWhXRstuXj6maGreKLFXuCV7/3Xm2rPglp5ST/wqN/EtFpRsYi/EqTbHR86zAeA2 /p4w== 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=Yae7P0Q6083dv69O1TuhnVIjdtmUZr4BtGd67cLDrDw=; b=qdSP7jSlITC7HclZZ2iNE2UmxakgsUzPXkx4jC1hONJ57PBDhLLX9IlhDri4W6FW9G lUxpRLhHC/C7xIfYPUn4M8cf53FkiHT7Sri6VHZYdf4Uky+uKxf9bNBhwswVtr8WZ3e4 5ZTZkSyScFZlEPHP6uDsbYydgEyWLfv7SxCPWrKYdpn+bo9xe3Vbi4WPY4AobwRYVQoW a3LgYXvw4uxhPwqi2v9eVPXME+NmeW8qoa0zH4OPEggTEmQAK+3L3Kxn7M34Wo43LAO4 CIMRenfQ1sLpzD6mgtNclt1YgXENk6VEUMVSEIiZePMe0wKUhG2K5dkCElogyVasJxVd 0gow== X-Gm-Message-State: AOAM530Dsadm4IUoACajGa6+6ssgtZkxrHXC8gpBiSf/B8Ld40rcDcNs UAW0aXs2LlZfMWyHfycvXHI= X-Google-Smtp-Source: ABdhPJzIyHV+/LUfm7D9nL9vW8OGycgbDVJ8xGPlS1ktTBXE2yfbAvN/oB5kTGyRlhsp44nQJOXkXw== X-Received: by 2002:a1c:f008:: with SMTP id a8mr8404691wmb.155.1601234967071; Sun, 27 Sep 2020 12:29:27 -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 n21sm6149609wmi.21.2020.09.27.12.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:26 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 08/20] ASoC: sun4i-i2s: Fix setting of FIFO modes Date: Sun, 27 Sep 2020 21:29:00 +0200 Message-Id: <20200927192912.46323-9-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Signed-off-by: Clément Péron Reviewed-by: Chen-Yu Tsai --- 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 3f9110d70941..9cd6cd1cd284 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -586,6 +586,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; @@ -914,13 +921,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 Sep 27 19:29:01 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: 11802333 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52197112C for ; Sun, 27 Sep 2020 19:34: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 670DC206E5 for ; Sun, 27 Sep 2020 19:34: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="A283GcRX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hYYtdT5J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 670DC206E5 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 7A8FD18FE; Sun, 27 Sep 2020 21:33:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7A8FD18FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235258; bh=rm4WkJekPu/v4PudpiRV9e0i9QeJ9EUVLvWeDy27Qh0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=A283GcRXD+AGnZwmDinn6tMV4z79Ml5n7zjlU9WFPT0A1ocbJnFZINuShQswvzAYt MetUqKGnmNRBsc9hJ+UoInByVNFUh9UqYoiL8TIyevL+Ccqzv+FrEEwAXUYDLuAr2G tANfiRVVCq2thChgEvNGBgynZsVBOxzMEspPhbek= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 32C81F80303; Sun, 27 Sep 2020 21:29:57 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 11659F802E0; Sun, 27 Sep 2020 21:29:38 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 9F184F80292 for ; Sun, 27 Sep 2020 21:29:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9F184F80292 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hYYtdT5J" Received: by mail-wr1-x443.google.com with SMTP id m6so9588375wrn.0 for ; Sun, 27 Sep 2020 12:29:28 -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=3W8D6ez0E1EN9kunjStsHDeyLV2So0bhgmjFnVu+y0o=; b=hYYtdT5J2lbYtw1h3CNjAzek2lH+LzJZdHVECbEvdTU/jLRW1oXuAcVlyA6z/Irotx kTZYef2GiX4xFbLOEoY68jUAsnlYyfybzCVmPVvjjDe9sU+NBQbH3BOJEQ2iyyjKwmZz XqA0syBhyivdtEC0L0MsNGIOojTDvboRPwon6/BuRRzKkfO0+AhaRjQBavKrMZz4Ccqv hSbB9A1D75lTZ/tXtw1LzOMs4bZo0PDdSYvbKNUM8f5HJSvMt9lDQZXaT4ICCHHfFCfi 5MEinIW2essWfKAZFGgWWnRupJ/qb841ZTUqAiRIaUeNCoqYZAbZE/7p6YT0/NWgt++f cnIg== 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=3W8D6ez0E1EN9kunjStsHDeyLV2So0bhgmjFnVu+y0o=; b=eZz5zuoesIJO1D+5ya/m6VXKOwwjeux/sIzuSJXMfcp60/JXRz4QTWafm6zJmCX3q1 Q0QXKHz1plSQUY/ptCiZuXAlBqz/W6zxFX8qIBQa76BOONNecXocYhtTmVQW9nehxwHm he+ldOie5xhrXU4LtsRURTwNPiNuO3iiPt3G2lupRqGkp4M456F1Ba8wWVxS3RCVCSY6 EF/5D45vjf76oiAHsuOewpRma+Ox/QUcCWOkSUEJnC3y8TKszrGdz0Ua2RzJtGJOBhDy 0b4H+AzAq48o5z9/vsPCCr2cw2To9Y5B+UF6bDFiusSCLI/OPsQTAfQTj/8SI5ufF/KC QadA== X-Gm-Message-State: AOAM533RErN68mgT2OLUjhiVxoiLWsNOL38yObL5p6vaYPNuVukPnI3r uxsY50APH8m5zxiQAXz6pR8= X-Google-Smtp-Source: ABdhPJxdMPb3y8OLx5/uCv7BmgNFZaa3m3cSLR5JV5R5qBm9oAw2aUmQrVEJFSUhiTLVyvr2EGEGWQ== X-Received: by 2002:adf:aadb:: with SMTP id i27mr15006207wrc.258.1601234968172; Sun, 27 Sep 2020 12:29:28 -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 n21sm6149609wmi.21.2020.09.27.12.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:27 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 09/20] arm64: dts: allwinner: h6: Add DAI node and soundcard for HDMI Date: Sun, 27 Sep 2020 21:29:01 +0200 Message-Id: <20200927192912.46323-10-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 the I2S node used by the HDMI and a simple-soundcard to link audio between HDMI and I2S. Note that the HDMI codec requires an inverted frame clock and a fixed I2S width. As there is no such option for I2S we use TDM property of the simple-soundcard to do that. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 28c77d6872f6..a8853ee7885a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi @@ -67,6 +67,25 @@ de: display-engine { status = "disabled"; }; + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "sun50i-h6-hdmi"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,frame-inversion; + status = "disabled"; + + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s1>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + }; + }; + osc24M: osc24M_clk { #clock-cells = <0>; compatible = "fixed-clock"; @@ -609,6 +628,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"; @@ -739,6 +771,7 @@ ohci3: usb@5311400 { }; hdmi: hdmi@6000000 { + #sound-dai-cells = <0>; compatible = "allwinner,sun50i-h6-dw-hdmi"; reg = <0x06000000 0x10000>; reg-io-width = <1>; From patchwork Sun Sep 27 19:29:02 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: 11802345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C46701746 for ; Sun, 27 Sep 2020 19:35:54 +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 48A972311C for ; Sun, 27 Sep 2020 19:35: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="T6h2hxCe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YOWcmmkG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48A972311C 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 AE1CD175A; Sun, 27 Sep 2020 21:35:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AE1CD175A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235352; bh=eWiiq5Url4azgTOk6WrrOLGo89ieP4u00auyyK+0BG8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=T6h2hxCel69V/Ol1tJ684IqUIpSKFMYlWVL3dMvim1PP5/z/DWjSWIrGLKBTSXJf7 yQGukEz2xpD/txvGvO0JOtFOFwWjkGlFRKIhnrvHspsl3mL9ufYv896yhPU6EPbgQu auJmW5PD8I0px11kTSwbN5NZsq41GhTbJg1Qig+U= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9FAB0F8031A; Sun, 27 Sep 2020 21:30:04 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 409DFF80292; Sun, 27 Sep 2020 21:29:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 DA062F8029A for ; Sun, 27 Sep 2020 21:29:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DA062F8029A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YOWcmmkG" Received: by mail-wm1-x342.google.com with SMTP id v12so4627354wmh.3 for ; Sun, 27 Sep 2020 12:29:29 -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=x/iq/UaybIFP5fVA6Ln+hpouuRJu9kADukrtHp3BLVg=; b=YOWcmmkGZkoo0xR3hpRolwIz5WB4o72C2m4j4wWLhP0awIseYW8VrNkbz5M7TVqAh7 nzd/4xyciScgGAlNkp9Qienl1nb0Qe+wKzdkBpQ4VEIKGvw6slRNbX17TpNhy+o3yuLA +RQKKcnSbAqRio0HVhoUxiTb6xRZCuTjtNpwih+iNRagzwKS7LOTXj/zGGWCu2TU1JvT TQSmgpe5GuKC5SBoCRJF6DwO/kuBq6xZ36INr0g9z35eJUU83TwGviF01wpNuhaQNnjH K80ks2dao6LktdmUIGf9WJ6O7Xg0TF3onlpPgSoyS6+crm70EbqY0FetjCIgX6krXfkw cgXw== 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=x/iq/UaybIFP5fVA6Ln+hpouuRJu9kADukrtHp3BLVg=; b=je4AKVoYS9ktshVwTGzWtt1Pv2vWMZzXfZ/NFrpiZTmvwpb5fPRz2QXbEpKcfUiuwz a7aMX2jQq1FkAB6bJe0QylsegCAQsZwciQS4Us1M2p4F4nSAwlZs/FwShwkOUIdwLRqd RpkQeUqTgIcaO/sA0NlgfB9DFHMUYmzd5v5wmrtkXw/8cAOhxNaGM3L//C8L7E6CFs4F VY/0EBJ4Vmt1QKbE5lbb4hel7FHx42h4tUaSQWulRXD9v4a0zHWWnqnQcaYTikMEeBOU ON1Kim0+Yjrjvjos0tenB1bHTKXm5DvdAglFnKzT4r8dJEb7seyBENaLx2dPSdMI6ECt VOrg== X-Gm-Message-State: AOAM5300kaiQdwtXcOWMvGk9+59HW2TdFRPW2D3bB33izK8L0VWSpib6 K2kzqJ+o8qkAwwS/riJXHqU= X-Google-Smtp-Source: ABdhPJwEVVny6H3wcCVbC8vChEo/WrPglNZDmGptdt4Kmi1gaRlgOVezaOJH6sDtWeJkUL30HiHAbg== X-Received: by 2002:a7b:c453:: with SMTP id l19mr7779709wmi.163.1601234969221; Sun, 27 Sep 2020 12:29:29 -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 n21sm6149609wmi.21.2020.09.27.12.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:28 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 10/20] arm64: dts: allwinner: h6: Enable HDMI sound for Beelink GS1 Date: Sun, 27 Sep 2020 21:29:02 +0200 Message-Id: <20200927192912.46323-11-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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" Now that HDMI sound node is available in the SoC dtsi. Enable it for this board. Signed-off-by: Clément Péron Acked-by: Chen-Yu Tsai --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts index 3f7ceeb1a767..049c21718846 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts @@ -118,6 +118,14 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + +&i2s1 { + status = "okay"; +}; + &mdio { ext_rgmii_phy: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; From patchwork Sun Sep 27 19:29:03 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: 11802349 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1645C1580 for ; Sun, 27 Sep 2020 19:36:11 +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 8107423A32 for ; Sun, 27 Sep 2020 19:36:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Mv4V0Mug"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dtm3KvhW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8107423A32 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 DE65E1ABA; Sun, 27 Sep 2020 21:35:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE65E1ABA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235368; bh=nsQWo721z/5moalyYt2mBIl3HjKEG33RFt/ZrX0MPsY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Mv4V0MugDoCyqW6iCs2+TJsoGycti4tgkJYEteuLjMO5d4qXKKUqFbw5jGwH4ExyB G+u4sE1NjJ+4gyQriBA6gOoXropMTpyj9ZKpH8LOxNnq7kz7FYCGFvyNivxkddavgo Gvq8xLGKrg4watVHUeOudqn6Cwaoqqb7txD9kz6c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2BE07F80328; Sun, 27 Sep 2020 21:30:10 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6DCE3F802EA; Sun, 27 Sep 2020 21:29:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 D21A1F802C3 for ; Sun, 27 Sep 2020 21:29:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D21A1F802C3 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dtm3KvhW" Received: by mail-wm1-x344.google.com with SMTP id v12so4627391wmh.3 for ; Sun, 27 Sep 2020 12:29:30 -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=qinYT+htnv5raGBG7/lcRXg3HUQ8nsG0V/iyMvoCrjw=; b=dtm3KvhWEjETON47MufCoWFczcCy9gWFncPJN6+SivV/cbZW/bpplLpDhNS2X0TXos jrLvrLhY8Gt3YHD7TK/49WPAmIbIkFLCj3UAv83nMC7/J3v0M+WIinhl7DHjoRP4Twgx QBK7KlThYbVtGDz3gCtB2VNdG24PNDqJLbTPrM7r1yLM2r6gefMj+CHG63Ykq3F+8XjN O+EMH2d+GRLYyXbFBffJbyFVJ68RBufeP4Bz7dccEOGoVKR5bg1C+P4XOegesib4PYNO JyRDGEYeO6zzYIMuzv/2lCkRnZyu9+LXe9h9nGlipwMPacBDG2XZ8Dk2UR62MjpFL167 qsfw== 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=qinYT+htnv5raGBG7/lcRXg3HUQ8nsG0V/iyMvoCrjw=; b=O8+bChsRqOdlOQFVaP6mjRPYte3qTuHw1k1vtmxTMDlzmuY4r+nI1An+RLKXrFNYYB 4dmy8Qevnts86RJL8zJT2ZL+GyO8yJJ823Il6wPutRe97qVtZu7cTgmqjae9aIW2zqf1 QjQthF2IkT1ZdZu31njV/jl05+6rYzSMqsqgirZ53TTEJrNr+pigYt0fOee4NOEUw5yW wMLhG/0pGbyl5P+Qp60Kpip+ZcwLi6ayKlww51vXJnv2dwLpJy94La5Pkoh+HDTlc1PD PVfQ+DEdXWcB6e8CyA/lPgykTsksLMydQL/owi49jNkBGZDq+xajGtkwErxfjRQ82JHQ esTg== X-Gm-Message-State: AOAM5311BQXu91Lj6LgGm84xOiHrkl8xiUW8Eb2cnb7rz6Uxr6dovVex cN4VDv1qTx9rs9KP1ta7BHY= X-Google-Smtp-Source: ABdhPJz85EH46sP614KXnsZfvh9Dt7ZgvmqNA47Uzmxfxe/quEF4Yk8pjPcdOy+HpsevslnpZ/rqLQ== X-Received: by 2002:a7b:c192:: with SMTP id y18mr7685544wmi.108.1601234970301; Sun, 27 Sep 2020 12:29:30 -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 n21sm6149609wmi.21.2020.09.27.12.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:29 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 11/20] arm: dts: sunxi: h3/h5: Add DAI node and soundcard for HDMI Date: Sun, 27 Sep 2020 21:29:03 +0200 Message-Id: <20200927192912.46323-12-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 new DAI block for I2S2 which is used for HDMI audio and a simple-soundcard to link audio between HDMI and I2S. Note that the HDMI codec requires an inverted frame clock and a fixed I2S width. As there is no such option for I2S we use TDM property of the simple-soundcard to do that. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 22d533d18992..7168e9412410 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -105,6 +105,25 @@ de: display-engine { status = "disabled"; }; + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "sun8i-h3-hdmi"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,frame-inversion; + status = "disabled"; + + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s2>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + }; + }; + soc { compatible = "simple-bus"; #address-cells = <1>; @@ -662,6 +681,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>, <&dma 27>; + resets = <&ccu RST_BUS_I2S2>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + codec: codec@1c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun8i-h3-codec"; @@ -793,6 +825,7 @@ csi: camera@1cb0000 { }; hdmi: hdmi@1ee0000 { + #sound-dai-cells = <0>; compatible = "allwinner,sun8i-h3-dw-hdmi", "allwinner,sun8i-a83t-dw-hdmi"; reg = <0x01ee0000 0x10000>; From patchwork Sun Sep 27 19:29:04 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: 11802357 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C53D9112C for ; Sun, 27 Sep 2020 19:38:32 +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 2AA252311C for ; Sun, 27 Sep 2020 19:38: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="Ob2pyKqD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rKfMWekh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AA252311C 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 60EB71AE1; Sun, 27 Sep 2020 21:37:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 60EB71AE1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235510; bh=D/YVt5lbsY1L8tB5Rw2FqLgcE37Fu1cKZ7jw3rmRlyY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ob2pyKqDI5rT5YwxW8xyHWQHOY7NJVsSvPQ7xYMMylDeIa87myC3OxWJF90HLL2Xd EG4Rf3FpD5mUgEandZEmkTSzi5Cg+eeJ9ByaUPJO7rew68NXUNd0hWy8GP0QqHmagG YZtSpD9C0KvxV3Pc7IySeqsITMhlFvzZAw8r1fYo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 43137F80341; Sun, 27 Sep 2020 21:30:15 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B5C8F802EC; Sun, 27 Sep 2020 21:29:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 6975CF801F5 for ; Sun, 27 Sep 2020 21:29:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6975CF801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rKfMWekh" Received: by mail-wr1-x441.google.com with SMTP id w5so9524527wrp.8 for ; Sun, 27 Sep 2020 12:29: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=9TQWIqgvaw89lJDj44ur6CfXLBdvHwh5oAFQqUb8yKI=; b=rKfMWekhk7Ns8FICmbviit95Pt+WpU7TuXkoPXKkf/DGkKAG3sWtM2kxCDfM58R6fx iVEiO1d6KYmkiz7thtuGvxuwOSXzNXG9eql/5LS4M5wiO8ysiFXpKONZ/TlmKAEQQr8j fHVqVk7/lOlOXEbzw6z80vG6C/quZb7hMDfffn2WuK9FHEjWsAVhi0ClxuKduKBqakRE SUhEkcSa2y5pLO7vsJ1CIcBXpNL41i72YlDSFiuBUtXNq+4vHRsECc9+b587v5PhByPS F3PARu87zvOHatIjf788LXYpRCGbGFQPpLcxSxgiNjnGKgJ9833xFZxPWxecLIPUcYY8 5TRA== 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=9TQWIqgvaw89lJDj44ur6CfXLBdvHwh5oAFQqUb8yKI=; b=jF4Wv/vWDoQ+uu39I+vRPgqxiDOJ1KNyxvkU03XXw4mankee/n35mDo2ilfjdxBYo8 H7M4rsehyzpwRIIhfCa+CiQKdeEbvxG24QT9JE2bKZYmVIz8+F7znE6Y3E6VGZV+QDOP HK7/FqcvmkeuNbLzFnOI5cJkezWiWgWnW25RpVniVKlcmN+M8N4Lizaxpcyiwjy1x0kY oF3C324jqqTIazIm1xZZVPLG6rR1/pfj/fFuOnrW66EvIwe6yhVHqeycUNlGrVUQAv9Z sDl8JIHYByyeQV+hmyYDrHsBBHi8Kl4WO7XNowzBNJZTnQVq38V8rIgzMhM4cclKr60T Lmdg== X-Gm-Message-State: AOAM533t3fyrUcsiYPXZ72q3lUlbKcpfwLR98orUwPNoSRM4q3Xpr6FZ cD0WBBBWG7XpNIEfrCHN8Go= X-Google-Smtp-Source: ABdhPJzBvHHOuka+qYBTkGrJbTxh9J56urhJS3nHGtKfbwHU33hQ2wR1ys5AololhKsYuJSIYeYALg== X-Received: by 2002:a5d:4c4c:: with SMTP id n12mr14893492wrt.162.1601234971305; Sun, 27 Sep 2020 12:29:31 -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 n21sm6149609wmi.21.2020.09.27.12.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:30 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 12/20] arm64: dts: allwinner: a64: Add DAI node and soundcard for HDMI Date: Sun, 27 Sep 2020 21:29:04 +0200 Message-Id: <20200927192912.46323-13-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 new DAI block for I2S2 which is used for HDMI audio and a simple-soundcard to link audio between HDMI and I2S. Note that the HDMI codec requires an inverted frame clock and a fixed I2S width. As there is no such option for I2S we use TDM property of the simple-soundcard to do that. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index dc238814013c..ba8a84e6e993 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -102,6 +102,25 @@ de: display-engine { status = "disabled"; }; + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,name = "sun50i-a64-hdmi"; + simple-audio-card,mclk-fs = <128>; + simple-audio-card,frame-inversion; + status = "disabled"; + + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s2>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + }; + }; + osc24M: osc24M_clk { #clock-cells = <0>; compatible = "fixed-clock"; @@ -846,6 +865,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"; @@ -1143,6 +1176,7 @@ deinterlace: deinterlace@1e00000 { }; hdmi: hdmi@1ee0000 { + #sound-dai-cells = <0>; compatible = "allwinner,sun50i-a64-dw-hdmi", "allwinner,sun8i-a83t-dw-hdmi"; reg = <0x01ee0000 0x10000>; From patchwork Sun Sep 27 19:29:05 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: 11802363 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4377112C for ; Sun, 27 Sep 2020 19:40:08 +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 4BF982311C for ; Sun, 27 Sep 2020 19:40:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="IodJt/Sm"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WuSM27ih" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4BF982311C 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 A3E191B00; Sun, 27 Sep 2020 21:39:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A3E191B00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235606; bh=K4dmeNGtrcbmftZRBPeJGLx+M++AXOW7aIu4gnDm/Kk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IodJt/Sm+/hlih/tY6rWehQb+mgcVhsjkEDh9IgxGT4lYtUkQbi5T4LkO2W6znvtS pPq0/w3sGXJCq4Qi088Pgr1Whz2cpzjo4XGC/1G7majRHcmcvApYQc6VlzmV/CTNNR n/E3BN8EDUxixizxBM+7juIFi1WThqHovrafTrHU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E8608F8034C; Sun, 27 Sep 2020 21:30:19 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6DE66F802FF; Sun, 27 Sep 2020 21:29:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 3E402F802DD for ; Sun, 27 Sep 2020 21:29:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3E402F802DD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WuSM27ih" Received: by mail-wm1-x343.google.com with SMTP id d4so4376932wmd.5 for ; Sun, 27 Sep 2020 12:29: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=4HdI15SBEuyVNQNB+e23d+K5pgBDpyUoqfbF257aXR4=; b=WuSM27ihaY7HvK2d2jBbe8/5M6vGm4KLG4Ix/Tru69x7t4pNz83yNOd9vreTdOqWAK V61OQsNGlsVPePxpPM5ysIZSglxgADvF0EDAJqhME+KvZLA0wBsUxpEZTSVv4+9qtOjS w+9xmT5szD1SZ0updA+1F5x9+PJk4GfTc9BzHRgTwXpxclppGupLuGJm34fwfiyM1Yy/ MPA/Hn8fsL4Sy0cS6k6zL0IvapMRHPlLnvpMPLi3Lx0bZ1QC8Ngk0c7ndbAHAXGfqlXm dNraa+h3+AExmcLQfsFiB+T1Wo5v6rgJvani4PEk3RZtgYw7HG96TTGDgCAEAuLHiGhX Aitg== 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=4HdI15SBEuyVNQNB+e23d+K5pgBDpyUoqfbF257aXR4=; b=RVnX4TBNXTqzs4M2fcPyglOK1zjOL1usKilenjtOsqcBpSVQXi/YRpJN6nGNpI1+NG O24hU5uKmGTrvUpEz6sXqpmKu4Qy5kMHmoZTgNpm3ONACkY0XgP9CZ/RNruvhF37H2s6 WMqw4msiYPxbZy9vHwvSu2APorFM6FJPwahS1kLLDituFh42C4+8lN50Mj6q2QmTO0P9 w6TCMQHV4CxMe+7/sFsLwWR0BKFz3ECpizDh2t9BQ7iv8r13xivDdBVkN0ihX6GtZ4G0 lb7mNsV8A8fzux1XEoF0lTLn8bqYKhUisLcBgC3X3UC5256dsluSJ1fVRL8smqCDV3TT cC8w== X-Gm-Message-State: AOAM531R6MEAqDR7Xa31LSotYNNt/OUwGI1fDr0Q0gG2P8cpQKnuL1iD gd0V3W4WLdA+ar2dvvgmJGU= X-Google-Smtp-Source: ABdhPJyURiLf4YlSa3Qa75suU5D4nme65ur4OltvA877EE1WX/lOUjgff/+olLYacFgpFL3o/xgK/Q== X-Received: by 2002:a7b:c210:: with SMTP id x16mr7930499wmi.37.1601234972334; Sun, 27 Sep 2020 12:29:32 -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 n21sm6149609wmi.21.2020.09.27.12.29.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:31 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 13/20] arm: sun8i: h3: Add HDMI audio to Orange Pi 2 Date: Sun, 27 Sep 2020 21:29:05 +0200 Message-Id: <20200927192912.46323-14-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Enable HDMI audio on the Orange Pi 2. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts index 597c425d08ec..64e8e2829f27 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts @@ -144,6 +144,14 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + +&i2s2 { + status = "okay"; +}; + &ir { pinctrl-names = "default"; pinctrl-0 = <&r_ir_rx_pin>; From patchwork Sun Sep 27 19:29:06 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: 11802353 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 967B8112C for ; Sun, 27 Sep 2020 19:37:28 +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 1CA942311C for ; Sun, 27 Sep 2020 19:37:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Xeo5sYZP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hKf3qxaT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CA942311C 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 9067E1AC9; Sun, 27 Sep 2020 21:36:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9067E1AC9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235446; bh=Ffu0p009uCbD0lcNfaK6xKfJNWxF0SG5XCL5X9Lp6GY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Xeo5sYZPNmwQAG867ep6K4v/UePjizNDYqBmPhy+gmyvCnVjA/EL8cbdNNKBrpubZ nGmU1bFZNLVDsoPfd5F4L2Ze39orsaUdGbpxlC9qY/AzmeECj4WcfelIcX/7GKV8NL auc0e03Di8Aymgvvl1R3CAUWZgaWm3ikOWxOeuyY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8623CF80336; Sun, 27 Sep 2020 21:30:12 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E17E3F802EB; Sun, 27 Sep 2020 21:29:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 E51D3F800DF for ; Sun, 27 Sep 2020 21:29:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E51D3F800DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hKf3qxaT" Received: by mail-wm1-x342.google.com with SMTP id v12so4627520wmh.3 for ; Sun, 27 Sep 2020 12:29:33 -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=ZKqv9b9ye6nXeHQ0sv780xJ1tkZxHw2igrPZLKbetcg=; b=hKf3qxaTjVKN4DLweISEOSGqgAW29sTg5C75FqFcWoZth2AzalZ9en0t8NWvcBDLK0 S1L7hJblkLs8vBQjLwkwnF2oveIDWtUyLZDohZSkxcucHOU9VrYU7XBcaeikc1y/FE4w kaGs9b4Am42PfOfnlc9dGN9ufD87FmJCFZlF3HmGP0mWrIlq7S37thmWbOk4QdImVNMR nXwEyvnwZ+DDxZYCs5Q3DVfAP/MBSOs+3zBiM1L5/XMuNmrZcPfp52EdM9fFzaXWfmBo FOUjlPPtAmJyMmXomsulwk8cAE/D0v0vN6qINHfrbwcbQjgSj1J1KKLTgahuwzjmk0ma nglg== 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=ZKqv9b9ye6nXeHQ0sv780xJ1tkZxHw2igrPZLKbetcg=; b=pxWxnPdZswuQgULB55upB7QMPOPzISCAlwgkOXrpq0ttGA80M9gvMjTEq55Ak4U3s7 rlNA32A7JgI2UlEarqTklLz1vVpjfEOBSWLrPFJbmbXuYvT5rgIpnJrsDf1MYWW5C8u7 KOI0st4TfoiqJw0/wkhpj3Pdbq0196Axb0Me3HobNgXXjvufuphJp+weVj8ZHBhabcsA bJOtbpZ/NT4ck3DFFwF5vESqg7s/zllL6brYuZfCwElIqXZEnnKVi87AY4q+OhsFt70v lSU/MCppuNRWmdGLFNv0yBmLlt5xtX/13RTks9xO0fkrYDV/gLEyQ2y3+wz/zgzrhJ7S KPmA== X-Gm-Message-State: AOAM5310AmGpevKUs1sb1fTIa35yBbW3SLRJF5ND3SuvIgT4q7WGCRxT PuR1rrtLcjqjBt5MoCQw7LI= X-Google-Smtp-Source: ABdhPJw/QDoYhDvnvxpteGvAG0/B8IDFN19JpZcPo/KEqFbSJ+XylG/NliGSOFtjvxUpV4sYmexJZA== X-Received: by 2002:a05:600c:2118:: with SMTP id u24mr7934660wml.59.1601234973311; Sun, 27 Sep 2020 12:29:33 -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 n21sm6149609wmi.21.2020.09.27.12.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:32 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 14/20] arm: sun8i: h3: Add HDMI audio to Beelink X2 Date: Sun, 27 Sep 2020 21:29:06 +0200 Message-Id: <20200927192912.46323-15-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Enable HDMI audio on the Beelink X2. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts index 45a24441ff18..f9bec6935120 100644 --- a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts +++ b/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts @@ -142,6 +142,14 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + +&i2s2 { + status = "okay"; +}; + &ir { linux,rc-map-name = "rc-tanix-tx3mini"; pinctrl-names = "default"; From patchwork Sun Sep 27 19:29:07 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: 11802361 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CEEB112C for ; Sun, 27 Sep 2020 19:39:29 +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 89B862311C for ; Sun, 27 Sep 2020 19:39:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="F3m2skrx"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BTvsFbJm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89B862311C 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 0041F1AC3; Sun, 27 Sep 2020 21:38:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0041F1AC3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235567; bh=+RfYBz/Rj8O5KxCb8uCFafkT4TJfTlahyp2IDTlfBgc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=F3m2skrx/Eqb38PtQfIMP2BZ9vXkqYHxantk4rAkx02h3jpnG8jSpZzD9iBDvgvCA QANlukHfUC1mbCuyoRe7NZGzKi1hAW96GWcf7YooBmFK50GXpzUdPjejWarJoFOhP+ O1wyVQ2IDSPK7ke/oAWyWvvqsqkqiaEN4fekNoX4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6F1EFF80349; Sun, 27 Sep 2020 21:30:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 916E6F80303; Sun, 27 Sep 2020 21:29:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) (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 5F6B0F8029A for ; Sun, 27 Sep 2020 21:29:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F6B0F8029A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BTvsFbJm" Received: by mail-wm1-x343.google.com with SMTP id s13so4378234wmh.4 for ; Sun, 27 Sep 2020 12:29: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=dZhYwaoUjzd/wEdIR2SZMGyqDMCzyDmEzzuRB3l0wN4=; b=BTvsFbJmBED9nWWFx0ySyEfb1ek2Lk+a2RoS+gWg+3xw8sD3JEgL0GgtQjZeGmVUOc DWM1C0N/ZoxPbw+FwNOb9JCEx3jP5cEO/eC/maZPLG7eBgGGBngVaOoIug4LFiaQp760 sfUdzB3WQk03K2iVs+JADPUFO3Rcx3bNV1i4Og+NeewSxdaycKCfHTndcyag/3EJUHOA PbsZW0PmaRvM2a37Az7bPf30z8K5EkHAfZvWJ2HpKI+lkClZqvIll7rMAWmeWLikhw4P HATjfrZsgNynX90bCbYvga2B+JLvTR6e1V68dxRv/QxlH/AeyIyrYRCDfo5zuZxeEVpJ SMjQ== 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=dZhYwaoUjzd/wEdIR2SZMGyqDMCzyDmEzzuRB3l0wN4=; b=kGpSkBFGYi1QKXwsSJOmJGa+z2wnOeuh9N8Lzmn3OE/b1vXlaiJKpbEfVZiYkqJ103 hsFu5RJYQ0s21pC73jB+LQahaKPf9ZyDuCjn7V1GpbQ9lzPWpO9C3L7oii5NgCdId/eq 7uS9Kj6Dg2iT1g4ydKTsmefGoQlRvtjJ12OBbBNYPF6fXAHvFHH373lO4XT8uyPD3meg nvkFZEEFC8jP/wWOcEV+YV7HsmJbDYAAA8yX92Icz7Jdn7c5SbE8XVHZAM9sx/hiyVIU PPZ3cT3DlP/ggfzJ2LI9cUPFgCxdzF0TH+Q6vXABYe/Xoydid/ej0uUXz9DSorXrEHtW X2EA== X-Gm-Message-State: AOAM533XoGvuy4ZevLQ2VhQNTx4EvSkILa6ut3YldtqCAFN4NPFLmyPH I4RGELy86cv46dZ3c/kJ+NI= X-Google-Smtp-Source: ABdhPJwCdIQR98e1axxF8yYJ0f+R6ecrEmDf4R2AGdjdcLpkVOow5lcdLgZ30NtEJrSCvDX/+bjH4Q== X-Received: by 2002:a7b:c1d3:: with SMTP id a19mr7842009wmj.19.1601234974395; Sun, 27 Sep 2020 12:29:34 -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 n21sm6149609wmi.21.2020.09.27.12.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:33 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 15/20] arm64: dts: allwinner: a64: Add HDMI audio to Pine64 Date: Sun, 27 Sep 2020 21:29:07 +0200 Message-Id: <20200927192912.46323-16-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Enable HDMI audio on Pine64. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts index 329cf276561e..b54b02e59085 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts @@ -99,6 +99,10 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + &i2c1 { status = "okay"; }; @@ -107,6 +111,10 @@ &i2c1_pins { bias-pull-up; }; +&i2s2 { + status = "okay"; +}; + &mdio { ext_rmii_phy1: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; From patchwork Sun Sep 27 19:29:08 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: 11802355 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E1A7A112C for ; Sun, 27 Sep 2020 19:37:50 +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 1BB142311C for ; Sun, 27 Sep 2020 19:37:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="qiPjOhKH"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F6ph8XTb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BB142311C 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 84A9A1ACD; Sun, 27 Sep 2020 21:37:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 84A9A1ACD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235468; bh=1jaUTW1IS/d+0xKEIaljMnyEL+efvJY6RnPLC7maicM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qiPjOhKHJBQnH1qRtgCpoQCgf48bUfc0HxkmKzCb8tRqWrJSEYOawbxvBwtB3/bUb zCIU8ZSPFtAEfNzdsgyB7CphwxXQKdOFoJySWcquzm8TLu8ZpgdsxZyYFmyTjbVGUk E+DWwrv55xd5AHo20Ai1jRa/iNcmVEF0xIgc7O+0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C97F6F80338; Sun, 27 Sep 2020 21:30:13 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 58053F802F7; Sun, 27 Sep 2020 21:29:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 907DAF802DC for ; Sun, 27 Sep 2020 21:29:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 907DAF802DC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F6ph8XTb" Received: by mail-wr1-x441.google.com with SMTP id k10so6419620wru.6 for ; Sun, 27 Sep 2020 12:29: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=7kdiKWYhgrXc/dLuy4QmJOJzV5nCR1FMn7KxcL86B2g=; b=F6ph8XTb6Jv9FXVYW3glwPA1tIKm8quNpkWf2VOxD1VYzAHBr04NauORR/BY7R90LP eEnXgCgWnveW7V5bj8IcbfmBZouffSA38AOLzdbpxg0YdpLFo+BlpWsBpsSCIonaByw0 brQKxBy3nstw+oiHpawAlRKwiWLlI6F79Cg9pYrTaADg+ZrkEyUD6KwCJCD0JHbpyBMn hQPDOUXhyz5OXj3Xel9LuiqeWG9HK8F9yKMLFyf2KtKr8UoPxSo8CweUSrAcKnLVcV/o MTZQJe1KJlYdFSrct1B5ImwK50np+sSaSI+xliBNTn4gnipgMfSGH6Nw1NPLgEov0Rts H4Cw== 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=7kdiKWYhgrXc/dLuy4QmJOJzV5nCR1FMn7KxcL86B2g=; b=Oj/RHdM38y/IxR7XYvVJBjiAhsNeFunPF4X3te66gq6pofozMzJAg53ADUqoXciggz /h6mlzEUcZWeOzO/xoCXL6tmov4f58Kb9PeZTcm+zYaBhQ4yJjRwmP5MN0hgEewU/him jKPXHvsrD03A2Hj7burkFdWqhuFqHdNtEb393rhOjoK9eAU1M51eOO8BavBsER8Sm7Ld uITDLdNYfC1qZgN4rIJEfkktlwH7k8NTeQ5OfldV8gLho8NCUvuX28zi93utqPJGdbC2 CTO/45LCe+q0wfeuOu/I4l+i9NtMl8AYawyG5DIpJifxK8Dn/oW8rrzfOI2XtpoCYcZ/ LuUQ== X-Gm-Message-State: AOAM531BxdwZx0nJyFG7O/x+0Ja/9Aa8xjN+0EyBnUkWdeQ2y2g8tNBj sh8b4L3yXdhFSWKW99GSvdg= X-Google-Smtp-Source: ABdhPJyyCzYnZGSwRmOTXmFhk6QYvJY31J6KYXHkVdCv7BuScwP2uXyucdfc7nly/WI1HgtWtMG+uw== X-Received: by 2002:a5d:6691:: with SMTP id l17mr15666769wru.10.1601234975687; Sun, 27 Sep 2020 12:29: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 n21sm6149609wmi.21.2020.09.27.12.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:35 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 16/20] arm64: dts: allwinner: Enable HDMI audio on Orange Pi PC 2 Date: Sun, 27 Sep 2020 21:29:08 +0200 Message-Id: <20200927192912.46323-17-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: Ondrej Jirman , 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: Ondrej Jirman The board has HDMI output, enable audio on it. Signed-off-by: Ondrej Jirman Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts index 7d7aad18f078..e6ed8774a17f 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts @@ -144,6 +144,14 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + +&i2s2 { + status = "okay"; +}; + &ir { pinctrl-names = "default"; pinctrl-0 = <&r_ir_rx_pin>; From patchwork Sun Sep 27 19:29:09 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: 11802359 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2C706CA for ; Sun, 27 Sep 2020 19:39:02 +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 392A123A32 for ; Sun, 27 Sep 2020 19:39:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="fIrEvzFm"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ec/nBSVt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 392A123A32 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 8BA681AE7; Sun, 27 Sep 2020 21:38:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8BA681AE7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235540; bh=FtDtCsCG+I5mkYHTFGcWwPmUiqOJd/722cScSNcK4tM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fIrEvzFmPoINmyR/Qpp6tY5p58T7IKdq3eAaY1/Q4cr3tGP3cQbSIeDJg+FkyS59a iZjJ+P6V7V6xZSWwndM1TMFtjYUesqlssVDMxMvRKNLeDWUx8vGywklE7z0NZaMi4R IaTa7hLXtBqx1u4mTQYgOqDhZMtWeb9InAYTaFuQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BEDB3F80345; Sun, 27 Sep 2020 21:30:16 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B5B4AF802FF; Sun, 27 Sep 2020 21:29:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 7C770F802E1 for ; Sun, 27 Sep 2020 21:29:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7C770F802E1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ec/nBSVt" Received: by mail-wr1-x441.google.com with SMTP id o5so9483098wrn.13 for ; Sun, 27 Sep 2020 12:29:37 -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=rtKn0+o2ojoOITB0B8/ryvpv4K4vTdQg90PI/damrA4=; b=ec/nBSVtLqLm+8O5jvfkUt2ne2fgh2Pk7OHZtZoDFquzebrPCcyATT6JqYLYlyliK5 pQpn9fx/rYEWCTTDg3ABoUNCrFLyG9OCP0cxSbI8GLXWHd/U9srHGzgmLsn8JvG+Zv62 mpBkNGhfXP2W5l0w+8du1hSmGOSd7MdzJ3oPe8t3rjKsWl4RoFTWEvT7ebcxiv0rLx/N PLNnXFZ8jdvXBXUvhWWef3EgGAYQQYKQbV3NqcVEYq6UevOczWn0sTqZ+rCgpXSzxep0 KApD6YdLTkEVOC2PLuOg18iOnhexv39YyzHEAKLbZ36OUYxo7LVITGJsruW3wmmQjnxk mfig== 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=rtKn0+o2ojoOITB0B8/ryvpv4K4vTdQg90PI/damrA4=; b=bcOtE7bGYyhd9ZTowNrrytu11/9Wt8Wpiqbdl6RTKyvziQAMMs4UBivR44LsqpMVTX c+7D06QD0y9DMXsyYv4m8EdJgAn/ApphkgECeTywZzOGkNRTZgZoCVUaOb6V/rLO/H9V fc2CVJw1/iRD2qkcp4tUNKFJOnYq8vcO4zMUcRipNOJF3iaOJuB1i+6bawdkInRWO3TP MR3I2wGZkidjek3zevWTLnzflzTdB+YbSS6BEXw+2UMRlNm2yHhkbxYBeNwnh1iJn78Q I28kVSIgt6Yze0Gvoc2uHXURTaiXkeQsCbtQp2Kkfl/mSNh6yrYYRpYa1gASxRUes7oE kyrQ== X-Gm-Message-State: AOAM532yxw/mQqtVBgSaYcll+rqcuTc15y+pls7JSUxrGGkCZpkculZc K1FkCVpTYt52dSgM2x3I4DU= X-Google-Smtp-Source: ABdhPJyv0D+mC53gVQf7mF2GADpU37fvw6wJOGa0nM/DxKoV/zqI5cE4prxkH89c1SvMhlQMw/SmsA== X-Received: by 2002:a5d:43cf:: with SMTP id v15mr16570978wrr.149.1601234976814; Sun, 27 Sep 2020 12:29:36 -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 n21sm6149609wmi.21.2020.09.27.12.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:36 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 17/20] ARM: dts: sun8i-h3: Enable HDMI audio on Orange Pi PC/One Date: Sun, 27 Sep 2020 21:29:09 +0200 Message-Id: <20200927192912.46323-18-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: Ondrej Jirman , 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: Ondrej Jirman The board has HDMI output, enable audio on it. Signed-off-by: Ondrej Jirman Signed-off-by: Clément Péron --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 ++++++++ arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts index 4759ba3f2986..a5b45655fcf6 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts @@ -146,6 +146,14 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + +&i2s2 { + status = "okay"; +}; + &mmc0 { vmmc-supply = <®_vcc3v3>; bus-width = <4>; diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts index 5aff8ecc66cb..ebb12a6f3a9f 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts @@ -146,6 +146,14 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + +&i2s2 { + status = "okay"; +}; + &ir { pinctrl-names = "default"; pinctrl-0 = <&r_ir_rx_pin>; From patchwork Sun Sep 27 19:29:10 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: 11802367 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 779566CA for ; Sun, 27 Sep 2020 19:41:07 +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 A48F923A32 for ; Sun, 27 Sep 2020 19:41:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="uhRvNpLv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iZyv2VLE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A48F923A32 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 E4E021682; Sun, 27 Sep 2020 21:40:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E4E021682 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235665; bh=Rb5wXmBrtBKDogUuv7UZhOrx+urFeYY/Tiyvce3YfbA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uhRvNpLvtU1YCaDRXP4vaDYPL+ta6BDZIWayXT3h6w8tsBRlbmM0C1wCMIMlChvMl MGFhTPhPBtG1mcJ8wF0j/S7Zcdw6Hr7g2ZU/KD0EuIuA9vOfXgMkqygZCy/Sjp7cAD 0br/JDEPcYdjMmL/oPDpE699LHqiTSBWgMJ6gJg8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 70DBBF80350; Sun, 27 Sep 2020 21:30:22 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id A56E7F80305; Sun, 27 Sep 2020 21:29:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 7DC25F802DF for ; Sun, 27 Sep 2020 21:29:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7DC25F802DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iZyv2VLE" Received: by mail-wm1-x342.google.com with SMTP id v12so4627764wmh.3 for ; Sun, 27 Sep 2020 12:29: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=JRfXBGFiqY7c/El7z89zWfrRGF9fF+u62x7PKZnaUzI=; b=iZyv2VLEgfXdTf101uh6h3DUe68TxHsCdp8h9PNhz+JBiBd5noYxV5hWSysw3svFrO 3hzxseVeGw9pxlCAjvA1BEPYcTTNVp8XRSYF73HyhH/NAYotAPrd5ORkSlV3htIziMEV bsnAMNkOGupuZWgg++cuyQImqtV6MwB6N9Sd0RWmNtFcYWfqV3VgP2yNKOdZlPy+Nqf0 nXuHSJBIpvQs/gztfKSdSLSxOO/cWLMnu6a9O+wf3uF8ENpQY+2OSARre3pdmy0RgC0c I1gzQj5z6mrTNLZvqlS2y9qNL4XvFDQ+rEawDAYMIWC9K/6G02J3NvyONDaTQlWhN5yB QXQw== 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=JRfXBGFiqY7c/El7z89zWfrRGF9fF+u62x7PKZnaUzI=; b=q0sziTjU/RuysKiZz6ty6/laePE0/DDzhCUbfTAZi55N6RRCD43+AWkEjib+ckIhVS LmwbdBZMPH9jaA67oIZ3GSj+sOEFyQvjl4BmX7uiMhKRW6Kwn18ONb2olemn8aTPUr/n wOPvfK8VjCH/XzcYN88Hgx2gI5MG0hVV8VuBOlrfkW7mQJl3mWP8wS0jByzemENGWQRL OgPnDtgvjQS6AD7cci0S9n6113vR9BEVCDtG9ZKNpgPzwUXnuq6WGnahoHhMxF4IjpyT I4ukflauAVyVgdKxawP2xqIs4I6vanBfqPTmF9PTzV5PdhoxUKqW4QhT8ctpW7Tq6Dnu XXbg== X-Gm-Message-State: AOAM530R/m8+8qF4knVvQTZNzLziLuFdqLbIFUGsv9JGDuITdqpgacva G9SxzrClfQeNCZ3T/OxoZiY= X-Google-Smtp-Source: ABdhPJyMfhFmZdZRNFIA7hlt5CN0yPE3ZvZ+6BZVp9QyVpTd/nn/PhNL8cZhWvAv4entdLHdnxWazA== X-Received: by 2002:a7b:c141:: with SMTP id z1mr8285789wmi.79.1601234977829; Sun, 27 Sep 2020 12:29:37 -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 n21sm6149609wmi.21.2020.09.27.12.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:37 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 18/20] arm64: dts: sun50i-h6-orangepi-3: Enable HDMI audio Date: Sun, 27 Sep 2020 21:29:10 +0200 Message-Id: <20200927192912.46323-19-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-1-peron.clem@gmail.com> MIME-Version: 1.0 Cc: Ondrej Jirman , 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: Ondrej Jirman The board has HDMI output, enable audio on it. Signed-off-by: Ondrej Jirman Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts index 15c9dd8c4479..193587e78031 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts @@ -128,6 +128,14 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + +&i2s1 { + status = "okay"; +}; + &mmc0 { vmmc-supply = <®_cldo1>; cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ From patchwork Sun Sep 27 19:29: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: 11802365 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6D97112C for ; Sun, 27 Sep 2020 19:40:36 +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 3484E207D8 for ; Sun, 27 Sep 2020 19:40: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="O6bKs1uk"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d7tabAeE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3484E207D8 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 8CA3C1AF7; Sun, 27 Sep 2020 21:39:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8CA3C1AF7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235634; 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=O6bKs1ukhqgFPwSENzhxDzgK69K0n7KTQOuEd89oCRnmfBuh9nLujhHs9kPYysujm qDEfImYbgOmqaAV4hYes1v7Biz3doi9fhb9MNSWAb8YDgjyPAXTPSk00RUq+3qXQYT dcrM2ZpecMr1zJmo3xcwLn6mcVc5kP8aHCmAjwXA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3A20AF80351; Sun, 27 Sep 2020 21:30:21 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 56CC3F80306; Sun, 27 Sep 2020 21:29:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,PRX_BODY_26,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 B74B5F8022D for ; Sun, 27 Sep 2020 21:29:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B74B5F8022D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d7tabAeE" Received: by mail-wr1-x442.google.com with SMTP id k10so6419763wru.6 for ; Sun, 27 Sep 2020 12:29: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=KmIaDgGE58XyP65chgC3iPI5GCq1dVupIq3PDHXzLnk=; b=d7tabAeEQcbWpIcf8bNpbfx+YiUYroDJG3Mpuft5m+pZXAm53fT4rIrfX5RyaH/+0U fES9PX0yez+Y0BwKocC8M+j0DG/b1hBw85XPyTKT0bEWevWR4ZlUYxDM2BBezH43ftds kKSBWrB98qLZ9gPhzqiVQNvMgzG7xh4iVLOhnEDc04VYwcaDHFbPTi/eEeiXGK/Y//qy VtcgkElSkGfTaUnnvkjUOffMfx3MXOkrSTLR9NYMkts5u3imN80VjOGI+1MQML867Eb7 H7aWNftVjvgH2gYS08pOfCSswsm9PXcBk/P5cK/BS9ARUuXBvq6U3ltRDTWJQBkCHVO2 o+nQ== 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=M3M7+fdrcx9EcWv2Rf0xPCVK7OvToQi5G9UP0KIPVaTR//z7YuEkOvh+rospRQQ/h4 Cy2Rv6neF5O9w1qh4ssehV3aza1N+rX1iWNwnHm/fkMGSEvTj9gMqQYpC6+ZWhKMWp9g qmve5ZVLCD8X5m4nYR+4UEs+RZqhmt1KAsmqDOQvuQHMNg0eXyD8J0qXWsfInkqZq/4f tbY8lPH4shUbEeSFaBjsdjLlZTDBsdbr7nZw/5C15f55vJOj0T4Fy+LkiilzCgWHOYFT hZJkuw0jx6w5E5rZCCBbZlMKfOUOByVCg4XQ/b9YmbJ3QhLZaUr7pplpxgZMiiutiekm yQ9w== X-Gm-Message-State: AOAM532c04M28c7q4SeR2I/OkiiYmhSiYnMwz1Uhe6ytMN+t0eT/rlOk W/OXdDToCxvL89ww4E8O4lo= X-Google-Smtp-Source: ABdhPJwljJVskiQ1Pj0MaM/KEgYjDiPvS3aD+BnOt1B+mZDbPaEY644Sj7saJphk6yqLypNH4WrKhQ== X-Received: by 2002:adf:fe08:: with SMTP id n8mr14997891wrr.159.1601234979015; Sun, 27 Sep 2020 12:29:39 -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 n21sm6149609wmi.21.2020.09.27.12.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:38 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 19/20] arm64: defconfig: Enable Allwinner i2s driver Date: Sun, 27 Sep 2020 21:29:11 +0200 Message-Id: <20200927192912.46323-20-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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 Sep 27 19:29: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: 11802369 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D1D636CA for ; Sun, 27 Sep 2020 19:41:46 +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 4679B21D95 for ; Sun, 27 Sep 2020 19:41:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="nNYEoOlE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NdxKLIks" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4679B21D95 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 ACEC81AE0; Sun, 27 Sep 2020 21:41:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz ACEC81AE0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1601235704; bh=UfEzQCMo7mSftdUD88TE0CUt/qeIa5V2ZCz4mtT9UMg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=nNYEoOlEaaJIRePVpgQje7ithdEI8InL5CLBOvnQ+S6KyVi7qKr4VcH1fUM3BfiVp OeCo4fhUEmZCDMrmA2k1a2HhAbPgnX2NKpFXYTPkxKrkeqoO/6pL8laLksOY9ge/FR qWejstL2aGMkOo7hn2MjrNd+m79E5Ys6CRHtoz1Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D1B9AF80367; Sun, 27 Sep 2020 21:30:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 63827F80308; Sun, 27 Sep 2020 21:30:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 F10F2F802E0 for ; Sun, 27 Sep 2020 21:29:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F10F2F802E0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NdxKLIks" Received: by mail-wr1-x441.google.com with SMTP id z1so9552024wrt.3 for ; Sun, 27 Sep 2020 12:29:40 -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=hFD9C0g02b1YD9AU5pxjflPT96QGvB/rE3rUqbHSeaU=; b=NdxKLIksYEYWvMIxygmJ/wOgbIokpUYXQ7/7+hNB0bJwQlliFTMJsi+7U8PR+mhGQP iy5VoMPACrRlx1sa6Psyr2JTvGxd7ZB47r4LXI17QtvgX315RzmxdiLz8aL2EnCdzTBb wFbexHzCi9QbrV6d2Kr3RGTsApudPoWR/eAjRYdvIVqGavIYdFe8jdBctGSUCFdBuXoK gMYHF30+idE7QvS/yFF9WogbwiOWCmB8vQVBligf48+Sd0FmFLaXJUa0PfJGnFKh86DW kkVut1zRfkW8VNezqQRGOwq1RS7JF6VjlmhXhHxQZbKgZCo/r5rIBQck1cUSeMELkYWZ fD3Q== 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=hFD9C0g02b1YD9AU5pxjflPT96QGvB/rE3rUqbHSeaU=; b=tifQgHrFelLg6RaovCw8zBJ67fVKAFgEv//Om+dJQ4COnfYFiN4AAAtHRguU73MPPN fExwPF9yPC/WZb56hOMtLtSAdApGMhC13+O+o1LPkPVZZB8m9EYdXaTrJp6pIIMexyDG kNA0Nbhx3vpeYjKZfZ5Y6SquL+J3CFguM4pssRixIXoxysjTuZn01Vpb/q1OF6ME44/a /IKEDuGjFbcDi/Lu1xnUcSsivsJtljCPdGcwNDxqyVBiVvUJ9iFZ/0y1Q42VWyKCalFF xD6FnSuw0GUqV/G0OiFtfsYt9vEsM0nPcDqe2/xyUSkhDpw6+XzJ0RFIsr6uPXNqlmGJ +iHw== X-Gm-Message-State: AOAM533TXM3ZxpWNRmpSDqiCV8n7d/GWcXvSCsqfLLvvYZ0z++jZSu5a JGcktydrXiDb3+7CxtdkTPUnK9FFr8+Ttw== X-Google-Smtp-Source: ABdhPJwDIz/p54l7LU0V8+Pe13zDL0f4KhqMgsxnx1wJvc48DpYxuBX17S9t8cH1n0Cmz7B5+bFTmQ== X-Received: by 2002:a5d:4d49:: with SMTP id a9mr16140367wru.363.1601234980231; Sun, 27 Sep 2020 12:29: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 n21sm6149609wmi.21.2020.09.27.12.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 12:29:39 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= To: Maxime Ripard , Chen-Yu Tsai , Rob Herring , Mark Brown , Liam Girdwood Subject: [PATCH v5 20/20] ASoC: sun4i-i2s: fix coding-style for callback definition Date: Sun, 27 Sep 2020 21:29:12 +0200 Message-Id: <20200927192912.46323-21-peron.clem@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200927192912.46323-1-peron.clem@gmail.com> References: <20200927192912.46323-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. 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 9cd6cd1cd284..a6fd9bef30d1 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 {