[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d14d668b-f351-f6d3-fe85-aac0fcbfb11b@wanadoo.fr>
Date: Thu, 30 Mar 2023 20:17:09 +0200
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Shenghao Ding <13916275206@....com>, broonie@...nel.org,
lgirdwood@...il.com, perex@...ex.cz,
pierre-louis.bossart@...ux.intel.com
Cc: kevin-lu@...com, shenghao-ding@...com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, x1077012@...com, peeyush@...com,
navada@...com
Subject: Re: [PATCH v10] ASoC: tas2781: Add tas2781 driver
Le 29/03/2023 à 12:01, Shenghao Ding a écrit :
> Create tas2781 driver.
>
> Signed-off-by: Shenghao Ding <13916275206@....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
Powered by blists - more mailing lists