[alsa-devel] [PATCH] ASoC: mediatek: common: refine mtk_afe_fe_hw_params
Mark Brown
broonie at kernel.org
Tue Nov 12 18:34:09 CET 2019
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.
-------------- 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/20191112/e8d99619/attachment.sig>
More information about the Alsa-devel
mailing list