Commit 1bdb7836 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-v6.3' of...

Merge tag 'asoc-v6.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v6.3

There's been quite a lot of activity this release, but not really
one big feature - lots of new devices, plus a lot of cleanup and
modernisation work spread throughout the subsystem:

 - More factoring out of common operations into helper functions
   by Morimoto-san.
 - DT schema conversons and stylistic nits.
 - Continued work on building out the new SOF IPC4 scheme.
 - Support for Awinc AT88395, Infineon PEB2466, Iron Device
   SMA1303, Mediatek MT8188, Realtek RT712, Renesas IDT821034,
   Samsung/Tesla FSD SoC I2S, and TI TAS5720A-Q1.
parents 5661706e 76f5aaab
......@@ -15,7 +15,9 @@ description: |
properties:
compatible:
const: mediatek,mt8186-dsp
enum:
- mediatek,mt8186-dsp
- mediatek,mt8188-dsp
reg:
items:
......
Analog Devices ADAU7002 Stereo PDM-to-I2S/TDM Converter
Required properties:
- compatible: Must be "adi,adau7002"
Optional properties:
- IOVDD-supply: Phandle and specifier for the power supply providing the IOVDD
supply as covered in Documentation/devicetree/bindings/regulator/regulator.txt
If this property is not present it is assumed that the supply pin is
hardwired to always on.
Example:
adau7002: pdm-to-i2s {
compatible = "adi,adau7002";
IOVDD-supply = <&supply>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,adau7002.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices ADAU7002 Stereo PDM-to-I2S/TDM Converter
maintainers:
- Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: adi,adau7002
IOVDD-supply:
description:
IOVDD power supply, if skipped then it is assumed that the supply pin is
hardwired to always on.
wakeup-delay-ms:
description:
Delay after power up needed for device to settle.
required:
- compatible
unevaluatedProperties: false
examples:
- |
audio-codec {
compatible = "adi,adau7002";
IOVDD-supply = <&pp1800_l15a>;
#sound-dai-cells = <0>;
wakeup-delay-ms = <80>;
};
......@@ -25,6 +25,13 @@ properties:
"#sound-dai-cells":
const: 0
ports:
$ref: audio-graph-port.yaml#/definitions/ports
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
patternProperties:
"^asahi-kasei,in[1-2]-single-end$":
description: Input Pin 1 - 2.
......
* Amlogic Audio FIFO controllers
Required properties:
- compatible: 'amlogic,axg-toddr' or
'amlogic,axg-toddr' or
'amlogic,g12a-frddr' or
'amlogic,g12a-toddr' or
'amlogic,sm1-frddr' or
'amlogic,sm1-toddr'
- reg: physical base address of the controller and length of memory
mapped region.
- interrupts: interrupt specifier for the fifo.
- clocks: phandle to the fifo peripheral clock provided by the audio
clock controller.
- resets: list of reset phandle, one for each entry reset-names.
- reset-names: should contain the following:
* "arb" : memory ARB line (required)
* "rst" : dedicated device reset line (optional)
- #sound-dai-cells: must be 0.
- amlogic,fifo-depth: The size of the controller's fifo in bytes. This
is useful for determining certain configuration such
as the flush threshold of the fifo
Example of FRDDR A on the A113 SoC:
frddr_a: audio-controller@1c0 {
compatible = "amlogic,axg-frddr";
reg = <0x0 0x1c0 0x0 0x1c>;
#sound-dai-cells = <0>;
interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
resets = <&arb AXG_ARB_FRDDR_A>;
fifo-depth = <512>;
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,axg-fifo.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic AXG Audio FIFO controllers
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
compatible:
oneOf:
- enum:
- amlogic,axg-toddr
- amlogic,axg-frddr
- items:
- enum:
- amlogic,g12a-toddr
- amlogic,sm1-toddr
- const: amlogic,axg-toddr
- items:
- enum:
- amlogic,g12a-frddr
- amlogic,sm1-frddr
- const: amlogic,axg-frddr
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
clocks:
items:
- description: Peripheral clock
interrupts:
maxItems: 1
resets:
minItems: 1
maxItems: 2
reset-names:
minItems: 1
maxItems: 2
amlogic,fifo-depth:
$ref: /schemas/types.yaml#/definitions/uint32
description: Size of the controller's fifo in bytes
required:
- compatible
- reg
- "#sound-dai-cells"
- clocks
- interrupts
- resets
- amlogic,fifo-depth
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- amlogic,g12a-toddr
- amlogic,sm1-toddr
- amlogic,g12a-frddr
- amlogic,sm1-frddr
then:
properties:
resets:
minItems: 2
reset-names:
items:
- const: arb
- const: rst
required:
- reset-names
else:
properties:
resets:
maxItems: 1
reset-names:
const: arb
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/axg-audio-clkc.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
audio-controller@1c0 {
compatible = "amlogic,g12a-frddr", "amlogic,axg-frddr";
reg = <0x1c0 0x1c>;
#sound-dai-cells = <0>;
clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
resets = <&arb>, <&clkc_audio AUD_RESET_FRDDR_A>;
reset-names = "arb", "rst";
amlogic,fifo-depth = <512>;
};
* Amlogic Audio PDM input
Required properties:
- compatible: 'amlogic,axg-pdm' or
'amlogic,g12a-pdm' or
'amlogic,sm1-pdm'
- reg: physical base address of the controller and length of memory
mapped region.
- clocks: list of clock phandle, one for each entry clock-names.
- clock-names: should contain the following:
* "pclk" : peripheral clock.
* "dclk" : pdm digital clock
* "sysclk" : dsp system clock
- #sound-dai-cells: must be 0.
Optional property:
- resets: phandle to the dedicated reset line of the pdm input.
Example of PDM on the A113 SoC:
pdm: audio-controller@ff632000 {
compatible = "amlogic,axg-pdm";
reg = <0x0 0xff632000 0x0 0x34>;
#sound-dai-cells = <0>;
clocks = <&clkc_audio AUD_CLKID_PDM>,
<&clkc_audio AUD_CLKID_PDM_DCLK>,
<&clkc_audio AUD_CLKID_PDM_SYSCLK>;
clock-names = "pclk", "dclk", "sysclk";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,axg-pdm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Audio AXG PDM input
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
compatible:
oneOf:
- items:
- enum:
- amlogic,g12a-pdm
- amlogic,sm1-pdm
- const: amlogic,axg-pdm
- const: amlogic,axg-pdm
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
clocks:
items:
- description: Peripheral clock
- description: PDM digital clock
- description: DSP system clock
clock-names:
items:
- const: pclk
- const: dclk
- const: sysclk
resets:
maxItems: 1
required:
- compatible
- reg
- "#sound-dai-cells"
- clocks
- clock-names
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- amlogic,g12a-pdm
- amlogic,sm1-pdm
then:
required:
- resets
else:
properties:
resets: false
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/axg-audio-clkc.h>
audio-controller@ff632000 {
compatible = "amlogic,axg-pdm";
reg = <0xff632000 0x34>;
#sound-dai-cells = <0>;
clocks = <&clkc_audio AUD_CLKID_PDM>,
<&clkc_audio AUD_CLKID_PDM_DCLK>,
<&clkc_audio AUD_CLKID_PDM_SYSCLK>;
clock-names = "pclk", "dclk", "sysclk";
};
Amlogic AXG sound card:
Required properties:
- compatible: "amlogic,axg-sound-card"
- model : User specified audio sound card name, one string
Optional properties:
- audio-aux-devs : List of phandles pointing to auxiliary devices
- audio-widgets : Please refer to widgets.txt.
- audio-routing : A list of the connections between audio components.
Subnodes:
- dai-link: Container for dai-link level properties and the CODEC
sub-nodes. There should be at least one (and probably more)
subnode of this type.
Required dai-link properties:
- sound-dai: phandle and port of the CPU DAI.
Required TDM Backend dai-link properties:
- dai-format : CPU/CODEC common audio format
Optional TDM Backend dai-link properties:
- dai-tdm-slot-rx-mask-{0,1,2,3}: Receive direction slot masks
- dai-tdm-slot-tx-mask-{0,1,2,3}: Transmit direction slot masks
When omitted, mask is assumed to have to no
slots. A valid must have at one slot, so at
least one these mask should be provided with
an enabled slot.
- dai-tdm-slot-num : Please refer to tdm-slot.txt.
If omitted, slot number is set to accommodate the largest
mask provided.
- dai-tdm-slot-width : Please refer to tdm-slot.txt. default to 32 if omitted.
- mclk-fs : Multiplication factor between stream rate and mclk
Backend dai-link subnodes:
- codec: dai-link representing backend links should have at least one subnode.
One subnode for each codec of the dai-link.
dai-link representing frontend links have no codec, therefore have no
subnodes
Required codec subnodes properties:
- sound-dai: phandle and port of the CODEC DAI.
Optional codec subnodes properties:
- dai-tdm-slot-tx-mask : Please refer to tdm-slot.txt.
- dai-tdm-slot-rx-mask : Please refer to tdm-slot.txt.
Example:
sound {
compatible = "amlogic,axg-sound-card";
model = "AXG-S420";
audio-aux-devs = <&tdmin_a>, <&tdmout_c>;
audio-widgets = "Line", "Lineout",
"Line", "Linein",
"Speaker", "Speaker1 Left",
"Speaker", "Speaker1 Right";
"Speaker", "Speaker2 Left",
"Speaker", "Speaker2 Right";
audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
"SPDIFOUT IN 0", "FRDDR_A OUT 3",
"TDM_C Playback", "TDMOUT_C OUT",
"TDMIN_A IN 2", "TDM_C Capture",
"TDMIN_A IN 5", "TDM_C Loopback",
"TODDR_A IN 0", "TDMIN_A OUT",
"Lineout", "Lineout AOUTL",
"Lineout", "Lineout AOUTR",
"Speaker1 Left", "SPK1 OUT_A",
"Speaker2 Left", "SPK2 OUT_A",
"Speaker1 Right", "SPK1 OUT_B",
"Speaker2 Right", "SPK2 OUT_B",
"Linein AINL", "Linein",
"Linein AINR", "Linein";
dai-link@0 {
sound-dai = <&frddr_a>;
};
dai-link@1 {
sound-dai = <&toddr_a>;
};
dai-link@2 {
sound-dai = <&tdmif_c>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-2 = <1 1>;
dai-tdm-slot-tx-mask-3 = <1 1>;
dai-tdm-slot-rx-mask-1 = <1 1>;
mclk-fs = <256>;
codec@0 {
sound-dai = <&lineout>;
};
codec@1 {
sound-dai = <&speaker_amp1>;
};
codec@2 {
sound-dai = <&speaker_amp2>;
};
codec@3 {
sound-dai = <&linein>;
};
};
dai-link@3 {
sound-dai = <&spdifout>;
codec {
sound-dai = <&spdif_dit>;
};
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,axg-sound-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic AXG sound card
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
compatible:
const: amlogic,axg-sound-card
audio-aux-devs:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: list of auxiliary devices
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
A list of the connections between audio components. Each entry is a
pair of strings, the first being the connection's sink, the second
being the connection's source.
audio-widgets:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
A list off component DAPM widget. Each entry is a pair of strings,
the first being the widget type, the second being the widget name
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
patternProperties:
"^dai-link-[0-9]+$":
type: object
additionalProperties: false
description:
Container for dai-link level properties and the CODEC sub-nodes.
There should be at least one (and probably more) subnode of this type
properties:
dai-format:
$ref: /schemas/types.yaml#/definitions/string
enum: [ i2s, left-j, dsp_a ]
dai-tdm-slot-num:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Number of slots in use. If omitted, slot number is set to
accommodate the largest mask provided.
maximum: 32
dai-tdm-slot-width:
$ref: /schemas/types.yaml#/definitions/uint32
description: Width in bits for each slot
enum: [ 8, 16, 20, 24, 32 ]
default: 32
mclk-fs:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Multiplication factor between the frame rate and master clock
rate
sound-dai:
maxItems: 1
description: phandle of the CPU DAI
patternProperties:
"^dai-tdm-slot-(t|r)x-mask-[0-3]$":
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 32
description:
Transmit and receive cpu slot masks of each TDM lane
When omitted, mask is assumed to have to no slots. A valid
interface must have at least one slot, so at least one these
mask should be provided with an enabled slot.
"^codec(-[0-9]+)?$":
type: object
additionalProperties: false
description:
dai-link representing backend links should have at least one subnode.
One subnode for each codec of the dai-link. dai-link representing
frontend links have no codec, therefore have no subnodes
properties:
sound-dai:
maxItems: 1
description: phandle of the codec DAI
patternProperties:
"^dai-tdm-slot-(t|r)x-mask$":
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 32
description: Transmit and receive codec slot masks
required:
- sound-dai
required:
- sound-dai
required:
- model
- dai-link-0
unevaluatedProperties: false
examples:
- |
sound {
compatible = "amlogic,axg-sound-card";
model = "AXG-S420";
audio-aux-devs = <&tdmin_a>, <&tdmout_c>;
audio-widgets = "Line", "Lineout",
"Line", "Linein",
"Speaker", "Speaker1 Left",
"Speaker", "Speaker1 Right",
"Speaker", "Speaker2 Left",
"Speaker", "Speaker2 Right";
audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2",
"SPDIFOUT IN 0", "FRDDR_A OUT 3",
"TDM_C Playback", "TDMOUT_C OUT",
"TDMIN_A IN 2", "TDM_C Capture",
"TDMIN_A IN 5", "TDM_C Loopback",
"TODDR_A IN 0", "TDMIN_A OUT",
"Lineout", "Lineout AOUTL",
"Lineout", "Lineout AOUTR",
"Speaker1 Left", "SPK1 OUT_A",
"Speaker2 Left", "SPK2 OUT_A",
"Speaker1 Right", "SPK1 OUT_B",
"Speaker2 Right", "SPK2 OUT_B",
"Linein AINL", "Linein",
"Linein AINR", "Linein";
dai-link-0 {
sound-dai = <&frddr_a>;
};
dai-link-1 {
sound-dai = <&toddr_a>;
};
dai-link-2 {
sound-dai = <&tdmif_c>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-2 = <1 1>;
dai-tdm-slot-tx-mask-3 = <1 1>;
dai-tdm-slot-rx-mask-1 = <1 1>;
mclk-fs = <256>;
codec-0 {
sound-dai = <&lineout>;
};
codec-1 {
sound-dai = <&speaker_amp1>;
};
codec-2 {
sound-dai = <&speaker_amp2>;
};
codec-3 {
sound-dai = <&linein>;
};
};
dai-link-3 {
sound-dai = <&spdifout>;
codec {
sound-dai = <&spdif_dit>;
};
};
};
* Amlogic Audio SPDIF Input
Required properties:
- compatible: 'amlogic,axg-spdifin' or
'amlogic,g12a-spdifin' or
'amlogic,sm1-spdifin'
- interrupts: interrupt specifier for the spdif input.
- clocks: list of clock phandle, one for each entry clock-names.
- clock-names: should contain the following:
* "pclk" : peripheral clock.
* "refclk" : spdif input reference clock
- #sound-dai-cells: must be 0.
Optional property:
- resets: phandle to the dedicated reset line of the spdif input.
Example on the A113 SoC:
spdifin: audio-controller@400 {
compatible = "amlogic,axg-spdifin";
reg = <0x0 0x400 0x0 0x30>;
#sound-dai-cells = <0>;
interrupts = <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
<&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
clock-names = "pclk", "refclk";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifin.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Audio AXG SPDIF Input
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
compatible:
oneOf:
- const: amlogic,axg-spdifin
- items:
- enum:
- amlogic,g12a-spdifin
- amlogic,sm1-spdifin
- const: amlogic,axg-spdifin
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
clocks:
items:
- description: Peripheral clock
- description: SPDIF input reference clock
clock-names:
items:
- const: pclk
- const: refclk
interrupts:
maxItems: 1
resets:
maxItems: 1
required:
- compatible
- reg
- "#sound-dai-cells"
- clocks
- clock-names
- interrupts
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- amlogic,g12a-spdifin
- amlogic,sm1-spdifin
then:
required:
- resets
else:
properties:
resets: false
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/axg-audio-clkc.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
audio-controller@400 {
compatible = "amlogic,axg-spdifin";
reg = <0x400 0x30>;
#sound-dai-cells = <0>;
interrupts = <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
<&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
clock-names = "pclk", "refclk";
};
* Amlogic Audio SPDIF Output
Required properties:
- compatible: 'amlogic,axg-spdifout' or
'amlogic,g12a-spdifout' or
'amlogic,sm1-spdifout'
- clocks: list of clock phandle, one for each entry clock-names.
- clock-names: should contain the following:
* "pclk" : peripheral clock.
* "mclk" : master clock
- #sound-dai-cells: must be 0.
Optional property:
- resets: phandle to the dedicated reset line of the spdif output.
Example on the A113 SoC:
spdifout: audio-controller@480 {
compatible = "amlogic,axg-spdifout";
reg = <0x0 0x480 0x0 0x50>;
#sound-dai-cells = <0>;
clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
<&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
clock-names = "pclk", "mclk";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifout.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Audio AXG SPDIF Output
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
compatible:
oneOf:
- const: amlogic,axg-spdifout
- items:
- enum:
- amlogic,g12a-spdifout
- amlogic,sm1-spdifout
- const: amlogic,axg-spdifout
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
clocks:
items:
- description: Peripheral clock
- description: SPDIF output master clock
clock-names:
items:
- const: pclk
- const: mclk
resets:
maxItems: 1
required:
- compatible
- reg
- "#sound-dai-cells"
- clocks
- clock-names
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- amlogic,g12a-spdifout
- amlogic,sm1-spdifout
then:
required:
- resets
else:
properties:
resets: false
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/axg-audio-clkc.h>
audio-controller@480 {
compatible = "amlogic,axg-spdifout";
reg = <0x480 0x50>;
#sound-dai-cells = <0>;
clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
<&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
clock-names = "pclk", "mclk";
};
* Amlogic Audio TDM formatters
Required properties:
- compatible: 'amlogic,axg-tdmin' or
'amlogic,axg-tdmout' or
'amlogic,g12a-tdmin' or
'amlogic,g12a-tdmout' or
'amlogic,sm1-tdmin' or
'amlogic,sm1-tdmout
- reg: physical base address of the controller and length of memory
mapped region.
- clocks: list of clock phandle, one for each entry clock-names.
- clock-names: should contain the following:
* "pclk" : peripheral clock.
* "sclk" : bit clock.
* "sclk_sel" : bit clock input multiplexer.
* "lrclk" : sample clock
* "lrclk_sel": sample clock input multiplexer
Optional property:
- resets: phandle to the dedicated reset line of the tdm formatter.
Example of TDMOUT_A on the S905X2 SoC:
tdmout_a: audio-controller@500 {
compatible = "amlogic,axg-tdmout";
reg = <0x0 0x500 0x0 0x40>;
resets = <&clkc_audio AUD_RESET_TDMOUT_A>;
clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
<&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
<&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
<&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
<&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
clock-names = "pclk", "sclk", "sclk_sel",
"lrclk", "lrclk_sel";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Audio AXG TDM formatters
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
compatible:
enum:
- amlogic,g12a-tdmout
- amlogic,sm1-tdmout
- amlogic,axg-tdmout
- amlogic,g12a-tdmin
- amlogic,sm1-tdmin
- amlogic,axg-tdmin
clocks:
items:
- description: Peripheral clock
- description: Bit clock
- description: Bit clock input multiplexer
- description: Sample clock
- description: Sample clock input multiplexer
clock-names:
items:
- const: pclk
- const: sclk
- const: sclk_sel
- const: lrclk
- const: lrclk_sel
reg:
maxItems: 1
resets:
maxItems: 1
required:
- compatible
- reg
- clocks
- clock-names
allOf:
- $ref: component-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- amlogic,g12a-tdmin
- amlogic,sm1-tdmin
- amlogic,g12a-tdmout
- amlogic,sm1-tdmout
then:
required:
- resets
else:
properties:
resets: false
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/axg-audio-clkc.h>
#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
audio-controller@500 {
compatible = "amlogic,g12a-tdmout";
reg = <0x500 0x40>;
resets = <&clkc_audio AUD_RESET_TDMOUT_A>;
clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
<&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
<&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
<&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
<&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
clock-names = "pclk", "sclk", "sclk_sel",
"lrclk", "lrclk_sel";
};
* Amlogic Audio TDM Interfaces
Required properties:
- compatible: 'amlogic,axg-tdm-iface'
- clocks: list of clock phandle, one for each entry clock-names.
- clock-names: should contain the following:
* "sclk" : bit clock.
* "lrclk": sample clock
* "mclk" : master clock
-> optional if the interface is in clock slave mode.
- #sound-dai-cells: must be 0.
Example of TDM_A on the A113 SoC:
tdmif_a: audio-controller@0 {
compatible = "amlogic,axg-tdm-iface";
#sound-dai-cells = <0>;
clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
<&clkc_audio AUD_CLKID_MST_A_SCLK>,
<&clkc_audio AUD_CLKID_MST_A_LRCLK>;
clock-names = "mclk", "sclk", "lrclk";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Audio TDM Interfaces
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: amlogic,axg-tdm-iface
"#sound-dai-cells":
const: 0
clocks:
minItems: 2
items:
- description: Bit clock
- description: Sample clock
- description: Master clock #optional
clock-names:
minItems: 2
items:
- const: sclk
- const: lrclk
- const: mclk
required:
- compatible
- "#sound-dai-cells"
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/axg-audio-clkc.h>
audio-controller {
compatible = "amlogic,axg-tdm-iface";
#sound-dai-cells = <0>;
clocks = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
<&clkc_audio AUD_CLKID_MST_A_LRCLK>,
<&clkc_audio AUD_CLKID_MST_A_MCLK>;
clock-names = "sclk", "lrclk", "mclk";
};
......@@ -62,7 +62,7 @@ patternProperties:
description: phandle of the CPU DAI
patternProperties:
"^codec-[0-9]+$":
"^codec(-[0-9]+)?$":
type: object
additionalProperties: false
description: |-
......
......@@ -11,32 +11,24 @@ maintainers:
select: false
allOf:
- $ref: /schemas/graph.yaml#/$defs/port-base
properties:
prefix:
description: "device name prefix"
$ref: /schemas/types.yaml#/definitions/string
definitions:
port-base:
$ref: /schemas/graph.yaml#/$defs/port-base
properties:
convert-rate:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
convert-channels:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
convert-sample-format:
$ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
mclk-fs:
$ref: "simple-card.yaml#/definitions/mclk-fs"
patternProperties:
"^endpoint(@[0-9a-f]+)?":
endpoint-base:
$ref: /schemas/graph.yaml#/$defs/endpoint-base
unevaluatedProperties: false
properties:
mclk-fs:
description: |
Multiplication factor between stream rate and codec mclk.
When defined, mclk-fs property defined in dai-link sub nodes are
ignored.
$ref: /schemas/types.yaml#/definitions/uint32
$ref: "simple-card.yaml#/definitions/mclk-fs"
frame-inversion:
description: dai-link uses frame clock inversion
$ref: /schemas/types.yaml#/definitions/flag
......@@ -53,6 +45,15 @@ patternProperties:
oneOf:
- $ref: /schemas/types.yaml#/definitions/flag
- $ref: /schemas/types.yaml#/definitions/phandle
clocks:
description: Indicates system clock
$ref: /schemas/types.yaml#/definitions/phandle
system-clock-frequency:
$ref: "simple-card.yaml#/definitions/system-clock-frequency"
system-clock-direction-out:
$ref: "simple-card.yaml#/definitions/system-clock-direction-out"
system-clock-fixed:
$ref: "simple-card.yaml#/definitions/system-clock-fixed"
dai-format:
description: audio format.
......@@ -100,4 +101,24 @@ patternProperties:
minimum: 1
maximum: 64
ports:
$ref: "#/definitions/port-base"
unevaluatedProperties: false
patternProperties:
"^port(@[0-9a-f]+)?$":
$ref: "#/definitions/port-base"
unevaluatedProperties: false
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: "#/definitions/endpoint-base"
unevaluatedProperties: false
allOf:
- $ref: "#/definitions/port-base"
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: "#/definitions/endpoint-base"
unevaluatedProperties: false
additionalProperties: true
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/awinic,aw88395.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Awinic AW88395 Smart Audio Amplifier
maintainers:
- Weidong Wang <wangweidong.a@awinic.com>
description:
The Awinic AW88395 is an I2S/TDM input, high efficiency
digital Smart K audio amplifier with an integrated 10.25V
smart boost convert.
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: awinic,aw88395
reg:
maxItems: 1
'#sound-dai-cells':
const: 0
reset-gpios:
maxItems: 1
required:
- compatible
- reg
- '#sound-dai-cells'
- reset-gpios
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@34 {
compatible = "awinic,aw88395";
reg = <0x34>;
#sound-dai-cells = <0>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
};
......@@ -22,6 +22,9 @@ properties:
reg:
maxItems: 1
interrupts:
maxItems: 1
'#sound-dai-cells':
description:
The first cell indicating the audio interface.
......@@ -42,7 +45,7 @@ properties:
Configures the peak current by monitoring the current through the boost FET.
Range starts at 1600 mA and goes to a maximum of 4500 mA with increments
of 50 mA. See section 4.3.6 of the datasheet for details.
$ref: "/schemas/types.yaml#/definitions/uint32"
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1600
maximum: 4500
default: 4500
......@@ -51,7 +54,7 @@ properties:
description:
Boost inductor value, expressed in nH. Valid
values include 1000, 1200, 1500 and 2200.
$ref: "/schemas/types.yaml#/definitions/uint32"
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1000
maximum: 2200
......@@ -60,7 +63,7 @@ properties:
Total equivalent boost capacitance on the VBST
and VAMP pins, derated at 11 volts DC. The value must be rounded to the
nearest integer and expressed in uF.
$ref: "/schemas/types.yaml#/definitions/uint32"
$ref: /schemas/types.yaml#/definitions/uint32
cirrus,asp-sdout-hiz:
description:
......@@ -70,7 +73,7 @@ properties:
1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled
2 = (Default) Logic 0 during unused slots, but Hi-Z while all transmit channels disabled
3 = Hi-Z during unused slots and while all transmit channels disabled
$ref: "/schemas/types.yaml#/definitions/uint32"
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 3
default: 2
......@@ -84,7 +87,7 @@ properties:
enable boost voltage.
0 = Internal Boost
1 = External Boost
$ref: "/schemas/types.yaml#/definitions/uint32"
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 1
......@@ -109,7 +112,7 @@ properties:
1 = GPIO
2 = Sync
3 = MCLK input
$ref: "/schemas/types.yaml#/definitions/uint32"
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 3
......@@ -136,7 +139,7 @@ properties:
3 = MCLK input
4 = Push-pull INTB (active low)
5 = Push-pull INT (active high)
$ref: "/schemas/types.yaml#/definitions/uint32"
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 5
......@@ -176,17 +179,19 @@ unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
cs35l41: cs35l41@2 {
cs35l41: speaker-amp@2 {
#sound-dai-cells = <1>;
compatible = "cirrus,cs35l41";
reg = <2>;
VA-supply = <&dummy_vreg>;
VP-supply = <&dummy_vreg>;
reset-gpios = <&gpio 110 0>;
reset-gpios = <&gpio 110 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4500>;
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/component-common.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Audio Component Common Properties
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
sound-name-prefix:
$ref: /schemas/types.yaml#/definitions/string
description: |
Card implementing the routing property define the connection between
audio components as list of string pair. Component using the same
sink/source names may use this property to prepend the name of their
sinks/sources with the provided string.
additionalProperties: true
......@@ -9,15 +9,10 @@ title: Digital Audio Interface Common Properties
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
properties:
sound-name-prefix:
$ref: /schemas/types.yaml#/definitions/string
description: |
Card implementing the routing property define the connection between
audio components as list of string pair. Component using the same
sink/source names may use this property to prepend the name of their
sinks/sources with the provided string.
allOf:
- $ref: component-common.yaml#
properties:
'#sound-dai-cells': true
additionalProperties: true
......@@ -76,10 +76,14 @@ properties:
minItems: 4
dmas:
maxItems: 2
items:
- description: DMA controller phandle and request line for RX
- description: DMA controller phandle and request line for TX
dma-names:
maxItems: 2
items:
- const: rx
- const: tx
interrupts:
items:
......@@ -142,31 +146,6 @@ properties:
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
const: fsl,vf610-sai
then:
properties:
dmas:
items:
- description: DMA controller phandle and request line for TX
- description: DMA controller phandle and request line for RX
dma-names:
items:
- const: tx
- const: rx
else:
properties:
dmas:
items:
- description: DMA controller phandle and request line for RX
- description: DMA controller phandle and request line for TX
dma-names:
items:
- const: rx
- const: tx
- if:
required:
- fsl,sai-asynchronous
......@@ -199,9 +178,8 @@ examples:
<&clks VF610_CLK_SAI2>,
<&clks 0>, <&clks 0>;
clock-names = "bus", "mclk1", "mclk2", "mclk3";
dma-names = "tx", "rx";
dmas = <&edma0 0 21>,
<&edma0 0 20>;
dma-names = "rx", "tx";
dmas = <&edma0 0 20>, <&edma0 0 21>;
big-endian;
lsb-first;
};
......
......@@ -21,6 +21,7 @@ properties:
compatible:
enum:
- fsl,imx8mp-xcvr
- fsl,imx93-xcvr
reg:
items:
......
......@@ -75,6 +75,18 @@ patternProperties:
additionalProperties: false
platform:
description: Holds subnode which includes the phandle of q6apm platform device.
type: object
properties:
sound-dai:
maxItems: 1
required:
- sound-dai
additionalProperties: false
required:
- link-name
- cpu
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/infineon,peb2466.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Infineon PEB2466 codec
maintainers:
- Herve Codina <herve.codina@bootlin.com>
description: |
The Infineon PEB2466 codec is a programmable DSP-based four channels codec
with filters capabilities.
The time-slots used by the codec must be set and so, the properties
'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and
'dai-tdm-slot-rx-mask' must be present in the sound card node for sub-nodes
that involve the codec. The codec uses one 8bit time-slot per channel.
'dai-tdm-tdm-slot-with' must be set to 8.
The PEB2466 codec also supports 28 gpios (signaling pins).
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml
- $ref: dai-common.yaml#
properties:
compatible:
const: infineon,peb2466
reg:
description:
SPI device address.
maxItems: 1
clocks:
items:
- description: Master clock
clock-names:
items:
- const: mclk
spi-max-frequency:
maximum: 8192000
reset-gpios:
description:
GPIO used to reset the device.
maxItems: 1
firmware-name:
$ref: /schemas/types.yaml#/definitions/string
description:
Filters coefficients file to load. If this property is omitted, internal
filters are disabled.
'#sound-dai-cells':
const: 0
'#gpio-cells':
const: 2
gpio-controller: true
required:
- compatible
- reg
- '#sound-dai-cells'
- gpio-controller
- '#gpio-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@0 {
compatible = "infineon,peb2466";
reg = <0>;
spi-max-frequency = <8192000>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
#sound-dai-cells = <0>;
gpio-controller;
#gpio-cells = <2>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/irondevice,sma1303.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Iron Device SMA1303 Audio Amplifier
maintainers:
- Kiseok Jo <kiseok.jo@irondevice.com>
description:
SMA1303 digital class-D audio amplifier
with an integrated boost converter.
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- irondevice,sma1303
reg:
maxItems: 1
'#sound-dai-cells':
const: 1
required:
- compatible
- reg
- '#sound-dai-cells'
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
amplifier@1e {
compatible = "irondevice,sma1303";
reg = <0x1e>;
#sound-dai-cells = <1>;
};
};
MAX98090 audio CODEC
This device supports I2C only.
Required properties:
- compatible : "maxim,max98090" or "maxim,max98091".
- reg : The I2C address of the device.
- interrupts : The CODEC's interrupt output.
Optional properties:
- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"
- #sound-dai-cells : should be 0.
- maxim,dmic-freq: Frequency at which to clock DMIC
- maxim,micbias: Micbias voltage applies to the analog mic, valid voltages value are:
0 - 2.2v
1 - 2.55v
2 - 2.4v
3 - 2.8v
Pins on the device (for linking into audio routes):
* MIC1
* MIC2
* DMICL
* DMICR
* IN1
* IN2
* IN3
* IN4
* IN5
* IN6
* IN12
* IN34
* IN56
* HPL
* HPR
* SPKL
* SPKR
* RCVL
* RCVR
* MICBIAS
Example:
audio-codec@10 {
compatible = "maxim,max98090";
reg = <0x10>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(H, 4) IRQ_TYPE_LEVEL_HIGH>;
};
MAX98095 audio CODEC
This device supports I2C only.
Required properties:
- compatible : "maxim,max98095".
- reg : The I2C address of the device.
Optional properties:
- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"
Example:
max98095: codec@11 {
compatible = "maxim,max98095";
reg = <0x11>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98090.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Integrated MAX98090/MAX98091 audio codecs
maintainers:
- Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
description: |
Pins on the device (for linking into audio routes):
MIC1, MIC2, DMICL, DMICR, IN1, IN2, IN3, IN4, IN5, IN6, IN12, IN34, IN56,
HPL, HPR, SPKL, SPKR, RCVL, RCVR, MICBIAS
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- maxim,max98090
- maxim,max98091
reg:
maxItems: 1
clocks:
items:
- description: master clock
clock-names:
items:
- const: mclk
interrupts:
maxItems: 1
maxim,dmic-freq:
$ref: /schemas/types.yaml#/definitions/uint32
default: 2500000
description:
DMIC clock frequency
maxim,micbias:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [ 0, 1, 2, 3 ]
default: 3
description: |
Micbias voltage applied to the analog mic, valid voltages value are:
0 - 2.2v
1 - 2.55v
2 - 2.4v
3 - 2.8v
'#sound-dai-cells':
const: 0
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@10 {
compatible = "maxim,max98090";
reg = <0x10>;
interrupt-parent = <&gpx3>;
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
clocks = <&i2s0 0>;
clock-names = "mclk";
#sound-dai-cells = <0>;
};
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98095.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Integrated MAX98095 audio codec
maintainers:
- Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- maxim,max98095
reg:
maxItems: 1
clocks:
items:
- description: master clock
clock-names:
items:
- const: mclk
'#sound-dai-cells':
const: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@11 {
compatible = "maxim,max98095";
reg = <0x11>;
clocks = <&i2s0 0>;
clock-names = "mclk";
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mediatek,mt8188-afe.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek AFE PCM controller for mt8188
maintainers:
- Trevor Wu <trevor.wu@mediatek.com>
properties:
compatible:
const: mediatek,mt8188-afe
reg:
maxItems: 1
interrupts:
maxItems: 1
resets:
maxItems: 1
reset-names:
const: audiosys
mediatek,topckgen:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the mediatek topckgen controller
power-domains:
maxItems: 1
clocks:
items:
- description: 26M clock
- description: audio pll1 clock
- description: audio pll2 clock
- description: clock divider for i2si1_mck
- description: clock divider for i2si2_mck
- description: clock divider for i2so1_mck
- description: clock divider for i2so2_mck
- description: clock divider for dptx_mck
- description: a1sys hoping clock
- description: audio intbus clock
- description: audio hires clock
- description: audio local bus clock
- description: mux for dptx_mck
- description: mux for i2so1_mck
- description: mux for i2so2_mck
- description: mux for i2si1_mck
- description: mux for i2si2_mck
- description: audio 26m clock
clock-names:
items:
- const: clk26m
- const: apll1
- const: apll2
- const: apll12_div0
- const: apll12_div1
- const: apll12_div2
- const: apll12_div3
- const: apll12_div9
- const: a1sys_hp_sel
- const: aud_intbus_sel
- const: audio_h_sel
- const: audio_local_bus_sel
- const: dptx_m_sel
- const: i2so1_m_sel
- const: i2so2_m_sel
- const: i2si1_m_sel
- const: i2si2_m_sel
- const: adsp_audio_26m
mediatek,etdm-in1-cowork-source:
$ref: /schemas/types.yaml#/definitions/uint32
description:
etdm modules can share the same external clock pin. Specify
which etdm clock source is required by this etdm in module.
enum:
- 1 # etdm2_in
- 2 # etdm1_out
- 3 # etdm2_out
mediatek,etdm-in2-cowork-source:
$ref: /schemas/types.yaml#/definitions/uint32
description:
etdm modules can share the same external clock pin. Specify
which etdm clock source is required by this etdm in module.
enum:
- 0 # etdm1_in
- 2 # etdm1_out
- 3 # etdm2_out
mediatek,etdm-out1-cowork-source:
$ref: /schemas/types.yaml#/definitions/uint32
description:
etdm modules can share the same external clock pin. Specify
which etdm clock source is required by this etdm out module.
enum:
- 0 # etdm1_in
- 1 # etdm2_in
- 3 # etdm2_out
mediatek,etdm-out2-cowork-source:
$ref: /schemas/types.yaml#/definitions/uint32
description:
etdm modules can share the same external clock pin. Specify
which etdm clock source is required by this etdm out module.
enum:
- 0 # etdm1_in
- 1 # etdm2_in
- 2 # etdm1_out
patternProperties:
"^mediatek,etdm-in[1-2]-chn-disabled$":
$ref: /schemas/types.yaml#/definitions/uint8-array
minItems: 1
maxItems: 16
description:
This is a list of channel IDs which should be disabled.
By default, all data received from ETDM pins will be outputed to
memory. etdm in supports disable_out in direct mode(w/o interconn),
so user can disable the specified channels by the property.
uniqueItems: true
items:
minimum: 0
maximum: 15
"^mediatek,etdm-in[1-2]-multi-pin-mode$":
type: boolean
description: if present, the etdm data mode is I2S.
"^mediatek,etdm-out[1-3]-multi-pin-mode$":
type: boolean
description: if present, the etdm data mode is I2S.
required:
- compatible
- reg
- interrupts
- resets
- reset-names
- mediatek,topckgen
- power-domains
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
afe@10b10000 {
compatible = "mediatek,mt8188-afe";
reg = <0x10b10000 0x10000>;
interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
resets = <&watchdog 14>;
reset-names = "audiosys";
mediatek,topckgen = <&topckgen>;
power-domains = <&spm 13>; //MT8188_POWER_DOMAIN_AUDIO
mediatek,etdm-in2-cowork-source = <2>;
mediatek,etdm-out2-cowork-source = <0>;
mediatek,etdm-in1-multi-pin-mode;
mediatek,etdm-in1-chn-disabled = /bits/ 8 <0x0 0x2>;
clocks = <&clk26m>,
<&apmixedsys 9>, //CLK_APMIXED_APLL1
<&apmixedsys 10>, //CLK_APMIXED_APLL2
<&topckgen 186>, //CLK_TOP_APLL12_CK_DIV0
<&topckgen 187>, //CLK_TOP_APLL12_CK_DIV1
<&topckgen 188>, //CLK_TOP_APLL12_CK_DIV2
<&topckgen 189>, //CLK_TOP_APLL12_CK_DIV3
<&topckgen 191>, //CLK_TOP_APLL12_CK_DIV9
<&topckgen 83>, //CLK_TOP_A1SYS_HP
<&topckgen 31>, //CLK_TOP_AUD_INTBUS
<&topckgen 32>, //CLK_TOP_AUDIO_H
<&topckgen 69>, //CLK_TOP_AUDIO_LOCAL_BUS
<&topckgen 81>, //CLK_TOP_DPTX
<&topckgen 77>, //CLK_TOP_I2SO1
<&topckgen 78>, //CLK_TOP_I2SO2
<&topckgen 79>, //CLK_TOP_I2SI1
<&topckgen 80>, //CLK_TOP_I2SI2
<&adsp_audio26m 0>; //CLK_AUDIODSP_AUDIO26M
clock-names = "clk26m",
"apll1",
"apll2",
"apll12_div0",
"apll12_div1",
"apll12_div2",
"apll12_div3",
"apll12_div9",
"a1sys_hp_sel",
"aud_intbus_sel",
"audio_h_sel",
"audio_local_bus_sel",
"dptx_m_sel",
"i2so1_m_sel",
"i2so2_m_sel",
"i2si1_m_sel",
"i2si2_m_sel",
"adsp_audio_26m";
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mediatek,mt8188-mt6359.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek MT8188 ASoC sound card
maintainers:
- Trevor Wu <trevor.wu@mediatek.com>
properties:
compatible:
const: mediatek,mt8188-mt6359-evb
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description:
A list of the connections between audio components. Each entry is a
sink/source pair of strings. Valid names could be the input or output
widgets of audio components, power supplies, MicBias of codec and the
software switch.
mediatek,platform:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of MT8188 ASoC platform.
patternProperties:
"^dai-link-[0-9]+$":
type: object
description:
Container for dai-link level properties and CODEC sub-nodes.
properties:
link-name:
description:
This property corresponds to the name of the BE dai-link to which
we are going to update parameters in this node.
items:
enum:
- ADDA_BE
- DPTX_BE
- ETDM1_IN_BE
- ETDM2_IN_BE
- ETDM1_OUT_BE
- ETDM2_OUT_BE
- ETDM3_OUT_BE
- PCM1_BE
codec:
description: Holds subnode which indicates codec dai.
type: object
additionalProperties: false
properties:
sound-dai:
minItems: 1
maxItems: 2
required:
- sound-dai
additionalProperties: false
required:
- link-name
- codec
additionalProperties: false
required:
- compatible
- mediatek,platform
examples:
- |
sound {
compatible = "mediatek,mt8188-mt6359-evb";
mediatek,platform = <&afe>;
pinctrl-names = "default";
pinctrl-0 = <&aud_pins_default>;
audio-routing =
"Headphone", "Headphone L",
"Headphone", "Headphone R",
"AIN1", "Headset Mic";
dai-link-0 {
link-name = "ETDM3_OUT_BE";
codec {
sound-dai = <&hdmi0>;
};
};
};
...
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mchp,i2s-mcc.yaml#
$id: http://devicetree.org/schemas/sound/microchip,sama7g5-i2smcc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip I2S Multi-Channel Controller
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/microchip,pdmc.yaml#
$id: http://devicetree.org/schemas/sound/microchip,sama7g5-pdmc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip Pulse Density Microphone Controller
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mchp,spdifrx.yaml#
$id: http://devicetree.org/schemas/sound/microchip,sama7g5-spdifrx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip S/PDIF Rx Controller
......
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mchp,spdiftx.yaml#
$id: http://devicetree.org/schemas/sound/microchip,sama7g5-spdiftx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip S/PDIF Tx Controller
......
NAU8822 audio CODEC
This device supports I2C only.
Required properties:
- compatible : "nuvoton,nau8822"
- reg : the I2C address of the device.
Example:
codec: nau8822@1a {
compatible = "nuvoton,nau8822";
reg = <0x1a>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nuvoton,nau8822.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NAU8822 audio CODEC
description: |
24 bit stereo audio codec with speaker driver.
This device supports I2C/SPI.
maintainers:
- David Lin <CTLIN0@nuvoton.com>
properties:
compatible:
enum:
- nuvoton,nau8822
reg:
maxItems: 1
nuvoton,spk-btl:
description:
If set, configure the two loudspeaker outputs as a Bridge Tied Load output
to drive a high power external loudspeaker.
$ref: /schemas/types.yaml#/definitions/flag
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "nuvoton,nau8822";
reg = <0x1a>;
};
};
......@@ -35,7 +35,7 @@ properties:
clocks:
minItems: 3
maxItems: 7
maxItems: 10
clock-names:
minItems: 1
......@@ -65,6 +65,9 @@ properties:
power-domain-names:
maxItems: 1
required-opps:
maxItems: 1
'#sound-dai-cells':
const: 1
......@@ -75,7 +78,7 @@ properties:
const: 0
patternProperties:
"^dai-link@[0-9a-f]$":
"^dai-link@[0-9a-f]+$":
type: object
description: |
LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
......@@ -121,6 +124,8 @@ allOf:
then:
properties:
clocks:
maxItems: 3
clock-names:
items:
- const: ahbix-clk
......@@ -135,6 +140,9 @@ allOf:
then:
properties:
clocks:
minItems: 7
maxItems: 7
clock-names:
items:
- const: ahbix-clk
......@@ -153,31 +161,29 @@ allOf:
then:
properties:
clocks:
minItems: 6
maxItems: 6
clock-names:
oneOf:
- items: #for I2S
items:
- const: pcnoc-sway-clk
- const: audio-core
- const: mclk0
- const: pcnoc-mport-clk
- const: mi2s-bit-clk0
- const: mi2s-bit-clk1
- items: #for HDMI
- const: pcnoc-sway-clk
- const: audio-core
- const: pcnoc-mport-clk
reg:
minItems: 2
maxItems: 2
reg-names:
anyOf:
- items: #for I2S
- const: lpass-lpaif
- items: #for I2S and HDMI
items:
- const: lpass-hdmiif
- const: lpass-lpaif
interrupts:
minItems: 2
maxItems: 2
interrupt-names:
anyOf:
- items: #for I2S
- const: lpass-irq-lpaif
- items: #for I2S and HDMI
items:
- const: lpass-irq-lpaif
- const: lpass-irq-hdmi
required:
......@@ -192,53 +198,43 @@ allOf:
then:
properties:
clocks:
minItems: 10
maxItems: 10
clock-names:
oneOf:
- items: #for I2S
items:
- const: aon_cc_audio_hm_h
- const: audio_cc_ext_mclk0
- const: core_cc_sysnoc_mport_core
- const: core_cc_ext_if0_ibit
- const: core_cc_ext_if1_ibit
- items: #for Soundwire
- const: aon_cc_audio_hm_h
- const: audio_cc_codec_mem
- const: audio_cc_codec_mem0
- const: audio_cc_codec_mem1
- const: audio_cc_codec_mem2
- const: aon_cc_va_mem0
- items: #for HDMI
- const: core_cc_sysnoc_mport_core
reg:
minItems: 6
maxItems: 6
reg-names:
anyOf:
- items: #for I2S
- const: lpass-lpaif
- items: #for I2S and HDMI
- const: lpass-hdmiif
- const: lpass-lpaif
- items: #for I2S, soundwire and HDMI
items:
- const: lpass-hdmiif
- const: lpass-lpaif
- const: lpass-rxtx-cdc-dma-lpm
- const: lpass-rxtx-lpaif
- const: lpass-va-lpaif
- const: lpass-va-cdc-dma-lpm
interrupts:
minItems: 4
maxItems: 4
interrupt-names:
anyOf:
- items: #for I2S
- const: lpass-irq-lpaif
- items: #for I2S and HDMI
- const: lpass-irq-lpaif
- const: lpass-irq-hdmi
- items: #for I2S, soundwire and HDMI
items:
- const: lpass-irq-lpaif
- const: lpass-irq-hdmi
- const: lpass-irq-vaif
- const: lpass-irq-rxtxif
power-domain-names:
allOf:
- items:
items:
- const: lcx
required:
......
......@@ -36,7 +36,7 @@ properties:
oneOf:
- items: #for ADSP based platforms
- const: mclk
- const: core
- const: macro
- const: dcodec
- items: #for ADSP bypass based platforms
- const: mclk
......@@ -77,7 +77,7 @@ examples:
clocks = <&aoncc 0>,
<&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
clock-names = "mclk", "core", "dcodec";
clock-names = "mclk", "macro", "dcodec";
clock-output-names = "fsgen";
qcom,dmic-sample-rate = <600000>;
vdd-micb-supply = <&vreg_s4a_1p8>;
......
......@@ -17,7 +17,8 @@ properties:
const: qcom,q6apm-dais
iommus:
maxItems: 1
minItems: 1
maxItems: 2
required:
- compatible
......
......@@ -15,10 +15,14 @@ description:
properties:
compatible:
enum:
oneOf:
- items:
- enum:
- lenovo,yoga-c630-sndcard
- qcom,apq8016-sbc-sndcard
- qcom,db845c-sndcard
- const: qcom,sdm845-sndcard
- enum:
- qcom,apq8016-sbc-sndcard
- qcom,msm8916-qdsp6-sndcard
- qcom,qrb5165-rb5-sndcard
- qcom,sc8280xp-sndcard
......
......@@ -28,7 +28,9 @@ properties:
description: GPIO spec for reset line to use
maxItems: 1
slim-ifc-dev: true
slim-ifc-dev:
description: IFC device interface
$ref: /schemas/types.yaml#/definitions/phandle
clocks:
maxItems: 1
......@@ -147,9 +149,15 @@ patternProperties:
required:
- compatible
- reg
allOf:
- if:
required:
- slim-ifc-dev
then:
required:
- reset-gpios
- slim-ifc-dev
- interrupts
- interrupt-controller
- clock-frequency
- clock-output-names
......@@ -162,6 +170,28 @@ required:
- "#sound-dai-cells"
- "#address-cells"
- "#size-cells"
oneOf:
- required:
- interrupts-extended
- required:
- interrupts
else:
properties:
reset-gpios: false
slim-ifc-dev: false
interrupts: false
interrupt-controller: false
clock-frequency: false
clock-output-names: false
qcom,micbias1-microvolt: false
qcom,micbias2-microvolt: false
qcom,micbias3-microvolt: false
qcom,micbias4-microvolt: false
"#interrupt-cells": false
"#clock-cells": false
"#sound-dai-cells": false
"#address-cells": false
"#size-cells": false
additionalProperties: false
......
......@@ -15,6 +15,9 @@ description: |
Their primary operating mode uses a SoundWire digital audio
interface. This binding is for SoundWire interface.
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: sdw10217201000
......@@ -39,7 +42,7 @@ required:
- "#thermal-sensor-cells"
- "#sound-dai-cells"
additionalProperties: false
unevaluatedProperties: false
examples:
- |
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/renesas,idt821034.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas IDT821034 codec device
maintainers:
- Herve Codina <herve.codina@bootlin.com>
description: |
The IDT821034 codec is a four channel PCM codec with onchip filters and
programmable gain setting.
The time-slots used by the codec must be set and so, the properties
'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and
'dai-tdm-slot-rx-mask' must be present in the ALSA sound card node for
sub-nodes that involve the codec. The codec uses one 8bit time-slot per
channel.
'dai-tdm-tdm-slot-with' must be set to 8.
The IDT821034 codec also supports 5 gpios (SLIC signals) per channel.
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- $ref: dai-common.yaml#
properties:
compatible:
const: renesas,idt821034
reg:
description:
SPI device address.
maxItems: 1
spi-max-frequency:
maximum: 8192000
spi-cpha: true
'#sound-dai-cells':
const: 0
'#gpio-cells':
const: 2
gpio-controller: true
required:
- compatible
- reg
- spi-cpha
- '#sound-dai-cells'
- gpio-controller
- '#gpio-cells'
unevaluatedProperties: false
examples:
- |
spi {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@0 {
compatible = "renesas,idt821034";
reg = <0>;
spi-max-frequency = <8192000>;
spi-cpha;
#sound-dai-cells = <0>;
gpio-controller;
#gpio-cells = <2>;
};
};
......@@ -18,8 +18,7 @@ properties:
- enum:
- renesas,rcar_sound-r8a7778 # R-Car M1A
- renesas,rcar_sound-r8a7779 # R-Car H1
- enum:
- renesas,rcar_sound-gen1
- const: renesas,rcar_sound-gen1
# for Gen2 SoC
- items:
- enum:
......@@ -32,8 +31,7 @@ properties:
- renesas,rcar_sound-r8a7791 # R-Car M2-W
- renesas,rcar_sound-r8a7793 # R-Car M2-N
- renesas,rcar_sound-r8a7794 # R-Car E2
- enum:
- renesas,rcar_sound-gen2
- const: renesas,rcar_sound-gen2
# for Gen3 SoC
- items:
- enum:
......@@ -47,10 +45,12 @@ properties:
- renesas,rcar_sound-r8a77965 # R-Car M3-N
- renesas,rcar_sound-r8a77990 # R-Car E3
- renesas,rcar_sound-r8a77995 # R-Car D3
- enum:
- renesas,rcar_sound-gen3
# for Generic
- const: renesas,rcar_sound-gen3
# for Gen4 SoC
- items:
- const: renesas,rcar_sound-r8a779g0 # R-Car V4H
- const: renesas,rcar_sound-gen4
# for Generic
- enum:
- renesas,rcar_sound-gen1
- renesas,rcar_sound-gen2
......@@ -68,6 +68,7 @@ properties:
description: |
it must be 0 if your system is using single DAI
it must be 1 if your system is using multi DAIs
This is used on simple-audio-card
enum: [0, 1]
"#clock-cells":
......@@ -113,14 +114,33 @@ properties:
- pattern: '^clk_(a|b|c|i)$'
ports:
$ref: /schemas/graph.yaml#/properties/ports
$ref: audio-graph-port.yaml#/definitions/port-base
unevaluatedProperties: false
patternProperties:
'^port(@[0-9a-f]+)?$':
$ref: audio-graph-port.yaml#
$ref: audio-graph-port.yaml#/definitions/port-base
unevaluatedProperties: false
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: audio-graph-port.yaml#/definitions/endpoint-base
properties:
playback:
$ref: /schemas/types.yaml#/definitions/phandle-array
capture:
$ref: /schemas/types.yaml#/definitions/phandle-array
unevaluatedProperties: false
port:
$ref: audio-graph-port.yaml#
$ref: audio-graph-port.yaml#/definitions/port-base
unevaluatedProperties: false
patternProperties:
"^endpoint(@[0-9a-f]+)?":
$ref: audio-graph-port.yaml#/definitions/endpoint-base
properties:
playback:
$ref: /schemas/types.yaml#/definitions/phandle-array
capture:
$ref: /schemas/types.yaml#/definitions/phandle-array
unevaluatedProperties: false
rcar_sound,dvc:
......@@ -178,10 +198,6 @@ properties:
enum:
- tx
- rx
required:
- interrupts
- dmas
- dma-names
additionalProperties: false
rcar_sound,ssiu:
......@@ -240,8 +256,6 @@ properties:
$ref: /schemas/types.yaml#/definitions/flag
required:
- interrupts
- dmas
- dma-names
additionalProperties: false
# For DAI base
......@@ -271,7 +285,6 @@ required:
- reg-names
- clocks
- clock-names
- "#sound-dai-cells"
allOf:
- $ref: dai-common.yaml#
......@@ -285,7 +298,6 @@ allOf:
reg:
maxItems: 3
reg-names:
maxItems: 3
items:
enum:
- scu
......@@ -294,9 +306,8 @@ allOf:
else:
properties:
reg:
maxItems: 5
minItems: 5
reg-names:
maxItems: 5
items:
enum:
- scu
......
......@@ -20,6 +20,9 @@ Optional properties:
- realtek,in3-differential
Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended.
- realtek,lout-differential
Boolean. Indicate LOUT output is differential, rather than stereo.
- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
- realtek,dmic1-data-pin
......
......@@ -43,9 +43,10 @@ properties:
type: object
properties:
sound-dai:
minItems: 1
items:
- description: phandle of the MAX98090 CODEC
- description: phandle of the HDMI IP block node
- description: phandle of the MAX98090 CODEC
samsung,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
......
......@@ -37,12 +37,20 @@ properties:
samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports
stereo channels. Exynos7 I2S1 upgraded to 5.1 multichannel with
slightly modified bit offsets.
tesla,fsd-i2s: for 8/16/24bit stereo channel I2S for playback and
capture, secondary FIFO using external DMA, s/w reset control,
internal mux for root clock source with all root clock sampling
frequencies supported by Exynos7 I2S and 7.1 channel TDM support
for playback and capture TDM (Time division multiplexing) to allow
transfer of multiple channel audio data on single data line.
enum:
- samsung,s3c6410-i2s
- samsung,s5pv210-i2s
- samsung,exynos5420-i2s
- samsung,exynos7-i2s
- samsung,exynos7-i2s1
- tesla,fsd-i2s
'#address-cells':
const: 1
......@@ -67,9 +75,6 @@ properties:
- const: rx
- const: tx-sec
assigned-clock-parents: true
assigned-clocks: true
clocks:
minItems: 1
maxItems: 3
......
......@@ -205,6 +205,8 @@ patternProperties:
$ref: "#/definitions/dai"
"^simple-audio-card,codec(@[0-9a-f]+)?$":
$ref: "#/definitions/dai"
"^simple-audio-card,plat(@[0-9a-f]+)?$":
$ref: "#/definitions/dai"
"^simple-audio-card,dai-link(@[0-9a-f]+)?$":
description: |
......@@ -215,6 +217,10 @@ patternProperties:
reg:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
# common properties
frame-master:
$ref: "#/definitions/frame-master"
......@@ -244,9 +250,9 @@ patternProperties:
maxItems: 1
patternProperties:
"^cpu(@[0-9a-f]+)?":
"^cpu(-[0-9]+)?$":
$ref: "#/definitions/dai"
"^codec(@[0-9a-f]+)?":
"^codec(-[0-9]+)?$":
$ref: "#/definitions/dai"
additionalProperties: false
......@@ -462,16 +468,16 @@ examples:
convert-channels = <8>; /* TDM Split */
sndcpu1: cpu0 {
sndcpu1: cpu-0 {
sound-dai = <&rcar_sound 1>;
};
cpu1 {
cpu-1 {
sound-dai = <&rcar_sound 2>;
};
cpu2 {
cpu-2 {
sound-dai = <&rcar_sound 3>;
};
cpu3 {
cpu-3 {
sound-dai = <&rcar_sound 4>;
};
codec {
......
......@@ -6,11 +6,13 @@ audio playback. For more product information please see the links below:
https://www.ti.com/product/TAS5720L
https://www.ti.com/product/TAS5720M
https://www.ti.com/product/TAS5720A-Q1
https://www.ti.com/product/TAS5722L
Required properties:
- compatible : "ti,tas5720",
"ti,tas5720a-q1",
"ti,tas5722"
- reg : I2C slave address
- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
......
Texas Instruments pcm3168a DT bindings
This driver supports both SPI and I2C bus access for this codec
Required properties:
- compatible: "ti,pcm3168a"
- clocks : Contains an entry for each entry in clock-names
- clock-names : Includes the following entries:
"scki" The system clock
- VDD1-supply : Digital power supply regulator 1 (+3.3V)
- VDD2-supply : Digital power supply regulator 2 (+3.3V)
- VCCAD1-supply : ADC power supply regulator 1 (+5V)
- VCCAD2-supply : ADC power supply regulator 2 (+5V)
- VCCDA1-supply : DAC power supply regulator 1 (+5V)
- VCCDA2-supply : DAC power supply regulator 2 (+5V)
For required properties on SPI/I2C, consult SPI/I2C device tree documentation
Optional properties:
- reset-gpios : Optional reset gpio line connected to RST pin of the codec.
The RST line is low active:
RST = low: device power-down
RST = high: device is enabled
Examples:
i2c0: i2c0@0 {
...
pcm3168a: audio-codec@44 {
compatible = "ti,pcm3168a";
reg = <0x44>;
reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
clocks = <&clk_core CLK_AUDIO>;
clock-names = "scki";
VDD1-supply = <&supply3v3>;
VDD2-supply = <&supply3v3>;
VCCAD1-supply = <&supply5v0>;
VCCAD2-supply = <&supply5v0>;
VCCDA1-supply = <&supply5v0>;
VCCDA2-supply = <&supply5v0>;
pinctrl-names = "default";
pinctrl-0 = <&dac_clk_pin>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,pcm3168a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments PCM3168A Audio Codec
maintainers:
- Damien Horsley <Damien.Horsley@imgtec.com>
- Geert Uytterhoeven <geert+renesas@glider.be>
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
description:
The Texas Instruments PCM3168A is a 24-bit Multi-channel Audio CODEC with
96/192kHz sampling rate, supporting both SPI and I2C bus access.
properties:
compatible:
const: ti,pcm3168a
reg:
maxItems: 1
clocks:
items:
- description: System clock input
clock-names:
items:
- const: scki
reset-gpios:
items:
- description: |
GPIO line connected to the active-low RST pin of the codec.
RST = low: device power-down
RST = high: device is enabled
"#sound-dai-cells":
enum: [0, 1]
VDD1-supply:
description: Digital power supply regulator 1 (+3.3V)
VDD2-supply:
description: Digital power supply regulator 2 (+3.3V)
VCCAD1-supply:
description: ADC power supply regulator 1 (+5V)
VCCAD2-supply:
description: ADC power supply regulator 2 (+5V)
VCCDA1-supply:
description: DAC power supply regulator 1 (+5V)
VCCDA2-supply:
description: DAC power supply regulator 2 (+5V)
ports:
$ref: audio-graph-port.yaml#/definitions/port-base
properties:
port@0:
$ref: audio-graph-port.yaml#
description: Audio input port.
port@1:
$ref: audio-graph-port.yaml#
description: Audio output port.
required:
- compatible
- reg
- clocks
- clock-names
- VDD1-supply
- VDD2-supply
- VCCAD1-supply
- VCCAD2-supply
- VCCDA1-supply
- VCCDA2-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
pcm3168a: audio-codec@44 {
compatible = "ti,pcm3168a";
reg = <0x44>;
reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
clocks = <&clk_core 42>;
clock-names = "scki";
VDD1-supply = <&supply3v3>;
VDD2-supply = <&supply3v3>;
VCCAD1-supply = <&supply5v0>;
VCCAD2-supply = <&supply5v0>;
VCCDA1-supply = <&supply5v0>;
VCCDA2-supply = <&supply5v0>;
};
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
# Copyright (C) 2022 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,tlv320aic3x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TLV320AIC3x Codec
description: |
TLV320AIC3x are a series of low-power stereo audio codecs with stereo
headphone amplifier, as well as multiple inputs and outputs programmable in
single-ended or fully differential configurations.
The serial control bus supports SPI or I2C protocols, while the serial audio
data bus is programmable for I2S, left/right-justified, DSP, or TDM modes.
The following pins can be referred in the sound node's audio routing property:
CODEC output pins:
LLOUT
RLOUT
MONO_LOUT
HPLOUT
HPROUT
HPLCOM
HPRCOM
CODEC input pins for TLV320AIC3104:
MIC2L
MIC2R
LINE1L
LINE1R
CODEC input pins for other compatible codecs:
MIC3L
MIC3R
LINE1L
LINE2L
LINE1R
LINE2R
maintainers:
- Jai Luthra <j-luthra@ti.com>
properties:
compatible:
enum:
- ti,tlv320aic3x
- ti,tlv320aic33
- ti,tlv320aic3007
- ti,tlv320aic3106
- ti,tlv320aic3104
reg:
maxItems: 1
reset-gpios:
maxItems: 1
description:
GPIO specification for the active low RESET input.
gpio-reset:
maxItems: 1
description:
Deprecated, please use reset-gpios instead.
deprecated: true
ai3x-gpio-func:
description: AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
$ref: /schemas/types.yaml#/definitions/uint32-array
maxItems: 2
ai3x-micbias-vg:
description: MicBias required voltage. If node is omitted then MicBias is powered down.
$ref: /schemas/types.yaml#/definitions/uint32
oneOf:
- const: 1
description: MICBIAS output is powered to 2.0V.
- const: 2
description: MICBIAS output is powered to 2.5V.
- const: 3
description: MICBIAS output is connected to AVDD.
ai3x-ocmv:
description: Output Common-Mode Voltage selection.
$ref: /schemas/types.yaml#/definitions/uint32
oneOf:
- const: 0
description: 1.35V
- const: 1
description: 1.5V
- const: 2
description: 1.65V
- const: 3
description: 1.8V
AVDD-supply:
description: Analog DAC voltage.
IOVDD-supply:
description: I/O voltage.
DRVDD-supply:
description: ADC analog and output driver voltage.
DVDD-supply:
description: Digital core voltage.
'#sound-dai-cells':
const: 0
clocks:
maxItems: 1
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
tlv320aic3x_i2c: audio-codec@1b {
compatible = "ti,tlv320aic3x";
reg = <0x1b>;
reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
AVDD-supply = <&regulator>;
IOVDD-supply = <&regulator>;
DRVDD-supply = <&regulator>;
DVDD-supply = <&regulator>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
tlv320aic3x_spi: audio-codec@0 {
compatible = "ti,tlv320aic3x";
reg = <0>; /* CS number */
#sound-dai-cells = <0>;
AVDD-supply = <&regulator>;
IOVDD-supply = <&regulator>;
DRVDD-supply = <&regulator>;
DVDD-supply = <&regulator>;
ai3x-ocmv = <0>;
};
};
...
Texas Instruments - tlv320aic3x Codec module
The tlv320aic3x serial control bus communicates through both I2C and SPI bus protocols
Required properties:
- compatible - "string" - One of:
"ti,tlv320aic3x" - Generic TLV320AIC3x device
"ti,tlv320aic33" - TLV320AIC33
"ti,tlv320aic3007" - TLV320AIC3007
"ti,tlv320aic3106" - TLV320AIC3106
"ti,tlv320aic3104" - TLV320AIC3104
- reg - <int> - I2C slave address
Optional properties:
- reset-gpios - GPIO specification for the active low RESET input.
- ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
- Not supported on tlv320aic3104
- ai3x-micbias-vg - MicBias Voltage required.
1 - MICBIAS output is powered to 2.0V,
2 - MICBIAS output is powered to 2.5V,
3 - MICBIAS output is connected to AVDD,
If this node is not mentioned or if the value is incorrect, then MicBias
is powered down.
- ai3x-ocmv - Output Common-Mode Voltage selection:
0 - 1.35V,
1 - 1.5V,
2 - 1.65V,
3 - 1.8V
- AVDD-supply, IOVDD-supply, DRVDD-supply, DVDD-supply : power supplies for the
device as covered in Documentation/devicetree/bindings/regulator/regulator.txt
Deprecated properties:
- gpio-reset - gpio pin number used for codec reset
CODEC output pins:
* LLOUT
* RLOUT
* MONO_LOUT
* HPLOUT
* HPROUT
* HPLCOM
* HPRCOM
CODEC input pins for TLV320AIC3104:
* MIC2L
* MIC2R
* LINE1L
* LINE1R
CODEC input pins for other compatible codecs:
* MIC3L
* MIC3R
* LINE1L
* LINE2L
* LINE1R
* LINE2R
The pins can be used in referring sound node's audio-routing property.
I2C example:
#include <dt-bindings/gpio/gpio.h>
tlv320aic3x: tlv320aic3x@1b {
compatible = "ti,tlv320aic3x";
reg = <0x1b>;
reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
AVDD-supply = <&regulator>;
IOVDD-supply = <&regulator>;
DRVDD-supply = <&regulator>;
DVDD-supply = <&regulator>;
};
SPI example:
spi0: spi@f0000000 {
tlv320aic3x: codec@0 {
compatible = "ti,tlv320aic3x";
reg = <0>; /* CS number */
#sound-dai-cells = <0>;
spi-max-frequency = <1000000>;
AVDD-supply = <&regulator>;
IOVDD-supply = <&regulator>;
DRVDD-supply = <&regulator>;
DVDD-supply = <&regulator>;
ai3x-ocmv = <0>;
};
};
......@@ -635,6 +635,8 @@ patternProperties:
description: Inverse Path
"^iom,.*":
description: Iomega Corporation
"^irondevice,.*":
description: Iron Device Corporation
"^isee,.*":
description: ISEE 2007 S.L.
"^isil,.*":
......
......@@ -10166,6 +10166,13 @@ L: linux-iio@vger.kernel.org
S: Maintained
F: drivers/iio/pressure/dps310.c
INFINEON PEB2466 ASoC CODEC
M: Herve Codina <herve.codina@bootlin.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/infineon,peb2466.yaml
F: sound/soc/codecs/peb2466.c
INFINIBAND SUBSYSTEM
M: Jason Gunthorpe <jgg@nvidia.com>
M: Leon Romanovsky <leonro@nvidia.com>
......@@ -10927,6 +10934,13 @@ M: David Sterba <dsterba@suse.com>
S: Odd Fixes
F: drivers/tty/ipwireless/
IRON DEVICE AUDIO CODEC DRIVERS
M: Kiseok Jo <kiseok.jo@irondevice.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/irondevice,*
F: sound/soc/codecs/sma*
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
M: Marc Zyngier <maz@kernel.org>
S: Maintained
......@@ -17803,6 +17817,13 @@ F: Documentation/devicetree/bindings/net/renesas,*.yaml
F: drivers/net/ethernet/renesas/
F: include/linux/sh_eth.h
RENESAS IDT821034 ASoC CODEC
M: Herve Codina <herve.codina@bootlin.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/renesas,idt821034.yaml
F: sound/soc/codecs/idt821034.c
RENESAS R-CAR GYROADC DRIVER
M: Marek Vasut <marek.vasut@gmail.com>
L: linux-iio@vger.kernel.org
......
......@@ -469,7 +469,7 @@ static int sdw_prep_deprep_slave_ports(struct sdw_bus *bus,
}
/* Inform slave about the impending port prepare */
sdw_do_port_prep(s_rt, prep_ch, SDW_OPS_PORT_PRE_PREP);
sdw_do_port_prep(s_rt, prep_ch, prep ? SDW_OPS_PORT_PRE_PREP : SDW_OPS_PORT_PRE_DEPREP);
/* Prepare Slave port implementing CP_SM */
if (!dpn_prop->simple_ch_prep_sm) {
......@@ -501,7 +501,7 @@ static int sdw_prep_deprep_slave_ports(struct sdw_bus *bus,
}
/* Inform slaves about ports prepared */
sdw_do_port_prep(s_rt, prep_ch, SDW_OPS_PORT_POST_PREP);
sdw_do_port_prep(s_rt, prep_ch, prep ? SDW_OPS_PORT_POST_PREP : SDW_OPS_PORT_POST_DEPREP);
/* Disable interrupt after Port de-prepare */
if (!prep && intr)
......
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) ST-Ericsson SA 2010
*
* Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson
*/
#ifndef __MSP_H
#define __MSP_H
#include <linux/platform_data/dma-ste-dma40.h>
/* Platform data structure for a MSP I2S-device */
struct msp_i2s_platform_data {
int id;
struct stedma40_chan_cfg *msp_i2s_dma_rx;
struct stedma40_chan_cfg *msp_i2s_dma_tx;
};
#endif
......@@ -566,13 +566,15 @@ struct sdw_prepare_ch {
* enum sdw_port_prep_ops: Prepare operations for Data Port
*
* @SDW_OPS_PORT_PRE_PREP: Pre prepare operation for the Port
* @SDW_OPS_PORT_PREP: Prepare operation for the Port
* @SDW_OPS_PORT_PRE_DEPREP: Pre deprepare operation for the Port
* @SDW_OPS_PORT_POST_PREP: Post prepare operation for the Port
* @SDW_OPS_PORT_POST_DEPREP: Post deprepare operation for the Port
*/
enum sdw_port_prep_ops {
SDW_OPS_PORT_PRE_PREP = 0,
SDW_OPS_PORT_PREP = 1,
SDW_OPS_PORT_POST_PREP = 2,
SDW_OPS_PORT_PRE_DEPREP,
SDW_OPS_PORT_POST_PREP,
SDW_OPS_PORT_POST_DEPREP,
};
/**
......
This diff is collapsed.
......@@ -34,6 +34,7 @@
#define CS42L42_PAGE_24 0x2400
#define CS42L42_PAGE_25 0x2500
#define CS42L42_PAGE_26 0x2600
#define CS42L42_PAGE_27 0x2700
#define CS42L42_PAGE_28 0x2800
#define CS42L42_PAGE_29 0x2900
#define CS42L42_PAGE_2A 0x2A00
......@@ -720,6 +721,10 @@
#define CS42L42_SRC_SDOUT_FS (CS42L42_PAGE_26 + 0x09)
/* Page 0x27 DMA */
#define CS42L42_SOFT_RESET_REBOOT (CS42L42_PAGE_27 + 0x01)
#define CS42L42_SFT_RST_REBOOT_MASK BIT(1)
/* Page 0x28 S/PDIF Registers */
#define CS42L42_SPDIF_CTL1 (CS42L42_PAGE_28 + 0x01)
#define CS42L42_SPDIF_CTL2 (CS42L42_PAGE_28 + 0x02)
......
......@@ -69,6 +69,7 @@ struct asoc_simple_priv {
} *dai_props;
struct asoc_simple_jack hp_jack;
struct asoc_simple_jack mic_jack;
struct snd_soc_jack *aux_jacks;
struct snd_soc_dai_link *dai_link;
struct asoc_simple_dai *dais;
struct snd_soc_dai_link_component *dlcs;
......@@ -187,6 +188,8 @@ int asoc_simple_parse_pin_switches(struct snd_soc_card *card,
int asoc_simple_init_jack(struct snd_soc_card *card,
struct asoc_simple_jack *sjack,
int is_hp, char *prefix, char *pin);
int asoc_simple_init_aux_jacks(struct asoc_simple_priv *priv,
char *prefix);
int asoc_simple_init_priv(struct asoc_simple_priv *priv,
struct link_info *li);
int asoc_simple_remove(struct platform_device *pdev);
......
......@@ -98,6 +98,7 @@ struct snd_soc_component_driver {
int source, unsigned int freq_in, unsigned int freq_out);
int (*set_jack)(struct snd_soc_component *component,
struct snd_soc_jack *jack, void *data);
int (*get_jack_type)(struct snd_soc_component *component);
/* DT */
int (*of_xlate_dai_name)(struct snd_soc_component *component,
......@@ -384,6 +385,7 @@ int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
unsigned int freq_out);
int snd_soc_component_set_jack(struct snd_soc_component *component,
struct snd_soc_jack *jack, void *data);
int snd_soc_component_get_jack_type(struct snd_soc_component *component);
void snd_soc_component_seq_notifier(struct snd_soc_component *component,
enum snd_soc_dapm_type type, int subseq);
......
......@@ -423,6 +423,16 @@ struct snd_soc_dai_driver {
int remove_order;
};
/* for Playback/Capture */
struct snd_soc_dai_stream {
struct snd_soc_dapm_widget *widget;
unsigned int active; /* usage count */
unsigned int tdm_mask; /* CODEC TDM slot masks and params (for fixup) */
void *dma_data; /* DAI DMA data */
};
/*
* Digital Audio Interface runtime data.
*
......@@ -437,14 +447,7 @@ struct snd_soc_dai {
struct snd_soc_dai_driver *driver;
/* DAI runtime info */
unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1]; /* usage count */
struct snd_soc_dapm_widget *playback_widget;
struct snd_soc_dapm_widget *capture_widget;
/* DAI DMA data */
void *playback_dma_data;
void *capture_dma_data;
struct snd_soc_dai_stream stream[SNDRV_PCM_STREAM_LAST + 1];
/* Symmetry data - only valid if symmetry is being enforced */
unsigned int rate;
......@@ -454,10 +457,6 @@ struct snd_soc_dai {
/* parent platform/codec */
struct snd_soc_component *component;
/* CODEC TDM slot masks and params (for fixup) */
unsigned int tx_mask;
unsigned int rx_mask;
struct list_head list;
/* function mark */
......@@ -477,36 +476,59 @@ snd_soc_dai_get_pcm_stream(const struct snd_soc_dai *dai, int stream)
&dai->driver->playback : &dai->driver->capture;
}
#define snd_soc_dai_get_widget_playback(dai) snd_soc_dai_get_widget(dai, SNDRV_PCM_STREAM_PLAYBACK)
#define snd_soc_dai_get_widget_capture(dai) snd_soc_dai_get_widget(dai, SNDRV_PCM_STREAM_CAPTURE)
static inline
struct snd_soc_dapm_widget *snd_soc_dai_get_widget(
struct snd_soc_dai *dai, int stream)
struct snd_soc_dapm_widget *snd_soc_dai_get_widget(struct snd_soc_dai *dai, int stream)
{
return (stream == SNDRV_PCM_STREAM_PLAYBACK) ?
dai->playback_widget : dai->capture_widget;
return dai->stream[stream].widget;
}
static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai,
const struct snd_pcm_substream *ss)
#define snd_soc_dai_set_widget_playback(dai, widget) snd_soc_dai_set_widget(dai, SNDRV_PCM_STREAM_PLAYBACK, widget)
#define snd_soc_dai_set_widget_capture(dai, widget) snd_soc_dai_set_widget(dai, SNDRV_PCM_STREAM_CAPTURE, widget)
static inline
void snd_soc_dai_set_widget(struct snd_soc_dai *dai, int stream, struct snd_soc_dapm_widget *widget)
{
return (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
dai->playback_dma_data : dai->capture_dma_data;
dai->stream[stream].widget = widget;
}
static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai,
const struct snd_pcm_substream *ss,
void *data)
#define snd_soc_dai_dma_data_get_playback(dai) snd_soc_dai_dma_data_get(dai, SNDRV_PCM_STREAM_PLAYBACK)
#define snd_soc_dai_dma_data_get_capture(dai) snd_soc_dai_dma_data_get(dai, SNDRV_PCM_STREAM_CAPTURE)
#define snd_soc_dai_get_dma_data(dai, ss) snd_soc_dai_dma_data_get(dai, ss->stream)
static inline void *snd_soc_dai_dma_data_get(const struct snd_soc_dai *dai, int stream)
{
if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)
dai->playback_dma_data = data;
else
dai->capture_dma_data = data;
return dai->stream[stream].dma_data;
}
#define snd_soc_dai_dma_data_set_playback(dai, data) snd_soc_dai_dma_data_set(dai, SNDRV_PCM_STREAM_PLAYBACK, data)
#define snd_soc_dai_dma_data_set_capture(dai, data) snd_soc_dai_dma_data_set(dai, SNDRV_PCM_STREAM_CAPTURE, data)
#define snd_soc_dai_set_dma_data(dai, ss, data) snd_soc_dai_dma_data_set(dai, ss->stream, data)
static inline void snd_soc_dai_dma_data_set(struct snd_soc_dai *dai, int stream, void *data)
{
dai->stream[stream].dma_data = data;
}
static inline void snd_soc_dai_init_dma_data(struct snd_soc_dai *dai, void *playback, void *capture)
{
snd_soc_dai_dma_data_set_playback(dai, playback);
snd_soc_dai_dma_data_set_capture(dai, capture);
}
static inline unsigned int snd_soc_dai_tdm_mask_get(struct snd_soc_dai *dai, int stream)
{
return dai->stream[stream].tdm_mask;
}
static inline void snd_soc_dai_init_dma_data(struct snd_soc_dai *dai,
void *playback, void *capture)
static inline void snd_soc_dai_tdm_mask_set(struct snd_soc_dai *dai, int stream,
unsigned int tdm_mask)
{
dai->playback_dma_data = playback;
dai->capture_dma_data = capture;
dai->stream[stream].tdm_mask = tdm_mask;
}
static inline unsigned int snd_soc_dai_stream_active(struct snd_soc_dai *dai, int stream)
{
/* see snd_soc_dai_action() for setup */
return dai->stream[stream].active;
}
static inline void snd_soc_dai_set_drvdata(struct snd_soc_dai *dai,
......@@ -561,10 +583,4 @@ static inline void *snd_soc_dai_get_stream(struct snd_soc_dai *dai,
return ERR_PTR(-ENOTSUPP);
}
static inline unsigned int
snd_soc_dai_stream_active(struct snd_soc_dai *dai, int stream)
{
return dai->stream_active[stream];
}
#endif
......@@ -16,6 +16,7 @@
#include <sound/asoc.h>
struct device;
struct snd_pcm_substream;
struct snd_soc_pcm_runtime;
struct soc_enum;
......
......@@ -162,6 +162,8 @@ int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream);
int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
int event);
bool dpcm_end_walk_at_be(struct snd_soc_dapm_widget *widget, enum snd_soc_dapm_direction dir);
int widget_in_list(struct snd_soc_dapm_widget_list *list,
struct snd_soc_dapm_widget *widget);
#define dpcm_be_dai_startup_rollback(fe, stream, last) \
dpcm_be_dai_stop(fe, stream, 0, last)
......
......@@ -62,7 +62,7 @@ struct snd_soc_dobj {
enum snd_soc_dobj_type type;
unsigned int index; /* objects can belong in different groups */
struct list_head list;
struct snd_soc_tplg_ops *ops;
int (*unload)(struct snd_soc_component *comp, struct snd_soc_dobj *dobj);
union {
struct snd_soc_dobj_control control;
struct snd_soc_dobj_widget widget;
......
......@@ -1052,6 +1052,12 @@ struct snd_soc_card {
#define for_each_card_widgets_safe(card, w, _w) \
list_for_each_entry_safe(w, _w, &card->widgets, list)
static inline int snd_soc_card_is_instantiated(struct snd_soc_card *card)
{
return card && card->instantiated;
}
/* SoC machine DAI configuration, glues a codec and cpu DAI together */
struct snd_soc_pcm_runtime {
struct device *dev;
......
......@@ -185,6 +185,9 @@ enum sof_ipc4_pipeline_state {
#define SOF_IPC4_GLB_PIPE_STATE_MASK GENMASK(15, 0)
#define SOF_IPC4_GLB_PIPE_STATE(x) ((x) << SOF_IPC4_GLB_PIPE_STATE_SHIFT)
/* pipeline set state IPC msg extension */
#define SOF_IPC4_GLB_PIPE_STATE_EXT_MULTI BIT(0)
/* load library ipc msg */
#define SOF_IPC4_GLB_LOAD_LIBRARY_LIB_ID_SHIFT 16
#define SOF_IPC4_GLB_LOAD_LIBRARY_LIB_ID(x) ((x) << SOF_IPC4_GLB_LOAD_LIBRARY_LIB_ID_SHIFT)
......
......@@ -108,6 +108,7 @@ enum avs_tplg_token {
AVS_TKN_MOD_CORE_ID_U8 = 1704,
AVS_TKN_MOD_PROC_DOMAIN_U8 = 1705,
AVS_TKN_MOD_MODCFG_EXT_ID_U32 = 1706,
AVS_TKN_MOD_KCONTROL_ID_U32 = 1707,
/* struct avs_tplg_path_template */
AVS_TKN_PATH_TMPL_ID_U32 = 1801,
......@@ -121,6 +122,9 @@ enum avs_tplg_token {
AVS_TKN_PIN_FMT_INDEX_U32 = 2201,
AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
AVS_TKN_PIN_FMT_AFMT_ID_U32 = 2203,
/* struct avs_tplg_kcontrol */
AVS_TKN_KCONTROL_ID_U32 = 2301,
};
#endif
......@@ -16,6 +16,7 @@
#include <sound/pcm_params.h>
#include <sound/soc-acpi.h>
#include <sound/soc-dapm.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include "acp-mach.h"
......@@ -27,6 +28,7 @@ static struct acp_card_drvdata rt5682_rt1019_data = {
.hs_codec_id = RT5682,
.amp_codec_id = RT1019,
.dmic_codec_id = DMIC,
.tdm_mode = false,
};
static struct acp_card_drvdata rt5682s_max_data = {
......@@ -36,6 +38,7 @@ static struct acp_card_drvdata rt5682s_max_data = {
.hs_codec_id = RT5682S,
.amp_codec_id = MAX98360A,
.dmic_codec_id = DMIC,
.tdm_mode = false,
};
static struct acp_card_drvdata rt5682s_rt1019_data = {
......@@ -45,6 +48,7 @@ static struct acp_card_drvdata rt5682s_rt1019_data = {
.hs_codec_id = RT5682S,
.amp_codec_id = RT1019,
.dmic_codec_id = DMIC,
.tdm_mode = false,
};
static struct acp_card_drvdata max_nau8825_data = {
......@@ -56,6 +60,7 @@ static struct acp_card_drvdata max_nau8825_data = {
.dmic_codec_id = DMIC,
.soc_mclk = true,
.platform = REMBRANDT,
.tdm_mode = false,
};
static struct acp_card_drvdata rt5682s_rt1019_rmb_data = {
......@@ -67,6 +72,7 @@ static struct acp_card_drvdata rt5682s_rt1019_rmb_data = {
.dmic_codec_id = DMIC,
.soc_mclk = true,
.platform = REMBRANDT,
.tdm_mode = false,
};
static const struct snd_kcontrol_new acp_controls[] = {
......@@ -90,6 +96,8 @@ static int acp_asoc_probe(struct platform_device *pdev)
{
struct snd_soc_card *card = NULL;
struct device *dev = &pdev->dev;
const struct dmi_system_id *dmi_id;
struct acp_card_drvdata *acp_card_drvdata;
int ret;
if (!pdev->id_entry)
......@@ -108,6 +116,11 @@ static int acp_asoc_probe(struct platform_device *pdev)
card->num_controls = ARRAY_SIZE(acp_controls);
card->drvdata = (struct acp_card_drvdata *)pdev->id_entry->driver_data;
acp_card_drvdata = card->drvdata;
dmi_id = dmi_first_match(acp_quirk_table);
if (dmi_id && dmi_id->driver_data)
acp_card_drvdata->tdm_mode = dmi_id->driver_data;
acp_legacy_dai_links_create(card);
ret = devm_snd_soc_register_card(&pdev->dev, card);
......
This diff is collapsed.
......@@ -18,6 +18,8 @@
#include <linux/module.h>
#include <sound/soc.h>
#define TDM_CHANNELS 8
enum be_id {
HEADSET_BE_ID = 0,
AMP_BE_ID,
......@@ -58,9 +60,11 @@ struct acp_card_drvdata {
struct clk *wclk;
struct clk *bclk;
bool soc_mclk;
bool tdm_mode;
};
int acp_sofdsp_dai_links_create(struct snd_soc_card *card);
int acp_legacy_dai_links_create(struct snd_soc_card *card);
extern const struct dmi_system_id acp_quirk_table[];
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment