* [PATCH v2 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property
2025-02-14 7:05 [PATCH v2 0/2] ASoC: imx-card: support playback or capture only Shengjiu Wang
@ 2025-02-14 7:05 ` Shengjiu Wang
2025-02-14 8:40 ` Krzysztof Kozlowski
2025-02-14 7:05 ` [PATCH v2 2/2] ASoC: imx-card: Add playback_only or capture_only support Shengjiu Wang
2025-02-14 12:49 ` [PATCH v2 0/2] ASoC: imx-card: support playback or capture only Iuliana Prodan
2 siblings, 1 reply; 5+ messages in thread
From: Shengjiu Wang @ 2025-02-14 7:05 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>
Reviewed-by: Daniel Baluta <daniel.baluta@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] 5+ messages in thread
* Re: [PATCH v2 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property
2025-02-14 7:05 ` [PATCH v2 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property Shengjiu Wang
@ 2025-02-14 8:40 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-14 8:40 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 Fri, Feb 14, 2025 at 03:05:32PM +0800, Shengjiu Wang wrote:
> 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:
Aren't these mutually exclusive? If so, you need proper schema for this.
https://lore.kernel.org/all/20230118163208.GA117919-robh@kernel.org/
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ASoC: imx-card: Add playback_only or capture_only support
2025-02-14 7:05 [PATCH v2 0/2] ASoC: imx-card: support playback or capture only Shengjiu Wang
2025-02-14 7:05 ` [PATCH v2 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property Shengjiu Wang
@ 2025-02-14 7:05 ` Shengjiu Wang
2025-02-14 12:49 ` [PATCH v2 0/2] ASoC: imx-card: support playback or capture only Iuliana Prodan
2 siblings, 0 replies; 5+ messages in thread
From: Shengjiu Wang @ 2025-02-14 7:05 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>
Reviewed-by: Daniel Baluta <daniel.baluta@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] 5+ messages in thread
* Re: [PATCH v2 0/2] ASoC: imx-card: support playback or capture only
2025-02-14 7:05 [PATCH v2 0/2] ASoC: imx-card: support playback or capture only Shengjiu Wang
2025-02-14 7:05 ` [PATCH v2 1/2] ASoC: dt-bindings: imx-card: Add playback-only and capture-only property Shengjiu Wang
2025-02-14 7:05 ` [PATCH v2 2/2] ASoC: imx-card: Add playback_only or capture_only support Shengjiu Wang
@ 2025-02-14 12:49 ` Iuliana Prodan
2 siblings, 0 replies; 5+ messages in thread
From: Iuliana Prodan @ 2025-02-14 12:49 UTC (permalink / raw)
To: Shengjiu Wang, 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 2/14/2025 9:05 AM, Shengjiu Wang wrote:
> Be similar to audio graph card, support playback or capture only for
> imx-audio-card.
>
> imx-card can't directly refer to audio-graph-port.yaml, because it is
> not based on 'ports'. Add playback-only and capture-only property
> directly
>
> changes in v2:
> - wrap at 75 chars for commit messages
>
> 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 the series:
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Thanks,
Iulia
^ permalink raw reply [flat|nested] 5+ messages in thread