* [PATCH 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property
2025-02-11 3:57 [PATCH 0/2] ASoC: imx-card: support playback or capture only Shengjiu Wang
@ 2025-02-11 3:57 ` Shengjiu Wang
2025-02-11 15:32 ` Frank Li
2025-02-11 3:57 ` [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support Shengjiu Wang
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Shengjiu Wang @ 2025-02-11 3:57 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
Refer to audio graph card, add playback-only and capture-only property
for imx-audio-card.yaml for the case that only playback or capture
is supported.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
.../devicetree/bindings/sound/imx-audio-card.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
index f7ad5ea2491e..86571fa930f6 100644
--- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
+++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
@@ -46,6 +46,14 @@ patternProperties:
description: see tdm-slot.txt.
$ref: /schemas/types.yaml#/definitions/uint32
+ playback-only:
+ description: link is used only for playback
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ capture-only:
+ description: link is used only for capture
+ $ref: /schemas/types.yaml#/definitions/flag
+
cpu:
description: Holds subnode which indicates cpu dai.
type: object
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property
2025-02-11 3:57 ` [PATCH 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property Shengjiu Wang
@ 2025-02-11 15:32 ` Frank Li
2025-02-12 3:51 ` Shengjiu Wang
0 siblings, 1 reply; 11+ messages in thread
From: Frank Li @ 2025-02-11 15:32 UTC (permalink / raw)
To: Shengjiu Wang
Cc: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
On Tue, Feb 11, 2025 at 11:57:36AM +0800, Shengjiu Wang wrote:
> Refer to audio graph card, add playback-only and capture-only property
> for imx-audio-card.yaml for the case that only playback or capture
> is supported.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> .../devicetree/bindings/sound/imx-audio-card.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
> index f7ad5ea2491e..86571fa930f6 100644
> --- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
> @@ -46,6 +46,14 @@ patternProperties:
> description: see tdm-slot.txt.
> $ref: /schemas/types.yaml#/definitions/uint32
>
> + playback-only:
> + description: link is used only for playback
> + $ref: /schemas/types.yaml#/definitions/flag
> +
> + capture-only:
> + description: link is used only for capture
> + $ref: /schemas/types.yaml#/definitions/flag
> +
why not ref to audio-graph-port.yaml?
Frank
> cpu:
> description: Holds subnode which indicates cpu dai.
> type: object
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property
2025-02-11 15:32 ` Frank Li
@ 2025-02-12 3:51 ` Shengjiu Wang
0 siblings, 0 replies; 11+ messages in thread
From: Shengjiu Wang @ 2025-02-12 3:51 UTC (permalink / raw)
To: Frank Li
Cc: Shengjiu Wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
On Tue, Feb 11, 2025 at 11:32 PM Frank Li <Frank.li@nxp.com> wrote:
>
> On Tue, Feb 11, 2025 at 11:57:36AM +0800, Shengjiu Wang wrote:
> > Refer to audio graph card, add playback-only and capture-only property
> > for imx-audio-card.yaml for the case that only playback or capture
> > is supported.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> > .../devicetree/bindings/sound/imx-audio-card.yaml | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
> > index f7ad5ea2491e..86571fa930f6 100644
> > --- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
> > +++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml
> > @@ -46,6 +46,14 @@ patternProperties:
> > description: see tdm-slot.txt.
> > $ref: /schemas/types.yaml#/definitions/uint32
> >
> > + playback-only:
> > + description: link is used only for playback
> > + $ref: /schemas/types.yaml#/definitions/flag
> > +
> > + capture-only:
> > + description: link is used only for capture
> > + $ref: /schemas/types.yaml#/definitions/flag
> > +
>
> why not ref to audio-graph-port.yaml?
>
audio-graph-port are based on 'port'. which is not used
in imx-card. imx-card can't directly refer to audio-graph-port.yaml.
Best regards
Shengjiu Wang
> Frank
>
> > cpu:
> > description: Holds subnode which indicates cpu dai.
> > type: object
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support
2025-02-11 3:57 [PATCH 0/2] ASoC: imx-card: support playback or capture only Shengjiu Wang
2025-02-11 3:57 ` [PATCH 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property Shengjiu Wang
@ 2025-02-11 3:57 ` Shengjiu Wang
2025-02-11 15:34 ` Frank Li
2025-02-11 13:06 ` [PATCH 0/2] ASoC: imx-card: support playback or capture only Daniel Baluta
2025-02-25 17:03 ` Mark Brown
3 siblings, 1 reply; 11+ messages in thread
From: Shengjiu Wang @ 2025-02-11 3:57 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
With the DPCM case, the backend only support capture or
playback, then the linked frontend can only support
capture or playback, but frontend can't automatically
enable only capture or playback, it needs the input
from dt-binding.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
sound/soc/fsl/imx-card.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index ac043ad367ac..905294682996 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -518,6 +518,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
struct snd_soc_dai_link *link;
struct dai_link_data *link_data;
struct of_phandle_args args;
+ bool playback_only, capture_only;
int ret, num_links;
u32 asrc_fmt = 0;
u32 width;
@@ -679,6 +680,10 @@ static int imx_card_parse_of(struct imx_card_data *data)
link->ops = &imx_aif_ops;
}
+ graph_util_parse_link_direction(np, &playback_only, &capture_only);
+ link->playback_only = playback_only;
+ link->capture_only = capture_only;
+
/* Get dai fmt */
ret = simple_util_parse_daifmt(dev, np, codec,
NULL, &link->dai_fmt);
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support
2025-02-11 3:57 ` [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support Shengjiu Wang
@ 2025-02-11 15:34 ` Frank Li
2025-02-12 3:48 ` Shengjiu Wang
0 siblings, 1 reply; 11+ messages in thread
From: Frank Li @ 2025-02-11 15:34 UTC (permalink / raw)
To: Shengjiu Wang
Cc: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
On Tue, Feb 11, 2025 at 11:57:37AM +0800, Shengjiu Wang wrote:
> With the DPCM case, the backend only support capture or
> playback, then the linked frontend can only support
> capture or playback, but frontend can't automatically
> enable only capture or playback, it needs the input
> from dt-binding.
wrap at 75 chars
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
> sound/soc/fsl/imx-card.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
> index ac043ad367ac..905294682996 100644
> --- a/sound/soc/fsl/imx-card.c
> +++ b/sound/soc/fsl/imx-card.c
> @@ -518,6 +518,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
> struct snd_soc_dai_link *link;
> struct dai_link_data *link_data;
> struct of_phandle_args args;
> + bool playback_only, capture_only;
> int ret, num_links;
> u32 asrc_fmt = 0;
> u32 width;
> @@ -679,6 +680,10 @@ static int imx_card_parse_of(struct imx_card_data *data)
> link->ops = &imx_aif_ops;
> }
>
> + graph_util_parse_link_direction(np, &playback_only, &capture_only);
> + link->playback_only = playback_only;
> + link->capture_only = capture_only;
> +
if only use once, needn't local variable.
graph_util_parse_link_direction(np, &link->playback_only, &link->capture_only)
Frank
> /* Get dai fmt */
> ret = simple_util_parse_daifmt(dev, np, codec,
> NULL, &link->dai_fmt);
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support
2025-02-11 15:34 ` Frank Li
@ 2025-02-12 3:48 ` Shengjiu Wang
2025-02-12 13:25 ` Mark Brown
2025-02-12 15:47 ` Frank Li
0 siblings, 2 replies; 11+ messages in thread
From: Shengjiu Wang @ 2025-02-12 3:48 UTC (permalink / raw)
To: Frank Li
Cc: Shengjiu Wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
On Tue, Feb 11, 2025 at 11:34 PM Frank Li <Frank.li@nxp.com> wrote:
>
> On Tue, Feb 11, 2025 at 11:57:37AM +0800, Shengjiu Wang wrote:
> > With the DPCM case, the backend only support capture or
> > playback, then the linked frontend can only support
> > capture or playback, but frontend can't automatically
> > enable only capture or playback, it needs the input
> > from dt-binding.
>
> wrap at 75 chars
On my side, there are in 75 chars...
>
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> > sound/soc/fsl/imx-card.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
> > index ac043ad367ac..905294682996 100644
> > --- a/sound/soc/fsl/imx-card.c
> > +++ b/sound/soc/fsl/imx-card.c
> > @@ -518,6 +518,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
> > struct snd_soc_dai_link *link;
> > struct dai_link_data *link_data;
> > struct of_phandle_args args;
> > + bool playback_only, capture_only;
> > int ret, num_links;
> > u32 asrc_fmt = 0;
> > u32 width;
> > @@ -679,6 +680,10 @@ static int imx_card_parse_of(struct imx_card_data *data)
> > link->ops = &imx_aif_ops;
> > }
> >
> > + graph_util_parse_link_direction(np, &playback_only, &capture_only);
> > + link->playback_only = playback_only;
> > + link->capture_only = capture_only;
> > +
>
> if only use once, needn't local variable.
>
> graph_util_parse_link_direction(np, &link->playback_only, &link->capture_only)
sound/soc/fsl/imx-card.c:683:53: error: cannot take address of
bit-field ‘playback_only’
683 | graph_util_parse_link_direction(np,
&link->playback_only, &link->capture_only);
| ^
sound/soc/fsl/imx-card.c:683:75: error: cannot take address of
bit-field ‘capture_only’
683 | graph_util_parse_link_direction(np,
&link->playback_only, &link->capture_only);
There are errors with it.
best regards
Shengjiu Wang
>
> Frank
>
> > /* Get dai fmt */
> > ret = simple_util_parse_daifmt(dev, np, codec,
> > NULL, &link->dai_fmt);
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support
2025-02-12 3:48 ` Shengjiu Wang
@ 2025-02-12 13:25 ` Mark Brown
2025-02-12 15:47 ` Frank Li
1 sibling, 0 replies; 11+ messages in thread
From: Mark Brown @ 2025-02-12 13:25 UTC (permalink / raw)
To: Shengjiu Wang
Cc: Frank Li, Shengjiu Wang, Xiubo.Lee, festevam, nicoleotsuka,
lgirdwood, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
[-- Attachment #1: Type: text/plain, Size: 588 bytes --]
On Wed, Feb 12, 2025 at 11:48:43AM +0800, Shengjiu Wang wrote:
> On Tue, Feb 11, 2025 at 11:34 PM Frank Li <Frank.li@nxp.com> wrote:
> > On Tue, Feb 11, 2025 at 11:57:37AM +0800, Shengjiu Wang wrote:
> > > With the DPCM case, the backend only support capture or
> > > playback, then the linked frontend can only support
> > > capture or playback, but frontend can't automatically
> > > enable only capture or playback, it needs the input
> > > from dt-binding.
> > wrap at 75 chars
> On my side, there are in 75 chars...
It's wrapped as above in the copy I got FWIW.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support
2025-02-12 3:48 ` Shengjiu Wang
2025-02-12 13:25 ` Mark Brown
@ 2025-02-12 15:47 ` Frank Li
1 sibling, 0 replies; 11+ messages in thread
From: Frank Li @ 2025-02-12 15:47 UTC (permalink / raw)
To: Shengjiu Wang
Cc: Shengjiu Wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
On Wed, Feb 12, 2025 at 11:48:43AM +0800, Shengjiu Wang wrote:
> On Tue, Feb 11, 2025 at 11:34 PM Frank Li <Frank.li@nxp.com> wrote:
> >
> > On Tue, Feb 11, 2025 at 11:57:37AM +0800, Shengjiu Wang wrote:
> > > With the DPCM case, the backend only support capture or
> > > playback, then the linked frontend can only support
> > > capture or playback, but frontend can't automatically
> > > enable only capture or playback, it needs the input
> > > from dt-binding.
> >
> > wrap at 75 chars
>
> On my side, there are in 75 chars...
>
> >
> > >
> > > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > > ---
> > > sound/soc/fsl/imx-card.c | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
> > > index ac043ad367ac..905294682996 100644
> > > --- a/sound/soc/fsl/imx-card.c
> > > +++ b/sound/soc/fsl/imx-card.c
> > > @@ -518,6 +518,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
> > > struct snd_soc_dai_link *link;
> > > struct dai_link_data *link_data;
> > > struct of_phandle_args args;
> > > + bool playback_only, capture_only;
> > > int ret, num_links;
> > > u32 asrc_fmt = 0;
> > > u32 width;
> > > @@ -679,6 +680,10 @@ static int imx_card_parse_of(struct imx_card_data *data)
> > > link->ops = &imx_aif_ops;
> > > }
> > >
> > > + graph_util_parse_link_direction(np, &playback_only, &capture_only);
> > > + link->playback_only = playback_only;
> > > + link->capture_only = capture_only;
> > > +
> >
> > if only use once, needn't local variable.
> >
> > graph_util_parse_link_direction(np, &link->playback_only, &link->capture_only)
>
> sound/soc/fsl/imx-card.c:683:53: error: cannot take address of
> bit-field ‘playback_only’
> 683 | graph_util_parse_link_direction(np,
> &link->playback_only, &link->capture_only);
> | ^
> sound/soc/fsl/imx-card.c:683:75: error: cannot take address of
> bit-field ‘capture_only’
> 683 | graph_util_parse_link_direction(np,
> &link->playback_only, &link->capture_only);
>
> There are errors with it.
Okay, it should be fine.
Frank
>
> best regards
> Shengjiu Wang
> >
> > Frank
> >
> > > /* Get dai fmt */
> > > ret = simple_util_parse_daifmt(dev, np, codec,
> > > NULL, &link->dai_fmt);
> > > --
> > > 2.34.1
> > >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] ASoC: imx-card: support playback or capture only
2025-02-11 3:57 [PATCH 0/2] ASoC: imx-card: support playback or capture only Shengjiu Wang
2025-02-11 3:57 ` [PATCH 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property Shengjiu Wang
2025-02-11 3:57 ` [PATCH 2/2] ASoC: imx-card: Add playback_only or capture_only support Shengjiu Wang
@ 2025-02-11 13:06 ` Daniel Baluta
2025-02-25 17:03 ` Mark Brown
3 siblings, 0 replies; 11+ messages in thread
From: Daniel Baluta @ 2025-02-11 13:06 UTC (permalink / raw)
To: Shengjiu Wang
Cc: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree
On Tue, Feb 11, 2025 at 5:58 AM Shengjiu Wang <shengjiu.wang@nxp.com> wrote:
>
> Be similar to audio graph card, support playback or capture only
> for imx-audio-card.
>
> Shengjiu Wang (2):
> ASoC: dt-bindings: imx-card: Add playback-only and capture-only
> property
> ASoC: imx-card: Add playback_only or capture_only support
>
> .../devicetree/bindings/sound/imx-audio-card.yaml | 8 ++++++++
> sound/soc/fsl/imx-card.c | 5 +++++
> 2 files changed, 13 insertions(+)
For entire patchseries,
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/2] ASoC: imx-card: support playback or capture only
2025-02-11 3:57 [PATCH 0/2] ASoC: imx-card: support playback or capture only Shengjiu Wang
` (2 preceding siblings ...)
2025-02-11 13:06 ` [PATCH 0/2] ASoC: imx-card: support playback or capture only Daniel Baluta
@ 2025-02-25 17:03 ` Mark Brown
3 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2025-02-25 17:03 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
perex, tiwai, shawnguo, s.hauer, kernel, linux-sound,
linuxppc-dev, imx, linux-arm-kernel, linux-kernel, robh, krzk+dt,
conor+dt, devicetree, Shengjiu Wang
On Tue, 11 Feb 2025 11:57:35 +0800, Shengjiu Wang wrote:
> Be similar to audio graph card, support playback or capture only
> for imx-audio-card.
>
> Shengjiu Wang (2):
> ASoC: dt-bindings: imx-card: Add playback-only and capture-only
> property
> ASoC: imx-card: Add playback_only or capture_only support
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property
commit: 8c6ede5cc4226fd841f252d02ab0372cb92ee75c
[2/2] ASoC: imx-card: Add playback_only or capture_only support
commit: 1877c3e7937fb2b9373ba263a4900448d50917b7
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 11+ messages in thread