From patchwork Thu Nov 24 08:54:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SmlheGluIFl1ICjkv57lrrbpkasp?= X-Patchwork-Id: 628591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5AE0DC433FE for ; Thu, 24 Nov 2022 08:55:50 +0000 (UTC) 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 9FD8C16DA; Thu, 24 Nov 2022 09:54:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9FD8C16DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1669280148; bh=7QTlydbdY9YeoWqx0L6YSjXNbh14hzV6W3tcDVBkMNM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LTzQV8VCQ81RuY5b4hDRw8F/AhjYHkJ/d/ruA3FgAu328j+4igbgmHWbHIWpbHTGX PoZje8aJpdNfsZEoFZPGysaUNrVRWK5mquTwtwiD6MBcprLoItOCgQbgSkgpnGxUJE Pk3OP4tiZXWtf/EHyP6yCTlMuIfdjOXV1RQ/IOhg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 53083F80245; Thu, 24 Nov 2022 09:54:58 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5ED58F80431; Thu, 24 Nov 2022 09:54:57 +0100 (CET) Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 155D5F80149 for ; Thu, 24 Nov 2022 09:54:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 155D5F80149 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="kaE5lrXd" X-UUID: 4eec1624fe3e4ac1bd1052dd37f46a9b-20221124 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Se93twhCnANzbyfAp19LflQ7H378k9rkCrI1fa1AgUY=; b=kaE5lrXdlSx/NNQjmuyyQJ7mZv2iZcS635v/rxTauMCA/80UDzSNnVpPucgo7AJXsPuck7eaWhnC9RhND4RbsIwvwLuHawXEmuEEYSOfy1a0708AunRnAL0+tmHnMEcRl8P1wRajLKZn7k/8YbZQ8joNfIdgAwmhrItkXahRLWg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14, REQID:016c2cf5-489e-4d9c-939f-472d708d3b4a, IP:0, U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:dcaaed0, CLOUDID:7bc4b52f-2938-482e-aafd-98d66723b8a9, B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 4eec1624fe3e4ac1bd1052dd37f46a9b-20221124 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 177122599; Thu, 24 Nov 2022 16:54:41 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Thu, 24 Nov 2022 16:54:39 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 24 Nov 2022 16:54:38 +0800 From: Jiaxin Yu To: , , , , , , , Subject: [PATCH 1/3] drm: bridge: it6505: bridge to hdmi-codec Date: Thu, 24 Nov 2022 16:54:34 +0800 Message-ID: <20221124085436.24900-2-jiaxin.yu@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124085436.24900-1-jiaxin.yu@mediatek.com> References: <20221124085436.24900-1-jiaxin.yu@mediatek.com> MIME-Version: 1.0 X-MTK: N Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, allen-kh.cheng@mediatek.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Project_Global_Chrome_Upstream_Group@mediatek.com, linux-mediatek@lists.infradead.org, Jiaxin Yu , ajye_huang@compal.corp-partner.google.com, 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" 1. Bridge to hdmi-codec to support audio feature. At the same time, the function of automatically detecting audio is removed. 2. It is observed that some DP-to-HDMI dongles will get into bad states if sending InfoFrame without audio data. Defer to enable it6505's audio feature when PCM triggers START or RESUME. Signed-off-by: Jiaxin Yu --- drivers/gpu/drm/bridge/ite-it6505.c | 36 ++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index dfe4351c9bdd..f4e1a1d94ed8 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -2159,7 +2159,6 @@ static void it6505_stop_link_train(struct it6505 *it6505) static void it6505_link_train_ok(struct it6505 *it6505) { - struct device *dev = &it6505->client->dev; it6505->link_state = LINK_OK; /* disalbe mute enable avi info frame */ @@ -2167,11 +2166,6 @@ static void it6505_link_train_ok(struct it6505 *it6505) it6505_set_bits(it6505, REG_INFOFRAME_CTRL, EN_VID_CTRL_PKT, EN_VID_CTRL_PKT); - if (it6505_audio_input(it6505)) { - DRM_DEV_DEBUG_DRIVER(dev, "Enable audio!"); - it6505_enable_audio(it6505); - } - if (it6505->hdcp_desired) it6505_start_hdcp(it6505); } @@ -2823,6 +2817,36 @@ static void __maybe_unused it6505_audio_shutdown(struct device *dev, void *data) it6505_disable_audio(it6505); } +static int __maybe_unused it6505_audio_setup_trigger(struct it6505 *it6505, int cmd) +{ + struct device *dev = &it6505->client->dev; + + DRM_DEV_DEBUG_DRIVER(dev, "event: %d", cmd); + + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_RESUME: + queue_delayed_work(system_wq, &it6505->delayed_audio, + msecs_to_jiffies(180)); + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_SUSPEND: + cancel_delayed_work(&it6505->delayed_audio); + break; + default: + return -EINVAL; + } + + return 0; +} + +static int __maybe_unused it6505_audio_trigger(struct device *dev, int cmd) +{ + struct it6505 *it6505 = dev_get_drvdata(dev); + + return it6505_audio_setup_trigger(it6505, cmd); +} + static int __maybe_unused it6505_audio_hook_plugged_cb(struct device *dev, void *data, hdmi_codec_plugged_cb fn, From patchwork Thu Nov 24 08:54:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SmlheGluIFl1ICjkv57lrrbpkasp?= X-Patchwork-Id: 628590 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id EFF9AC4332F for ; Thu, 24 Nov 2022 08:56:40 +0000 (UTC) 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 3C6F816E3; Thu, 24 Nov 2022 09:55:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C6F816E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1669280199; bh=3xU7GO2BsLnguyMEAKKnIVFArEV2jJbhr9I1hK4sEiE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=q/4IlontlNjaRfpiIyxM/NLVhFcTEg7t9tHE9i6N7lWxjnPHcl7NEdM8vw1rTYa2z 0XWqO9d/9AhUtdFMxPr/eWx/L8Qk31oJ0NCSrjgnj6utGbvbndORGQVwlgBbqV0uAl OYlzwFubiuv3jkRRx0IzIZM4O/bix/izvS+V3nBc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C6AFEF80557; Thu, 24 Nov 2022 09:55:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9695FF80558; Thu, 24 Nov 2022 09:55:08 +0100 (CET) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id ADD4EF80115 for ; Thu, 24 Nov 2022 09:55:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ADD4EF80115 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="sup8TiFd" X-UUID: 5a1697d7b01a49778e007fc4272136c7-20221124 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=vz32to7zdlLJ3qNpyb8VnolqTMd0LD/XvVaG+ohQNDo=; b=sup8TiFduXrY0r4zf8XjEecKkTbuO+vMjjII35GMGEZmZ/GPJm1+mboYnNuLrWMhAY+WLUM8swuBkTGoB/KcGvj/PTZujBkLE3crIcchlw5vU51QTsiS/RBzda2osf7NoT1CFG2ZFcgQ/ExU1Uayg30siMrKuNqmH1C8wkd1Omw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14, REQID:a4eda33b-4abd-4ed3-9487-fd23bb665f5c, IP:0, U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:dcaaed0, CLOUDID:826420dc-6ad4-42ff-91f3-18e0272db660, B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 5a1697d7b01a49778e007fc4272136c7-20221124 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 449839032; Thu, 24 Nov 2022 16:54:42 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Thu, 24 Nov 2022 16:54:40 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 24 Nov 2022 16:54:39 +0800 From: Jiaxin Yu To: , , , , , , , Subject: [PATCH 2/3] ASoC: hdmi-codec: Add event handler for hdmi TX Date: Thu, 24 Nov 2022 16:54:35 +0800 Message-ID: <20221124085436.24900-3-jiaxin.yu@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124085436.24900-1-jiaxin.yu@mediatek.com> References: <20221124085436.24900-1-jiaxin.yu@mediatek.com> MIME-Version: 1.0 X-MTK: N Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, allen-kh.cheng@mediatek.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Project_Global_Chrome_Upstream_Group@mediatek.com, linux-mediatek@lists.infradead.org, Jiaxin Yu , ajye_huang@compal.corp-partner.google.com, 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" If the speaker and hdmi are connect to the same port of I2S, when try to switch to speaker playback, we will find that hdmi is always turned on automatically. The way of switching is through SOC_DAPM_PIN_SWITCH, however, such events can not be handled in hdmi-codec driver. So add event handler for hdmi TX to solve the above issue. Signed-off-by: Jiaxin Yu --- include/sound/hdmi-codec.h | 6 ++++++ sound/soc/codecs/hdmi-codec.c | 37 +++++++++++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/include/sound/hdmi-codec.h b/include/sound/hdmi-codec.h index 48ad33aba393..dcbc09254144 100644 --- a/include/sound/hdmi-codec.h +++ b/include/sound/hdmi-codec.h @@ -81,6 +81,12 @@ struct hdmi_codec_ops { struct hdmi_codec_daifmt *fmt, struct hdmi_codec_params *hparms); + /* + * PCM trigger callback. + * Mandatory + */ + int (*trigger)(struct device *dev, int cmd); + /* * Shuts down the audio stream. * Mandatory diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 0b1cdb2d6049..cb4479372e09 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -276,7 +276,31 @@ struct hdmi_codec_priv { u8 iec_status[AES_IEC958_STATUS_SIZE]; }; +static int hdmi_tx_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) +{ + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component); + + switch (event) { + case SND_SOC_DAPM_PRE_PMU: + if (hcp->hcd.ops->trigger) + hcp->hcd.ops->trigger(component->dev->parent, SNDRV_PCM_TRIGGER_START); + break; + case SND_SOC_DAPM_POST_PMD: + if (hcp->hcd.ops->trigger) + hcp->hcd.ops->trigger(component->dev->parent, SNDRV_PCM_TRIGGER_STOP); + break; + default: + break; + } + + return 0; +} + static const struct snd_soc_dapm_widget hdmi_widgets[] = { + SND_SOC_DAPM_OUT_DRV_E("SDB", SND_SOC_NOPM, 0, 0, NULL, 0, hdmi_tx_event, + SND_SOC_DAPM_POST_PMD | SND_SOC_DAPM_PRE_PMU), SND_SOC_DAPM_OUTPUT("TX"), SND_SOC_DAPM_OUTPUT("RX"), }; @@ -808,18 +832,23 @@ static int hdmi_dai_probe(struct snd_soc_dai *dai) struct hdmi_codec_daifmt *daifmt; struct snd_soc_dapm_route route[] = { { - .sink = "TX", + .sink = dai->driver->capture.stream_name, + .source = "RX", + }, + { + .sink = "SDB", .source = dai->driver->playback.stream_name, }, { - .sink = dai->driver->capture.stream_name, - .source = "RX", + .sink = "TX", + .source = "SDB", }, + }; int ret; dapm = snd_soc_component_get_dapm(dai->component); - ret = snd_soc_dapm_add_routes(dapm, route, 2); + ret = snd_soc_dapm_add_routes(dapm, route, ARRAY_SIZE(route)); if (ret) return ret; From patchwork Thu Nov 24 08:54:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SmlheGluIFl1ICjkv57lrrbpkasp?= X-Patchwork-Id: 628335 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AB9FBC433FE for ; Thu, 24 Nov 2022 08:56:59 +0000 (UTC) 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 AED7316E2; Thu, 24 Nov 2022 09:56:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AED7316E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1669280217; bh=ZHs9/GxjSFbvMQT8b/K0hUFR5tDi7PfT/GtGQiZE4HI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Gl9dX3c8nWiyoQGKrnKWSChNLzYPcCXRNivCiaKRB5ccHOVIW+B3ECSV/CYIKx2r/ jZhieP+s21M8Iz8TsPUDMwRgeW932DPsYznI4DOTX1a9sevKuBQPggRNOqNp14b/4e TaKRuuC+QsfRmyk7RaPj656cOUrqmMTLr5G7n7cA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6C8A6F80431; Thu, 24 Nov 2022 09:56:07 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2E85CF80431; Thu, 24 Nov 2022 09:56:06 +0100 (CET) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0C235F8049E for ; Thu, 24 Nov 2022 09:55:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0C235F8049E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="c9YszU9h" X-UUID: 79ec29ffe0a04ef1b3784846e65cc590-20221124 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ViGNiKiDlpdTwQms22X0e/YbhcaMRLoQ4ODpbxaV73U=; b=c9YszU9huKp+SyvUw8kjCHgS2Lsb02TS8Peq257WeYi+i6yf5Mph7VqEabURiLNRmiu1w4HFLqWBGnL6ahRopPYzn6njB48NZN4NBnZUyCkUAGx4pNiN1CpefOa4sdsghYtdS4pJEx0vs4jJnUo7inVSlcgr2fd+AJiV+EnigG4=; X-CID-UNFAMILIAR: 1 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14, REQID:5d14ae8f-31e1-46c9-a318-7adf258747d3, IP:0, U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:95 X-CID-INFO: VERSION:1.1.14, REQID:5d14ae8f-31e1-46c9-a318-7adf258747d3, IP:0, URL :0,TC:0,Content:-5,EDM:0,RT:0,SF:100,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTI ON:quarantine,TS:95 X-CID-META: VersionHash:dcaaed0, CLOUDID:c8c4b52f-2938-482e-aafd-98d66723b8a9, B ulkID:221124165445AUVM93DU,BulkQuantity:0,Recheck:0,SF:38|28|16|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 79ec29ffe0a04ef1b3784846e65cc590-20221124 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1815254158; Thu, 24 Nov 2022 16:54:43 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Thu, 24 Nov 2022 16:54:42 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 24 Nov 2022 16:54:40 +0800 From: Jiaxin Yu To: , , , , , , , Subject: [PATCH 3/3] ASoC: mediatek: mt8186: correct the HDMI widgets Date: Thu, 24 Nov 2022 16:54:36 +0800 Message-ID: <20221124085436.24900-4-jiaxin.yu@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124085436.24900-1-jiaxin.yu@mediatek.com> References: <20221124085436.24900-1-jiaxin.yu@mediatek.com> MIME-Version: 1.0 X-MTK: N Cc: alsa-devel@alsa-project.org, chunxu.li@mediatek.com, allen-kh.cheng@mediatek.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Project_Global_Chrome_Upstream_Group@mediatek.com, linux-mediatek@lists.infradead.org, Jiaxin Yu , ajye_huang@compal.corp-partner.google.com, 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" Use SND_SOC_DAPM_LINE instead of SND_SOC_DAPM_OUTPUT to trigger DAPM events to hdmi-codec when userspace control the DPAM pin. Signed-off-by: Jiaxin Yu --- sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c | 2 +- sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c index d8c93d66b4e6..f4960b0c8298 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c @@ -965,7 +965,7 @@ mt8186_mt6366_da7219_max98357_widgets[] = { SND_SOC_DAPM_SPK("Speakers", NULL), SND_SOC_DAPM_HP("Headphones", NULL), SND_SOC_DAPM_MIC("Headset Mic", NULL), - SND_SOC_DAPM_OUTPUT("HDMI1"), + SND_SOC_DAPM_LINE("HDMI1", NULL), SND_SOC_DAPM_MIXER(SOF_DMA_DL1, SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER(SOF_DMA_DL2, SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER(SOF_DMA_UL1, SND_SOC_NOPM, 0, 0, NULL, 0), diff --git a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c index e59d92e2afa3..c61e9bb419d4 100644 --- a/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c +++ b/sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c @@ -1033,7 +1033,7 @@ mt8186_mt6366_rt1019_rt5682s_widgets[] = { SND_SOC_DAPM_SPK("Speakers", NULL), SND_SOC_DAPM_HP("Headphone", NULL), SND_SOC_DAPM_MIC("Headset Mic", NULL), - SND_SOC_DAPM_OUTPUT("HDMI1"), + SND_SOC_DAPM_LINE("HDMI1", NULL), SND_SOC_DAPM_MIXER(SOF_DMA_DL1, SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER(SOF_DMA_DL2, SND_SOC_NOPM, 0, 0, NULL, 0), SND_SOC_DAPM_MIXER(SOF_DMA_UL1, SND_SOC_NOPM, 0, 0, NULL, 0),