From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD26C322C66 for ; Tue, 10 Feb 2026 16:45:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770741920; cv=none; b=mimR8YX9rcJ0Zqn90oVsMUgbFJWTE5cXUc8dKhQ2rpkXRGtnd7m4/kAT9ScQQVHK4i3E57whDTRV4i2aCQmc9cMKfitldKNsbdOKjtwyHB4BnpNhZT63toD9CTpdkSNc+hPZvkCA7wfcTfxG5vJsD0fldnPqKLV8/ytD79wrLYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770741920; c=relaxed/simple; bh=UUm+bLcdKYE5IIE7+KdxvFAqIYTHre9xCj1Dl4dX36o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=UvCRHPajeeOSXXCbKUMeQUAKFYaJDDryI3PHPwaiRbH0dwlM3iclYOy4WQX6+UNddmyoSmq1mj5acd40JwyF1+tPYvLLnNmG/pyO+wHjXSxgnL6ypQIDbc/fReKlK0KO77eppDWLNlwWNNKQr+kthr1yTissfoqQjRjE6RjbCxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=L+kGIAb8; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="L+kGIAb8" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-48069a48629so53514905e9.0 for ; Tue, 10 Feb 2026 08:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770741917; x=1771346717; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=digqO1ViR8cAak2LyXhldm+fhpXvMIKFaNvFw1RmKa8=; b=L+kGIAb8JGcgZo6R7kOAxyx50J8CzobE5GGiRHqVpuI2m4oh2lm+42G5243LucaiXw C4a9x8KYc94uHlny1iDr9CfMsykAoCLpiIsf5oMJj2FGirRePvNCuCKjqH6y3CCQtAl1 nwsc9Eccnyi3mZ0QavDzvvTQbirlw05rM/fg0JogXXBuoYrcrGGRfCmK3Lqee9hnFtVm cnddcIHQq5wRz/DN2KI7sTeLHeBkz9zmzdKJU8K1+2qxutli3qY3W9hE7zIzbRa0p0XN keQpIU16dQklZNiJkWqs6X2Sxfy2egwz454JTIJH1O1NMhdSmL9RRDF2kQYLw4S9kVfP CUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770741917; x=1771346717; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=digqO1ViR8cAak2LyXhldm+fhpXvMIKFaNvFw1RmKa8=; b=D8jxId6PpnJ+yyWzDeQXy+ON/vnlecRzDZeDmTXRobpqTGWBqqyI/bCmUsDotueLWf QObWeFQDHLj/I5OOlY5+2nL8t2L0SHKuCrQe31kJvw+AjENP8PZT05YVxAD1pzAf9T1I WZ+7qr6qhagRVc9UhaFglyuHfll+IvV+ak1h7pQ5lRmFklyZPzccTFVZfJO0qA3472de uT2r5K8fpOvSPDzP9rwcVR/2iw1YNTwOUD5r4Gv9Atr0cRbPwlu2W/ssoCfGqpAwFRz4 m1udl/56AtaBakQPOpIkqesmv764fQ5Ua5lQXOUExMSsiYQqCzoSsgyN52pCP7hTmqKL mQEg== X-Forwarded-Encrypted: i=1; AJvYcCWBZlh42UqTLS6rk6IbFCphsNXGeIm9EbJf8ohNRMlUCrCuj3xpLxhO417zFKoynffox+xbb/xnkCHxRMc=@vger.kernel.org X-Gm-Message-State: AOJu0YztXr2uYDTfnE5qI8W5daIWE90EZ+IC3QOmB+T/YOdYeZZZ0b0G oreqD2RB5bR5f8ZH6RvqAgK4ks+gidHQGpO4W1MlAbAYvw6ogImJyOS4 X-Gm-Gg: AZuq6aI7cCRYk1A3EK6I5Frr8y13oUYSGfXP6L+tDjs9+KkY6bzwo0AKpA95iNUwZZ8 TBKCuT14wg8Je6mJ4tp348Kvys2CLOJPES3Kbh4oym5LE7STZpxObi/9jw5MKqcNnB88q/if227 YfeC3da7621dy4lRqjTX8FKQ13QBX7ZxnRUbcZ+teBVQwuz1Z7jRzb1RK6F5uVdLnwr14bE/E5T 1Xz7x0K4KpUl8LTv5GW+rmPifRKucWTNJj1ZaqROhV5okkIZi18t9dML+zTNwDAntCfnqDPC6DM WaNpklOn7ATB2oEjeok1kUpbeX6lZcInsMLpZ4W0UwZYkzGs52GLwodKW3FdGOUh3WvL3JTpc6Y KEEI4P6egFmdbvvsZXDk+EdRWvAezCVkbVNIhRo8MnxAryBLr9GJ7hPSHU7f5lwWKBjR7YpE9yC B7/rSGaAecqY6uhUDdHp950u1TXvAbiHdUzcZwiPoKPaL2InntiL4CeCcyjfSnXxxG19iIZya6I 86y/rcnOvpVqkCc0rCHqT8sOMDKzK4bkjZgg5Nh X-Received: by 2002:a05:600c:8b62:b0:477:7b16:5fb1 with SMTP id 5b1f17b1804b1-483507cffddmr40958635e9.7.1770741916822; Tue, 10 Feb 2026 08:45:16 -0800 (PST) Received: from Lord-Beerus.station (net-188-152-100-94.cust.vodafonedsl.it. [188.152.100.94]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4834d5d78cfsm96294245e9.1.2026.02.10.08.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 08:45:16 -0800 (PST) From: Stefano Radaelli X-Google-Original-From: Stefano Radaelli To: Kuninori Morimoto , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Brown , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai , alexander.h@variscite.com, pierluigi.p@variscite.com, Stefano Radaelli Subject: [PATCH v2 0/2] ASoC: simple-card: make sysclk ordering configurable Date: Tue, 10 Feb 2026 17:45:04 +0100 Message-ID: <20260210164506.161810-1-stefano.r@variscite.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series addresses an issue in simple-audio-card where the ordering of sysclk configuration between CPU and codec DAIs can affect the initial playback behaviour on some platforms. Some CPU DAIs finalize the MCLK rate as part of their set_sysclk() callback. If the codec sysclk is configured before the CPU DAI applies the final MCLK rate, the codec may base its internal clocking on a non-final MCLK value, resulting in incorrect clocking on the first playback after boot. This was observed on i.MX95 systems using fsl_sai, but the issue is generic and can affect any setup where the CPU DAI adjusts the MCLK rate in set_sysclk(). Instead of changing the ordering unconditionally, this series keeps the existing default behaviour (codec-first) and introduces a DT flag that allows selecting CPU-first sysclk ordering where required. This makes the behaviour configurable on a per-card or per-link basis while avoiding regressions on existing systems. Patch 1 documents the new DT binding. Patch 2 implements the selectable sysclk ordering in simple-audio-card. v2: - Do not change the default sysclk ordering - Make the ordering selectable via DT flag - Add DT binding documentation v1: Link: https://patchwork.kernel.org/project/alsa-devel/patch/20260206134014.143057-1-stefano.r@variscite.com/ Stefano Radaelli (2): dt-bindings: sound: simple-card: add sysclk-cpu-first flag ASoC: simple-card-utils: add selectable sysclk ordering .../bindings/sound/simple-card.yaml | 11 ++++++ include/sound/simple_card_utils.h | 1 + sound/soc/generic/simple-card-utils.c | 39 +++++++++++++------ sound/soc/generic/simple-card.c | 7 ++++ 4 files changed, 47 insertions(+), 11 deletions(-) base-commit: b7ff7151e653aa296ab6c5495b2c1ab7c21eb250 -- 2.47.3