Re: [PATCH] ASoC: mediatek: common: refine mtk_afe_fe_hw_params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 12, 2019 at 12:22:18PM +0800, Eason Yen wrote:

> 1. Add the following function to refine mtk_afe_fe_hw_params
> - mtk_memif_set_enable
> - mtk_memif_set_disable
> - mtk_memif_set_addr
> - mtk_memif_set_channel
> - mtk_memif_set_rate
> - mtk_memif_set_rate_substream
> - mtk_memif_set_format
> - mtk_memif_set_pbuf_size
> 2. extend mtk_base_memif_data struct for new platform(mt6779)

It'd be better to split these two into separate patches, they're two
separate things.  Ideally the refactoring should just be simple code
motion.  Right now the patch is a bit difficult to follow.

>  static int mtk_regmap_update_bits(struct regmap *map, int reg,
> -			   unsigned int mask,
> -			   unsigned int val, int shift)
> +				  unsigned int mask,
> +				  unsigned int val, int shift)
>  {
>  	if (reg < 0 || WARN_ON_ONCE(shift < 0))
>  		return 0;

This is an unrelated indentation change?

> +	dev_info(afe->dev, "%s(), %s, ch %d, rate %d, fmt %d, dma_addr %pad, dma_area %p, dma_bytes 0x%zx\n",
> +		 __func__, memif->data->name,
> +		 channels, rate, format,
> +		 &substream->runtime->dma_addr,
> +		 substream->runtime->dma_area,
> +		 substream->runtime->dma_bytes);

This is going to get noisy, dev_dbg at most please.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux