From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 CA7A3EA3F2A for ; Tue, 10 Feb 2026 09:54:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Subject:From:To: Cc:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/QdmiGh6TS281MWt/gNj+EOpwQ3jEYgCq5MyXQ2yVMc=; b=fEt7RMlRBj5UEp XFis/mJyXqJbOnpdBRkDpL/Xe5qQDw5rglZ8wS9RWn3gSUAu0QA1aYsqzXNFneb/3EYTqfh7WtxJM i7uGFdYjQYQWfilrY3i2ejNyoyBHWj9RcK69oRxwgBVHBfBwFw9fclpu5/1geITaWKn4jOPclZYVk rbrgJ/kQZY9Jj5ZzjiUaZCVaB82hPbLgVY9NWnwHzAtkXsgNRm6675+tCBSGsQvCruN6txBCQo6oP NnwaBXJVfn+eEqZzJg2CnNbVApDsbwpB10SkjP2CEPLl/Cr2QQCo9oO04hezf9FUMK3G72JXY0UjM Nwo2DEOtUQ8mfqJzywlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vpkRo-0000000Gmio-12MA; Tue, 10 Feb 2026 09:54:20 +0000 Received: from smtpout-03.galae.net ([185.246.85.4]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vpkRk-0000000GmiI-20X2 for linux-rockchip@lists.infradead.org; Tue, 10 Feb 2026 09:54:19 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 43E0A4E40BB4; Tue, 10 Feb 2026 09:54:11 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0877A606BD; Tue, 10 Feb 2026 09:54:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B9975119D10B8; Tue, 10 Feb 2026 10:54:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770717250; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=xiRrYJ72zQo1WMZ9lVj3XZTV0dKHYq/gmc5+HrpHpm8=; b=sh26Rq50pKO+hha3iylHdSe9ifBNiwrXtydKZ0jYK1V4jUREnbZoVLnl5pjvCqXKadU6Yw OFHVH0UNkPJcGDbg2lcsrYmJnnU1jXsf9jPFu8XmKZ30omHJ05jfTAa7epIkHzSCP1p7hq qLqYjeQ+1jtj35e/IB585nBYhHvbr4m1zgD2bkk8q8wwHr0d76DoLgtmiWWjxk0UZVuew5 ziioJ8kH1/FTcIg9y9aWTpy7C+P144MWiVh/Tz4vP80hf9iSHgtXTw8JN4ZOkLPdT3VhMH yG7HIvhQgu7zni/fAtyYLmGRX4GsBjn6htrF1RZtT82PrL0ZvW7g0xu6RVDTzQ== Mime-Version: 1.0 Date: Tue, 10 Feb 2026 10:54:04 +0100 Message-Id: Cc: "Nicolas Frattaroli" , "Liam Girdwood" , "Mark Brown" , "Jaroslav Kysela" , "Takashi Iwai" , "Heiko Stuebner" , , , , , , To: "Detlev Casanova" , From: "Luca Ceresoli" Subject: [REGRESSION] Re: [PATCH v1] ASoC: rockchip: i2s_tdm: Re-add the set_sysclk callback X-Mailer: aerc 0.20.1 References: <20250117163102.65807-1-detlev.casanova@collabora.com> In-Reply-To: <20250117163102.65807-1-detlev.casanova@collabora.com> X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260210_015416_934651_B7B9C549 X-CRM114-Status: GOOD ( 17.81 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Hello Detlev, On Fri Jan 17, 2025 at 5:31 PM CET, Detlev Casanova wrote: > In commit > 9e2ab4b18ebd ("ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates"), > the set_sysclk callback was removed as considered unused as the mclk rate > can be set in the hw_params callback. > The difference between hw_params and set_sysclk is that the former is > called with the audio sampling rate set in the params (e.g.: 48000 Hz) > while the latter is called with a clock rate already computed with > sampling_rate * mclk-fs (e.g.: 48000 * 256) > > For HDMI audio using the Rockchip I2S TDM driver, the mclk-fs value must > be set to 128 instead of the default 256, and that value is set in the > device tree at the machine driver level (like a simple-audio-card > compatible node). > Therefore, the i2s_tdm driver has no idea that another mclk-fs value can > be configured and simply computes the mclk rate in the hw_params callback > with DEFAULT_MCLK_FS * params_rate(params), which is wrong for HDMI > audio. > > Re-add the set_sysclk callback so that the mclk rate is computed by the > machine driver which has the correct mclk-fs value set in its device tree > node. I'm afraid I just found this commit breaks audio capture on the RK3308. Using 'arecord -Vmono -d 2 -c 8 -f S16_LE -r 96000 /dev/null' I get: rockchip-i2s-tdm ff320000.i2s: ASoC error (-22): at snd_soc_dai_hw_params() on ff320000.i2s ff320000.i2s-rk3308-hifi: ASoC error (-22): at __soc_pcm_hw_params() on ff320000.i2s-rk3308-hifi Tested on: * Radxa Rock Pi S * Upstream kernel * arm64 defconfig Tested kernel versions: * v6.12 works * 5323186e2e8d (this commit) fails * 5323186e2e8d^ works * 21cfbeae7d7c (same patch on stable/linux-6.12.y) fails * 21cfbeae7d7c^ works * v6.19 fails * v6.19 + 'git revert 5323186e2e8d' works I don't have more information at the moment. > Fixes: 9e2ab4b18ebd ("ASoC: rockchip: i2s-tdm: Fix inaccurate sampling rates") I'm the author of commit 9e2ab4b18ebd mentioned in the 'Fixes:' tag, so it would have been good to Cc me. I would have had the option of testing your patch and this regression could have been solved before getting in mainline. I think b4 does it automatically (and perhaps get_maintainers with appropriate flags). Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip