[alsa-devel] [PATCH v3 08/14] ASoC: SOF: Add DSP HW abstraction operations

Mark Brown broonie at kernel.org
Wed Jan 9 21:51:29 CET 2019


On Tue, Dec 11, 2018 at 03:23:12PM -0600, Pierre-Louis Bossart wrote:

> +int snd_sof_pci_update_bits_unlocked(struct snd_sof_dev *sdev, u32 offset,
> +				     u32 mask, u32 value)
> +{
> +	bool change;
> +	unsigned int old, new;
> +	u32 ret = ~0; /* explicit init to remove uninitialized use warnings */

This looks a lot like you want to write regmap_pci_config...

> +/* control */
> +static inline int snd_sof_dsp_run(struct snd_sof_dev *sdev)
> +{
> +	if (sdev->ops->run)
> +		return sdev->ops->run(sdev);
> +
> +	return 0;
> +}

Do we really want to return 0 for all these ops if they're not
implemented?  For some that seems sensible but there's others where it
seems like the caller might want to know they got ignored and an error
code like -ENOTSUPP might be better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20190109/c9e422f4/attachment.sig>


More information about the Alsa-devel mailing list