Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2438591rwd; Wed, 14 Jun 2023 02:52:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5z+1WTOTEFSmPk0XOLOIEkcBdjuECf6NuDv+r5U6SbSyktyWgIYunf6g8HOqLneS5Pboil X-Received: by 2002:a05:6a20:43ac:b0:107:1f22:10d5 with SMTP id i44-20020a056a2043ac00b001071f2210d5mr822338pzl.52.1686736376197; Wed, 14 Jun 2023 02:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686736376; cv=none; d=google.com; s=arc-20160816; b=jlRxQYOE4Bloq2W7xabLvtctOYlIVGzpaEBZEPyC3sNobu92zTCZUCOLpH3Y4OFsVa EyrfMSDgDJT8dJK1bqfDOnaSIPkJ2X1c3mH0/lEFTCrxyNojQRfo2puBrn7IQ4E/bNxs QhS7fps9VcGECJaSgXdtD/3flprWkDK0PR5phgPstbdZ/E++l4Kfj8/ZPLSYDusa63Vj akEJoDsF11r1NwZAvdzfaBH2CXfaAi4HBdQPQahNPffHOASYUFpqqy/erd3nnPRZUdDk lpWWdaxBxZTt7KIqVZs8nj/56CvADtxSa7pZCF8tOwFINNNPQH7HpuK9i2tFKBpy2j96 NOew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=wBoWoHzgme25QILD70Zz/16rD42/K6PlY373jEJ+7cM=; b=e19ItsTcf6Vr0doF87RdlcSd0qWFERLrlWfePMHZcJCsnvbw44nofbmARMPb08sG7r fZmSd1JE2eQQtMEuUViBfNzQYILrYROWA+VHzeUb78wXFkmkf/3r2TG6MMGVC8fGEem4 Np+LD+96bIkUWnG+lmepQTctRURsDMpHHsx6OrHN50qbUrahMSNkVWsRJ1YM9xGtw16O iYv0tFDkWHppAelfP4dNJZq/G+2gzll1E/HETBJ8u/R3dZWJWX4qSZWd1mdfQZlaytwH kBom4WbecfG1kQzZ0P1WT9QuOLZQ46PH/RK95PTZ22n7vjnHOouHLILqJDxncwJl0DTU NYsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a170902b11500b001b3c274fa2csi5435999plr.187.2023.06.14.02.52.44; Wed, 14 Jun 2023 02:52:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235631AbjFNJP1 (ORCPT + 99 others); Wed, 14 Jun 2023 05:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244046AbjFNJPC (ORCPT ); Wed, 14 Jun 2023 05:15:02 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7A11F1FD7 for ; Wed, 14 Jun 2023 02:14:54 -0700 (PDT) Received: from loongson.cn (unknown [10.180.13.22]) by gateway (Coremail) with SMTP id _____8Bx4OgMhYlkdQ8FAA--.8833S3; Wed, 14 Jun 2023 17:14:52 +0800 (CST) Received: from [10.180.13.22] (unknown [10.180.13.22]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxduQLhYlkyW0aAA--.9439S3; Wed, 14 Jun 2023 17:14:51 +0800 (CST) Message-ID: <978fa726-e194-2162-e10d-aed3a1c756e8@loongson.cn> Date: Wed, 14 Jun 2023 17:14:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [ PATCH v2 2/3] ASoC: loongson: Add Loongson ASoC Sound Card Support Content-Language: en-US To: Mark Brown Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, loongarch@lists.linux.dev, loongson-kernel@lists.loongnix.cn References: <20230612090046.3039532-1-mengyingkun@loongson.cn> <1568e064-606e-4f56-951f-429a87a3a2d9@sirena.org.uk> From: Yingkun Meng In-Reply-To: <1568e064-606e-4f56-951f-429a87a3a2d9@sirena.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8BxduQLhYlkyW0aAA--.9439S3 X-CM-SenderInfo: 5phqw55lqjy33q6o00pqjv00gofq/1tbiAQACDGSIXIIXpwABsM X-Coremail-Antispam: 1Uk129KBj9xXoWrurW3ZrWUJr1DWF1kGFW7trc_yoWxAFX_uF 4rWFn2ywnxCr4qq3yrGr4DXr4IkF1ayFn3Kw1Y93W3AF1xGa92kFykXr1ru393Za95JasI v395X3say3y7ZosvyTuYvTs0mTUanT9S1TB71UUUUjUqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUbfkYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ Cr1j6rxdM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYI kI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUtVWr XwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMx k0xIA0c2IEe2xFo4CEbIxvr21l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_ Gr1l4IxYO2xFxVAFwI0_Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67 AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8I cVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI 8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v2 6r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4AhLUUUUU X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/6/13 03:06, Mark Brown wrote: > On Mon, Jun 12, 2023 at 05:00:46PM +0800, YingKun Meng wrote: > >> + if (ls_card->mclk_fs) { >> + mclk = ls_card->mclk_fs * params_rate(params); >> + ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk, >> + SND_SOC_CLOCK_OUT); >> + if (ret < 0) { >> + dev_err(codec_dai->dev, "cpu_dai clock not set\n"); >> + return ret; >> + } > Does this need to be in the machine driver - this isn't configuring an > external clock, it's just within the SoC, so presumably the driver for > the SoC DAI can just set itself up. I think so. The driver for the SoC DAI cannot obtain the MCLK frequency of I2S bus from the clock subsystem.