Re: [PATCH v2] ASoC: mediatek: common: handle NULL case in suspend/resume function

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

 



On Mon, Sep 13, 2021 at 01:55:38PM +0800, Trevor Wu wrote:
> On Fri, 2021-09-10 at 11:23 +0100, Mark Brown wrote:

> > It seems like it'd be better to just allocate the buffer at probe
> > time
> > and fail in case we can't get it, I'd be surprised if there's many
> > platforms using this hardware that don't also end up suspending and
> > resuming.

> Thanks for your suggestion.
> I agree it's better to allocate the memory at probe time.
> I think we can still keep the implementation in the suspend/resume
> function as a fallback solution if user doesn't allocate the memory in
> probe function.

If you can't allocate it at probe time you should probably just fail the
probe.

> In the new mediatek SOCs, regcache has been used to handle register
> backup.
> Do I need to add the buffer allocation on probe function to the
> platform in which mtk_afe_suspend and mtk_afe_resume are used?

I think you should have separate implementations if you have both regmap
and non-regmap versions of this.

Attachment: signature.asc
Description: PGP signature


[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