From patchwork Sun Feb 26 12:49:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13152396 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 44D97C6FA8E for ; Sun, 26 Feb 2023 12:51:18 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D5965832; Sun, 26 Feb 2023 13:50:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D5965832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677415874; bh=CRp8GhZU+qN7HRXYjIwtnt541hE7kwal9bWY145FMw8=; h=From:Date:Subject:References:In-Reply-To:To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=F32gYtp6tfeHyyMHfuGruvgZejy5hQXagv0OSfPYZdU9OOszye9jNsQbEbFgbok0b 3kppcWtjOhYiiHGPGDExEduGOaAxCy7qPexnaiQNdnv3FydjpSj+TfoooXNfLcr1wC 6UECadeeWDuKA3tmsTAUkwK2k5OCyMdQsxB/bht8= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 4E2DBF800DF; Sun, 26 Feb 2023 13:50:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C177F8049C; Sun, 26 Feb 2023 13:50:19 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E8D72F800DF for ; Sun, 26 Feb 2023 13:50:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E8D72F800DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=lWYIoGWV Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DCEC160C1B; Sun, 26 Feb 2023 12:50:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 938BAC4339C; Sun, 26 Feb 2023 12:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677415814; bh=CRp8GhZU+qN7HRXYjIwtnt541hE7kwal9bWY145FMw8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lWYIoGWVDxH+6USa5/bfTvaC1qRD4dafIFrFw6eOoO8rAmaQ5Gs6PI2THoXiMKqTl 6p2uPsvNjfvTWZsDS7bNNHiX2C2EXyHWyVdzhScsfaUvOSHQruEtH1PpMwW5xjrKew PsAzqwr39cjVD5u0AGYE4R988atKERwyFccz/VhLGp0cTBP4ucoVxirfwReI5BFTrO mek0kBnMJpgL7Saf/pY2RgJA3lIvQyOYGIU1ZeYcUxA8SK8+/GiC6xD8rnjTkoIHul 7XkkZ/qnX0LXYVph+X0coglMVASXBxgq3o1aujPLbuzwhBsor7de6ucq3Jnv/IA4SI R9ZgKw3Nv4uqQ== From: Mark Brown Date: Sun, 26 Feb 2023 12:49:56 +0000 Subject: [PATCH 1/2] ASoC: mt8183: Remove spammy logging from I2S DAI driver MIME-Version: 1.0 Message-Id: <20230224-asoc-mt8183-quick-fixes-v1-1-041f29419ed5@kernel.org> References: <20230224-asoc-mt8183-quick-fixes-v1-0-041f29419ed5@kernel.org> In-Reply-To: <20230224-asoc-mt8183-quick-fixes-v1-0-041f29419ed5@kernel.org> To: Liam Girdwood , Matthias Brugger , AngeloGioacchino Del Regno X-Mailer: b4 0.13-dev-ada30 X-Developer-Signature: v=1; a=openpgp-sha256; l=2207; i=broonie@kernel.org; h=from:subject:message-id; bh=CRp8GhZU+qN7HRXYjIwtnt541hE7kwal9bWY145FMw8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBj+1V/5RImjDJMcZfKi1j7muuEZi+2C+oXbbNVerB3 0ZhEk+qJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY/tVfwAKCRAk1otyXVSH0OCPB/ 4g20IqYn32wt3p14KSSEUa5B9865bw3M89JBtDJEGfRlX4d2TFqAWR5+OcKyejvPYuSOOPqByf/mbA jkNob2/JuWayTDNZgy/kPtUagVyH3Q1LCDxqpeapZ8Wsb1mN0qDYKziKN/9KW5J6De1FXXs3ccqpf6 MJ24rpgiT/FSNtKoFJx6DSdS/dHSH6diNbq6k4M7GPp2a1cLk0pySm6LS0Q5K+GsKTELcMnii0A7ym aUqcjqaAKkfmM8HMpk2gIXR5Qd79+Bvbcf+KU1pqcJorGtQpLqjrtvD7Snfr4sJ7YIKzFN80eRQDaO 8SSYx15jEK09yTybkOzw4h/fkcHem6 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: HPWDRPJQQTAIHPZZCQFJTJYIXM4FC467 X-Message-ID-Hash: HPWDRPJQQTAIHPZZCQFJTJYIXM4FC467 X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: There is a lot of dev_info() logging in normal operation in the I2S DAI driver, remove it to avoid spamming the console. Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8183/mt8183-dai-i2s.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c index 6a9ace4180d3..38f7fa38ee95 100644 --- a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c +++ b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c @@ -148,9 +148,6 @@ static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol, hd_en = ucontrol->value.integer.value[0]; - dev_info(afe->dev, "%s(), kcontrol name %s, hd_en %d\n", - __func__, kcontrol->id.name, hd_en); - i2s_priv = get_i2s_priv_by_name(afe, kcontrol->id.name); if (!i2s_priv) { @@ -276,9 +273,6 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w, struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm); struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); - dev_info(cmpnt->dev, "%s(), name %s, event 0x%x\n", - __func__, w->name, event); - switch (event) { case SND_SOC_DAPM_PRE_PMU: if (strcmp(w->name, APLL1_W_NAME) == 0) @@ -307,9 +301,6 @@ static int mtk_mclk_en_event(struct snd_soc_dapm_widget *w, struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); struct mtk_afe_i2s_priv *i2s_priv; - dev_info(cmpnt->dev, "%s(), name %s, event 0x%x\n", - __func__, w->name, event); - i2s_priv = get_i2s_priv_by_name(afe, w->name); if (!i2s_priv) { @@ -715,11 +706,6 @@ static int mtk_dai_i2s_config(struct mtk_base_afe *afe, unsigned int i2s_con = 0, fmt_con = I2S_FMT_I2S << I2S_FMT_SFT; int ret = 0; - dev_info(afe->dev, "%s(), id %d, rate %d, format %d\n", - __func__, - i2s_id, - rate, format); - if (i2s_priv) { i2s_priv->rate = rate; @@ -810,8 +796,6 @@ static int mtk_dai_i2s_set_sysclk(struct snd_soc_dai *dai, return -EINVAL; } - dev_info(afe->dev, "%s(), freq %d\n", __func__, freq); - apll = mt8183_get_apll_by_rate(afe, freq); apll_rate = mt8183_get_apll_rate(afe, apll); From patchwork Sun Feb 26 12:49:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13152397 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 D360BC6FA8E for ; Sun, 26 Feb 2023 12:51:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E129C852; Sun, 26 Feb 2023 13:50:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E129C852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677415889; bh=JEDiIUtaX6g3tzXr94u0tVLuH331wW8Kksrsq52VVaw=; h=From:Date:Subject:References:In-Reply-To:To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=uomsSBWnhwh2aatkWENVC5QpfCMgRLQRDNJxZ23iBOz5o1PgaBJSz372L2Z8CysG5 qBSHETXePFwOTjDjEjqhSSJ68U1mNPhLPFdoFl+h80vc/Qrp4Z0Jbge44TmHl9CKis 7L9Cq9BAaUgMeyD0lE01X22R17bFkbNwzZXGNOcA= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BCA42F804FE; Sun, 26 Feb 2023 13:50:25 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3C024F80527; Sun, 26 Feb 2023 13:50:21 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 75D8EF800DF for ; Sun, 26 Feb 2023 13:50:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 75D8EF800DF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=KJDl+HGr Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B4837B80159; Sun, 26 Feb 2023 12:50:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB669C4339E; Sun, 26 Feb 2023 12:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677415816; bh=JEDiIUtaX6g3tzXr94u0tVLuH331wW8Kksrsq52VVaw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KJDl+HGre8yXeUx2qaDrDi2wZvNZ2dIYmMUG1rcPYUNvYuSzehbaEh/fOnI5/IWNt qd1XCLGO/mvCyeWMu1+YPB2h/n2SjS7KNu0prq0VQ2EGUQies2if/laQpoMK/VkfKL 4als1i4T3HaS4Bea6b8FXV9R2FwynDxiowMh3L6MB3lPDDKvAAvuzCDb3nGvQg2wSj 9GGiOKXHVtZs8jFhn9qG5MEyLb16B5OpWUmpd7vSCZBIIqzR/A/rraz2ujnZt2DyfU nVcL9+iBGAPKuELGEKic7vJlBeqQU2b1VqRtpsyU3xHkJwgyI8FGVG9n/xJiCtBtUp XY3gaYU+0A8TQ== From: Mark Brown Date: Sun, 26 Feb 2023 12:49:57 +0000 Subject: [PATCH 2/2] ASoC: mt8183: Fix event generation for I2S DAI operations MIME-Version: 1.0 Message-Id: <20230224-asoc-mt8183-quick-fixes-v1-2-041f29419ed5@kernel.org> References: <20230224-asoc-mt8183-quick-fixes-v1-0-041f29419ed5@kernel.org> In-Reply-To: <20230224-asoc-mt8183-quick-fixes-v1-0-041f29419ed5@kernel.org> To: Liam Girdwood , Matthias Brugger , AngeloGioacchino Del Regno X-Mailer: b4 0.13-dev-ada30 X-Developer-Signature: v=1; a=openpgp-sha256; l=1295; i=broonie@kernel.org; h=from:subject:message-id; bh=JEDiIUtaX6g3tzXr94u0tVLuH331wW8Kksrsq52VVaw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBj+1WAnugavWTX+9Hg/IvfRmt51ua6j+yicn0pEbPH asQEgkeJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY/tVgAAKCRAk1otyXVSH0CYYB/ 0YSxCulCFXlrJOmzm6bM8diam+8P0CaA2QdRk+4WzbchuF3GPtZYVkpLATCYcFkge0COsUx4/f25Ng DEm6IaKvDx3uPBKT6F2o2utQBxHYPzaotQ0l6AzJ/CakQC+7h0FKRcwjK5yEWYGT0Y4LoVeZStSKfu rvLgBlDdRsXMEDGzXAhDzzpuU9y22LBshUeP/DQZnhpzYxFtUOlvCA+Xzavgn7FpA9Wxeut5Ztpq3f xsAVW6NAEr6b4xUwsgMfUazDH6Hh2dwnDuj9DzhaVKP+QLRrMZeKKBNHRjjCE/RTJRSODi+FkaI/nE 4tr+kl9q1aYhrH7pGqFNzIEqt7tVnq X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: 3NU7B44NBXSF6EEVNZFKQQG5A6RXAWAU X-Message-ID-Hash: 3NU7B44NBXSF6EEVNZFKQQG5A6RXAWAU X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ALSA control put() operations should return 0 if the value changed so that events can be generated appropriately for userspace but the custom control in the MT8183 I2S DAI driver doesn't do that, fix it. Signed-off-by: Mark Brown Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8183/mt8183-dai-i2s.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c index 38f7fa38ee95..8645ab686970 100644 --- a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c +++ b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c @@ -141,7 +141,7 @@ static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol, struct mtk_base_afe *afe = snd_soc_component_get_drvdata(cmpnt); struct mtk_afe_i2s_priv *i2s_priv; struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; - int hd_en; + int hd_en, change; if (ucontrol->value.enumerated.item[0] >= e->items) return -EINVAL; @@ -155,9 +155,10 @@ static int mt8183_i2s_hd_set(struct snd_kcontrol *kcontrol, return -EINVAL; } + change = i2s_priv->low_jitter_en != hd_en; i2s_priv->low_jitter_en = hd_en; - return 0; + return change; } static const struct snd_kcontrol_new mtk_dai_i2s_controls[] = {