mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-02 08:32:55 +00:00

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> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20250217021715.284951-2-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
132 lines
3.0 KiB
YAML
132 lines
3.0 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/sound/imx-audio-card.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: NXP i.MX audio sound card.
|
|
|
|
maintainers:
|
|
- Shengjiu Wang <shengjiu.wang@nxp.com>
|
|
|
|
allOf:
|
|
- $ref: sound-card-common.yaml#
|
|
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- fsl,imx-audio-card
|
|
|
|
patternProperties:
|
|
".*-dai-link$":
|
|
description:
|
|
Each subnode represents a dai link. Subnodes of each dai links would be
|
|
cpu/codec dais.
|
|
|
|
type: object
|
|
|
|
properties:
|
|
link-name:
|
|
description: Indicates dai-link name and PCM stream name.
|
|
$ref: /schemas/types.yaml#/definitions/string
|
|
maxItems: 1
|
|
|
|
format:
|
|
description: audio format.
|
|
items:
|
|
enum:
|
|
- i2s
|
|
- dsp_b
|
|
|
|
dai-tdm-slot-num:
|
|
description: see tdm-slot.txt.
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
|
|
dai-tdm-slot-width:
|
|
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
|
|
additionalProperties: false
|
|
properties:
|
|
sound-dai:
|
|
maxItems: 1
|
|
|
|
codec:
|
|
description: Holds subnode which indicates codec dai.
|
|
type: object
|
|
additionalProperties: false
|
|
properties:
|
|
sound-dai:
|
|
minItems: 1
|
|
maxItems: 2
|
|
|
|
fsl,mclk-equal-bclk:
|
|
description: Indicates mclk can be equal to bclk, especially for sai interface
|
|
$ref: /schemas/types.yaml#/definitions/flag
|
|
|
|
required:
|
|
- link-name
|
|
- cpu
|
|
|
|
allOf:
|
|
- not:
|
|
required:
|
|
- playback-only
|
|
- capture-only
|
|
|
|
additionalProperties: false
|
|
|
|
required:
|
|
- compatible
|
|
|
|
unevaluatedProperties: false
|
|
|
|
examples:
|
|
- |
|
|
sound-ak4458 {
|
|
compatible = "fsl,imx-audio-card";
|
|
model = "ak4458-audio";
|
|
pri-dai-link {
|
|
link-name = "akcodec";
|
|
format = "i2s";
|
|
fsl,mclk-equal-bclk;
|
|
cpu {
|
|
sound-dai = <&sai1>;
|
|
};
|
|
codec {
|
|
sound-dai = <&ak4458_1>, <&ak4458_2>;
|
|
};
|
|
};
|
|
fe-dai-link {
|
|
link-name = "HiFi-ASRC-FE";
|
|
format = "i2s";
|
|
cpu {
|
|
sound-dai = <&easrc>;
|
|
};
|
|
};
|
|
be-dai-link {
|
|
link-name = "HiFi-ASRC-BE";
|
|
format = "dsp_b";
|
|
dai-tdm-slot-num = <8>;
|
|
dai-tdm-slot-width = <32>;
|
|
fsl,mclk-equal-bclk;
|
|
cpu {
|
|
sound-dai = <&sai1>;
|
|
};
|
|
codec {
|
|
sound-dai = <&ak4458_1>, <&ak4458_2>;
|
|
};
|
|
};
|
|
};
|