Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp8234rwl; Thu, 30 Mar 2023 11:19:03 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZUIx6EzydvdMOihhr6aN95HGxNBtzJA4b9LqSv5QkaAO2XkktmM9G/OCbREVK9GFIV9DB X-Received: by 2002:a05:6a00:22cb:b0:627:ff64:85cc with SMTP id f11-20020a056a0022cb00b00627ff6485ccmr3590183pfj.0.1680200343317; Thu, 30 Mar 2023 11:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680200343; cv=none; d=google.com; s=arc-20160816; b=BGrcUbgN/YUawp0jEZA+zk437HZzM3szemKBJp6dkREgyvgabR5t55zlge64KB8J+P BhGwkXYj7PJNskT/ASEUiolv35Y5Y3k1NSE25yq7UfDrO7tQnrYTf01MR9Kn+xHMvj4p De10vF9vz3FnYJoKTfc9tL4vxHCpujKD9LGIq4ZifSZUPCNk8G+cJwoANmmU6lUIQf6Y LbY7/vnpGma46h33YjcBjlqFbjDUjE5aSNCChzba2iPZs/iGcKtoTP/JVDdxiupLrcVY /zpL5EBEJ4bbrPGA4KQBdOGhCaycEuOH0lGU5PstbcF6KAjBPtrUnlZSxiWFR/H+/dN1 Dr5A== 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=uae0B53RIisDYY3Tr5EOegPdKljFnHmd4++YjhKxmPA=; b=Wo/Vk6vjE1+dQ1RufqhdVF3t8wRCJyr0acpjas3XwBpA6izfPu76HDS7qOz8O801bF n8w8Fo7Z1465Ts8o4mgeT2P3D/aGzQ/2FGena5vx2bq1yqYDvVumgFQzqtlYkzKpz/qA bjDpVxxF8KPcVQxoYeiqiCvBx+pqndcXmnJtr8mbVMr4iqTT/F2LEuYFAFhQ1EWni3di uO4U4oaL+z9n2e/rVvI2mIJswb3+NIZZVkOgNK+9qFoDPqURjL8yu6Nhb4hC0YcC1z+6 loFJAHwkIxPH4Jp/kQTlVLRCjr4uqXreG/EVB3Wk3kzq+qo1DHWWytjwao7F2WJxtGEq vrHA== 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 j6-20020a625506000000b005a8c65d57a0si337795pfb.257.2023.03.30.11.18.48; Thu, 30 Mar 2023 11:19:03 -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 S231138AbjC3SR1 (ORCPT + 99 others); Thu, 30 Mar 2023 14:17:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230513AbjC3SRZ (ORCPT ); Thu, 30 Mar 2023 14:17:25 -0400 Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B57D1EF9F for ; Thu, 30 Mar 2023 11:17:18 -0700 (PDT) Received: from [192.168.1.18] ([86.243.2.178]) by smtp.orange.fr with ESMTPA id hwphptLXW6OWihwphpVejs; Thu, 30 Mar 2023 20:17:16 +0200 X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Thu, 30 Mar 2023 20:17:16 +0200 X-ME-IP: 86.243.2.178 Message-ID: Date: Thu, 30 Mar 2023 20:17:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v10] ASoC: tas2781: Add tas2781 driver Content-Language: fr To: Shenghao Ding <13916275206@139.com>, broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, pierre-louis.bossart@linux.intel.com Cc: kevin-lu@ti.com, shenghao-ding@ti.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, x1077012@ti.com, peeyush@ti.com, navada@ti.com References: <20230329100107.8181-1-13916275206@139.com> From: Christophe JAILLET In-Reply-To: <20230329100107.8181-1-13916275206@139.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.0 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 Le 29/03/2023 à 12:01, Shenghao Ding a écrit : > Create tas2781 driver. > > Signed-off-by: Shenghao Ding <13916275206@139.com> > > --- > Changes in v10: [...] Hi, > +static void tasdevice_select_cfg_blk(void *pContext, int conf_no, > + unsigned char block_type) > +{ > + struct tasdevice_priv *tas_dev = (struct tasdevice_priv *) pContext; > + struct tasdevice_rca *rca = &(tas_dev->rcabin); > + struct tasdevice_config_info **cfg_info = rca->cfg_info; > + struct tasdev_blk_data **blk_data; > + int j, k, chn, chnend; > + > + if (conf_no >= rca->ncfgs || conf_no < 0 || !cfg_info) { > + dev_err(tas_dev->dev, "conf_no should be not more than %u\n", > + rca->ncfgs); > + return; > + } > + blk_data = cfg_info[conf_no]->blk_data; > + > + for (j = 0; j < (int)cfg_info[conf_no]->real_nblocks; j++) { > + unsigned int length = 0, rc = 0; > + > + if (block_type > 5 || block_type < 2) { > + dev_err(tas_dev->dev, > + "block_type should be in range from 2 to 5\n"); > + break; > + } > + if (block_type != blk_data[j]->block_type) > + continue; > + > + for (k = 0; k < (int)blk_data[j]->n_subblks; k++) { > + if (cfg_info[conf_no]->blk_data[j]->dev_idx) { Just use "blk_data[j]->dev_idx"? > + chn = blk_data[j]->dev_idx - 1; > + chnend = blk_data[j]->dev_idx; > + } else { > + chn = 0; > + chnend = tas_dev->ndev; > + } [...] > + /* Several kinds of dsp/algorithm firmwares can run on tas2781, > + * the number and size of blk are not fixed and different among > + * thest firmwares. these? CJ