All of lore.kernel.org
 help / color / mirror / Atom feed
From: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
To: Rob Herring <robh@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	shengjiu wang <shengjiu.wang@gmail.com>,
	Xiubo Lee <Xiubo.Lee@gmail.com>,
	Fabio Estevam <festevam@gmail.com>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	linux-sound <linux-sound@vger.kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	alsa-devel <alsa-devel@alsa-project.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com>
Subject: Re: [PATCHv3 RESEND 10/10] ASoC: dt-bindings: fsl-asoc-card: add compatible for generic codec
Date: Tue, 2 Jan 2024 06:37:39 -0500 (EST)	[thread overview]
Message-ID: <1300509761.24764.1704195459987.JavaMail.zimbra@savoirfairelinux.com> (raw)
In-Reply-To: <20231220222550.GA1232936-robh@kernel.org>

Hello,

On Wednesday, 20 December, 2023 23:25:50, Rob Herring wrote:
> On Mon, Dec 18, 2023 at 01:40:58PM +0100, Elinor Montmasson wrote: 
> > +Optional, relevant only with the "fsl,imx-audio-generic" compatible: 
> > + 
> > + - cpu-slot-width : Indicates a specific TDM slot width in bits. 
> > + - cpu-slot-num : Indicates a specific number of TDM slots per frame. 
> 
> Pretty sure I've seen other bindings with TDM slot properties. A sign we 
> need something common if we don't already have something. 

That's right, "tdm-slot.txt" already defines TDM bindings, I will
use them with the utility function snd_soc_of_parse_tdm_slot().

> > + - cpu-sysclk-freq-rx : Frequency of the CPU DAI sys clock for Rx. 
> > + - cpu-sysclk-freq-tx : Frequency of the CPU DAI sys clock for Tx. 
> > + 
> > + - cpu-sysclk-dir-rx-out : Boolean property. Specifies sys clock direction 
> > + as 'out' on initialization for Rx. 
> > + If not set, default direction is 'in'. 
> > + - cpu-sysclk-dir-tx-out : Boolean property. Specifies sys clock direction 
> > + as 'out' on initialization for Tx. 
> > + If not set, default direction is 'in'. 
> 
> Looks like clock stuff. Use the clock binding. 

simple-card defines similar properties at the dai level:
"system-clock-frequency" and "system-clock-direction-out".
The first is used if no "clocks" binding is specified for the dai node.

Maybe I could use a similar logic with fsl-asoc-card ?
* adding a "clock-cpu" phandle property which should be the cpu clock.
It will be used to retreive the frequency for both RX and TX.
* keeping "cpu-sysclk-freq-rx"/"cpu-sysclk-freq-tx", which are used if
no clock is provided, like "system-clock-frequency" in simple-card.
* keep using "cpu-sysclk-dir-rx-out"/"cpu-sysclk-dir-tx-out", like
"system-clock-direction-out" in simple card.

Also, maybe I could rename my new properties:
cpu-system-clock-frequency-tx, cpu-system-clock-direction-out-rx, ...
It would better match those in simple-card as they do the same thing.

Best regards,
Elinor Montmasson

WARNING: multiple messages have this Message-ID (diff)
From: Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>
To: Rob Herring <robh@kernel.org>
Cc: devicetree <devicetree@vger.kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	alsa-devel <alsa-devel@alsa-project.org>,
	Xiubo Lee <Xiubo.Lee@gmail.com>,
	Fabio Estevam <festevam@gmail.com>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-sound <linux-sound@vger.kernel.org>,
	Jaroslav Kysela <perex@perex.cz>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Philip-Dylan Gleonec <philip-dylan.gleonec@savoirfairelinux.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	shengjiu wang <shengjiu.wang@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv3 RESEND 10/10] ASoC: dt-bindings: fsl-asoc-card: add compatible for generic codec
Date: Tue, 2 Jan 2024 06:37:39 -0500 (EST)	[thread overview]
Message-ID: <1300509761.24764.1704195459987.JavaMail.zimbra@savoirfairelinux.com> (raw)
In-Reply-To: <20231220222550.GA1232936-robh@kernel.org>

Hello,

On Wednesday, 20 December, 2023 23:25:50, Rob Herring wrote:
> On Mon, Dec 18, 2023 at 01:40:58PM +0100, Elinor Montmasson wrote: 
> > +Optional, relevant only with the "fsl,imx-audio-generic" compatible: 
> > + 
> > + - cpu-slot-width : Indicates a specific TDM slot width in bits. 
> > + - cpu-slot-num : Indicates a specific number of TDM slots per frame. 
> 
> Pretty sure I've seen other bindings with TDM slot properties. A sign we 
> need something common if we don't already have something. 

That's right, "tdm-slot.txt" already defines TDM bindings, I will
use them with the utility function snd_soc_of_parse_tdm_slot().

> > + - cpu-sysclk-freq-rx : Frequency of the CPU DAI sys clock for Rx. 
> > + - cpu-sysclk-freq-tx : Frequency of the CPU DAI sys clock for Tx. 
> > + 
> > + - cpu-sysclk-dir-rx-out : Boolean property. Specifies sys clock direction 
> > + as 'out' on initialization for Rx. 
> > + If not set, default direction is 'in'. 
> > + - cpu-sysclk-dir-tx-out : Boolean property. Specifies sys clock direction 
> > + as 'out' on initialization for Tx. 
> > + If not set, default direction is 'in'. 
> 
> Looks like clock stuff. Use the clock binding. 

simple-card defines similar properties at the dai level:
"system-clock-frequency" and "system-clock-direction-out".
The first is used if no "clocks" binding is specified for the dai node.

Maybe I could use a similar logic with fsl-asoc-card ?
* adding a "clock-cpu" phandle property which should be the cpu clock.
It will be used to retreive the frequency for both RX and TX.
* keeping "cpu-sysclk-freq-rx"/"cpu-sysclk-freq-tx", which are used if
no clock is provided, like "system-clock-frequency" in simple-card.
* keep using "cpu-sysclk-dir-rx-out"/"cpu-sysclk-dir-tx-out", like
"system-clock-direction-out" in simple card.

Also, maybe I could rename my new properties:
cpu-system-clock-frequency-tx, cpu-system-clock-direction-out-rx, ...
It would better match those in simple-card as they do the same thing.

Best regards,
Elinor Montmasson

  reply	other threads:[~2024-01-02 19:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-18 12:40 [PATCHv3 RESEND 00/10] ASoC: fsl-asoc-card: compatibility integration of a generic codec use case for use with S/PDIF controller Elinor Montmasson
2023-12-18 12:40 ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 01/10] ASoC: fsl-asoc-card: add support for dai links with multiple codecs Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 02/10] ASoC: fsl-asoc-card: add second dai link component for codecs Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 03/10] ASoC: fsl-asoc-card: add compatibility to use 2 codecs in dai-links Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 04/10] ASoC: fsl-asoc-card: add new compatible for a generic codec use case Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 05/10] ASoC: fsl-asoc-card: set generic codec as clock provider Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 06/10] ASoC: fsl-asoc-card: add dts property "cpu-slot-width" Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 07/10] ASoC: fsl-asoc-card: add dts property "cpu-slot-num" Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 08/10] ASoC: fsl-asoc-card: add dts properties "cpu-sysclk-freq" Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 09/10] ASoC: fsl-asoc-card: add dts properties "cpu-sysclk-dir-out" Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-18 12:40 ` [PATCHv3 RESEND 10/10] ASoC: dt-bindings: fsl-asoc-card: add compatible for generic codec Elinor Montmasson
2023-12-18 12:40   ` Elinor Montmasson
2023-12-20 22:25   ` Rob Herring
2023-12-20 22:25     ` Rob Herring
2024-01-02 11:37     ` Elinor Montmasson [this message]
2024-01-02 11:37       ` Elinor Montmasson
2023-12-18 12:46 ` [PATCHv3 RESEND 00/10] ASoC: fsl-asoc-card: compatibility integration of a generic codec use case for use with S/PDIF controller Krzysztof Kozlowski
2023-12-18 12:46   ` Krzysztof Kozlowski
2023-12-18 13:54 ` Daniel Baluta
2023-12-18 13:54   ` Daniel Baluta
2023-12-19 12:39   ` Elinor Montmasson
2023-12-19 12:39     ` Elinor Montmasson
2023-12-29 13:45     ` Elinor Montmasson
2023-12-29 13:45       ` Elinor Montmasson
2024-01-16 11:41       ` Daniel Baluta
2024-01-16 11:41         ` Daniel Baluta

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=1300509761.24764.1704195459987.JavaMail.zimbra@savoirfairelinux.com \
    --to=elinor.montmasson@savoirfairelinux.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=perex@perex.cz \
    --cc=philip-dylan.gleonec@savoirfairelinux.com \
    --cc=robh@kernel.org \
    --cc=shengjiu.wang@gmail.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.