Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3751275rwb; Tue, 20 Sep 2022 04:20:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48ahTRC/277F8T11L2LbWeNHGvRa70uwag4o7JwT0PePKfnZBoih1IBSSuSM+y1Ff99L/Z X-Received: by 2002:a17:907:74a:b0:77e:9455:b4e3 with SMTP id xc10-20020a170907074a00b0077e9455b4e3mr16667572ejb.471.1663672816070; Tue, 20 Sep 2022 04:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663672816; cv=none; d=google.com; s=arc-20160816; b=UfQs7w2dQJ0jKkgcZER9daoWdx6Zdr515lz4FGkfpbUmTu5EfxwMlqLDvM0HQiNBY4 ZIWkUgX2lbwx9LFUhyZmmS3HO2VctvjsrpstEAmeKqBt5quC0wcNQ44ILiRn1HReZLJP c2iTDTlzBKQiA+BQZFJdsig1MlMIcsODV6hD+tgasIIs52CDLvM/X6V2CIbCP0Xx6vwZ BTct3iCIkps5ErVHmjQgK6WOQj2pglDCIMateOoH/DAUtainmNCJo9wtBCGri8FBvmyQ 9pZ1Mo65Xnfc0DaF8YrYoY4OkqtIvU8ekkQnZeMQk8R2VbrjNbxdRciMpYqNTkoh1Saq ixDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yvQpRWQfKh4nbzHVUybYHb45icAIOto75MeAV70V7mA=; b=qSCqREg9H/xmY/I/RY6BLkmXOTRpK26COJ7rVU0f3a8shVcNWjT1dtXZqPLD9cRU/y xuuuqT0yb7h4bOSbKef3xRH4n/nYNm6hYjekcQKz4OOlZeb1snksUIDworj3lH3W2Nt4 STur7Sh1CKUrbhincSaOqkxMpLG5S0EIcq8XMJziK1QZCJsTJAH044xTi1blXOLAA6TI hg530rm4ZKA/E/p6h5avzRKnIpfFJR0G976KiX2Hs9fmIC/LUwf0ZnV8C12DAWL/nChh QsuGvphwLqLQwi9SCAaARzqmrBKZZ99XVlikBtBkZGaua+JB7T5ZJtzkJetI/D+829XP HbEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="e/u8yuCL"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae1-20020a17090725c100b007803739fe1bsi1026658ejc.10.2022.09.20.04.19.50; Tue, 20 Sep 2022 04:20:16 -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=@collabora.com header.s=mail header.b="e/u8yuCL"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbiITLLo (ORCPT + 99 others); Tue, 20 Sep 2022 07:11:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbiITLLn (ORCPT ); Tue, 20 Sep 2022 07:11:43 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 193A912746; Tue, 20 Sep 2022 04:11:42 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 119786601F41; Tue, 20 Sep 2022 12:11:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663672300; bh=QSpSDTgYCpqgFq+O5bVL9KBXyxjvk1qUR8EKvHpwW60=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=e/u8yuCL8pOpihKA+yEqSrBZAFKnJt1+3WV3WVVHWqL9sjeK0w/HabOuNuQjM5ZdG a7yx0xVV0Ri3EbQUDUJB79KC+2BgDdTCFZAcP8hle6RbibPIhM2QkLe+1XSuPxbDv+ eApEkDjpEhr94a7oaqtQCp7ku5aaeR+33SmmLe5+f3Uqvs4sd4jjVjwLJf7/KxhqvU m8ppQ/8kheumqjbVTxvLrw6/gPYzE2IW9m1aJcIOaaZ3pz5lqRcU+U4+kf5pSDc54s pbIyF+h/9Cp2jLgufGA9GvqonCUrfDWqbvYM/TlXEuRZFJdSCpjzy+VtKTGAWYHBpO Fk/H+Wtug4PTg== Message-ID: Date: Tue, 20 Sep 2022 13:11:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v1 12/17] drm/mediatek: hdmi: mt8195: add audio support Content-Language: en-US To: Guillaume Ranquet , 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 , Matthias Brugger 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 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-12-4844816c9808@baylibre.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220919-v1-12-4844816c9808@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 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. > + 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