[v2,2/3] ASoC: dt-bindings: sama7g5-pdmc: add microchip,startup-delay-us binding

Message ID 20230217124151.236216-3-claudiu.beznea@microchip.com
State New
Headers
Series ASoC: mchp-pdmc: fix poc noises when starting capture |

Commit Message

Claudiu Beznea Feb. 17, 2023, 12:41 p.m. UTC
  Add microchip,startup-delay-us binding to let PDMC users to specify
startup delay.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml   | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Rob Herring Feb. 20, 2023, 10:56 p.m. UTC | #1
On Fri, Feb 17, 2023 at 02:41:50PM +0200, Claudiu Beznea wrote:
> Add microchip,startup-delay-us binding to let PDMC users to specify
> startup delay.

The diff tells me all this. Why does this need to be per platform?

> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml   | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
> index c4cf1e5ab84b..9b40268537cb 100644
> --- a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
> +++ b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
> @@ -67,6 +67,12 @@ properties:
>      maxItems: 4
>      uniqueItems: true
>  
> +  microchip,startup-delay-us:
> +    description: |
> +      Specifies the delay in microseconds that needs to be applied after
> +      enabling the PDMC microphones to avoid unwanted noise due to microphones
> +      not being ready.
> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.34.1
>
  
Claudiu Beznea Feb. 21, 2023, 8:10 a.m. UTC | #2
On 21.02.2023 00:56, Rob Herring wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Fri, Feb 17, 2023 at 02:41:50PM +0200, Claudiu Beznea wrote:
>> Add microchip,startup-delay-us binding to let PDMC users to specify
>> startup delay.
> 
> The diff tells me all this. Why does this need to be per platform?

PDMC can work with different kind of microphones, thus different boards
could have different microphones. Depending on microphone type the PDMC
would need to wait longer or shorter period than the default chosen period
to filter unwanted noise. Thus the need of having this specified though
device tree. Would you prefer to have this in commit message?

Thank you,
Claudiu

> 
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>>  .../devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml   | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
>> index c4cf1e5ab84b..9b40268537cb 100644
>> --- a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
>> +++ b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
>> @@ -67,6 +67,12 @@ properties:
>>      maxItems: 4
>>      uniqueItems: true
>>
>> +  microchip,startup-delay-us:
>> +    description: |
>> +      Specifies the delay in microseconds that needs to be applied after
>> +      enabling the PDMC microphones to avoid unwanted noise due to microphones
>> +      not being ready.
>> +
>>  required:
>>    - compatible
>>    - reg
>> --
>> 2.34.1
>>
  
Krzysztof Kozlowski Feb. 21, 2023, 9:23 a.m. UTC | #3
On 21/02/2023 09:10, Claudiu.Beznea@microchip.com wrote:
> On 21.02.2023 00:56, Rob Herring wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> On Fri, Feb 17, 2023 at 02:41:50PM +0200, Claudiu Beznea wrote:
>>> Add microchip,startup-delay-us binding to let PDMC users to specify
>>> startup delay.
>>
>> The diff tells me all this. Why does this need to be per platform?
> 
> PDMC can work with different kind of microphones, thus different boards
> could have different microphones. Depending on microphone type the PDMC
> would need to wait longer or shorter period than the default chosen period
> to filter unwanted noise. Thus the need of having this specified though
> device tree. Would you prefer to have this in commit message?

I believe you also had explain it to me, thus as you can see having it
in commit msg would spare you two questions...

Best regards,
Krzysztof
  
Claudiu Beznea Feb. 21, 2023, 10:52 a.m. UTC | #4
On 21.02.2023 11:23, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On 21/02/2023 09:10, Claudiu.Beznea@microchip.com wrote:
>> On 21.02.2023 00:56, Rob Herring wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>>
>>> On Fri, Feb 17, 2023 at 02:41:50PM +0200, Claudiu Beznea wrote:
>>>> Add microchip,startup-delay-us binding to let PDMC users to specify
>>>> startup delay.
>>>
>>> The diff tells me all this. Why does this need to be per platform?
>>
>> PDMC can work with different kind of microphones, thus different boards
>> could have different microphones. Depending on microphone type the PDMC
>> would need to wait longer or shorter period than the default chosen period
>> to filter unwanted noise. Thus the need of having this specified though
>> device tree. Would you prefer to have this in commit message?
> 
> I believe you also had explain it to me, thus as you can see having it
> in commit msg would spare you two questions...

Right, I'll add it in the next version.

Thank you,
Claudiu

> 
> Best regards,
> Krzysztof
>
  
Mark Brown Feb. 21, 2023, 2:50 p.m. UTC | #5
On Tue, Feb 21, 2023 at 10:52:54AM +0000, Claudiu.Beznea@microchip.com wrote:
> On 21.02.2023 11:23, Krzysztof Kozlowski wrote:

> >> PDMC can work with different kind of microphones, thus different boards
> >> could have different microphones. Depending on microphone type the PDMC
> >> would need to wait longer or shorter period than the default chosen period
> >> to filter unwanted noise. Thus the need of having this specified though
> >> device tree. Would you prefer to have this in commit message?

> > I believe you also had explain it to me, thus as you can see having it
> > in commit msg would spare you two questions...

> Right, I'll add it in the next version.

TBH this is really standard stuff for audio hardware, having to leave
board specific settling delays is very normal.
  

Patch

diff --git a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
index c4cf1e5ab84b..9b40268537cb 100644
--- a/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
+++ b/Documentation/devicetree/bindings/sound/microchip,sama7g5-pdmc.yaml
@@ -67,6 +67,12 @@  properties:
     maxItems: 4
     uniqueItems: true
 
+  microchip,startup-delay-us:
+    description: |
+      Specifies the delay in microseconds that needs to be applied after
+      enabling the PDMC microphones to avoid unwanted noise due to microphones
+      not being ready.
+
 required:
   - compatible
   - reg