Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8837624ybi; Wed, 10 Jul 2019 00:09:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIbjPwyJNf3MqKGMqSnZ2INsyrIj0ARncQ2N4O0XaGiPhKnQQpaPkZUdn1IayPa1l4rONi X-Received: by 2002:a17:902:ba8e:: with SMTP id k14mr37073953pls.256.1562742545711; Wed, 10 Jul 2019 00:09:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562742545; cv=none; d=google.com; s=arc-20160816; b=CsGeyFM9EYgBswjHYnRfOSpY18tK9gHLo5d41zffzlOLqZhhq9z7VpA98YkprSxqFk Y5ouO1TDdSJh2KTin1RcXKdwevdMghYBY0ndrKg8a6/0t7VPk1FgR6KVhlOEZ0kg6zpF Ix+qP/AYbv74PffPD5ZgEckaJq7f+GfFRhCeWoOwUVdfEMWnkrbUFN67Xo+qxWcMei98 4XmUBuBpCVYoOw4upGDM8RIJtmDzRx6J7w4QjtL/rxHEAvYj7RJUV2MUdJQKLRxV1hKG 5xQJSsqq185k/BK+Dj78HFswJamqu7vpfZDBm8xqwckSWacaLLhIASvobnEfmpD3gkbO 8NmQ== 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=l6Pj1C/JhLO9pIuL0o6GitOicJcsYgk0aas0LOHb1To=; b=DFH4FMCeaTUPO7FC4tLNYkSk0aO5PhR+0ZnpwyvkmoNoafW10opQ7hojZvMrgRZ5WJ mxrWNrmWShd7JwQ3QGQVoMxGw3YEPP2bKe135n17aSra3xlGOealKHX+PY3aSFb+Rc13 gsok5n4DeIO+EellcnR6Mvc+SXRYJnRPURBWGrEqz7I6XJHs5uQf2yqg22IDbSexx/u7 cEfKJBKmlzNVQ1w1nCnx1gR/mCT6CeYE2GEYykbgtLc7gOxZ/hUk4td6EuTQtmJFZVlm 23koXR78amXm0rzhggIGZb7UQg8O5wxM4hmfZS63EcHaZJuKJoRsJ/Dsxb58TdJkS8Uq fTug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QvHVOdXM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g65si1365924pgc.425.2019.07.10.00.08.49; Wed, 10 Jul 2019 00:09:05 -0700 (PDT) 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=@chromium.org header.s=google header.b=QvHVOdXM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726246AbfGJHIM (ORCPT + 99 others); Wed, 10 Jul 2019 03:08:12 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:33761 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfGJHIM (ORCPT ); Wed, 10 Jul 2019 03:08:12 -0400 Received: by mail-pf1-f196.google.com with SMTP id g2so654374pfq.0 for ; Wed, 10 Jul 2019 00:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=l6Pj1C/JhLO9pIuL0o6GitOicJcsYgk0aas0LOHb1To=; b=QvHVOdXMpWGBXu6BQw2jb5hQWR/4IGqs4UNl0MT4bqGhu5Iajbok3zWGlXLBLlAlA9 262x1usDPZZzrmJK/3Rcc1CmfG+FofUbFhNMjNYCW/5S2inZrI0tZc+5f/Yr3ArqOg1U UezUTifar1c9zaRSMgeuuMvYvOFH23m9ls4vM= 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=l6Pj1C/JhLO9pIuL0o6GitOicJcsYgk0aas0LOHb1To=; b=DY5mWIF+kLa05U+Rx+CGtLPBL3bqMePIvb743ckyHqG/2iH/i9hjodToxLgsmNO6xX sDyboW5ETy0lNV388nY2R0aUcZbNnsei9mLVWD/05KH3XKClDARQ8JvvGComl3v9Mr+t BtA8AD1yJ7JalJFnMLX7CAOAVIhEcgPAP+81LUBIyXCBXeBq4F1dQOXDQeGlYkLuLYhm 5mXvZgfbtH+CyEU+7PLP/712dI2Mg2+p63Sxt85tj31vUFIcCOdoR6WdYT50qxHAfQBW iJwWFYsn8TfiYL/qdqNzojo2otVqgncRiUgPnQNyckufgBqaXkh2VNyn2qRah1uxWqpG 8D+w== X-Gm-Message-State: APjAAAVjzejEUyf9NGVbwP502HaSyrLkG+TJZq0DPu9OrcjPkCtJH9sS lLlV0+n7CP9OusVXJ6ZCJZtJrKYdXJo= X-Received: by 2002:a65:500d:: with SMTP id f13mr34874390pgo.151.1562742491443; Wed, 10 Jul 2019 00:08:11 -0700 (PDT) Received: from localhost ([2401:fa00:1:b:e688:dfd2:a1a7:2956]) by smtp.gmail.com with ESMTPSA id h9sm1150976pgk.10.2019.07.10.00.08.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jul 2019 00:08:10 -0700 (PDT) From: Cheng-Yi Chiang To: linux-kernel@vger.kernel.org Cc: Hans Verkuil , Mark Brown , Liam Girdwood , Takashi Iwai , Jaroslav Kysela , Russell King , Andrzej Hajda , Laurent Pinchart , David Airlie , Daniel Vetter , Heiko Stuebner , dianders@chromium.org, dgreid@chromium.org, tzungbi@chromium.org, alsa-devel@alsa-project.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, Cheng-Yi Chiang Subject: [PATCH v2 0/4] Add HDMI jack support on RK3288 Date: Wed, 10 Jul 2019 15:07:47 +0800 Message-Id: <20190710070751.260061-1-cychiang@chromium.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series supports HDMI jack reporting on RK3288, which uses DRM dw-hdmi driver and hdmi-codec codec driver. The previous discussion about reporting jack status using hdmi-notifier and drm_audio_component is at https://lore.kernel.org/patchwork/patch/1083027/ The new approach is to use a callback mechanism that is specific to hdmi-codec. Changes from v1 to v2: - hdmi-codec.c: cleanup the sequence of hdmi_codec_jack_report and hdmi_codec_set_jack_detect. - dw-hdmi.c: change argument of hdmi_codec_plugged_cb so it takes a generic device which has hdmi_codec_priv in its drvdata. - dw-hdmi.c: add a helper function handle_plugged_change to check audio platform device and codec platform device before calling callback. - dw-hdmi-c: avoid setting callback function if audio platform device or codec platform device is missing. - rockchip_max98090: fix the checking of return code when setting sysclk on cpu_dai and codec_dai. cpu_dai error should be reported. For HDMI codec_dai, there is no need to set sysclk. Cheng-Yi Chiang (4): ASoC: hdmi-codec: Add an op to set callback function for plug event drm: bridge: dw-hdmi: Report connector status using callback ASoC: rockchip_max98090: Add dai_link for HDMI ASoC: rockchip_max98090: Add HDMI jack support .../gpu/drm/bridge/synopsys/dw-hdmi-audio.h | 3 + .../drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 10 ++ drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 55 ++++++++- include/sound/hdmi-codec.h | 16 +++ sound/soc/codecs/hdmi-codec.c | 45 +++++++ sound/soc/rockchip/rockchip_max98090.c | 116 ++++++++++++++---- 6 files changed, 221 insertions(+), 24 deletions(-) -- 2.22.0.410.gd8fdbe21b5-goog