diff mbox series

[1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring suspend

Message ID 20230925024847.2971421-1-chancel.liu@nxp.com (mailing list archive)
State New, archived
Headers show
Series [1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring suspend | expand

Commit Message

Chancel Liu Sept. 25, 2023, 2:48 a.m. UTC
Add a property to list DAPM endpoints which mark paths between these
endpoints ignoring suspend. These DAPM paths can still be power on when
system enters into suspend.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Krzysztof Kozlowski Sept. 25, 2023, 6:51 a.m. UTC | #1
On 25/09/2023 04:48, Chancel Liu wrote:
> Add a property to list DAPM endpoints which mark paths between these
> endpoints ignoring suspend. These DAPM paths can still be power on when
> system enters into suspend.
> 
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> index 188f38baddec..ec6e09eab427 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> @@ -91,6 +91,12 @@ properties:
>        - rpmsg-audio-channel
>        - rpmsg-micfil-channel
>  
> +  fsl,lpa-widgets:

What is LPA? It's not explained in property description.

> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> +    description: |
> +      A list of DAPM endpoints which mark paths between these endpoints
> +      ignoring suspend.

And how does it differ from audio-routing? Also, you need to explain
what is "suspend" in this context. Bindings are independent of Linux.

Best regards,
Krzysztof
Chancel Liu Sept. 25, 2023, 8:20 a.m. UTC | #2
> > Add a property to list DAPM endpoints which mark paths between these
> > endpoints ignoring suspend. These DAPM paths can still be power on
> > when system enters into suspend.
> >
> > Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> > ---
> >  Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > index 188f38baddec..ec6e09eab427 100644
> > --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
> > @@ -91,6 +91,12 @@ properties:
> >        - rpmsg-audio-channel
> >        - rpmsg-micfil-channel
> >
> > +  fsl,lpa-widgets:
> 
> What is LPA? It's not explained in property description.
> 

On asymmetric multiprocessor, there are Cortex-A core and Cortex-M core, Linux
is running on Cortex-A core, RTOS or other OS is running on Cortex-M core. The
audio hardware devices can be controlled by Cortex-M. LPA means low power audio
case. The mechanism can be explained that Cortex-A allocates a large buffer and
fill audio data, then Cortex-A can enter into suspend for the purpose of power
saving. Cortex-M continues to play the sound during suspend phase of Cortex-A.
When the data in buffer is consumed, Cortex-M will trigger the Cortex-A to
wakeup to fill data.

I can add above explanation to LPA in patch v2.

> > +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> > +    description: |
> > +      A list of DAPM endpoints which mark paths between these endpoints
> > +      ignoring suspend.
> 
> And how does it differ from audio-routing? Also, you need to explain what is
> "suspend" in this context. Bindings are independent of Linux.
> 

Normally audio paths will be disabled by ASoC dynamic audio power management if
Linux enters into suspend. LPA requires some audio paths enabled when Cortex-A
enters into suspend. We can read DAPM endpoints from the "fsl,lpa-widgets"
property and keep the paths between these endpoints enabled during suspend
phase of Cortex-A. Property "audio-routing" just declares the connection
between widgets and doesn't have such feature.

I will modify the description as following:
"A list of DAPM endpoints which mark paths between these endpoints still enabled
when system enters into suspend."

> Best regards,
> Krzysztof

Regards, 
Chancel Liu
Krzysztof Kozlowski Sept. 25, 2023, 8:36 a.m. UTC | #3
On 25/09/2023 10:20, Chancel Liu wrote:
>>> Add a property to list DAPM endpoints which mark paths between these
>>> endpoints ignoring suspend. These DAPM paths can still be power on
>>> when system enters into suspend.
>>>
>>> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
>>> ---
>>>  Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
>>> b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
>>> index 188f38baddec..ec6e09eab427 100644
>>> --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
>>> +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
>>> @@ -91,6 +91,12 @@ properties:
>>>        - rpmsg-audio-channel
>>>        - rpmsg-micfil-channel
>>>
>>> +  fsl,lpa-widgets:
>>
>> What is LPA? It's not explained in property description.
>>
> 
> On asymmetric multiprocessor, there are Cortex-A core and Cortex-M core, Linux
> is running on Cortex-A core, RTOS or other OS is running on Cortex-M core. The
> audio hardware devices can be controlled by Cortex-M. LPA means low power audio
> case. The mechanism can be explained that Cortex-A allocates a large buffer and
> fill audio data, then Cortex-A can enter into suspend for the purpose of power
> saving. Cortex-M continues to play the sound during suspend phase of Cortex-A.
> When the data in buffer is consumed, Cortex-M will trigger the Cortex-A to
> wakeup to fill data.
> 
> I can add above explanation to LPA in patch v2.
> 
>>> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
>>> +    description: |
>>> +      A list of DAPM endpoints which mark paths between these endpoints
>>> +      ignoring suspend.
>>
>> And how does it differ from audio-routing? Also, you need to explain what is
>> "suspend" in this context. Bindings are independent of Linux.
>>
> 
> Normally audio paths will be disabled by ASoC dynamic audio power management if
> Linux enters into suspend. LPA requires some audio paths enabled when Cortex-A
> enters into suspend. We can read DAPM endpoints from the "fsl,lpa-widgets"
> property and keep the paths between these endpoints enabled during suspend
> phase of Cortex-A. Property "audio-routing" just declares the connection
> between widgets and doesn't have such feature.
> 
> I will modify the description as following:
> "A list of DAPM endpoints which mark paths between these endpoints still enabled
> when system enters into suspend."

Yes, that's better, but even better would be to say not how the OS
should behave, but how the actual entire system works. Basically these
widgets remain in use by your co-processor, thus OS should not disable
them when entering in system suspend state.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
index 188f38baddec..ec6e09eab427 100644
--- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml
@@ -91,6 +91,12 @@  properties:
       - rpmsg-audio-channel
       - rpmsg-micfil-channel
 
+  fsl,lpa-widgets:
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+    description: |
+      A list of DAPM endpoints which mark paths between these endpoints
+      ignoring suspend.
+
 required:
   - compatible