Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1006793rwb; Tue, 27 Sep 2022 07:19:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5oxJkKEW36cAIjyL1SPTnOFCXfN+yoqekqDS+EA47mhhVZcs454nvanR+X9EOoXqHA3HHT X-Received: by 2002:a17:90b:1c07:b0:200:9728:b8cd with SMTP id oc7-20020a17090b1c0700b002009728b8cdmr4952421pjb.139.1664288357463; Tue, 27 Sep 2022 07:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664288357; cv=none; d=google.com; s=arc-20160816; b=p9TBn+zbKNEXDRUpXVevDmGlNnVtbzhpUhY25GoIsCmVB96xhqR96fgs/d+6fvcYyz 0GJ1d59aCJc8TYIAmGBDf0aWQVZ0aYLsoBAJyOmFBGZiB6RC0iSup6ith6QgXWcSxQbV y6KkrVU4iwERMHDAx7OCJn0D1zu7jNuIcdynNkHyq8vdzTUPdW5smor98k1RWXfE3cn4 3dPbWhdX6CPqMzx35B0btIRnV5XYxsNhR+P+QtA9KSyvldxU8KjWPVQcq+Swfv7ZMewB lwf0jRY0VUF9lHRQsyqG0f1pwbIhdrM+adhTjV4xZkk3vNSYF4uxLBNA8Y/YEMobYCR3 HezQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:mime-version :in-reply-to:references:user-agent:from:dkim-signature; bh=uw1gvMh/1zxeYeQnV6wZiimhJI0pYdqIU/T7gR133DU=; b=wXHs2vFkJuYZJ1u+xTIU3HgOmtHfQeMfV/X+bLaWSOjjpVQVWAPEv0AqEFd6qeZs8A n/nuSRZ5N2TQd8hMtscLTOUAzEICgZ83qgrUHQs1x2pm8bIdnmNJTIXoWVOcAEjQqW2q FI7JqpKR+jqHvYcbT3LiQ2Xx6/IsT5pNiJwtEdgFOiqxgNOfrBQ5ddiAGIW6J+feeay7 7xUjnKeJopVRrqVdJz6nVz3kiFE8/GYeUHMc9rpcbyxloZRX+dGybWTVa7gC2ZO3HO8X RwedZvEwC24ymqD27im7zMFOtXLm15R6d5fjFicHCqFzW7YtNVC+srQn6uVLmRFPSETq KKDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=KGZxffdg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a23-20020a63d417000000b004387f0e85d6si1898818pgh.263.2022.09.27.07.19.05; Tue, 27 Sep 2022 07:19:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=KGZxffdg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232478AbiI0NOA (ORCPT + 99 others); Tue, 27 Sep 2022 09:14:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232596AbiI0NNm (ORCPT ); Tue, 27 Sep 2022 09:13:42 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68DA21577F3 for ; Tue, 27 Sep 2022 06:13:39 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id q15-20020a17090a304f00b002002ac83485so10080136pjl.0 for ; Tue, 27 Sep 2022 06:13:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:from:to:cc:subject:date; bh=uw1gvMh/1zxeYeQnV6wZiimhJI0pYdqIU/T7gR133DU=; b=KGZxffdgEWrc+nIKZQdWmZ3shdGF0hcnG/eimwyIfxhrmALI1rYCYrjvI7h/XUgVGA AC6SvAtl53+/uRBU3anLk1UvpVRaNBemAR7Oyh2pHvX7bjmJNbSDXufs8hRYtyXsG5vQ jd3iWOu4rVRR/EnzQp9aaeBmal/AfKg+NmoFOYFIDeJe+wLcey51NCuMUbD1u2T1V94U R0nuad1PG+imVaMqobj/rIzM1PIjkWlf6o0msI+SnoIU3CpMuPKph0lfdyOcWwBg0vLZ dTGoMaNPB1H8WboG58vSq5A7eIOFKcqFwcw4AAp8tg8XHTSKsuUNf6zQOBzI1wa4MP6X qvxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:x-gm-message-state:from:to:cc:subject:date; bh=uw1gvMh/1zxeYeQnV6wZiimhJI0pYdqIU/T7gR133DU=; b=DvZW/Q/RmPkMjAW9ZudsKkpqVSwnAj6SLCkK3mvD106zycQ2aLEwo5ju2OK62B7s97 PPY6My9sC/rhGNFd+1/LTGOOEVVJ5IqC2TRqnh904lb7z3+Etz/x+C4FQWoP3y8Ts5bI hJIEYG2rFc0opDr2hRSJ0OUa5KRhOCfapoRfJsjSRWydyLwj6O3uNM4nE7i8V0405htv I1g0SOKNU6tZlnTh5dbCo35eVvn3nv+mafC6vP5BK06+x22brHSM/GqSJZJjNte+A553 ZC5Zf7nXFU5I2EP3YIhesE039USsC1IOMmVreNQCn8zBXoVf/b5i7OONI+OhP8cZtouz Ftvw== X-Gm-Message-State: ACrzQf3R7uq2cUhVlhUtHASr3U+oOwXajO/jSP6DppFcCo1fG2qFgcGV wHtuPNoncDM605dBdoOa965uiKwJJI/psLWKcB0Dcg== X-Received: by 2002:a17:902:f710:b0:178:a692:b1f7 with SMTP id h16-20020a170902f71000b00178a692b1f7mr27434461plo.112.1664284411364; Tue, 27 Sep 2022 06:13:31 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 27 Sep 2022 06:13:30 -0700 From: Guillaume Ranquet User-Agent: meli 0.7.2 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-12-4844816c9808@baylibre.com> In-Reply-To: MIME-Version: 1.0 Date: Tue, 27 Sep 2022 06:13:30 -0700 Message-ID: Subject: Re: [PATCH v1 12/17] drm/mediatek: hdmi: mt8195: add audio support To: AngeloGioacchino Del Regno , Matthias Brugger , Vinod Koul , Stephen Boyd , David Airlie , Rob Herring , Philipp Zabel , Krzysztof Kozlowski , Daniel Vetter , Chunfeng Yun , CK Hu , Jitao shi , Chun-Kuang Hu , Michael Turquette , Kishon Vijay Abraham I Cc: linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, Pablo Sun , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek , linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Sep 2022 13:11, AngeloGioacchino Del Regno wrote: >Il 19/09/22 18:56, Guillaume Ranquet ha scritto: >> Add HDMI audio support for mt8195 >> >> Signed-off-by: Guillaume Ranquet >> >> diff --git a/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c b/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c >> index 39e07a6dd490..bb7593ea4c86 100644 >> --- a/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c >> +++ b/drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c >> @@ -215,6 +215,26 @@ static void mtk_hdmi_hw_vid_black(struct mtk_hdmi *hdmi, bool black) >> mtk_hdmi_mask(hdmi, TOP_VMUTE_CFG1, 0, REG_VMUTE_EN); >> } >> >> +static void mtk_hdmi_hw_aud_mute(struct mtk_hdmi *hdmi) >> +{ >> + u32 val; >> + >> + val = mtk_hdmi_read(hdmi, AIP_CTRL, &val); >> + > >val_tx = AUD_MUTE_FIFO_EN; >if (val & DSD_EN) > val_tx |= DSD_MUTE_DATA; > >regmap_set_bits(regmap, AIP_TXCTRL, val_tx); > >Easier, shorter. Thx for the tip. > >> + if (val & DSD_EN) >> + mtk_hdmi_mask(hdmi, AIP_TXCTRL, >> + DSD_MUTE_DATA | AUD_MUTE_FIFO_EN, >> + DSD_MUTE_DATA | AUD_MUTE_FIFO_EN); >> + else >> + mtk_hdmi_mask(hdmi, AIP_TXCTRL, AUD_MUTE_FIFO_EN, >> + AUD_MUTE_FIFO_EN); >> +} > >Regards, >Angelo >