From patchwork Wed May 15 13:18:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 164297 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp749907ili; Wed, 15 May 2019 06:19:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtPSUJhegRFoiUq8Gmq4PNLxHgNMuSEJ61GLoarTjThDMWyjidDT5MIk8YJADpuc87bih4 X-Received: by 2002:a63:9214:: with SMTP id o20mr44212554pgd.203.1557926348095; Wed, 15 May 2019 06:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557926348; cv=none; d=google.com; s=arc-20160816; b=QDJtfBkiwOo60fI+f/+97FTAJh37woZWILN1YRONPIQ5YfNZL1seI6QMvGtQwuH6Tf 7NhMx9mIzPZga1+0Ogn3DaK7fRNqK7Uf03IaQBZ4G690robcbsuO9K5p77pHxWzdBQG1 QQfskUnigFZHOSAGDuNMJDOFb8SyjE6MJA5udWs0FrGQQ10hXwLoSpoBJbNj65I2/xIF 9ixohTyLdKZbp1QaXdLefUFmvTP1Dk5HCz/QdAKWJBcvC1wGwS9ri2kPnbSO/PY1Qt09 LlM0oVUIYQl05Zyo4BjLI8tN4oEFt0Js7tp4YE4jHS02ICnoAAGfAY/qVIdX2K3DqG7j 0Fvw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=JG2kah723rKt+6zVIVINToTJ1x5sX35cOTL/TkyEYK4=; b=x/H+8cE4Iim+KmOhl8NzjT+1vdUQOx66jo6ugIpyWUOlXb44WlNqpAPg/7+KVLWFhI /fbEGjRMy3WvIyU0++2UP/0/i4REST8OrC8NDcRvXyD5v3q1MDu+u6JIX0mjC5jlVqGL lSL9iJyItC9pfRA86hxqBdkhvZ+w+lWlR2iv86d7REhCv7S+1gw9JtpcNJhW/gIiWnwj 1BJdTRUyFrsSbVVS/3E/jVvrbztJ1w7LtGFVbMCz/w+P9z5L5iJVmDPJ0H+Yet/7xFEP XH/aziEAAI4PAWGrYKbyST2owmZZ64dHfzit2XFZ42ujnX2gPtjsO7b65DDm4xicu8GY a+mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vZJh22fk; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 v9si1837917pgs.17.2019.05.15.06.19.07; Wed, 15 May 2019 06:19:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=vZJh22fk; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727968AbfEONTH (ORCPT + 7 others); Wed, 15 May 2019 09:19:07 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41628 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727917AbfEONTF (ORCPT ); Wed, 15 May 2019 09:19:05 -0400 Received: by mail-wr1-f68.google.com with SMTP id d12so2641253wrm.8 for ; Wed, 15 May 2019 06:19:03 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=JG2kah723rKt+6zVIVINToTJ1x5sX35cOTL/TkyEYK4=; b=vZJh22fkqgxxzQYvoRgM2gvXtNWcFHA4w/ZhpXhg3KcO5ZYtjNKkseZoctyABSvJYM JNXexdB8b7YXqUh/5OWvK48RZeoIDCCWPoWronkJubu2sqLNjPQOW88bdogK8PEQiGMc zo18n9fcq58uSAzG5iop6qietQv3MER71K3ppvb1yVZfJU6VdcoOQw+MQJ5O8306Lvma zamrxMsrIEPwYPooRGHEPa8l06Q2BaP/8XZRivdDkyAdSFUNR7NzuEmlMhamIM5YXg0N xZpBDhwzk3jHq7UNVDBVdogplW0YEikZzTMBBfQpXXSVQWmKU8oFYxHSHbA6GbytzTEi Eqag== 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:mime-version :content-transfer-encoding; bh=JG2kah723rKt+6zVIVINToTJ1x5sX35cOTL/TkyEYK4=; b=seAeU84QUK41W3fwcLvVVHBPUcOOKFGtMBNwzL1wb5Yfxz9yNifx4gOPwYS+aByDxj lPsIwWedF6i6mrbau3iil1yqKOe2P2zvfw7RyxWmw1Y2tW0NkRMKwfqIqDoBZwKbG5GL +Cf/CR9X1/UrmVm72DCHGD4I341b64LhWHGdr+Lqg4dhHlpMB2JZNtLCSVm82JJxBizz wlAZHeC0HGEXXERk5wEDAktsEBduYI105MCvv0Hfof7Rdpa92KmuFLfed1UYERismEgK 2eidsiJE/YdS7lH+qBSXbYlUWjmnD0iWda/PYgPXikuVRvD/emarRex4uWVTVyh/KAcZ 9M3Q== X-Gm-Message-State: APjAAAXSGKvSNgDCz9U11nJIOg8sSlQRwQinaHXo1BeVUrf706tO0U1z B4AtQ6sNsJKaXfo3JRg4BWZ+QQ== X-Received: by 2002:a5d:4e50:: with SMTP id r16mr189913wrt.197.1557926342964; Wed, 15 May 2019 06:19:02 -0700 (PDT) Received: from boomer.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id b206sm2789848wmd.28.2019.05.15.06.19.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2019 06:19:02 -0700 (PDT) From: Jerome Brunet To: Mark Brown , Liam Girdwood , Kevin Hilman Cc: Jerome Brunet , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH 0/5] ASoC: meson: add hdmitx glue support Date: Wed, 15 May 2019 15:18:53 +0200 Message-Id: <20190515131858.32130-1-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On the Amlogic SoC, there is a glue between the SoC audio outputs and the input of the embedded Synopsys HDMI controller. On the g12a, this glue is mostly a couple of muxes to select the i2s and spdif inputs of the hdmi controller. Each of these inputs may have different hw_params and fmt which makes our life a little bit more interesting, especially when switching between to active inputs. This glue is modeled as codec driver and uses codec-to-codec links to connect to the Synopsys controller. This allows to use the regular hdmi-codec driver (used by dw-hdmi i2s). To avoid glitches while switching input, the trick is to temporarily force a disconnection of the mux output, which shutdowns the output dai link. This also ensure that the stream parameters and fmt are updated when the output is connected back. Jerome Brunet (5): ASoC: meson: axg-card: set link name based on link node name ASoC: dapm: allow muxes to force a disconnect ASoC: meson: add tohdmitx DT bindings ASoC: meson: axg-card: add basic codec-to-codec link support ASoC: meson: add g12a tohdmitx control .../bindings/sound/amlogic,g12a-tohdmitx.txt | 55 +++ .../dt-bindings/sound/meson-g12a-tohdmitx.h | 13 + sound/soc/meson/Kconfig | 8 + sound/soc/meson/Makefile | 2 + sound/soc/meson/axg-card.c | 31 +- sound/soc/meson/g12a-tohdmitx.c | 413 ++++++++++++++++++ sound/soc/soc-dapm.c | 2 +- 7 files changed, 518 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/amlogic,g12a-tohdmitx.txt create mode 100644 include/dt-bindings/sound/meson-g12a-tohdmitx.h create mode 100644 sound/soc/meson/g12a-tohdmitx.c -- 2.20.1 Tested-by: Neil Armstrong Tested-by: Kevin Hilman