From patchwork Tue Dec 11 13:47:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 153462 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp635268ljp; Tue, 11 Dec 2018 05:47:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/WaJfF+E4nsLtDaTqPaRep4lFTMkyy8/V/3lMZJByt45Jpfz1pZozP23XqnmgdNgxiqSUAj X-Received: by 2002:a63:1848:: with SMTP id 8mr14493023pgy.81.1544536051480; Tue, 11 Dec 2018 05:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544536051; cv=none; d=google.com; s=arc-20160816; b=hZWgSuayRtONHrvisCE9sPj/JnfnR0xdQQ9TZ/YC2acb9rRApI+rPt/laO6ngij8Fd F6AieLDPh1MpIE8IsNFnn3URyAsnb89Cxk3XhkrEz5aj/hEE++Ae1xyKHSD6gBXURjwm RtUte337gRoxb8oJ12x8KI1Ex0UH4y2xRfaTiSOLyTGGTAXYz77Una4qP/SHLHstycgI N6KznY0zkvpnO+VDS2wML3SySj4skweu537lkO3EWmFg/xIc6e9erLbqXckI3p7lvBnM 17ef8CG4niIRel8EUJzHybV+pRRmq8zkgE4gb76va5PY5BiaMGCsWs5OnWurkkV/51AJ f44w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x8YYSFigv4RU7j7xI4uPHxbxUgrWCBqBqOSREZXXKOw=; b=DyW5iT947YH3HCvtEodlNVrjQPkoqWcBZmaUi9F5cup90dcqGTtctIvRrQYLt6LrkN Ng803eF1MYZpod4JauqvMWDlB5Y5CpVcoKiahd3Yv17x9fx9qKtu23kI8Z5kkmM6J3lm Swsnj4yvReo4othbrDQPO4rbzf03C8fhhCt1/s/12q/DGcgGX8eOQUrj4sRAsjeVCNcn Fagbn3DKuMNhLbqNfBCyARoHmV6M5Sj3gNPFqW3J32eXapVM/ofcpHkFRcbIfM+klpYe IuR88y0ZqYVRqPIIXhsiHKlyANA7IFRG8Olxpiq+S0L8wUTkGKpExpc9jEe1LmPnay8B zk0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=OXfs8+T9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y123si13237461pfy.18.2018.12.11.05.47.31; Tue, 11 Dec 2018 05:47:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=OXfs8+T9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726671AbeLKNra (ORCPT + 31 others); Tue, 11 Dec 2018 08:47:30 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40162 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726653AbeLKNr1 (ORCPT ); Tue, 11 Dec 2018 08:47:27 -0500 Received: by mail-wm1-f68.google.com with SMTP id q26so2298233wmf.5 for ; Tue, 11 Dec 2018 05:47:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x8YYSFigv4RU7j7xI4uPHxbxUgrWCBqBqOSREZXXKOw=; b=OXfs8+T9xSRXfRguqjtSXuj0tn4XCU7QRhO1JWnm6xRGmRPk/aUY8trzyOiZ0Q0F7y PN4TydfL9OAqsgq7sBZupcVyRx15BGuiXi0Oc/d++nAGCwkVxK1fyp8b0ARdGqBa/wVf drLKBLygnVw+LRAJ17mTkk/KR5Kt98nDP4+8VPetqEImDdxZpX0iFQWsJscWwiMgbPUX l4YC2x8db6i72zVfviAX0PxNW/W6ukVIyhnVl9npVKOp29kKGE8F506KDe/2ndr/0U+1 VorNZsr0WpJYA+c5MBAoHZ3nQ4+0Qsk1vqumtGIfXmhRy+PXVvudkb3Xr01JsGbRTIdD 5D8w== 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=x8YYSFigv4RU7j7xI4uPHxbxUgrWCBqBqOSREZXXKOw=; b=E6UPM079X11WZbU7U3RRMtx36u80ubCY/HqsRQsEVxjrGrZkGHgjkJAX8Y6WqpWATK xAh3G11ODpZ4rp1r56aHc0XuKVXkgt/uzY3UrVZz2WuEzfpZDF81K+6DTcASefjDd5iI vUMwtmUkmwzou2w/EkpbEydrlSiR5WDg0EmIhtGTq6kwfBqkC1u1mjA/+UedbSTn/r7W wQ6ivTInTcZ7KFy75ZkxHy9UsIeSKUVC4nqWRXbFyphOgTy7eytRtGJGJ/XIMwqF2il0 H6l1+ViRezqlh3otORq1ZctLyEaHI7IiE3UoTXA0EhC47bTYfE/7nLzQ6gaRF/wwJUDV 0yeg== X-Gm-Message-State: AA+aEWaQ/1rKYIbHzsEo6QKBlAbTcMmGglt4HQ3nf1TQ2KJnglTHY/RM kdR4HgPUrqqBRTYmnJ2klIC19A== X-Received: by 2002:a7b:cb96:: with SMTP id m22mr2432266wmi.39.1544536045551; Tue, 11 Dec 2018 05:47:25 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id 126sm113768wmd.1.2018.12.11.05.47.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Dec 2018 05:47:25 -0800 (PST) From: Jerome Brunet To: Mark Brown , Kevin Hilman , Carlo Caione Cc: Jerome Brunet , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 1/4] ASoC: meson: axg-toddr: add support for spdifin backend Date: Tue, 11 Dec 2018 14:47:10 +0100 Message-Id: <20181211134713.4908-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181211134713.4908-1-jbrunet@baylibre.com> References: <20181211134713.4908-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org add IEC958_SUBFRAME_LE to the list of format accepted by the fifo frontend. As opposed to what was initially noted in the toddr dai driver, the spdifin does not place the msb at bit 28, it just output a whole spdif subframe. Placing the msb at bit 28 in the toddr driver just filters out the parity, user, channel status and validity bits. It is better to just provide the whole spdif subframe to the userspace and let the iec958 plugin deal with it. Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-fifo.h | 3 ++- sound/soc/meson/axg-toddr.c | 15 +++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) -- 2.19.2 diff --git a/sound/soc/meson/axg-fifo.h b/sound/soc/meson/axg-fifo.h index cb6c4013ca33..d9f516cfbeda 100644 --- a/sound/soc/meson/axg-fifo.h +++ b/sound/soc/meson/axg-fifo.h @@ -25,7 +25,8 @@ struct snd_soc_pcm_runtime; SNDRV_PCM_FMTBIT_S16_LE | \ SNDRV_PCM_FMTBIT_S20_LE | \ SNDRV_PCM_FMTBIT_S24_LE | \ - SNDRV_PCM_FMTBIT_S32_LE) + SNDRV_PCM_FMTBIT_S32_LE | \ + SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) #define AXG_FIFO_BURST 8 #define AXG_FIFO_MIN_CNT 64 diff --git a/sound/soc/meson/axg-toddr.c b/sound/soc/meson/axg-toddr.c index c2c9bb312586..0e9ca3882ae5 100644 --- a/sound/soc/meson/axg-toddr.c +++ b/sound/soc/meson/axg-toddr.c @@ -25,6 +25,8 @@ #define CTRL0_TODDR_LSB_POS_MASK GENMASK(7, 3) #define CTRL0_TODDR_LSB_POS(x) ((x) << 3) +#define TODDR_MSB_POS 31 + static int axg_toddr_pcm_new(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { @@ -36,14 +38,7 @@ static int axg_toddr_dai_hw_params(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct axg_fifo *fifo = snd_soc_dai_get_drvdata(dai); - unsigned int type, width, msb = 31; - - /* - * NOTE: - * Almost all backend will place the MSB at bit 31, except SPDIF Input - * which will put it at index 28. When adding support for the SPDIF - * Input, we'll need to find which type of backend we are connected to. - */ + unsigned int type, width; switch (params_physical_width(params)) { case 8: @@ -66,8 +61,8 @@ static int axg_toddr_dai_hw_params(struct snd_pcm_substream *substream, CTRL0_TODDR_MSB_POS_MASK | CTRL0_TODDR_LSB_POS_MASK, CTRL0_TODDR_TYPE(type) | - CTRL0_TODDR_MSB_POS(msb) | - CTRL0_TODDR_LSB_POS(msb - (width - 1))); + CTRL0_TODDR_MSB_POS(TODDR_MSB_POS) | + CTRL0_TODDR_LSB_POS(TODDR_MSB_POS - (width - 1))); return 0; } From patchwork Tue Dec 11 13:47:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 153464 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp635408ljp; Tue, 11 Dec 2018 05:47:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/X6yarYffwFHFiWP7HZWUEM0qk2F1Z48fnt89KozNtBjdAT/Z9SvF695MIm5VLWt+5lZhXx X-Received: by 2002:a65:4049:: with SMTP id h9mr14426683pgp.304.1544536060616; Tue, 11 Dec 2018 05:47:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544536060; cv=none; d=google.com; s=arc-20160816; b=WIB74rlNMjospQBvOlrVkxqRxjf6MbhsJ2NkyLtx2suUc4J0I7fIaeq1uwI1kpwDFe nPB2bsj1m7Z7RG1G9oZAo+QXuzJjK5eE0RzPRJi6MsrV9EEqxVOAHC906RNnHuZZIkpt Gk/ALv+wGMJ/W4kFx5it7GcljgcIF0SVNunhtFfN9qK8blVUridN5UsKn2aN9on2OEz3 gYUuTmIO0gi66h0L+3oGzzeqv0tbXpFfr0GHxdWr7rbGpY3djERNbMATa6YQU0AhKJ9M vbxC+7NyG3s7ZeiE5n2ZMl8QCVTg+53thRxPNNIoYt1PrevCQIq1iqqKKjTkV1hQAE1h VRQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vQbV8xwctzus4GInPuwAdRPCS5e1xGTqZIxHK4PJAeQ=; b=Kefr/6FwTsxCmvvCfIJeeVbUspVJiPSDPsRBflpp9Ds1hG7cyCzjY4Rd79mVnazG9S tM5MKBRspIWkhfwKv7Eq0zU/9YKjKHWNvJdd59N0u+QP2DcuI3amvsC1JXFJwjuh0g7a VAcccR/4S5+VPX0aC75vZD43hrdJqDK46dh845P1W+kLGe1CDqR+O9mlLdAp58E4pr5O ms4wBheijp8Lui1lJNzs3sdTLo4HuPPCkMus4U/wZIyn6W18XdcCgAKWf36s71SmubAt g29qBm1AMsU/0BqBJlS3busFzUz0oIBsNGHWxc5yKibzvSofEyJQapX/IFlCqQZUKARw pOwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="vr/WM++u"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k17si12225244pgl.62.2018.12.11.05.47.40; Tue, 11 Dec 2018 05:47:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="vr/WM++u"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726707AbeLKNre (ORCPT + 31 others); Tue, 11 Dec 2018 08:47:34 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33069 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726507AbeLKNrc (ORCPT ); Tue, 11 Dec 2018 08:47:32 -0500 Received: by mail-wr1-f68.google.com with SMTP id c14so14188598wrr.0 for ; Tue, 11 Dec 2018 05:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vQbV8xwctzus4GInPuwAdRPCS5e1xGTqZIxHK4PJAeQ=; b=vr/WM++unIByFuYmx35Ag47K8iqwRV5tz8LdpOmob6gJNiyQRJYwuWHfyhz2yOLpwB G4DPa6ZsIgahgFSL3q/J60JFsBcpSB6dU39G7RSLafD+hKD+rTxdaDi1R0WMNBFfMKT0 rEVLl03ge+K1REaLJN44Ycu3nclbYwZ9alWqJTqu2JTx/z6U8wvLN4o92OxaGbxKEylt SCvt2GNE1MEUIzbhCYP2w/CDfEj5VvT/tl3f/J2gzt+u1IIFgjLGFyQIQDghpdYfdCdv cRPvl0cjB0y1bPL0+W4fXdZ9lClnijgCVwuMOCgtr0sb2KCw0UqPEEpVG8IebTqS/YvC HIUg== 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=vQbV8xwctzus4GInPuwAdRPCS5e1xGTqZIxHK4PJAeQ=; b=l97l7Ee5a+qDNAAYfCamRWfnQ1vOBXBqKRoxpksfyRrVIxOr9TuxCkRlMWOxsdHacy imuqgYlRrIWYxJ2nROarcPQvvfY1QJAYs2WElwd8NtFYKkS9u6Uvun5Mj++6KPCtbXAQ UvQ9+mqLeUKk/D0Lo1ZT4sxdfErequWOXVwFl10oWnR0V8jB7wYUyQbW47i8w7XkpyR+ QKVkq5kv1ydGB8ZHVhrDrgQJE2mq0JD34xJrWX9jlVPa54VGy9OgSK4KROzEq4FHcxNf B2B2Zh7P9LK8w60VTiEaeak6pCRviCuwZKE9WwpPUgCyz9o9eTvdIjdA+Hes8rLmSJs7 bAtw== X-Gm-Message-State: AA+aEWYMpNIc3RgVs+fF0cTLM1rVMSPdaokt4NendTWPz72YMrYuw2G/ ++QJEiUYDT289oOKr/ijTNQqug== X-Received: by 2002:adf:f401:: with SMTP id g1mr13929777wro.103.1544536051222; Tue, 11 Dec 2018 05:47:31 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id 126sm113768wmd.1.2018.12.11.05.47.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Dec 2018 05:47:30 -0800 (PST) From: Jerome Brunet To: Mark Brown , Kevin Hilman , Carlo Caione Cc: Jerome Brunet , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 4/4] MAINTAINERS: Add Amlogic sound drivers entry Date: Tue, 11 Dec 2018 14:47:13 +0100 Message-Id: <20181211134713.4908-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181211134713.4908-1-jbrunet@baylibre.com> References: <20181211134713.4908-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add sound/soc/meson drivers entry for Amlogic audio drivers. Signed-off-by: Jerome Brunet --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.19.2 diff --git a/MAINTAINERS b/MAINTAINERS index 7fe120fc25fa..e8e79713a790 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1310,6 +1310,13 @@ F: drivers/pinctrl/meson/ F: drivers/mmc/host/meson* N: meson +ARM/Amlogic Meson SoC Sound Drivers +M: Jerome Brunet +L: alsa-devel@alsa-project.org (moderated for non-subscribers) +S: Maintained +F: sound/soc/meson/ +F: Documentation/devicetree/bindings/sound/amlogic* + ARM/Annapurna Labs ALPINE ARCHITECTURE M: Tsahee Zidenberg M: Antoine Tenart