Re: [PATCH v1] ASoC: tas2783-sdw: add firmware download status check

Andy Shevchenko <[email protected]>
Newsgroups org.alsa-project.alsa-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Wed, Aug 12, 2026 at 01:21:24PM +0800, Baojun Xu wrote:
> Currently, the firmware download is unnecessarily triggered on every
> system resume from suspend, causing significant wake-up latency. However,
> this step is redundant if the AMP remains powered on. Furthermore, certain
> memory pages (addresses > 0xc60000) are skipped even after an AMP reset.

...

>  	} else {
>  		tas2783_update_calibdata(tas_dev);
> +		/* Mark the AMP firmware download as complete. */

> +		regmap_write(tas_dev->regmap, TASDEV_REG_SDW(0, 0, 0x07),
> +			     0x22);

Make it a single line.

> +		tas_dev->first_hw_init = true;
>  	}

...

> @@ -1102,7 +1108,6 @@ static s32 tas2783_sdca_dev_resume(struct device *dev)
>  		regcache_mark_dirty(tas_dev->regmap);
>  		return ret;
>  	}
> -
>  	return 0;
>  }

Stray change.

...

>  static s32 tas_io_init(struct device *dev, struct sdw_slave *slave)
>  {
>  	struct tas2783_prv *tas_dev = dev_get_drvdata(dev);
> -	s32 ret;
> +	s32 ret, val;

Why is 'val' signed? It should be unsigned int (which is what API requires).

...

> -	usleep_range(2000, 2200);

> +		usleep_range(2000, 2200);

While at it, replace with fsleep().

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.