Re: [PATCH 2/8] ASoC: Intel: avs: Introduce PCM power management routines

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

 




On 10/19/22 12:53, Cezary Rojewski wrote:
> Implement suspend/resume() operations for component drivers. For most
> scenarios, the PM flow is similar to standard streaming one, except for
> the part where the position register are being saved and the lack of PCM
> pages freeing. To reduce code duplication, all avs_dai_suspend_XXX() and
> avs_dai_resume_XXX() functions reuse their non-PM equivalents.
> 
> Given that path binding/unbinding happens only in FE part of the stream,
> the order of suspend() goes:
> 
> 1. hw_free() all FE DAIs, paths are unbound here
> 2. hw_free() all BE DAIs
> 
> Consequently, for resume() its:
> 
> 1. hw_params() all BE DAIs
> 2. hw_params() all FE DAIs, paths are bound here
> 3. prepare() all BE DAIs
> 4. prepare() all FE DAIs
> 
> As component->suspend/resume() do not provide substream pointer, store
> it ourselves so that the PM flow has all the necessary information to
> proceed.
> 
> Signed-off-by: Cezary Rojewski <cezary.rojewski@xxxxxxxxx>
> ---
>  include/sound/hdaudio_ext.h |   5 +
>  sound/soc/intel/avs/pcm.c   | 227 +++++++++++++++++++++++++++++++++++-
>  2 files changed, 228 insertions(+), 4 deletions(-)
> 
> diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h
> index 83aed26ab143..6598e238b9c5 100644
> --- a/include/sound/hdaudio_ext.h
> +++ b/include/sound/hdaudio_ext.h
> @@ -66,6 +66,11 @@ struct hdac_ext_stream {
>  
>  	u32 dpib;
>  	u32 lpib;
> +	u32 pphcllpl;
> +	u32 pphcllpu;
> +	u32 pphcldpl;
> +	u32 pphcldpu;

This is clearly going to conflict with my own rename/move changes in
"ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer"

The SPIB and DRMS handling are not DSP-specific and should be handled in
the 'generic' sound/hda layer. In theory the HDaudio legacy driver
should have used those capabilities.

It should be a simple rebase though for this patch.



[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