From: Rob Herring <robh@kernel.org>
To: Sameer Pujar <spujar@nvidia.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
kuninori.morimoto.gx@renesas.com, linux-kernel@vger.kernel.org,
tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org,
krzysztof.kozlowski+dt@linaro.org
Subject: Re: [PATCH v2 2/3] ASoC: dt-bindings: Add sample format conversion
Date: Tue, 2 Aug 2022 08:50:08 -0600 [thread overview]
Message-ID: <20220802145008.GB30116-robh@kernel.org> (raw)
In-Reply-To: <1659370052-18966-3-git-send-email-spujar@nvidia.com>
On Mon, Aug 01, 2022 at 09:37:31PM +0530, Sameer Pujar wrote:
> Presently "convert-channels" and "convert-rate" DT bindings are available
> for channel and rate fixups respectively.
>
> Similarly add "convert-sample-format" binding to fixup DAI sample format
> as well. This is added to simple-card and audio-graph based sound cards.
Do you have users for both cases?
>
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 4 ++++
> Documentation/devicetree/bindings/sound/audio-graph.yaml | 2 ++
> Documentation/devicetree/bindings/sound/dai-params.yaml | 10 ++++++++++
> Documentation/devicetree/bindings/sound/simple-card.yaml | 4 ++++
> 4 files changed, 20 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> index 30a644d9..8e64192 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> @@ -22,6 +22,8 @@ properties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
>
> patternProperties:
> "^endpoint(@[0-9a-f]+)?":
> @@ -67,6 +69,8 @@ patternProperties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
>
> dai-tdm-slot-width-map:
> description: Mapping of sample widths to slot widths. For hardware
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> index a9cd52e..93ddd55 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> @@ -30,6 +30,8 @@ properties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
Can someone explain why we need these properties defined in 3 different
locations? That's not a great pattern to continue.
>
> pa-gpios:
> maxItems: 1
> diff --git a/Documentation/devicetree/bindings/sound/dai-params.yaml b/Documentation/devicetree/bindings/sound/dai-params.yaml
> index aae60cb..933957d 100644
> --- a/Documentation/devicetree/bindings/sound/dai-params.yaml
> +++ b/Documentation/devicetree/bindings/sound/dai-params.yaml
> @@ -19,6 +19,16 @@ properties:
> minimum: 1
> maximum: 32
>
> + dai-sample-format:
> + description: Audio sample format used by DAI
> + $ref: /schemas/types.yaml#/definitions/string
> + enum:
> + - s8
> + - s16_le
> + - s24_le
> + - s24_3le
> + - s32_le
> +
> dai-sample-rate:
> description: Audio sample rate used by DAI
> $ref: /schemas/types.yaml#/definitions/uint32
> diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
> index ab03a2b..ec21190 100644
> --- a/Documentation/devicetree/bindings/sound/simple-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
> @@ -183,6 +183,8 @@ properties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> simple-audio-card,convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + simple-audio-card,convert-sample-format:
Don't add more properties with 'simple-audio-card,' prefix. That's not a
pattern we want to be consistent with...
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
> simple-audio-card,prefix:
> $ref: "#/definitions/prefix"
> simple-audio-card,pin-switches:
> @@ -226,6 +228,8 @@ patternProperties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
> prefix:
> $ref: "#/definitions/prefix"
> pin-switches:
> --
> 2.7.4
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Sameer Pujar <spujar@nvidia.com>
Cc: broonie@kernel.org, lgirdwood@gmail.com,
krzysztof.kozlowski+dt@linaro.org, perex@perex.cz,
tiwai@suse.com, kuninori.morimoto.gx@renesas.com,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] ASoC: dt-bindings: Add sample format conversion
Date: Tue, 2 Aug 2022 08:50:08 -0600 [thread overview]
Message-ID: <20220802145008.GB30116-robh@kernel.org> (raw)
In-Reply-To: <1659370052-18966-3-git-send-email-spujar@nvidia.com>
On Mon, Aug 01, 2022 at 09:37:31PM +0530, Sameer Pujar wrote:
> Presently "convert-channels" and "convert-rate" DT bindings are available
> for channel and rate fixups respectively.
>
> Similarly add "convert-sample-format" binding to fixup DAI sample format
> as well. This is added to simple-card and audio-graph based sound cards.
Do you have users for both cases?
>
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> Documentation/devicetree/bindings/sound/audio-graph-port.yaml | 4 ++++
> Documentation/devicetree/bindings/sound/audio-graph.yaml | 2 ++
> Documentation/devicetree/bindings/sound/dai-params.yaml | 10 ++++++++++
> Documentation/devicetree/bindings/sound/simple-card.yaml | 4 ++++
> 4 files changed, 20 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> index 30a644d9..8e64192 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> @@ -22,6 +22,8 @@ properties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
>
> patternProperties:
> "^endpoint(@[0-9a-f]+)?":
> @@ -67,6 +69,8 @@ patternProperties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
>
> dai-tdm-slot-width-map:
> description: Mapping of sample widths to slot widths. For hardware
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> index a9cd52e..93ddd55 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> @@ -30,6 +30,8 @@ properties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
Can someone explain why we need these properties defined in 3 different
locations? That's not a great pattern to continue.
>
> pa-gpios:
> maxItems: 1
> diff --git a/Documentation/devicetree/bindings/sound/dai-params.yaml b/Documentation/devicetree/bindings/sound/dai-params.yaml
> index aae60cb..933957d 100644
> --- a/Documentation/devicetree/bindings/sound/dai-params.yaml
> +++ b/Documentation/devicetree/bindings/sound/dai-params.yaml
> @@ -19,6 +19,16 @@ properties:
> minimum: 1
> maximum: 32
>
> + dai-sample-format:
> + description: Audio sample format used by DAI
> + $ref: /schemas/types.yaml#/definitions/string
> + enum:
> + - s8
> + - s16_le
> + - s24_le
> + - s24_3le
> + - s32_le
> +
> dai-sample-rate:
> description: Audio sample rate used by DAI
> $ref: /schemas/types.yaml#/definitions/uint32
> diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
> index ab03a2b..ec21190 100644
> --- a/Documentation/devicetree/bindings/sound/simple-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
> @@ -183,6 +183,8 @@ properties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> simple-audio-card,convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + simple-audio-card,convert-sample-format:
Don't add more properties with 'simple-audio-card,' prefix. That's not a
pattern we want to be consistent with...
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
> simple-audio-card,prefix:
> $ref: "#/definitions/prefix"
> simple-audio-card,pin-switches:
> @@ -226,6 +228,8 @@ patternProperties:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-rate"
> convert-channels:
> $ref: "/schemas/sound/dai-params.yaml#/properties/dai-channels"
> + convert-sample-format:
> + $ref: "/schemas/sound/dai-params.yaml#/properties/dai-sample-format"
> prefix:
> $ref: "#/definitions/prefix"
> pin-switches:
> --
> 2.7.4
>
>
next prev parent reply other threads:[~2022-08-02 14:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 16:07 [PATCH v2 0/3] DT binding for sample format conversion Sameer Pujar
2022-08-01 16:07 ` Sameer Pujar
2022-08-01 16:07 ` [PATCH v2 1/3] ASoC: dt-bindings: Add schema for common DAI params Sameer Pujar
2022-08-01 16:07 ` Sameer Pujar
2022-08-01 19:30 ` Rob Herring
2022-08-01 19:30 ` Rob Herring
2022-08-02 10:45 ` Sameer Pujar
2022-08-02 10:45 ` Sameer Pujar
2022-08-02 14:46 ` Rob Herring
2022-08-02 14:46 ` Rob Herring
2022-08-04 10:09 ` Sameer Pujar
2022-08-01 16:07 ` [PATCH v2 2/3] ASoC: dt-bindings: Add sample format conversion Sameer Pujar
2022-08-01 16:07 ` Sameer Pujar
2022-08-02 14:50 ` Rob Herring [this message]
2022-08-02 14:50 ` Rob Herring
2022-08-04 11:09 ` Sameer Pujar
2022-08-01 16:07 ` [PATCH v2 3/3] ASoC: simple-card-utils: Fixup DAI sample format Sameer Pujar
2022-08-01 16:07 ` Sameer Pujar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220802145008.GB30116-robh@kernel.org \
--to=robh@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=spujar@nvidia.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.