Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp680473lqb; Fri, 15 Mar 2024 03:33:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFRejB+g2pkrpjYTPBRxnbFBeCgVSlH4H7aHFaOPxMm5eZJlxaO1mKtLqO8nxEnlnpc7n9k6wu9mf14MrdWf6m0lQLNhU8QRic5+5VjA== X-Google-Smtp-Source: AGHT+IGjpv/zivx2go3cK7ZtnGJW5dIcba3vhET0kO6iTtSfI/bw3zEfJWnvYl4YBAHaQbFp8rau X-Received: by 2002:a05:6871:548:b0:221:3742:77ff with SMTP id t8-20020a056871054800b00221374277ffmr3563385oal.36.1710498826097; Fri, 15 Mar 2024 03:33:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710498826; cv=pass; d=google.com; s=arc-20160816; b=M4rGnFqYIMoHrfQPngb0d0eaJqLESJ0KNmEvka23jmcoFE3LFQxyrIuGGaEnEImGMW FuPf2hnX0tJ7V79tnoy3Bk/ydoh8dwxjntghkucRJYAM1rKXF2dQjW9cFL6732MvRIqK n0lOX4iIQzxzZ7DufAUHwFalXTjkShaSQy12zC9WjMd7Ree11vgnqtQPzEEoAdgwYNp5 Fv7McWsfw+ND2y3zTyPfvu4Lb0Fh05LbsK5yeuqAFaRrCP2BOlKWZDbbN6LXyB4A88JA tOaEaA9FPDjD4AK/k2U1ejU4FvJTiTvLqlBP3aCri6FbWParLwuLsoXaXQS87BG3nCjT xVhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Lysa3j/b+7vY91N4LKyJOXIxDfbOuECbYmClh0Al9S0=; fh=K2PPfBYi7JTnx0VP2GSSY1KTw+qTNoKk4+rz8uwFi/Q=; b=0TxDeT1dkYt/6tGx84E7UyyHcF6S5FQ9wUFgJBgB3KlG97zwoMP4SlkkMqk6nQ5kgf /ooSF3FrAxALpkhiUzxklGXPrvI+rtWXFx64H/6VNC2ImjNu1VIwXiaaAY6At3M0OIqE bcJXq6CkWV8GCGHBTQbuF2cVzKFsvn5c2tJ7qG/aRbZyIffNkD5/hfEVq+TpLLU0Qzt+ joIOe6sWTrk55r+C7XgSdb+dT2LTQ3zQhYUKoWfr+1tpv9Y7AZ1Q5V65/drDB0FHxTUG YpUmKDGKnF6dKOATzm/aov57H9odLWD1Y4IbJfbF/XfslUNkBKA0ArLnfNa67WG5KIFm T+0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@toradex.com header.s=toradex-com header.b=OYzwDElx; arc=pass (i=1 spf=pass spfdomain=toradex.com dkim=pass dkdomain=toradex.com dmarc=pass fromdomain=toradex.com); spf=pass (google.com: domain of linux-kernel+bounces-104271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=toradex.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r13-20020aa7844d000000b006e69fdb9967si3252050pfn.3.2024.03.15.03.33.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 03:33:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@toradex.com header.s=toradex-com header.b=OYzwDElx; arc=pass (i=1 spf=pass spfdomain=toradex.com dkim=pass dkdomain=toradex.com dmarc=pass fromdomain=toradex.com); spf=pass (google.com: domain of linux-kernel+bounces-104271-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=toradex.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3490E281D34 for ; Fri, 15 Mar 2024 10:33:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C86051B59E; Fri, 15 Mar 2024 10:32:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=toradex.com header.i=@toradex.com header.b="OYzwDElx" Received: from de-smtp-delivery-113.mimecast.com (de-smtp-delivery-113.mimecast.com [194.104.109.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBF941B5AD for ; Fri, 15 Mar 2024 10:32:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.104.109.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710498778; cv=none; b=Wm95ZfiKUZVfOlkqsFDCQ+hauEbdJB0vlIeHqqA5Oi7apw/QgvCltikO4hH8v5zzYgTLhhgzKi1FGU/VL/iJoFSzd4Z/zKTruMmIlKS0U+Ww6Wb6C1Z/0qxyrX104YXJs//9JHqch/UoFx95Gw/tX+ve5ef0n/BiJ3WBjdmLqfs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710498778; c=relaxed/simple; bh=Lysa3j/b+7vY91N4LKyJOXIxDfbOuECbYmClh0Al9S0=; h=Date:From:To:Cc:Subject:Message-ID:References:In-Reply-To: MIME-Version:Content-Type:Content-Disposition; b=SDlvBi+9bu4DUoRxfqIblgxQkPyBi1xEASp+av1V8EbtxUFDTpXKPCrMRWvTeWTFaKJwl43ph4NObufO33HtkSzecfg/vHhCM3XdZYEXXKpJ03duGnpgnTt1L7rV62ssiCvxqMyK4ZccXXkwHxTYIH5gvwaT7nAYCsn70RbEYEY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=toradex.com; spf=pass smtp.mailfrom=toradex.com; dkim=pass (1024-bit key) header.d=toradex.com header.i=@toradex.com header.b=OYzwDElx; arc=none smtp.client-ip=194.104.109.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=toradex.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=toradex.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.com; s=toradex-com; t=1710498769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lysa3j/b+7vY91N4LKyJOXIxDfbOuECbYmClh0Al9S0=; b=OYzwDElxa4zfvDif50B8SbTRujxiNA589vjSCPOA3Z//OoGa1+E+IZK6yKq7GJjDXAgBPj kJQdpYR/EJIRMEWQ63NihIX1lhh7hC08PC84YSI07myQJL7bg2GdTTdrttn/qE4ZohBldS 4Yphx+K73VGwM35KORJ1UdXcvnvQL9U= Received: from ZRZP278CU001.outbound.protection.outlook.com (mail-switzerlandnorthazlp17011007.outbound.protection.outlook.com [40.93.85.7]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-59-3h8wLJniMfqJbUmeoCreYw-1; Fri, 15 Mar 2024 11:32:47 +0100 X-MC-Unique: 3h8wLJniMfqJbUmeoCreYw-1 Received: from ZRAP278MB0254.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1e::13) by GV0P278MB0949.CHEP278.PROD.OUTLOOK.COM (2603:10a6:710:54::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.22; Fri, 15 Mar 2024 10:32:46 +0000 Received: from ZRAP278MB0254.CHEP278.PROD.OUTLOOK.COM ([fe80::2128:374f:6717:b13a]) by ZRAP278MB0254.CHEP278.PROD.OUTLOOK.COM ([fe80::2128:374f:6717:b13a%6]) with mapi id 15.20.7386.020; Fri, 15 Mar 2024 10:32:46 +0000 Date: Fri, 15 Mar 2024 11:32:43 +0100 From: Andrejs Cainikovs To: Charles Keepax Cc: Andrejs Cainikovs , patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: Re: [RFC PATCH v1] ASoC: wm8904: enable fll with fixed mclk Message-ID: References: <20240308155831.141229-1-andrejs.cainikovs@gmail.com> In-Reply-To: X-ClientProxiedBy: ZR0P278CA0031.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1c::18) To ZRAP278MB0254.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:1e::13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZRAP278MB0254:EE_|GV0P278MB0949:EE_ X-MS-Office365-Filtering-Correlation-Id: f12a33e0-46c4-4468-bd79-08dc44db40f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: rnIW+bCH7VY68btCO0TAR8uwjiLdHwORcc93xv3043gHcL2I/g0p0Xn+ZTH/wVK+StzulwhATTKoTdtg1wBlEivdzdleuShFf22Cv1+6XMSXTXoZJv1zXQJapGEH3rKOwdzu/sJyupiYcPxGe4XGw4RbE3eCYPFnXoS3zFGPPn8kJJggCn22aoO6DxrRTVMAGoQRyWSqrzY28xGNdW+1WSkpDh/vLFwwRMvH3G/lJi710KoEcRebBB2tBo07+Yu7tpFUHG7Ly++YB4v7fY9YObZiJt5hHrllulqwWSKb4OPt4uyS08HpUAFsL5tT7xSeGXSVwubAaTk33XWvM0WoWzoxPpp/9vXkGJYR+3CjGHzxVZF+qo5LfAk0tPHVFT46qsCr1ssjKCOmQoQbyTa+ELKI489JCZh/gfqXbGVEGb6gWwEc3XqMQjNRISn+5FdReZJ3RPkVn1F3SCD6QJiTll+9ScqKj+RK2VtCS5JF9h9mN6CHDM6hBZxw3yJt0MKzQfuRxrv8Np3BIElT/GYl9GKGeB0XG2NOuVzlILYAHrmf8uxikhdopakPEnFouiB98TVWWh6EhhWC92JXOK2dULRj6fjhOMiHV8A/tqvH2M7NR4Km+K/aht3sBm83TMRT6kNWZuATHIZOjyQSjXMFcMJeg9vrQ6EOBd9Bqm6xos8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZRAP278MB0254.CHEP278.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(366007)(1800799015)(376005);DIR:OUT;SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IZZzzHVt3rj3IdpFghaNTxQbB2bCozuF9ra6nAJPDevWrctZSPSl1yMEZBVL?= =?us-ascii?Q?Fjq2+vGTUc5DizAzYkEzOcBenFBVwuJZBu5uAyU8PxKeTcWDmA0nB9Sf+tV/?= =?us-ascii?Q?5UR9ioaq//80q/s7vceC6i28murIeNB0To5ABkVETQnAar8nHMktwlBmnTPY?= =?us-ascii?Q?0rzXzpf8lZH1UkIZImXgd/v/r0k+cw3ZSSWcL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BoFx7aSv4P08q0HStEtIxBkUwaJbSFVkKHcu6p8MkuqeMBQZ6iWR6o9aXsM?= =?us-ascii?Q?rTeOI0D0KLPtYf/Z8OrzvZqZMpL+t9BRK1Q54qFkB9x1MIOZeF2h9pEgGZSk?= =?us-ascii?Q?uaYIeIBVYfZ9z4n/+lgvzU8Esznn7sivseTdqhgx/61/6ccu+Sn+SEYoekbb?= =?us-ascii?Q?RY5LwF4yq1p8nN6kAb0B2PbKQQ6mFyAoxVaMrv7rY5yU+uVDXgtMcsrsDb3J?= =?us-ascii?Q?OY1ROqYD01bDJredVO6mjIuk4E5kqTG88lQim7avFlPw33wYh2q96DQvgSf9?= =?us-ascii?Q?JTpG9c90weZ1OvAMwnl3twe5Jr6/URMZrpgpTSiwDYR5zYn24IrA5fcky41J?= =?us-ascii?Q?h7ILc1M6hfualBnf6EzJENXuJI/KPHsYBy7Ow3UVDogGy9kQgAmU3edtBtN2?= =?us-ascii?Q?smIYMJHRkQzwEK0lcr1AKjDirHE10qcxRzUL4ww12ZnFUO5ctkDNF8D14ZM7?= =?us-ascii?Q?NgDUR1O9sPFbvS2fmw58+gQA+XnFSYFwpzoNVp3ZXOeAwKHko/O+qpBBZqzk?= =?us-ascii?Q?Aw=3D=3D?= X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: f12a33e0-46c4-4468-bd79-08dc44db40f7 X-MS-Exchange-CrossTenant-AuthSource: ZRAP278MB0254.CHEP278.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 10:32:45.9836 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: W04d1rrPbFNberYzyvWaZuDtiA1ozO7msQRlXWi6PipT9jMibbbJnhJeeomzJNJALZhvDdNxeuLPstsytF8bgeXe4kmvCIjrqjaY4Nf7bP0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV0P278MB0949 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: toradex.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 12, 2024 at 01:51:02PM +0000, Charles Keepax wrote: > Ah, ok I see what I was missing here. simple_card_utils calls > clk_set_rate if you specify mclk_fs. Which you don't want in this > case. My gut reaction is that really the problem here is the machine > driver doesn't support the clocking setup you have. >=20 > Having a quick look through the simple card stuff can you remove: >=20 > =09clocks =3D <&audio_refclk1>; >=20 > From the machine driver DT stuff, and add mclk-fs. I think that > should cause the simple card to call the codec dai_set_sysclk > but without ever touching the audio_refclk. A small change in > simple_util_parse_clk might also be needed to allow it to return > without finding a clock. Which feels like a much simpler and less > scary change. Thanks for your help, Charles. Your suggestion works as expected. Btw, there was no need to touch simple_util_parse_clk as it does allow to return without finding a clock. Best regards, Andrejs. > My only slight reservation is the automatic clocking thing only > really exists as a hack to support simple card anyway. But overal > I think it might be better to try to move the direction of travel > more to adding support for the clocking systems that exist into > simple-card rather than tweaking the codec driver to work around > it. >=20 > Thanks, > Charles