From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 F2E9A2D7813 for ; Thu, 12 Feb 2026 09:20:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770888009; cv=none; b=HPFOV8ThrN7tdIaXKh3J3cAHXWd6sMVg/mCrECGTQAuSiggjC8eDBqeKx5G91+4DZ9hUHTkklVdchPd6jgJFsCNWcZ/bJ2HHT7/QRzrtZ+v565ULaMYbYVPqtbyt/9fxL9Ci48z7zhxWgZacekcahFPJ4qv00DtXUaozIQjMg7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770888009; c=relaxed/simple; bh=EVvRpWbkzklwILoJ9jNRQ8WJ/fBJztkBG71RCwf6PZ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AKzqroNj0HrTifMhlh05veSYJfTGTIVvEyDrBqiJVPOjVQgYru1rtRbSrQ4WwOKyVEaKX0iQ7oLOens1eMhNp2VkyY+lZ/SDr5Ko3xziydmNkboWxpBn8vS/Hwo2qrdvdFyF/m+ukQzNUaOoyfz3Gbns17pvT0EEpz0qV9U1ECA= 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=II3Lu45W; arc=none smtp.client-ip=209.85.128.54 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="II3Lu45W" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-48329eb96a7so31364385e9.3 for ; Thu, 12 Feb 2026 01:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770888006; x=1771492806; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hY6CiLhnKwBTZyp27azh8kEPNVSN1EDcWkJd3Yb4vdA=; b=II3Lu45WspaRCpgtSbyGs4DdQka2IJsJPXRgfz49cHBTHmdaD7ITIZ+VZbD59RlpSf flRzzawAnmIcEmqbLhlKT+4uib4f7YKRWmd9Lt1131baoJyDNlm+WIAjwkD/kfUfbkR/ mkZg+9iSm/MY/GO/uDM5eEbclDHpS+lxpay9N5bE332D/JeBoE2hBgKnTHgGws8YtNMm nUxQ+qacG8L7uTAG/ixysrfoN9VkA0ZKjpWoA6ulp16DMKznkB1agc5o2DFHfVP/tl/m hGDw8h2w+hjVIUwRRFH34VlsZHAkJSU6DKTH+YeNsCKXwvFkUuYPF6vJs5dZEJyVs8QM N1+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770888006; x=1771492806; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hY6CiLhnKwBTZyp27azh8kEPNVSN1EDcWkJd3Yb4vdA=; b=bol+uArjdnh07DbVX2el1VNf/axa9Q17M4O+74GcYzeU1YSSFxaZIMPDYmH7zTm6kP 4fpc89giDodDd7rgUVRQ6D5z7BckrE5dyIsGDWJsmeTeNEpRm2mU5uWpTFpWGahXQA2L n6uO8OT9fQdhGeKqOoSridj+Y5U3mp7Ic7JgyBoJMD5aHBe2N50QN3Oc/8B775EsQZcL aq1wRaARuxRou8xjZXnkz5iSSCVviJ3S3vzHNxDC2boMCnpLOPG11bo1vdSYGV7qFjOg oKpHnhqHa95AOsmE9swpoWDAjN0VazlSbh3mTxnWj7Z3VMU4TQWh365jSqF9r4OjqAkY WkEA== X-Forwarded-Encrypted: i=1; AJvYcCXeHt3m7NqL8GDzFoWF+o1ON9Wku19eT3TnDAXwi0+H5FWUh9fOtox+MdLnUclucKAB0kQY4ikYl3NCq1E=@vger.kernel.org X-Gm-Message-State: AOJu0YwZooD+Q60wVnZHkUSKzo6GK7fzL5UToAUUYHhBRJBCJG5g52y2 8q7QH3fsz1CdvKKESw4ExNtWbKDoTz5D/PIrh8dk1p2uShZRj+FTnIyR X-Gm-Gg: AZuq6aIlxXVJeLocNJ9v0A1TmA0ZXacXaBDKgerBQ4iZX8DEcFqlxK5cf3nQ//NwQhu AaGOiVlJYKwIrVgwrQrThrsJ3q993vPTz17qfBT8iUROZsOlR2Rv4kPEjmQfKJJY6HUfe9tKCG7 pzLI8uoTUZSIyrwuR/+f6sxkFf9ogdQo629wRSI5spJaEgaHE4Wj8KbipFs6FKaBG04ZCgzjksW IBqhOed5Y3J82CNK/D5YULp9FQy7JXCDZFVNXJ4MLyrDKbtVdo4LBrP3ASzHFwANlJpeu1bxFFZ oqM1G3Y2YVzpoB2Qi7T10kr/CbAemGD0vP/x3Y5ZHK90311j0B/SJytpUdkVOtGE+2PBZ7wbUA7 qFC026iHRrGNE9iXRKP92fM2r7sFf4Kj+gkOxTfhoCkjj9C/Qi61coY7SdVSKTepVLZnepYiq6l lwLiXDOUgFG/c7/7YIzq5jJMSGGKD+xA+Ct1ju5sa6j88jeKrz7BoaqjFLW4qkBs8xaQ1UmMIf+ zDLoj1Mzp7Zfl/eOzj5JXEZY6Ozli5yTqcJRuQZQrhOjg== X-Received: by 2002:a05:600c:5298:b0:477:73e9:dbe7 with SMTP id 5b1f17b1804b1-4836572257cmr29099455e9.35.1770888006045; Thu, 12 Feb 2026 01:20:06 -0800 (PST) Received: from Lord-Beerus.station (net-188-152-100-94.cust.dsl.teletu.it. [188.152.100.94]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4835d994670sm84262955e9.4.2026.02.12.01.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Feb 2026 01:20:05 -0800 (PST) Date: Thu, 12 Feb 2026 10:20:03 +0100 From: Stefano Radaelli To: Kuninori Morimoto Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alexander.h@variscite.com, pierluigi.p@variscite.com, Stefano Radaelli Subject: Re: [PATCH v3] ASoC: simple-card-utils: add sysclk ordering support Message-ID: References: <20260211112815.126734-1-stefano.r@variscite.com> <87y0kyu7iv.wl-kuninori.morimoto.gx@renesas.com> <87o6luu00l.wl-kuninori.morimoto.gx@renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87o6luu00l.wl-kuninori.morimoto.gx@renesas.com> Hi Kuninori, > > > (snip) > > > +enum simple_util_sysclk_order { > > > + SIMPLE_SYSCLK_ORDER_UNSPEC = 0, > > > + SIMPLE_SYSCLK_ORDER_CODEC_FIRST, > > > + SIMPLE_SYSCLK_ORDER_CPU_FIRST, > > > +}; > > > > I think UNSPEC is not needed ? > > > > enum simple_util_sysclk_order { > > SIMPLE_SYSCLK_ORDER_CODEC_FIRST = 0, > > SIMPLE_SYSCLK_ORDER_CPU_FIRST, > > }; > > > > Do you set this "order" via custome driver if you want ot use CPU_FIRST ? > > Or, not use flag, but check whether "clock master" ? > thanks for the feedback! Yes, my initial idea was to set CPU_FIRST from our downstream/custom kernel (e.g. via a small local change) when needed. Also thanks for the suggestion about checking the clock master. I had a look at it, but unfortunately the information we can reliably derive is about BCLK/FS (bitclock-master and frame-master). These properties describe who provides the serial bus clocks, but they do not imply anything about MCLK. In my case, for example, the codec is both frame-master and bitclock-master, yet I still need to call CPU DAI .set_sysclk() first because the CPU DAI may finalize/adjust the actual MCLK rate (e.g. via clk_set_rate()) and the codec may otherwise configure its internal clocking based on a non-final MCLK value. So selecting the sysclk ordering based on BCLK/FS master would not cover this case. So, do you think the solution I proposed would be acceptable if I remove SIMPLE_SYSCLK_ORDER_UNSPEC and keep only: enum simple_util_sysclk_order { SIMPLE_SYSCLK_ORDER_CODEC_FIRST = 0, SIMPLE_SYSCLK_ORDER_CPU_FIRST, }; with codec-first as the default behaviour? Many thanks and best regards, Stefano Radaelli