sound updates for 6.3-rc1
The majority of works in this cycle are about ASoC spread over trees. Most of them are for new devices and cleanups / refactoring works, and not much significant changes are seen in the core side. Below are some highlights: ASoC: - Continued refactoring to move into common helper functions - Lots of DT schema conversons and stylistic nits - Continued work on building out the new SOF IPC4 scheme - Continued work for Intel AVS - New drivers for Awinc AT88395, Infineon PEB2466, Iron Device SMA1303, Mediatek MT8188, Realtek RT712, Renesas IDT821034, Samsung/Tesla FSD SoC I2S, and TI TAS5720A-Q1 ALSA: - A few cleanups to make the remove callbacks to void returns - FireWire refactoring and enhancements - PCM kselftest enhancements -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmPw+kkOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE9X3RAAkxjjtk+BRF+tvS6VYQhezTOE7frSqpxB+ZHm KjdQClfpbPqYVD/pUEnz+N68bmOZKK8Ihif+LaaW+8NJJa/1kivQWNCQLCvm7L71 x7TRkOYvrzlx+Fhpf6JacOM8VaBkRrfd+cK6pQSv8b72ZTWorfenkaC9OMdL2NEY YI/sH5zZd6dDoKfQ+WPsplOSCog3KKgAGvn4qEQKxADsyOjsu3rpgijcgDmVc9XT y2RMAEPID68TtAtcNhesurLEKZ+4mEDvALQjAsxxb99lfAFDlDBezEO4/dl2v9Db yebsEnM+W5z3dVl13Aok9XtVCxrhy7n+v5z060ZEoTxIEJK7YVCWx8XCVL1KSgNV 31MEVDgf7PrsYAWr54yNF2lmwJh5YchZQ28ngZRHmQ7jMpVbO6ypyIzf77fEQSam SiCG7hurSCB38LUb7fg1WsjSRupRamoPDhRG9q7C36ePdeYRkBqOJsSmfABjN/Cb v0fixm45PtZpWoZUpLAzNEtkQA665Sf2SoAnAY+kCPllYuNXXHdEomokppffXHbO Xbq/wcehpOJKR9vqWhsBuVz34UbGyuM1SBLrNXj+sr24Xv6Uy4E5GcJ75rO1E3TR gTGTIM/DtOwTGKyceQ30Gnl9M2wKeP9/qEhkH60XgyzitGp9iAvrIvcU1ODVlfgN ZSBzjOk= =9s9c -----END PGP SIGNATURE----- Merge tag 'sound-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "The majority of works in this cycle are about ASoC spread over trees. Most of them are for new devices and cleanups / refactoring works, and not much significant changes are seen in the core side. Below are some highlights: ASoC: - Continued refactoring to move into common helper functions - Lots of DT schema conversons and stylistic nits - Continued work on building out the new SOF IPC4 scheme - Continued work for Intel AVS - New drivers for Awinc AT88395, Infineon PEB2466, Iron Device SMA1303, Mediatek MT8188, Realtek RT712, Renesas IDT821034, Samsung/Tesla FSD SoC I2S, and TI TAS5720A-Q1 ALSA: - A few cleanups to make the remove callbacks to void returns - FireWire refactoring and enhancements - PCM kselftest enhancements" * tag 'sound-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (398 commits) ALSA: hda/hdmi: Register with vga_switcheroo on Dual GPU Macbooks ASoC: soc-ac97: Return correct error codes ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared ASoC: cs35l45: Remove separate namespace for tables ASoC: cs35l45: Remove separate tables module ASoC: soc-ac97: Convert to agnostic GPIO API ASoC: dt-bindings: renesas,rsnd.yaml: drop "dmas/dma-names" from "rcar_sound,ssi" ALSA: hda: cs35l41: Enable Amp High Pass Filter ALSA: hda: cs35l41: Ensure firmware/tuning pairs are always loaded ALSA: hda: cs35l41: Correct error condition handling ASoC: codecs: wcd934x: Use min macro for comparison and assignment ASoC: Intel: Skylake: Fix struct definition ASoC: tlv320adcx140: extend list of supported samplerates ASoC: imx-pcm-rpmsg: Remove unused variable SoC: rt5682s: Disable jack detection interrupt during suspend ASoC: SOF: Intel: hda-dsp: Set streaming flag for d0i3 ASoC: SOF: Intel: Enable d0i3 work for ipc4 ASoC: SOF: ipc4: Wake up dsp core before sending ipc msg ASoC: SOF: Intel: hda-dsp: use set_pm_gate according to ipc version ASoC: SOF: Introduce a new set_pm_gate() IPC PM op ...
This commit is contained in:
commit
064d7dcf51
@ -15,7 +15,9 @@ description: |
|
|||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
const: mediatek,mt8186-dsp
|
enum:
|
||||||
|
- mediatek,mt8186-dsp
|
||||||
|
- mediatek,mt8188-dsp
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
items:
|
items:
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
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>;
|
|
||||||
};
|
|
40
Documentation/devicetree/bindings/sound/adi,adau7002.yaml
Normal file
40
Documentation/devicetree/bindings/sound/adi,adau7002.yaml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# 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":
|
"#sound-dai-cells":
|
||||||
const: 0
|
const: 0
|
||||||
|
|
||||||
|
ports:
|
||||||
|
$ref: audio-graph-port.yaml#/definitions/ports
|
||||||
|
|
||||||
|
port:
|
||||||
|
$ref: audio-graph-port.yaml#
|
||||||
|
unevaluatedProperties: false
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
"^asahi-kasei,in[1-2]-single-end$":
|
"^asahi-kasei,in[1-2]-single-end$":
|
||||||
description: Input Pin 1 - 2.
|
description: Input Pin 1 - 2.
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
* 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>;
|
|
||||||
};
|
|
112
Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml
Normal file
112
Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
# 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>;
|
||||||
|
};
|
@ -1,29 +0,0 @@
|
|||||||
* 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";
|
|
||||||
};
|
|
82
Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml
Normal file
82
Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
# 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";
|
||||||
|
};
|
@ -1,124 +0,0 @@
|
|||||||
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>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -0,0 +1,183 @@
|
|||||||
|
# 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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@ -1,27 +0,0 @@
|
|||||||
* 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";
|
|
||||||
};
|
|
@ -0,0 +1,86 @@
|
|||||||
|
# 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";
|
||||||
|
};
|
@ -1,25 +0,0 @@
|
|||||||
* 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";
|
|
||||||
};
|
|
@ -0,0 +1,79 @@
|
|||||||
|
# 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";
|
||||||
|
};
|
@ -1,36 +0,0 @@
|
|||||||
* 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";
|
|
||||||
};
|
|
@ -0,0 +1,88 @@
|
|||||||
|
# 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";
|
||||||
|
};
|
@ -1,22 +0,0 @@
|
|||||||
* 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";
|
|
||||||
};
|
|
@ -0,0 +1,55 @@
|
|||||||
|
# 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
|
description: phandle of the CPU DAI
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
"^codec-[0-9]+$":
|
"^codec(-[0-9]+)?$":
|
||||||
type: object
|
type: object
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
description: |-
|
description: |-
|
||||||
|
@ -11,32 +11,24 @@ maintainers:
|
|||||||
|
|
||||||
select: false
|
select: false
|
||||||
|
|
||||||
allOf:
|
definitions:
|
||||||
- $ref: /schemas/graph.yaml#/$defs/port-base
|
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"
|
||||||
|
|
||||||
properties:
|
endpoint-base:
|
||||||
prefix:
|
|
||||||
description: "device name prefix"
|
|
||||||
$ref: /schemas/types.yaml#/definitions/string
|
|
||||||
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"
|
|
||||||
|
|
||||||
patternProperties:
|
|
||||||
"^endpoint(@[0-9a-f]+)?":
|
|
||||||
$ref: /schemas/graph.yaml#/$defs/endpoint-base
|
$ref: /schemas/graph.yaml#/$defs/endpoint-base
|
||||||
unevaluatedProperties: false
|
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
mclk-fs:
|
mclk-fs:
|
||||||
description: |
|
$ref: "simple-card.yaml#/definitions/mclk-fs"
|
||||||
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
|
|
||||||
frame-inversion:
|
frame-inversion:
|
||||||
description: dai-link uses frame clock inversion
|
description: dai-link uses frame clock inversion
|
||||||
$ref: /schemas/types.yaml#/definitions/flag
|
$ref: /schemas/types.yaml#/definitions/flag
|
||||||
@ -53,6 +45,15 @@ patternProperties:
|
|||||||
oneOf:
|
oneOf:
|
||||||
- $ref: /schemas/types.yaml#/definitions/flag
|
- $ref: /schemas/types.yaml#/definitions/flag
|
||||||
- $ref: /schemas/types.yaml#/definitions/phandle
|
- $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:
|
dai-format:
|
||||||
description: audio format.
|
description: audio format.
|
||||||
@ -100,4 +101,24 @@ patternProperties:
|
|||||||
minimum: 1
|
minimum: 1
|
||||||
maximum: 64
|
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
|
additionalProperties: true
|
||||||
|
53
Documentation/devicetree/bindings/sound/awinic,aw88395.yaml
Normal file
53
Documentation/devicetree/bindings/sound/awinic,aw88395.yaml
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# 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:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
'#sound-dai-cells':
|
'#sound-dai-cells':
|
||||||
description:
|
description:
|
||||||
The first cell indicating the audio interface.
|
The first cell indicating the audio interface.
|
||||||
@ -42,7 +45,7 @@ properties:
|
|||||||
Configures the peak current by monitoring the current through the boost FET.
|
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
|
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.
|
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
|
minimum: 1600
|
||||||
maximum: 4500
|
maximum: 4500
|
||||||
default: 4500
|
default: 4500
|
||||||
@ -51,7 +54,7 @@ properties:
|
|||||||
description:
|
description:
|
||||||
Boost inductor value, expressed in nH. Valid
|
Boost inductor value, expressed in nH. Valid
|
||||||
values include 1000, 1200, 1500 and 2200.
|
values include 1000, 1200, 1500 and 2200.
|
||||||
$ref: "/schemas/types.yaml#/definitions/uint32"
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
minimum: 1000
|
minimum: 1000
|
||||||
maximum: 2200
|
maximum: 2200
|
||||||
|
|
||||||
@ -60,7 +63,7 @@ properties:
|
|||||||
Total equivalent boost capacitance on the VBST
|
Total equivalent boost capacitance on the VBST
|
||||||
and VAMP pins, derated at 11 volts DC. The value must be rounded to the
|
and VAMP pins, derated at 11 volts DC. The value must be rounded to the
|
||||||
nearest integer and expressed in uF.
|
nearest integer and expressed in uF.
|
||||||
$ref: "/schemas/types.yaml#/definitions/uint32"
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
|
||||||
cirrus,asp-sdout-hiz:
|
cirrus,asp-sdout-hiz:
|
||||||
description:
|
description:
|
||||||
@ -70,7 +73,7 @@ properties:
|
|||||||
1 = Hi-Z during unused slots but logic 0 while all transmit channels disabled
|
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
|
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
|
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
|
minimum: 0
|
||||||
maximum: 3
|
maximum: 3
|
||||||
default: 2
|
default: 2
|
||||||
@ -84,7 +87,7 @@ properties:
|
|||||||
enable boost voltage.
|
enable boost voltage.
|
||||||
0 = Internal Boost
|
0 = Internal Boost
|
||||||
1 = External Boost
|
1 = External Boost
|
||||||
$ref: "/schemas/types.yaml#/definitions/uint32"
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 1
|
maximum: 1
|
||||||
|
|
||||||
@ -109,7 +112,7 @@ properties:
|
|||||||
1 = GPIO
|
1 = GPIO
|
||||||
2 = Sync
|
2 = Sync
|
||||||
3 = MCLK input
|
3 = MCLK input
|
||||||
$ref: "/schemas/types.yaml#/definitions/uint32"
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 3
|
maximum: 3
|
||||||
|
|
||||||
@ -136,7 +139,7 @@ properties:
|
|||||||
3 = MCLK input
|
3 = MCLK input
|
||||||
4 = Push-pull INTB (active low)
|
4 = Push-pull INTB (active low)
|
||||||
5 = Push-pull INT (active high)
|
5 = Push-pull INT (active high)
|
||||||
$ref: "/schemas/types.yaml#/definitions/uint32"
|
$ref: /schemas/types.yaml#/definitions/uint32
|
||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 5
|
maximum: 5
|
||||||
|
|
||||||
@ -176,21 +179,23 @@ unevaluatedProperties: false
|
|||||||
|
|
||||||
examples:
|
examples:
|
||||||
- |
|
- |
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
|
||||||
spi {
|
spi {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
|
||||||
cs35l41: cs35l41@2 {
|
cs35l41: speaker-amp@2 {
|
||||||
#sound-dai-cells = <1>;
|
#sound-dai-cells = <1>;
|
||||||
compatible = "cirrus,cs35l41";
|
compatible = "cirrus,cs35l41";
|
||||||
reg = <2>;
|
reg = <2>;
|
||||||
VA-supply = <&dummy_vreg>;
|
VA-supply = <&dummy_vreg>;
|
||||||
VP-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-type = <0>;
|
||||||
cirrus,boost-peak-milliamp = <4500>;
|
cirrus,boost-peak-milliamp = <4500>;
|
||||||
cirrus,boost-ind-nanohenry = <1000>;
|
cirrus,boost-ind-nanohenry = <1000>;
|
||||||
cirrus,boost-cap-microfarad = <15>;
|
cirrus,boost-cap-microfarad = <15>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
# 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:
|
maintainers:
|
||||||
- Jerome Brunet <jbrunet@baylibre.com>
|
- Jerome Brunet <jbrunet@baylibre.com>
|
||||||
|
|
||||||
properties:
|
allOf:
|
||||||
sound-name-prefix:
|
- $ref: component-common.yaml#
|
||||||
$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.
|
|
||||||
|
|
||||||
|
properties:
|
||||||
'#sound-dai-cells': true
|
'#sound-dai-cells': true
|
||||||
|
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
|
@ -76,10 +76,14 @@ properties:
|
|||||||
minItems: 4
|
minItems: 4
|
||||||
|
|
||||||
dmas:
|
dmas:
|
||||||
maxItems: 2
|
items:
|
||||||
|
- description: DMA controller phandle and request line for RX
|
||||||
|
- description: DMA controller phandle and request line for TX
|
||||||
|
|
||||||
dma-names:
|
dma-names:
|
||||||
maxItems: 2
|
items:
|
||||||
|
- const: rx
|
||||||
|
- const: tx
|
||||||
|
|
||||||
interrupts:
|
interrupts:
|
||||||
items:
|
items:
|
||||||
@ -142,31 +146,6 @@ properties:
|
|||||||
|
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: dai-common.yaml#
|
- $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:
|
- if:
|
||||||
required:
|
required:
|
||||||
- fsl,sai-asynchronous
|
- fsl,sai-asynchronous
|
||||||
@ -199,9 +178,8 @@ examples:
|
|||||||
<&clks VF610_CLK_SAI2>,
|
<&clks VF610_CLK_SAI2>,
|
||||||
<&clks 0>, <&clks 0>;
|
<&clks 0>, <&clks 0>;
|
||||||
clock-names = "bus", "mclk1", "mclk2", "mclk3";
|
clock-names = "bus", "mclk1", "mclk2", "mclk3";
|
||||||
dma-names = "tx", "rx";
|
dma-names = "rx", "tx";
|
||||||
dmas = <&edma0 0 21>,
|
dmas = <&edma0 0 20>, <&edma0 0 21>;
|
||||||
<&edma0 0 20>;
|
|
||||||
big-endian;
|
big-endian;
|
||||||
lsb-first;
|
lsb-first;
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,7 @@ properties:
|
|||||||
compatible:
|
compatible:
|
||||||
enum:
|
enum:
|
||||||
- fsl,imx8mp-xcvr
|
- fsl,imx8mp-xcvr
|
||||||
|
- fsl,imx93-xcvr
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
items:
|
items:
|
||||||
|
@ -75,6 +75,18 @@ patternProperties:
|
|||||||
|
|
||||||
additionalProperties: false
|
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:
|
required:
|
||||||
- link-name
|
- link-name
|
||||||
- cpu
|
- cpu
|
||||||
|
@ -0,0 +1,91 @@
|
|||||||
|
# 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>;
|
||||||
|
};
|
||||||
|
};
|
@ -0,0 +1,48 @@
|
|||||||
|
# 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>;
|
||||||
|
};
|
||||||
|
};
|
@ -1,59 +0,0 @@
|
|||||||
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>;
|
|
||||||
};
|
|
@ -1,22 +0,0 @@
|
|||||||
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>;
|
|
||||||
};
|
|
84
Documentation/devicetree/bindings/sound/maxim,max98090.yaml
Normal file
84
Documentation/devicetree/bindings/sound/maxim,max98090.yaml
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
# 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>;
|
||||||
|
};
|
||||||
|
};
|
54
Documentation/devicetree/bindings/sound/maxim,max98095.yaml
Normal file
54
Documentation/devicetree/bindings/sound/maxim,max98095.yaml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# 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";
|
||||||
|
};
|
||||||
|
};
|
208
Documentation/devicetree/bindings/sound/mediatek,mt8188-afe.yaml
Normal file
208
Documentation/devicetree/bindings/sound/mediatek,mt8188-afe.yaml
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
# 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";
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
@ -0,0 +1,97 @@
|
|||||||
|
# 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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||||
%YAML 1.2
|
%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#
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
title: Microchip I2S Multi-Channel Controller
|
title: Microchip I2S Multi-Channel Controller
|
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||||
%YAML 1.2
|
%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#
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
title: Microchip Pulse Density Microphone Controller
|
title: Microchip Pulse Density Microphone Controller
|
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||||
%YAML 1.2
|
%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#
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
title: Microchip S/PDIF Rx Controller
|
title: Microchip S/PDIF Rx Controller
|
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||||
%YAML 1.2
|
%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#
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
title: Microchip S/PDIF Tx Controller
|
title: Microchip S/PDIF Tx Controller
|
@ -1,16 +0,0 @@
|
|||||||
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>;
|
|
||||||
};
|
|
46
Documentation/devicetree/bindings/sound/nuvoton,nau8822.yaml
Normal file
46
Documentation/devicetree/bindings/sound/nuvoton,nau8822.yaml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# 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:
|
clocks:
|
||||||
minItems: 3
|
minItems: 3
|
||||||
maxItems: 7
|
maxItems: 10
|
||||||
|
|
||||||
clock-names:
|
clock-names:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
@ -65,6 +65,9 @@ properties:
|
|||||||
power-domain-names:
|
power-domain-names:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
|
required-opps:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
'#sound-dai-cells':
|
'#sound-dai-cells':
|
||||||
const: 1
|
const: 1
|
||||||
|
|
||||||
@ -75,7 +78,7 @@ properties:
|
|||||||
const: 0
|
const: 0
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
"^dai-link@[0-9a-f]$":
|
"^dai-link@[0-9a-f]+$":
|
||||||
type: object
|
type: object
|
||||||
description: |
|
description: |
|
||||||
LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
|
LPASS CPU dai node for each I2S device or Soundwire device. Bindings of each node
|
||||||
@ -121,6 +124,8 @@ allOf:
|
|||||||
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
clocks:
|
||||||
|
maxItems: 3
|
||||||
clock-names:
|
clock-names:
|
||||||
items:
|
items:
|
||||||
- const: ahbix-clk
|
- const: ahbix-clk
|
||||||
@ -135,6 +140,9 @@ allOf:
|
|||||||
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
clocks:
|
||||||
|
minItems: 7
|
||||||
|
maxItems: 7
|
||||||
clock-names:
|
clock-names:
|
||||||
items:
|
items:
|
||||||
- const: ahbix-clk
|
- const: ahbix-clk
|
||||||
@ -153,33 +161,31 @@ allOf:
|
|||||||
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
clocks:
|
||||||
|
minItems: 6
|
||||||
|
maxItems: 6
|
||||||
clock-names:
|
clock-names:
|
||||||
oneOf:
|
items:
|
||||||
- items: #for I2S
|
- const: pcnoc-sway-clk
|
||||||
- const: pcnoc-sway-clk
|
- const: audio-core
|
||||||
- const: audio-core
|
- const: mclk0
|
||||||
- const: mclk0
|
- const: pcnoc-mport-clk
|
||||||
- const: pcnoc-mport-clk
|
- const: mi2s-bit-clk0
|
||||||
- const: mi2s-bit-clk0
|
- const: mi2s-bit-clk1
|
||||||
- const: mi2s-bit-clk1
|
reg:
|
||||||
- items: #for HDMI
|
minItems: 2
|
||||||
- const: pcnoc-sway-clk
|
maxItems: 2
|
||||||
- const: audio-core
|
|
||||||
- const: pcnoc-mport-clk
|
|
||||||
reg-names:
|
reg-names:
|
||||||
anyOf:
|
items:
|
||||||
- items: #for I2S
|
- const: lpass-hdmiif
|
||||||
- const: lpass-lpaif
|
- const: lpass-lpaif
|
||||||
- items: #for I2S and HDMI
|
interrupts:
|
||||||
- const: lpass-hdmiif
|
minItems: 2
|
||||||
- const: lpass-lpaif
|
maxItems: 2
|
||||||
interrupt-names:
|
interrupt-names:
|
||||||
anyOf:
|
items:
|
||||||
- items: #for I2S
|
- const: lpass-irq-lpaif
|
||||||
- const: lpass-irq-lpaif
|
- const: lpass-irq-hdmi
|
||||||
- items: #for I2S and HDMI
|
|
||||||
- const: lpass-irq-lpaif
|
|
||||||
- const: lpass-irq-hdmi
|
|
||||||
required:
|
required:
|
||||||
- iommus
|
- iommus
|
||||||
- power-domains
|
- power-domains
|
||||||
@ -192,54 +198,44 @@ allOf:
|
|||||||
|
|
||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
|
clocks:
|
||||||
|
minItems: 10
|
||||||
|
maxItems: 10
|
||||||
clock-names:
|
clock-names:
|
||||||
oneOf:
|
items:
|
||||||
- items: #for I2S
|
- const: aon_cc_audio_hm_h
|
||||||
- const: aon_cc_audio_hm_h
|
- const: audio_cc_ext_mclk0
|
||||||
- const: audio_cc_ext_mclk0
|
- const: core_cc_sysnoc_mport_core
|
||||||
- const: core_cc_sysnoc_mport_core
|
- const: core_cc_ext_if0_ibit
|
||||||
- const: core_cc_ext_if0_ibit
|
- const: core_cc_ext_if1_ibit
|
||||||
- const: core_cc_ext_if1_ibit
|
- const: audio_cc_codec_mem
|
||||||
- items: #for Soundwire
|
- const: audio_cc_codec_mem0
|
||||||
- const: aon_cc_audio_hm_h
|
- const: audio_cc_codec_mem1
|
||||||
- const: audio_cc_codec_mem
|
- const: audio_cc_codec_mem2
|
||||||
- const: audio_cc_codec_mem0
|
- const: aon_cc_va_mem0
|
||||||
- const: audio_cc_codec_mem1
|
reg:
|
||||||
- const: audio_cc_codec_mem2
|
minItems: 6
|
||||||
- const: aon_cc_va_mem0
|
maxItems: 6
|
||||||
- items: #for HDMI
|
|
||||||
- const: core_cc_sysnoc_mport_core
|
|
||||||
|
|
||||||
reg-names:
|
reg-names:
|
||||||
anyOf:
|
items:
|
||||||
- items: #for I2S
|
- const: lpass-hdmiif
|
||||||
- const: lpass-lpaif
|
- const: lpass-lpaif
|
||||||
- items: #for I2S and HDMI
|
- const: lpass-rxtx-cdc-dma-lpm
|
||||||
- const: lpass-hdmiif
|
- const: lpass-rxtx-lpaif
|
||||||
- const: lpass-lpaif
|
- const: lpass-va-lpaif
|
||||||
- items: #for I2S, soundwire and HDMI
|
- const: lpass-va-cdc-dma-lpm
|
||||||
- const: lpass-hdmiif
|
interrupts:
|
||||||
- const: lpass-lpaif
|
minItems: 4
|
||||||
- const: lpass-rxtx-cdc-dma-lpm
|
maxItems: 4
|
||||||
- const: lpass-rxtx-lpaif
|
|
||||||
- const: lpass-va-lpaif
|
|
||||||
- const: lpass-va-cdc-dma-lpm
|
|
||||||
interrupt-names:
|
interrupt-names:
|
||||||
anyOf:
|
items:
|
||||||
- items: #for I2S
|
- const: lpass-irq-lpaif
|
||||||
- const: lpass-irq-lpaif
|
- const: lpass-irq-hdmi
|
||||||
- items: #for I2S and HDMI
|
- const: lpass-irq-vaif
|
||||||
- const: lpass-irq-lpaif
|
- const: lpass-irq-rxtxif
|
||||||
- const: lpass-irq-hdmi
|
|
||||||
- items: #for I2S, soundwire and HDMI
|
|
||||||
- const: lpass-irq-lpaif
|
|
||||||
- const: lpass-irq-hdmi
|
|
||||||
- const: lpass-irq-vaif
|
|
||||||
- const: lpass-irq-rxtxif
|
|
||||||
power-domain-names:
|
power-domain-names:
|
||||||
allOf:
|
items:
|
||||||
- items:
|
- const: lcx
|
||||||
- const: lcx
|
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- iommus
|
- iommus
|
||||||
|
@ -36,7 +36,7 @@ properties:
|
|||||||
oneOf:
|
oneOf:
|
||||||
- items: #for ADSP based platforms
|
- items: #for ADSP based platforms
|
||||||
- const: mclk
|
- const: mclk
|
||||||
- const: core
|
- const: macro
|
||||||
- const: dcodec
|
- const: dcodec
|
||||||
- items: #for ADSP bypass based platforms
|
- items: #for ADSP bypass based platforms
|
||||||
- const: mclk
|
- const: mclk
|
||||||
@ -77,7 +77,7 @@ examples:
|
|||||||
clocks = <&aoncc 0>,
|
clocks = <&aoncc 0>,
|
||||||
<&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
|
<&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
|
||||||
<&q6afecc LPASS_HW_DCODEC_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";
|
clock-output-names = "fsgen";
|
||||||
qcom,dmic-sample-rate = <600000>;
|
qcom,dmic-sample-rate = <600000>;
|
||||||
vdd-micb-supply = <&vreg_s4a_1p8>;
|
vdd-micb-supply = <&vreg_s4a_1p8>;
|
||||||
|
@ -17,7 +17,8 @@ properties:
|
|||||||
const: qcom,q6apm-dais
|
const: qcom,q6apm-dais
|
||||||
|
|
||||||
iommus:
|
iommus:
|
||||||
maxItems: 1
|
minItems: 1
|
||||||
|
maxItems: 2
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
|
@ -15,16 +15,20 @@ description:
|
|||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
enum:
|
oneOf:
|
||||||
- lenovo,yoga-c630-sndcard
|
- items:
|
||||||
- qcom,apq8016-sbc-sndcard
|
- enum:
|
||||||
- qcom,db845c-sndcard
|
- lenovo,yoga-c630-sndcard
|
||||||
- qcom,msm8916-qdsp6-sndcard
|
- qcom,db845c-sndcard
|
||||||
- qcom,qrb5165-rb5-sndcard
|
- const: qcom,sdm845-sndcard
|
||||||
- qcom,sc8280xp-sndcard
|
- enum:
|
||||||
- qcom,sdm845-sndcard
|
- qcom,apq8016-sbc-sndcard
|
||||||
- qcom,sm8250-sndcard
|
- qcom,msm8916-qdsp6-sndcard
|
||||||
- qcom,sm8450-sndcard
|
- qcom,qrb5165-rb5-sndcard
|
||||||
|
- qcom,sc8280xp-sndcard
|
||||||
|
- qcom,sdm845-sndcard
|
||||||
|
- qcom,sm8250-sndcard
|
||||||
|
- qcom,sm8450-sndcard
|
||||||
|
|
||||||
audio-routing:
|
audio-routing:
|
||||||
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
|
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
|
||||||
|
@ -28,7 +28,9 @@ properties:
|
|||||||
description: GPIO spec for reset line to use
|
description: GPIO spec for reset line to use
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
slim-ifc-dev: true
|
slim-ifc-dev:
|
||||||
|
description: IFC device interface
|
||||||
|
$ref: /schemas/types.yaml#/definitions/phandle
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
@ -147,21 +149,49 @@ patternProperties:
|
|||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
- reg
|
- reg
|
||||||
- reset-gpios
|
|
||||||
- slim-ifc-dev
|
allOf:
|
||||||
- interrupts
|
- if:
|
||||||
- interrupt-controller
|
required:
|
||||||
- clock-frequency
|
- slim-ifc-dev
|
||||||
- clock-output-names
|
then:
|
||||||
- qcom,micbias1-microvolt
|
required:
|
||||||
- qcom,micbias2-microvolt
|
- reset-gpios
|
||||||
- qcom,micbias3-microvolt
|
- slim-ifc-dev
|
||||||
- qcom,micbias4-microvolt
|
- interrupt-controller
|
||||||
- "#interrupt-cells"
|
- clock-frequency
|
||||||
- "#clock-cells"
|
- clock-output-names
|
||||||
- "#sound-dai-cells"
|
- qcom,micbias1-microvolt
|
||||||
- "#address-cells"
|
- qcom,micbias2-microvolt
|
||||||
- "#size-cells"
|
- qcom,micbias3-microvolt
|
||||||
|
- qcom,micbias4-microvolt
|
||||||
|
- "#interrupt-cells"
|
||||||
|
- "#clock-cells"
|
||||||
|
- "#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
|
additionalProperties: false
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@ description: |
|
|||||||
Their primary operating mode uses a SoundWire digital audio
|
Their primary operating mode uses a SoundWire digital audio
|
||||||
interface. This binding is for SoundWire interface.
|
interface. This binding is for SoundWire interface.
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: dai-common.yaml#
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
const: sdw10217201000
|
const: sdw10217201000
|
||||||
@ -39,7 +42,7 @@ required:
|
|||||||
- "#thermal-sensor-cells"
|
- "#thermal-sensor-cells"
|
||||||
- "#sound-dai-cells"
|
- "#sound-dai-cells"
|
||||||
|
|
||||||
additionalProperties: false
|
unevaluatedProperties: false
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
- |
|
- |
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
# 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:
|
- enum:
|
||||||
- renesas,rcar_sound-r8a7778 # R-Car M1A
|
- renesas,rcar_sound-r8a7778 # R-Car M1A
|
||||||
- renesas,rcar_sound-r8a7779 # R-Car H1
|
- renesas,rcar_sound-r8a7779 # R-Car H1
|
||||||
- enum:
|
- const: renesas,rcar_sound-gen1
|
||||||
- renesas,rcar_sound-gen1
|
|
||||||
# for Gen2 SoC
|
# for Gen2 SoC
|
||||||
- items:
|
- items:
|
||||||
- enum:
|
- enum:
|
||||||
@ -32,8 +31,7 @@ properties:
|
|||||||
- renesas,rcar_sound-r8a7791 # R-Car M2-W
|
- renesas,rcar_sound-r8a7791 # R-Car M2-W
|
||||||
- renesas,rcar_sound-r8a7793 # R-Car M2-N
|
- renesas,rcar_sound-r8a7793 # R-Car M2-N
|
||||||
- renesas,rcar_sound-r8a7794 # R-Car E2
|
- renesas,rcar_sound-r8a7794 # R-Car E2
|
||||||
- enum:
|
- const: renesas,rcar_sound-gen2
|
||||||
- renesas,rcar_sound-gen2
|
|
||||||
# for Gen3 SoC
|
# for Gen3 SoC
|
||||||
- items:
|
- items:
|
||||||
- enum:
|
- enum:
|
||||||
@ -47,14 +45,16 @@ properties:
|
|||||||
- renesas,rcar_sound-r8a77965 # R-Car M3-N
|
- renesas,rcar_sound-r8a77965 # R-Car M3-N
|
||||||
- renesas,rcar_sound-r8a77990 # R-Car E3
|
- renesas,rcar_sound-r8a77990 # R-Car E3
|
||||||
- renesas,rcar_sound-r8a77995 # R-Car D3
|
- renesas,rcar_sound-r8a77995 # R-Car D3
|
||||||
- enum:
|
- const: renesas,rcar_sound-gen3
|
||||||
- renesas,rcar_sound-gen3
|
# for Gen4 SoC
|
||||||
# for Generic
|
|
||||||
- items:
|
- items:
|
||||||
- enum:
|
- const: renesas,rcar_sound-r8a779g0 # R-Car V4H
|
||||||
- renesas,rcar_sound-gen1
|
- const: renesas,rcar_sound-gen4
|
||||||
- renesas,rcar_sound-gen2
|
# for Generic
|
||||||
- renesas,rcar_sound-gen3
|
- enum:
|
||||||
|
- renesas,rcar_sound-gen1
|
||||||
|
- renesas,rcar_sound-gen2
|
||||||
|
- renesas,rcar_sound-gen3
|
||||||
|
|
||||||
reg:
|
reg:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
@ -68,6 +68,7 @@ properties:
|
|||||||
description: |
|
description: |
|
||||||
it must be 0 if your system is using single DAI
|
it must be 0 if your system is using single DAI
|
||||||
it must be 1 if your system is using multi DAIs
|
it must be 1 if your system is using multi DAIs
|
||||||
|
This is used on simple-audio-card
|
||||||
enum: [0, 1]
|
enum: [0, 1]
|
||||||
|
|
||||||
"#clock-cells":
|
"#clock-cells":
|
||||||
@ -113,15 +114,34 @@ properties:
|
|||||||
- pattern: '^clk_(a|b|c|i)$'
|
- pattern: '^clk_(a|b|c|i)$'
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
$ref: /schemas/graph.yaml#/properties/ports
|
$ref: audio-graph-port.yaml#/definitions/port-base
|
||||||
|
unevaluatedProperties: false
|
||||||
patternProperties:
|
patternProperties:
|
||||||
'^port(@[0-9a-f]+)?$':
|
'^port(@[0-9a-f]+)?$':
|
||||||
$ref: audio-graph-port.yaml#
|
$ref: audio-graph-port.yaml#/definitions/port-base
|
||||||
unevaluatedProperties: false
|
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:
|
port:
|
||||||
$ref: audio-graph-port.yaml#
|
$ref: audio-graph-port.yaml#/definitions/port-base
|
||||||
unevaluatedProperties: false
|
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:
|
rcar_sound,dvc:
|
||||||
description: DVC subnode.
|
description: DVC subnode.
|
||||||
@ -178,10 +198,6 @@ properties:
|
|||||||
enum:
|
enum:
|
||||||
- tx
|
- tx
|
||||||
- rx
|
- rx
|
||||||
required:
|
|
||||||
- interrupts
|
|
||||||
- dmas
|
|
||||||
- dma-names
|
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|
||||||
rcar_sound,ssiu:
|
rcar_sound,ssiu:
|
||||||
@ -240,8 +256,6 @@ properties:
|
|||||||
$ref: /schemas/types.yaml#/definitions/flag
|
$ref: /schemas/types.yaml#/definitions/flag
|
||||||
required:
|
required:
|
||||||
- interrupts
|
- interrupts
|
||||||
- dmas
|
|
||||||
- dma-names
|
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|
||||||
# For DAI base
|
# For DAI base
|
||||||
@ -271,7 +285,6 @@ required:
|
|||||||
- reg-names
|
- reg-names
|
||||||
- clocks
|
- clocks
|
||||||
- clock-names
|
- clock-names
|
||||||
- "#sound-dai-cells"
|
|
||||||
|
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: dai-common.yaml#
|
- $ref: dai-common.yaml#
|
||||||
@ -285,7 +298,6 @@ allOf:
|
|||||||
reg:
|
reg:
|
||||||
maxItems: 3
|
maxItems: 3
|
||||||
reg-names:
|
reg-names:
|
||||||
maxItems: 3
|
|
||||||
items:
|
items:
|
||||||
enum:
|
enum:
|
||||||
- scu
|
- scu
|
||||||
@ -294,9 +306,8 @@ allOf:
|
|||||||
else:
|
else:
|
||||||
properties:
|
properties:
|
||||||
reg:
|
reg:
|
||||||
maxItems: 5
|
minItems: 5
|
||||||
reg-names:
|
reg-names:
|
||||||
maxItems: 5
|
|
||||||
items:
|
items:
|
||||||
enum:
|
enum:
|
||||||
- scu
|
- scu
|
||||||
|
@ -20,6 +20,9 @@ Optional properties:
|
|||||||
- realtek,in3-differential
|
- realtek,in3-differential
|
||||||
Boolean. Indicate MIC1/2/3 input are differential, rather than single-ended.
|
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,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
|
||||||
|
|
||||||
- realtek,dmic1-data-pin
|
- realtek,dmic1-data-pin
|
||||||
|
@ -43,9 +43,10 @@ properties:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
sound-dai:
|
sound-dai:
|
||||||
|
minItems: 1
|
||||||
items:
|
items:
|
||||||
- description: phandle of the MAX98090 CODEC
|
|
||||||
- description: phandle of the HDMI IP block node
|
- description: phandle of the HDMI IP block node
|
||||||
|
- description: phandle of the MAX98090 CODEC
|
||||||
|
|
||||||
samsung,audio-routing:
|
samsung,audio-routing:
|
||||||
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
|
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
|
||||||
|
@ -37,12 +37,20 @@ properties:
|
|||||||
samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports
|
samsung,exynos7-i2s1: I2S1 on previous samsung platforms supports
|
||||||
stereo channels. Exynos7 I2S1 upgraded to 5.1 multichannel with
|
stereo channels. Exynos7 I2S1 upgraded to 5.1 multichannel with
|
||||||
slightly modified bit offsets.
|
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:
|
enum:
|
||||||
- samsung,s3c6410-i2s
|
- samsung,s3c6410-i2s
|
||||||
- samsung,s5pv210-i2s
|
- samsung,s5pv210-i2s
|
||||||
- samsung,exynos5420-i2s
|
- samsung,exynos5420-i2s
|
||||||
- samsung,exynos7-i2s
|
- samsung,exynos7-i2s
|
||||||
- samsung,exynos7-i2s1
|
- samsung,exynos7-i2s1
|
||||||
|
- tesla,fsd-i2s
|
||||||
|
|
||||||
'#address-cells':
|
'#address-cells':
|
||||||
const: 1
|
const: 1
|
||||||
@ -67,9 +75,6 @@ properties:
|
|||||||
- const: rx
|
- const: rx
|
||||||
- const: tx-sec
|
- const: tx-sec
|
||||||
|
|
||||||
assigned-clock-parents: true
|
|
||||||
assigned-clocks: true
|
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
minItems: 1
|
minItems: 1
|
||||||
maxItems: 3
|
maxItems: 3
|
||||||
|
@ -205,6 +205,8 @@ patternProperties:
|
|||||||
$ref: "#/definitions/dai"
|
$ref: "#/definitions/dai"
|
||||||
"^simple-audio-card,codec(@[0-9a-f]+)?$":
|
"^simple-audio-card,codec(@[0-9a-f]+)?$":
|
||||||
$ref: "#/definitions/dai"
|
$ref: "#/definitions/dai"
|
||||||
|
"^simple-audio-card,plat(@[0-9a-f]+)?$":
|
||||||
|
$ref: "#/definitions/dai"
|
||||||
|
|
||||||
"^simple-audio-card,dai-link(@[0-9a-f]+)?$":
|
"^simple-audio-card,dai-link(@[0-9a-f]+)?$":
|
||||||
description: |
|
description: |
|
||||||
@ -215,6 +217,10 @@ patternProperties:
|
|||||||
reg:
|
reg:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
|
"#address-cells":
|
||||||
|
const: 1
|
||||||
|
"#size-cells":
|
||||||
|
const: 0
|
||||||
# common properties
|
# common properties
|
||||||
frame-master:
|
frame-master:
|
||||||
$ref: "#/definitions/frame-master"
|
$ref: "#/definitions/frame-master"
|
||||||
@ -244,9 +250,9 @@ patternProperties:
|
|||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
"^cpu(@[0-9a-f]+)?":
|
"^cpu(-[0-9]+)?$":
|
||||||
$ref: "#/definitions/dai"
|
$ref: "#/definitions/dai"
|
||||||
"^codec(@[0-9a-f]+)?":
|
"^codec(-[0-9]+)?$":
|
||||||
$ref: "#/definitions/dai"
|
$ref: "#/definitions/dai"
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|
||||||
@ -462,16 +468,16 @@ examples:
|
|||||||
|
|
||||||
convert-channels = <8>; /* TDM Split */
|
convert-channels = <8>; /* TDM Split */
|
||||||
|
|
||||||
sndcpu1: cpu0 {
|
sndcpu1: cpu-0 {
|
||||||
sound-dai = <&rcar_sound 1>;
|
sound-dai = <&rcar_sound 1>;
|
||||||
};
|
};
|
||||||
cpu1 {
|
cpu-1 {
|
||||||
sound-dai = <&rcar_sound 2>;
|
sound-dai = <&rcar_sound 2>;
|
||||||
};
|
};
|
||||||
cpu2 {
|
cpu-2 {
|
||||||
sound-dai = <&rcar_sound 3>;
|
sound-dai = <&rcar_sound 3>;
|
||||||
};
|
};
|
||||||
cpu3 {
|
cpu-3 {
|
||||||
sound-dai = <&rcar_sound 4>;
|
sound-dai = <&rcar_sound 4>;
|
||||||
};
|
};
|
||||||
codec {
|
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/TAS5720L
|
||||||
https://www.ti.com/product/TAS5720M
|
https://www.ti.com/product/TAS5720M
|
||||||
|
https://www.ti.com/product/TAS5720A-Q1
|
||||||
https://www.ti.com/product/TAS5722L
|
https://www.ti.com/product/TAS5722L
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
|
|
||||||
- compatible : "ti,tas5720",
|
- compatible : "ti,tas5720",
|
||||||
|
"ti,tas5720a-q1",
|
||||||
"ti,tas5722"
|
"ti,tas5722"
|
||||||
- reg : I2C slave address
|
- reg : I2C slave address
|
||||||
- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
|
- dvdd-supply : phandle to a 3.3-V supply for the digital circuitry
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
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>;
|
|
||||||
};
|
|
||||||
};
|
|
107
Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
Normal file
107
Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
# 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>;
|
||||||
|
};
|
||||||
|
};
|
165
Documentation/devicetree/bindings/sound/ti,tlv320aic3x.yaml
Normal file
165
Documentation/devicetree/bindings/sound/ti,tlv320aic3x.yaml
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
# 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 = <®ulator>;
|
||||||
|
IOVDD-supply = <®ulator>;
|
||||||
|
DRVDD-supply = <®ulator>;
|
||||||
|
DVDD-supply = <®ulator>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
- |
|
||||||
|
#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 = <®ulator>;
|
||||||
|
IOVDD-supply = <®ulator>;
|
||||||
|
DRVDD-supply = <®ulator>;
|
||||||
|
DVDD-supply = <®ulator>;
|
||||||
|
ai3x-ocmv = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
@ -1,97 +0,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 = <®ulator>;
|
|
||||||
IOVDD-supply = <®ulator>;
|
|
||||||
DRVDD-supply = <®ulator>;
|
|
||||||
DVDD-supply = <®ulator>;
|
|
||||||
};
|
|
||||||
|
|
||||||
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 = <®ulator>;
|
|
||||||
IOVDD-supply = <®ulator>;
|
|
||||||
DRVDD-supply = <®ulator>;
|
|
||||||
DVDD-supply = <®ulator>;
|
|
||||||
ai3x-ocmv = <0>;
|
|
||||||
};
|
|
||||||
};
|
|
@ -645,6 +645,8 @@ patternProperties:
|
|||||||
description: Inverse Path
|
description: Inverse Path
|
||||||
"^iom,.*":
|
"^iom,.*":
|
||||||
description: Iomega Corporation
|
description: Iomega Corporation
|
||||||
|
"^irondevice,.*":
|
||||||
|
description: Iron Device Corporation
|
||||||
"^isee,.*":
|
"^isee,.*":
|
||||||
description: ISEE 2007 S.L.
|
description: ISEE 2007 S.L.
|
||||||
"^isil,.*":
|
"^isil,.*":
|
||||||
|
@ -70,7 +70,7 @@ dsp_map
|
|||||||
PCM device number maps assigned to the 1st OSS device;
|
PCM device number maps assigned to the 1st OSS device;
|
||||||
Default: 0
|
Default: 0
|
||||||
adsp_map
|
adsp_map
|
||||||
PCM device number maps assigned to the 2st OSS device;
|
PCM device number maps assigned to the 2nd OSS device;
|
||||||
Default: 1
|
Default: 1
|
||||||
nonblock_open
|
nonblock_open
|
||||||
Don't block opening busy PCM devices;
|
Don't block opening busy PCM devices;
|
||||||
@ -97,7 +97,7 @@ midi_map
|
|||||||
MIDI device number maps assigned to the 1st OSS device;
|
MIDI device number maps assigned to the 1st OSS device;
|
||||||
Default: 0
|
Default: 0
|
||||||
amidi_map
|
amidi_map
|
||||||
MIDI device number maps assigned to the 2st OSS device;
|
MIDI device number maps assigned to the 2nd OSS device;
|
||||||
Default: 1
|
Default: 1
|
||||||
|
|
||||||
Module snd-soc-core
|
Module snd-soc-core
|
||||||
@ -727,9 +727,9 @@ Module for EMU10K1/EMU10k2 based PCI sound cards.
|
|||||||
* Sound Blaster Audigy
|
* Sound Blaster Audigy
|
||||||
|
|
||||||
extin
|
extin
|
||||||
bitmap of available external inputs for FX8010 (see bellow)
|
bitmap of available external inputs for FX8010 (see below)
|
||||||
extout
|
extout
|
||||||
bitmap of available external outputs for FX8010 (see bellow)
|
bitmap of available external outputs for FX8010 (see below)
|
||||||
seq_ports
|
seq_ports
|
||||||
allocated sequencer ports (4 by default)
|
allocated sequencer ports (4 by default)
|
||||||
max_synth_voices
|
max_synth_voices
|
||||||
|
@ -17,7 +17,7 @@ Digital mixer controls
|
|||||||
======================
|
======================
|
||||||
|
|
||||||
These controls are built using the DSP instructions. They offer extended
|
These controls are built using the DSP instructions. They offer extended
|
||||||
functionality. Only the default build-in code in the ALSA driver is described
|
functionality. Only the default built-in code in the ALSA driver is described
|
||||||
here. Note that the controls work as attenuators: the maximum value is the
|
here. Note that the controls work as attenuators: the maximum value is the
|
||||||
neutral position leaving the signal unchanged. Note that if the same destination
|
neutral position leaving the signal unchanged. Note that if the same destination
|
||||||
is mentioned in multiple controls, the signal is accumulated and can be wrapped
|
is mentioned in multiple controls, the signal is accumulated and can be wrapped
|
||||||
|
@ -156,7 +156,7 @@ IEC958 Output
|
|||||||
S/PDIF should output the same signal as channel 3+4. [untested!]
|
S/PDIF should output the same signal as channel 3+4. [untested!]
|
||||||
|
|
||||||
|
|
||||||
Digitial output selectors
|
Digital output selectors
|
||||||
These switches allow a direct digital routing from the ADCs to the DACs.
|
These switches allow a direct digital routing from the ADCs to the DACs.
|
||||||
Each switch determines where the digital input data to one of the DACs comes from.
|
Each switch determines where the digital input data to one of the DACs comes from.
|
||||||
They are not supported by the ESI windows driver.
|
They are not supported by the ESI windows driver.
|
||||||
|
@ -31,7 +31,7 @@ Digital mixer controls
|
|||||||
======================
|
======================
|
||||||
|
|
||||||
These controls are built using the DSP instructions. They offer extended
|
These controls are built using the DSP instructions. They offer extended
|
||||||
functionality. Only the default build-in code in the ALSA driver is described
|
functionality. Only the default built-in code in the ALSA driver is described
|
||||||
here. Note that the controls work as attenuators: the maximum value is the
|
here. Note that the controls work as attenuators: the maximum value is the
|
||||||
neutral position leaving the signal unchanged. Note that if the same destination
|
neutral position leaving the signal unchanged. Note that if the same destination
|
||||||
is mentioned in multiple controls, the signal is accumulated and can be wrapped
|
is mentioned in multiple controls, the signal is accumulated and can be wrapped
|
||||||
|
@ -8,7 +8,7 @@ Why we need Jack kcontrols
|
|||||||
ALSA uses kcontrols to export audio controls(switch, volume, Mux, ...)
|
ALSA uses kcontrols to export audio controls(switch, volume, Mux, ...)
|
||||||
to user space. This means userspace applications like pulseaudio can
|
to user space. This means userspace applications like pulseaudio can
|
||||||
switch off headphones and switch on speakers when no headphones are
|
switch off headphones and switch on speakers when no headphones are
|
||||||
pluged in.
|
plugged in.
|
||||||
|
|
||||||
The old ALSA jack code only created input devices for each registered
|
The old ALSA jack code only created input devices for each registered
|
||||||
jack. These jack input devices are not readable by userspace devices
|
jack. These jack input devices are not readable by userspace devices
|
||||||
|
@ -96,7 +96,7 @@ if you use an AWE64 card, you'll see like the following:
|
|||||||
Number of synth devices: 1
|
Number of synth devices: 1
|
||||||
synth 0: [EMU8000]
|
synth 0: [EMU8000]
|
||||||
type 0x1 : subtype 0x20 : voices 32
|
type 0x1 : subtype 0x20 : voices 32
|
||||||
capabilties : ioctl enabled / load_patch enabled
|
capabilities : ioctl enabled / load_patch enabled
|
||||||
|
|
||||||
Number of MIDI devices: 3
|
Number of MIDI devices: 3
|
||||||
midi 0: [Emu8000 Port-0] ALSA port 65:0
|
midi 0: [Emu8000 Port-0] ALSA port 65:0
|
||||||
|
@ -500,7 +500,7 @@ add_jack_modes (bool)
|
|||||||
change the headphone amp and mic bias VREF capabilities
|
change the headphone amp and mic bias VREF capabilities
|
||||||
power_save_node (bool)
|
power_save_node (bool)
|
||||||
advanced power management for each widget, controlling the power
|
advanced power management for each widget, controlling the power
|
||||||
sate (D0/D3) of each widget node depending on the actual pin and
|
state (D0/D3) of each widget node depending on the actual pin and
|
||||||
stream states
|
stream states
|
||||||
power_down_unused (bool)
|
power_down_unused (bool)
|
||||||
power down the unused widgets, a subset of power_save_node, and
|
power down the unused widgets, a subset of power_save_node, and
|
||||||
|
@ -1720,16 +1720,16 @@ Typically, you'll have a hardware descriptor as below:
|
|||||||
- ``rate_min`` and ``rate_max`` define the minimum and maximum sample
|
- ``rate_min`` and ``rate_max`` define the minimum and maximum sample
|
||||||
rate. This should correspond somehow to ``rates`` bits.
|
rate. This should correspond somehow to ``rates`` bits.
|
||||||
|
|
||||||
- ``channel_min`` and ``channel_max`` define, as you might already
|
- ``channels_min`` and ``channels_max`` define, as you might already
|
||||||
expected, the minimum and maximum number of channels.
|
expected, the minimum and maximum number of channels.
|
||||||
|
|
||||||
- ``buffer_bytes_max`` defines the maximum buffer size in
|
- ``buffer_bytes_max`` defines the maximum buffer size in
|
||||||
bytes. There is no ``buffer_bytes_min`` field, since it can be
|
bytes. There is no ``buffer_bytes_min`` field, since it can be
|
||||||
calculated from the minimum period size and the minimum number of
|
calculated from the minimum period size and the minimum number of
|
||||||
periods. Meanwhile, ``period_bytes_min`` and define the minimum and
|
periods. Meanwhile, ``period_bytes_min`` and ``period_bytes_max``
|
||||||
maximum size of the period in bytes. ``periods_max`` and
|
define the minimum and maximum size of the period in bytes.
|
||||||
``periods_min`` define the maximum and minimum number of periods in
|
``periods_max`` and ``periods_min`` define the maximum and minimum
|
||||||
the buffer.
|
number of periods in the buffer.
|
||||||
|
|
||||||
The “period” is a term that corresponds to a fragment in the OSS
|
The “period” is a term that corresponds to a fragment in the OSS
|
||||||
world. The period defines the size at which a PCM interrupt is
|
world. The period defines the size at which a PCM interrupt is
|
||||||
|
21
MAINTAINERS
21
MAINTAINERS
@ -10017,6 +10017,13 @@ L: linux-iio@vger.kernel.org
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/iio/pressure/dps310.c
|
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
|
INFINIBAND SUBSYSTEM
|
||||||
M: Jason Gunthorpe <jgg@nvidia.com>
|
M: Jason Gunthorpe <jgg@nvidia.com>
|
||||||
M: Leon Romanovsky <leonro@nvidia.com>
|
M: Leon Romanovsky <leonro@nvidia.com>
|
||||||
@ -10785,6 +10792,13 @@ M: David Sterba <dsterba@suse.com>
|
|||||||
S: Odd Fixes
|
S: Odd Fixes
|
||||||
F: drivers/tty/ipwireless/
|
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)
|
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
|
||||||
M: Marc Zyngier <maz@kernel.org>
|
M: Marc Zyngier <maz@kernel.org>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@ -17690,6 +17704,13 @@ F: Documentation/devicetree/bindings/net/renesas,*.yaml
|
|||||||
F: drivers/net/ethernet/renesas/
|
F: drivers/net/ethernet/renesas/
|
||||||
F: include/linux/sh_eth.h
|
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
|
RENESAS R-CAR GYROADC DRIVER
|
||||||
M: Marek Vasut <marek.vasut@gmail.com>
|
M: Marek Vasut <marek.vasut@gmail.com>
|
||||||
L: linux-iio@vger.kernel.org
|
L: linux-iio@vger.kernel.org
|
||||||
|
@ -111,6 +111,7 @@ struct inbound_transaction_resource {
|
|||||||
struct client_resource resource;
|
struct client_resource resource;
|
||||||
struct fw_card *card;
|
struct fw_card *card;
|
||||||
struct fw_request *request;
|
struct fw_request *request;
|
||||||
|
bool is_fcp;
|
||||||
void *data;
|
void *data;
|
||||||
size_t length;
|
size_t length;
|
||||||
};
|
};
|
||||||
@ -643,19 +644,14 @@ static int ioctl_send_request(struct client *client, union ioctl_arg *arg)
|
|||||||
client->device->max_speed);
|
client->device->max_speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool is_fcp_request(struct fw_request *request)
|
|
||||||
{
|
|
||||||
return request == NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void release_request(struct client *client,
|
static void release_request(struct client *client,
|
||||||
struct client_resource *resource)
|
struct client_resource *resource)
|
||||||
{
|
{
|
||||||
struct inbound_transaction_resource *r = container_of(resource,
|
struct inbound_transaction_resource *r = container_of(resource,
|
||||||
struct inbound_transaction_resource, resource);
|
struct inbound_transaction_resource, resource);
|
||||||
|
|
||||||
if (is_fcp_request(r->request))
|
if (r->is_fcp)
|
||||||
kfree(r->data);
|
fw_request_put(r->request);
|
||||||
else
|
else
|
||||||
fw_send_response(r->card, r->request, RCODE_CONFLICT_ERROR);
|
fw_send_response(r->card, r->request, RCODE_CONFLICT_ERROR);
|
||||||
|
|
||||||
@ -669,15 +665,20 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
|
|||||||
void *payload, size_t length, void *callback_data)
|
void *payload, size_t length, void *callback_data)
|
||||||
{
|
{
|
||||||
struct address_handler_resource *handler = callback_data;
|
struct address_handler_resource *handler = callback_data;
|
||||||
|
bool is_fcp = is_in_fcp_region(offset, length);
|
||||||
struct inbound_transaction_resource *r;
|
struct inbound_transaction_resource *r;
|
||||||
struct inbound_transaction_event *e;
|
struct inbound_transaction_event *e;
|
||||||
size_t event_size0;
|
size_t event_size0;
|
||||||
void *fcp_frame = NULL;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* card may be different from handler->client->device->card */
|
/* card may be different from handler->client->device->card */
|
||||||
fw_card_get(card);
|
fw_card_get(card);
|
||||||
|
|
||||||
|
// Extend the lifetime of data for request so that its payload is safely accessible in
|
||||||
|
// the process context for the client.
|
||||||
|
if (is_fcp)
|
||||||
|
fw_request_get(request);
|
||||||
|
|
||||||
r = kmalloc(sizeof(*r), GFP_ATOMIC);
|
r = kmalloc(sizeof(*r), GFP_ATOMIC);
|
||||||
e = kmalloc(sizeof(*e), GFP_ATOMIC);
|
e = kmalloc(sizeof(*e), GFP_ATOMIC);
|
||||||
if (r == NULL || e == NULL)
|
if (r == NULL || e == NULL)
|
||||||
@ -685,21 +686,10 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
|
|||||||
|
|
||||||
r->card = card;
|
r->card = card;
|
||||||
r->request = request;
|
r->request = request;
|
||||||
|
r->is_fcp = is_fcp;
|
||||||
r->data = payload;
|
r->data = payload;
|
||||||
r->length = length;
|
r->length = length;
|
||||||
|
|
||||||
if (is_fcp_request(request)) {
|
|
||||||
/*
|
|
||||||
* FIXME: Let core-transaction.c manage a
|
|
||||||
* single reference-counted copy?
|
|
||||||
*/
|
|
||||||
fcp_frame = kmemdup(payload, length, GFP_ATOMIC);
|
|
||||||
if (fcp_frame == NULL)
|
|
||||||
goto failed;
|
|
||||||
|
|
||||||
r->data = fcp_frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
r->resource.release = release_request;
|
r->resource.release = release_request;
|
||||||
ret = add_client_resource(handler->client, &r->resource, GFP_ATOMIC);
|
ret = add_client_resource(handler->client, &r->resource, GFP_ATOMIC);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -741,10 +731,11 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
|
|||||||
failed:
|
failed:
|
||||||
kfree(r);
|
kfree(r);
|
||||||
kfree(e);
|
kfree(e);
|
||||||
kfree(fcp_frame);
|
|
||||||
|
|
||||||
if (!is_fcp_request(request))
|
if (!is_fcp)
|
||||||
fw_send_response(card, request, RCODE_CONFLICT_ERROR);
|
fw_send_response(card, request, RCODE_CONFLICT_ERROR);
|
||||||
|
else
|
||||||
|
fw_request_put(request);
|
||||||
|
|
||||||
fw_card_put(card);
|
fw_card_put(card);
|
||||||
}
|
}
|
||||||
@ -819,19 +810,19 @@ static int ioctl_send_response(struct client *client, union ioctl_arg *arg)
|
|||||||
|
|
||||||
r = container_of(resource, struct inbound_transaction_resource,
|
r = container_of(resource, struct inbound_transaction_resource,
|
||||||
resource);
|
resource);
|
||||||
if (is_fcp_request(r->request)) {
|
if (r->is_fcp) {
|
||||||
kfree(r->data);
|
fw_request_put(r->request);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a->length != fw_get_response_length(r->request)) {
|
if (a->length != fw_get_response_length(r->request)) {
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
kfree(r->request);
|
fw_request_put(r->request);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (copy_from_user(r->data, u64_to_uptr(a->data), a->length)) {
|
if (copy_from_user(r->data, u64_to_uptr(a->data), a->length)) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
kfree(r->request);
|
fw_request_put(r->request);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
fw_send_response(r->card, r->request, a->rcode);
|
fw_send_response(r->card, r->request, a->rcode);
|
||||||
|
@ -535,12 +535,6 @@ const struct fw_address_region fw_unit_space_region =
|
|||||||
{ .start = 0xfffff0000900ULL, .end = 0x1000000000000ULL, };
|
{ .start = 0xfffff0000900ULL, .end = 0x1000000000000ULL, };
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
|
|
||||||
static bool is_in_fcp_region(u64 offset, size_t length)
|
|
||||||
{
|
|
||||||
return offset >= (CSR_REGISTER_BASE | CSR_FCP_COMMAND) &&
|
|
||||||
offset + length <= (CSR_REGISTER_BASE | CSR_FCP_END);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* fw_core_add_address_handler() - register for incoming requests
|
* fw_core_add_address_handler() - register for incoming requests
|
||||||
* @handler: callback
|
* @handler: callback
|
||||||
@ -617,6 +611,7 @@ void fw_core_remove_address_handler(struct fw_address_handler *handler)
|
|||||||
EXPORT_SYMBOL(fw_core_remove_address_handler);
|
EXPORT_SYMBOL(fw_core_remove_address_handler);
|
||||||
|
|
||||||
struct fw_request {
|
struct fw_request {
|
||||||
|
struct kref kref;
|
||||||
struct fw_packet response;
|
struct fw_packet response;
|
||||||
u32 request_header[4];
|
u32 request_header[4];
|
||||||
int ack;
|
int ack;
|
||||||
@ -625,13 +620,33 @@ struct fw_request {
|
|||||||
u32 data[];
|
u32 data[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void fw_request_get(struct fw_request *request)
|
||||||
|
{
|
||||||
|
kref_get(&request->kref);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void release_request(struct kref *kref)
|
||||||
|
{
|
||||||
|
struct fw_request *request = container_of(kref, struct fw_request, kref);
|
||||||
|
|
||||||
|
kfree(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fw_request_put(struct fw_request *request)
|
||||||
|
{
|
||||||
|
kref_put(&request->kref, release_request);
|
||||||
|
}
|
||||||
|
|
||||||
static void free_response_callback(struct fw_packet *packet,
|
static void free_response_callback(struct fw_packet *packet,
|
||||||
struct fw_card *card, int status)
|
struct fw_card *card, int status)
|
||||||
{
|
{
|
||||||
struct fw_request *request;
|
struct fw_request *request = container_of(packet, struct fw_request, response);
|
||||||
|
|
||||||
request = container_of(packet, struct fw_request, response);
|
// Decrease the reference count since not at in-flight.
|
||||||
kfree(request);
|
fw_request_put(request);
|
||||||
|
|
||||||
|
// Decrease the reference count to release the object.
|
||||||
|
fw_request_put(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
int fw_get_response_length(struct fw_request *r)
|
int fw_get_response_length(struct fw_request *r)
|
||||||
@ -782,6 +797,7 @@ static struct fw_request *allocate_request(struct fw_card *card,
|
|||||||
request = kmalloc(sizeof(*request) + length, GFP_ATOMIC);
|
request = kmalloc(sizeof(*request) + length, GFP_ATOMIC);
|
||||||
if (request == NULL)
|
if (request == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
kref_init(&request->kref);
|
||||||
|
|
||||||
request->response.speed = p->speed;
|
request->response.speed = p->speed;
|
||||||
request->response.timestamp =
|
request->response.timestamp =
|
||||||
@ -800,16 +816,22 @@ static struct fw_request *allocate_request(struct fw_card *card,
|
|||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* fw_send_response: - send response packet for asynchronous transaction.
|
||||||
|
* @card: interface to send the response at.
|
||||||
|
* @request: firewire request data for the transaction.
|
||||||
|
* @rcode: response code to send.
|
||||||
|
*
|
||||||
|
* Submit a response packet into the asynchronous response transmission queue. The @request
|
||||||
|
* is going to be released when the transmission successfully finishes later.
|
||||||
|
*/
|
||||||
void fw_send_response(struct fw_card *card,
|
void fw_send_response(struct fw_card *card,
|
||||||
struct fw_request *request, int rcode)
|
struct fw_request *request, int rcode)
|
||||||
{
|
{
|
||||||
if (WARN_ONCE(!request, "invalid for FCP address handlers"))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* unified transaction or broadcast transaction: don't respond */
|
/* unified transaction or broadcast transaction: don't respond */
|
||||||
if (request->ack != ACK_PENDING ||
|
if (request->ack != ACK_PENDING ||
|
||||||
HEADER_DESTINATION_IS_BROADCAST(request->request_header[0])) {
|
HEADER_DESTINATION_IS_BROADCAST(request->request_header[0])) {
|
||||||
kfree(request);
|
fw_request_put(request);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -821,6 +843,9 @@ void fw_send_response(struct fw_card *card,
|
|||||||
fw_fill_response(&request->response, request->request_header,
|
fw_fill_response(&request->response, request->request_header,
|
||||||
rcode, NULL, 0);
|
rcode, NULL, 0);
|
||||||
|
|
||||||
|
// Increase the reference count so that the object is kept during in-flight.
|
||||||
|
fw_request_get(request);
|
||||||
|
|
||||||
card->driver->send_response(card, &request->response);
|
card->driver->send_response(card, &request->response);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(fw_send_response);
|
EXPORT_SYMBOL(fw_send_response);
|
||||||
@ -910,7 +935,7 @@ static void handle_fcp_region_request(struct fw_card *card,
|
|||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
list_for_each_entry_rcu(handler, &address_handler_list, link) {
|
list_for_each_entry_rcu(handler, &address_handler_list, link) {
|
||||||
if (is_enclosing_handler(handler, offset, request->length))
|
if (is_enclosing_handler(handler, offset, request->length))
|
||||||
handler->address_callback(card, NULL, tcode,
|
handler->address_callback(card, request, tcode,
|
||||||
destination, source,
|
destination, source,
|
||||||
p->generation, offset,
|
p->generation, offset,
|
||||||
request->data,
|
request->data,
|
||||||
|
@ -244,6 +244,9 @@ int fw_get_response_length(struct fw_request *request);
|
|||||||
void fw_fill_response(struct fw_packet *response, u32 *request_header,
|
void fw_fill_response(struct fw_packet *response, u32 *request_header,
|
||||||
int rcode, void *payload, size_t length);
|
int rcode, void *payload, size_t length);
|
||||||
|
|
||||||
|
void fw_request_get(struct fw_request *request);
|
||||||
|
void fw_request_put(struct fw_request *request);
|
||||||
|
|
||||||
#define FW_PHY_CONFIG_NO_NODE_ID -1
|
#define FW_PHY_CONFIG_NO_NODE_ID -1
|
||||||
#define FW_PHY_CONFIG_CURRENT_GAP_COUNT -1
|
#define FW_PHY_CONFIG_CURRENT_GAP_COUNT -1
|
||||||
void fw_send_phy_config(struct fw_card *card,
|
void fw_send_phy_config(struct fw_card *card,
|
||||||
@ -254,4 +257,10 @@ static inline bool is_ping_packet(u32 *data)
|
|||||||
return (data[0] & 0xc0ffffff) == 0 && ~data[0] == data[1];
|
return (data[0] & 0xc0ffffff) == 0 && ~data[0] == data[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool is_in_fcp_region(u64 offset, size_t length)
|
||||||
|
{
|
||||||
|
return offset >= (CSR_REGISTER_BASE | CSR_FCP_COMMAND) &&
|
||||||
|
offset + length <= (CSR_REGISTER_BASE | CSR_FCP_END);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* _FIREWIRE_CORE_H */
|
#endif /* _FIREWIRE_CORE_H */
|
||||||
|
@ -319,13 +319,11 @@ err_free_compat:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wm97xx_ac97_remove(struct ac97_codec_device *adev)
|
static void wm97xx_ac97_remove(struct ac97_codec_device *adev)
|
||||||
{
|
{
|
||||||
struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev);
|
struct wm97xx_priv *wm97xx = ac97_get_drvdata(adev);
|
||||||
|
|
||||||
snd_ac97_compat_release(wm97xx->ac97);
|
snd_ac97_compat_release(wm97xx->ac97);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct ac97_id wm97xx_ac97_ids[] = {
|
static const struct ac97_id wm97xx_ac97_ids[] = {
|
||||||
|
@ -469,7 +469,7 @@ static int sdw_prep_deprep_slave_ports(struct sdw_bus *bus,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Inform slave about the impending port prepare */
|
/* 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 */
|
/* Prepare Slave port implementing CP_SM */
|
||||||
if (!dpn_prop->simple_ch_prep_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 */
|
/* 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 */
|
/* Disable interrupt after Port de-prepare */
|
||||||
if (!prep && intr)
|
if (!prep && intr)
|
||||||
|
@ -278,9 +278,8 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode,
|
|||||||
* Otherwise there is a danger of recursion of inbound and outbound
|
* Otherwise there is a danger of recursion of inbound and outbound
|
||||||
* transactions from and to the local node.
|
* transactions from and to the local node.
|
||||||
*
|
*
|
||||||
* The callback is responsible that either fw_send_response() or kfree()
|
* The callback is responsible that fw_send_response() is called on the @request, except for FCP
|
||||||
* is called on the @request, except for FCP registers for which the core
|
* registers for which the core takes care of that.
|
||||||
* takes care of that.
|
|
||||||
*/
|
*/
|
||||||
typedef void (*fw_address_callback_t)(struct fw_card *card,
|
typedef void (*fw_address_callback_t)(struct fw_card *card,
|
||||||
struct fw_request *request,
|
struct fw_request *request,
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
/* 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
|
* enum sdw_port_prep_ops: Prepare operations for Data Port
|
||||||
*
|
*
|
||||||
* @SDW_OPS_PORT_PRE_PREP: Pre prepare operation for the 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_PREP: Post prepare operation for the Port
|
||||||
|
* @SDW_OPS_PORT_POST_DEPREP: Post deprepare operation for the Port
|
||||||
*/
|
*/
|
||||||
enum sdw_port_prep_ops {
|
enum sdw_port_prep_ops {
|
||||||
SDW_OPS_PORT_PRE_PREP = 0,
|
SDW_OPS_PORT_PRE_PREP = 0,
|
||||||
SDW_OPS_PORT_PREP = 1,
|
SDW_OPS_PORT_PRE_DEPREP,
|
||||||
SDW_OPS_PORT_POST_PREP = 2,
|
SDW_OPS_PORT_POST_PREP,
|
||||||
|
SDW_OPS_PORT_POST_DEPREP,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -63,7 +63,7 @@ struct ac97_codec_device {
|
|||||||
struct ac97_codec_driver {
|
struct ac97_codec_driver {
|
||||||
struct device_driver driver;
|
struct device_driver driver;
|
||||||
int (*probe)(struct ac97_codec_device *);
|
int (*probe)(struct ac97_codec_device *);
|
||||||
int (*remove)(struct ac97_codec_device *);
|
void (*remove)(struct ac97_codec_device *dev);
|
||||||
void (*shutdown)(struct ac97_codec_device *);
|
void (*shutdown)(struct ac97_codec_device *);
|
||||||
const struct ac97_id *id_table;
|
const struct ac97_id *id_table;
|
||||||
};
|
};
|
||||||
|
@ -126,24 +126,24 @@
|
|||||||
#define ACP_PAD_PULLDOWN_CTRL 0x0001448
|
#define ACP_PAD_PULLDOWN_CTRL 0x0001448
|
||||||
#define ACP_PAD_DRIVE_STRENGTH_CTRL 0x000144C
|
#define ACP_PAD_DRIVE_STRENGTH_CTRL 0x000144C
|
||||||
#define ACP_PAD_SCHMEN_CTRL 0x0001450
|
#define ACP_PAD_SCHMEN_CTRL 0x0001450
|
||||||
#define ACP_SW_PAD_KEEPER_EN 0x0001454
|
#define ACP_SW0_PAD_KEEPER_EN 0x0001454
|
||||||
#define ACP_SW_WAKE_EN 0x0001458
|
#define ACP_SW0_WAKE_EN 0x0001458
|
||||||
#define ACP_I2S_WAKE_EN 0x000145C
|
#define ACP_I2S_WAKE_EN 0x000145C
|
||||||
#define ACP_SW1_WAKE_EN 0x0001460
|
#define ACP_SW1_WAKE_EN 0x0001460
|
||||||
|
|
||||||
#define ACP_SW_I2S_ERROR_REASON 0x00018B4
|
#define ACP_SW0_I2S_ERROR_REASON 0x00018B4
|
||||||
#define ACP_SW_POS_TRACK_I2S_TX_CTRL 0x00018B8
|
#define ACP_SW0_POS_TRACK_AUDIO0_TX_CTRL 0x00018B8
|
||||||
#define ACP_SW_I2S_TX_DMA_POS 0x00018BC
|
#define ACP_SW0_AUDIO0_TX_DMA_POS 0x00018BC
|
||||||
#define ACP_SW_POS_TRACK_BT_TX_CTRL 0x00018C0
|
#define ACP_SW0_POS_TRACK_AUDIO1_TX_CTRL 0x00018C0
|
||||||
#define ACP_SW_BT_TX_DMA_POS 0x00018C4
|
#define ACP_SW0_AUDIO1_TX_DMA_POS 0x00018C4
|
||||||
#define ACP_SW_POS_TRACK_HS_TX_CTRL 0x00018C8
|
#define ACP_SW0_POS_TRACK_AUDIO2_TX_CTRL 0x00018C8
|
||||||
#define ACP_SW_HS_TX_DMA_POS 0x00018CC
|
#define ACP_SW0_AUDIO2_TX_DMA_POS 0x00018CC
|
||||||
#define ACP_SW_POS_TRACK_I2S_RX_CTRL 0x00018D0
|
#define ACP_SW0_POS_TRACK_AUDIO0_RX_CTRL 0x00018D0
|
||||||
#define ACP_SW_I2S_RX_DMA_POS 0x00018D4
|
#define ACP_SW0_AUDIO0_DMA_POS 0x00018D4
|
||||||
#define ACP_SW_POS_TRACK_BT_RX_CTRL 0x00018D8
|
#define ACP_SW0_POS_TRACK_AUDIO1_RX_CTRL 0x00018D8
|
||||||
#define ACP_SW_BT_RX_DMA_POS 0x00018DC
|
#define ACP_SW0_AUDIO1_RX_DMA_POS 0x00018DC
|
||||||
#define ACP_SW_POS_TRACK_HS_RX_CTRL 0x00018E0
|
#define ACP_SW0_POS_TRACK_AUDIO2_RX_CTRL 0x00018E0
|
||||||
#define ACP_SW_HS_RX_DMA_POS 0x00018E4
|
#define ACP_SW0_AUDIO2_RX_DMA_POS 0x00018E4
|
||||||
#define ACP_ERROR_INTR_MASK1 0X0001974
|
#define ACP_ERROR_INTR_MASK1 0X0001974
|
||||||
#define ACP_ERROR_INTR_MASK2 0X0001978
|
#define ACP_ERROR_INTR_MASK2 0X0001978
|
||||||
#define ACP_ERROR_INTR_MASK3 0X000197C
|
#define ACP_ERROR_INTR_MASK3 0X000197C
|
||||||
@ -155,98 +155,80 @@
|
|||||||
#define ACP_EXTERNAL_INTR_STAT 0x0001A0C
|
#define ACP_EXTERNAL_INTR_STAT 0x0001A0C
|
||||||
#define ACP_EXTERNAL_INTR_STAT1 0x0001A10
|
#define ACP_EXTERNAL_INTR_STAT1 0x0001A10
|
||||||
#define ACP_ERROR_STATUS 0x0001A4C
|
#define ACP_ERROR_STATUS 0x0001A4C
|
||||||
#define ACP_P1_SW_I2S_ERROR_REASON 0x0001A50
|
#define ACP_SW1_I2S_ERROR_REASON 0x0001A50
|
||||||
#define ACP_P1_SW_POS_TRACK_I2S_TX_CTRL 0x0001A6C
|
#define ACP_SW1_POS_TRACK_AUDIO0_TX_CTRL 0x0001A6C
|
||||||
#define ACP_P1_SW_I2S_TX_DMA_POS 0x0001A70
|
#define ACP_SW1_AUDIO0_TX_DMA_POS 0x0001A70
|
||||||
#define ACP_P1_SW_POS_TRACK_I2S_RX_CTRL 0x0001A74
|
#define ACP_SW1_POS_TRACK_AUDIO0_RX_CTRL 0x0001A74
|
||||||
#define ACP_P1_SW_I2S_RX_DMA_POS 0x0001A78
|
#define ACP_SW1_AUDIO0_RX_DMA_POS 0x0001A78
|
||||||
#define ACP_P1_DMIC_I2S_GPIO_INTR_CTRL 0x0001A7C
|
#define ACP_P1_DMIC_I2S_GPIO_INTR_CTRL 0x0001A7C
|
||||||
#define ACP_P1_DMIC_I2S_GPIO_INTR_STATUS 0x0001A80
|
#define ACP_P1_DMIC_I2S_GPIO_INTR_STATUS 0x0001A80
|
||||||
#define ACP_SCRATCH_REG_BASE_ADDR 0x0001A84
|
#define ACP_SCRATCH_REG_BASE_ADDR 0x0001A84
|
||||||
#define ACP_P1_SW_POS_TRACK_BT_TX_CTRL 0x0001A88
|
#define ACP_SW1_POS_TRACK_AUDIO1_TX_CTRL 0x0001A88
|
||||||
#define ACP_P1_SW_BT_TX_DMA_POS 0x0001A8C
|
#define ACP_SW1_AUDIO1_TX_DMA_POS 0x0001A8C
|
||||||
#define ACP_P1_SW_POS_TRACK_HS_TX_CTRL 0x0001A90
|
#define ACP_SW1_POS_TRACK_AUDIO2_TX_CTRL 0x0001A90
|
||||||
#define ACP_P1_SW_HS_TX_DMA_POS 0x0001A94
|
#define ACP_SW1_AUDIO2_TX_DMA_POS 0x0001A94
|
||||||
#define ACP_P1_SW_POS_TRACK_BT_RX_CTRL 0x0001A98
|
#define ACP_SW1_POS_TRACK_AUDIO1_RX_CTRL 0x0001A98
|
||||||
#define ACP_P1_SW_BT_RX_DMA_POS 0x0001A9C
|
#define ACP_SW1_AUDIO1_RX_DMA_POS 0x0001A9C
|
||||||
#define ACP_P1_SW_POS_TRACK_HS_RX_CTRL 0x0001AA0
|
#define ACP_SW1_POS_TRACK_AUDIO2_RX_CTRL 0x0001AA0
|
||||||
#define ACP_P1_SW_HS_RX_DMA_POS 0x0001AA4
|
#define ACP_SW1_AUDIO2_RX_DMA_POS 0x0001AA4
|
||||||
#define ACP_ERROR_INTR_MASK4 0X0001AEC
|
#define ACP_ERROR_INTR_MASK4 0X0001AEC
|
||||||
#define ACP_ERROR_INTR_MASK5 0X0001AF0
|
#define ACP_ERROR_INTR_MASK5 0X0001AF0
|
||||||
|
|
||||||
/* Registers from ACP_AUDIO_BUFFERS block */
|
/* Registers from ACP_AUDIO_BUFFERS block */
|
||||||
#define ACP_I2S_RX_RINGBUFADDR 0x0002000
|
#define ACP_AUDIO0_RX_RINGBUFADDR 0x0002000
|
||||||
#define ACP_I2S_RX_RINGBUFSIZE 0x0002004
|
#define ACP_AUDIO0_RX_RINGBUFSIZE 0x0002004
|
||||||
#define ACP_I2S_RX_LINKPOSITIONCNTR 0x0002008
|
#define ACP_AUDIO0_RX_LINKPOSITIONCNTR 0x0002008
|
||||||
#define ACP_I2S_RX_FIFOADDR 0x000200C
|
#define ACP_AUDIO0_RX_FIFOADDR 0x000200C
|
||||||
#define ACP_I2S_RX_FIFOSIZE 0x0002010
|
#define ACP_AUDIO0_RX_FIFOSIZE 0x0002010
|
||||||
#define ACP_I2S_RX_DMA_SIZE 0x0002014
|
#define ACP_AUDIO0_RX_DMA_SIZE 0x0002014
|
||||||
#define ACP_I2S_RX_LINEARPOSITIONCNTR_HIGH 0x0002018
|
#define ACP_AUDIO0_RX_LINEARPOSITIONCNTR_HIGH 0x0002018
|
||||||
#define ACP_I2S_RX_LINEARPOSITIONCNTR_LOW 0x000201C
|
#define ACP_AUDIO0_RX_LINEARPOSITIONCNTR_LOW 0x000201C
|
||||||
#define ACP_I2S_RX_INTR_WATERMARK_SIZE 0x0002020
|
#define ACP_AUDIO0_RX_INTR_WATERMARK_SIZE 0x0002020
|
||||||
#define ACP_I2S_TX_RINGBUFADDR 0x0002024
|
#define ACP_AUDIO0_TX_RINGBUFADDR 0x0002024
|
||||||
#define ACP_I2S_TX_RINGBUFSIZE 0x0002028
|
#define ACP_AUDIO0_TX_RINGBUFSIZE 0x0002028
|
||||||
#define ACP_I2S_TX_LINKPOSITIONCNTR 0x000202C
|
#define ACP_AUDIO0_TX_LINKPOSITIONCNTR 0x000202C
|
||||||
#define ACP_I2S_TX_FIFOADDR 0x0002030
|
#define ACP_AUDIO0_TX_FIFOADDR 0x0002030
|
||||||
#define ACP_I2S_TX_FIFOSIZE 0x0002034
|
#define ACP_AUDIO0_TX_FIFOSIZE 0x0002034
|
||||||
#define ACP_I2S_TX_DMA_SIZE 0x0002038
|
#define ACP_AUDIO0_TX_DMA_SIZE 0x0002038
|
||||||
#define ACP_I2S_TX_LINEARPOSITIONCNTR_HIGH 0x000203C
|
#define ACP_AUDIO0_TX_LINEARPOSITIONCNTR_HIGH 0x000203C
|
||||||
#define ACP_I2S_TX_LINEARPOSITIONCNTR_LOW 0x0002040
|
#define ACP_AUDIO0_TX_LINEARPOSITIONCNTR_LOW 0x0002040
|
||||||
#define ACP_I2S_TX_INTR_WATERMARK_SIZE 0x0002044
|
#define ACP_AUDIO0_TX_INTR_WATERMARK_SIZE 0x0002044
|
||||||
#define ACP_BT_RX_RINGBUFADDR 0x0002048
|
#define ACP_AUDIO1_RX_RINGBUFADDR 0x0002048
|
||||||
#define ACP_BT_RX_RINGBUFSIZE 0x000204C
|
#define ACP_AUDIO1_RX_RINGBUFSIZE 0x000204C
|
||||||
#define ACP_BT_RX_LINKPOSITIONCNTR 0x0002050
|
#define ACP_AUDIO1_RX_LINKPOSITIONCNTR 0x0002050
|
||||||
#define ACP_BT_RX_FIFOADDR 0x0002054
|
#define ACP_AUDIO1_RX_FIFOADDR 0x0002054
|
||||||
#define ACP_BT_RX_FIFOSIZE 0x0002058
|
#define ACP_AUDIO1_RX_FIFOSIZE 0x0002058
|
||||||
#define ACP_BT_RX_DMA_SIZE 0x000205C
|
#define ACP_AUDIO1_RX_DMA_SIZE 0x000205C
|
||||||
#define ACP_BT_RX_LINEARPOSITIONCNTR_HIGH 0x0002060
|
#define ACP_AUDIO1_RX_LINEARPOSITIONCNTR_HIGH 0x0002060
|
||||||
#define ACP_BT_RX_LINEARPOSITIONCNTR_LOW 0x0002064
|
#define ACP_AUDIO1_RX_LINEARPOSITIONCNTR_LOW 0x0002064
|
||||||
#define ACP_BT_RX_INTR_WATERMARK_SIZE 0x0002068
|
#define ACP_AUDIO1_RX_INTR_WATERMARK_SIZE 0x0002068
|
||||||
#define ACP_BT_TX_RINGBUFADDR 0x000206C
|
#define ACP_AUDIO1_TX_RINGBUFADDR 0x000206C
|
||||||
#define ACP_BT_TX_RINGBUFSIZE 0x0002070
|
#define ACP_AUDIO1_TX_RINGBUFSIZE 0x0002070
|
||||||
#define ACP_BT_TX_LINKPOSITIONCNTR 0x0002074
|
#define ACP_AUDIO1_TX_LINKPOSITIONCNTR 0x0002074
|
||||||
#define ACP_BT_TX_FIFOADDR 0x0002078
|
#define ACP_AUDIO1_TX_FIFOADDR 0x0002078
|
||||||
#define ACP_BT_TX_FIFOSIZE 0x000207C
|
#define ACP_AUDIO1_TX_FIFOSIZE 0x000207C
|
||||||
#define ACP_BT_TX_DMA_SIZE 0x0002080
|
#define ACP_AUDIO1_TX_DMA_SIZE 0x0002080
|
||||||
#define ACP_BT_TX_LINEARPOSITIONCNTR_HIGH 0x0002084
|
#define ACP_AUDIO1_TX_LINEARPOSITIONCNTR_HIGH 0x0002084
|
||||||
#define ACP_BT_TX_LINEARPOSITIONCNTR_LOW 0x0002088
|
#define ACP_AUDIO1_TX_LINEARPOSITIONCNTR_LOW 0x0002088
|
||||||
#define ACP_BT_TX_INTR_WATERMARK_SIZE 0x000208C
|
#define ACP_AUDIO1_TX_INTR_WATERMARK_SIZE 0x000208C
|
||||||
#define ACP_HS_RX_RINGBUFADDR 0x0002090
|
#define ACP_AUDIO2_RX_RINGBUFADDR 0x0002090
|
||||||
#define ACP_HS_RX_RINGBUFSIZE 0x0002094
|
#define ACP_AUDIO2_RX_RINGBUFSIZE 0x0002094
|
||||||
#define ACP_HS_RX_LINKPOSITIONCNTR 0x0002098
|
#define ACP_AUDIO2_RX_LINKPOSITIONCNTR 0x0002098
|
||||||
#define ACP_HS_RX_FIFOADDR 0x000209C
|
#define ACP_AUDIO2_RX_FIFOADDR 0x000209C
|
||||||
#define ACP_HS_RX_FIFOSIZE 0x00020A0
|
#define ACP_AUDIO2_RX_FIFOSIZE 0x00020A0
|
||||||
#define ACP_HS_RX_DMA_SIZE 0x00020A4
|
#define ACP_AUDIO2_RX_DMA_SIZE 0x00020A4
|
||||||
#define ACP_HS_RX_LINEARPOSITIONCNTR_HIGH 0x00020A8
|
#define ACP_AUDIO2_RX_LINEARPOSITIONCNTR_HIGH 0x00020A8
|
||||||
#define ACP_HS_RX_LINEARPOSITIONCNTR_LOW 0x00020AC
|
#define ACP_AUDIO2_RX_LINEARPOSITIONCNTR_LOW 0x00020AC
|
||||||
#define ACP_HS_RX_INTR_WATERMARK_SIZE 0x00020B0
|
#define ACP_AUDIO2_RX_INTR_WATERMARK_SIZE 0x00020B0
|
||||||
#define ACP_HS_TX_RINGBUFADDR 0x00020B4
|
#define ACP_AUDIO2_TX_RINGBUFADDR 0x00020B4
|
||||||
#define ACP_HS_TX_RINGBUFSIZE 0x00020B8
|
#define ACP_AUDIO2_TX_RINGBUFSIZE 0x00020B8
|
||||||
#define ACP_HS_TX_LINKPOSITIONCNTR 0x00020BC
|
#define ACP_AUDIO2_TX_LINKPOSITIONCNTR 0x00020BC
|
||||||
#define ACP_HS_TX_FIFOADDR 0x00020C0
|
#define ACP_AUDIO2_TX_FIFOADDR 0x00020C0
|
||||||
#define ACP_HS_TX_FIFOSIZE 0x00020C4
|
#define ACP_AUDIO2_TX_FIFOSIZE 0x00020C4
|
||||||
#define ACP_HS_TX_DMA_SIZE 0x00020C8
|
#define ACP_AUDIO2_TX_DMA_SIZE 0x00020C8
|
||||||
#define ACP_HS_TX_LINEARPOSITIONCNTR_HIGH 0x00020CC
|
#define ACP_AUDIO2_TX_LINEARPOSITIONCNTR_HIGH 0x00020CC
|
||||||
#define ACP_HS_TX_LINEARPOSITIONCNTR_LOW 0x00020D0
|
#define ACP_AUDIO2_TX_LINEARPOSITIONCNTR_LOW 0x00020D0
|
||||||
#define ACP_HS_TX_INTR_WATERMARK_SIZE 0x00020D4
|
#define ACP_AUDIO2_TX_INTR_WATERMARK_SIZE 0x00020D4
|
||||||
#define ACP_AUDIO_RX_RINGBUFADDR ACP_I2S_RX_RINGBUFADDR
|
|
||||||
#define ACP_AUDIO_RX_RINGBUFSIZE ACP_I2S_RX_RINGBUFSIZE
|
|
||||||
#define ACP_AUDIO_RX_LINKPOSITIONCNTR ACP_I2S_RX_LINKPOSITIONCNTR
|
|
||||||
#define ACP_AUDIO_RX_FIFOADDR ACP_I2S_RX_FIFOADDR
|
|
||||||
#define ACP_AUDIO_RX_FIFOSIZE ACP_I2S_RX_FIFOSIZE
|
|
||||||
#define ACP_AUDIO_RX_DMA_SIZE ACP_I2S_RX_DMA_SIZE
|
|
||||||
#define ACP_AUDIO_RX_LINEARPOSITIONCNTR_HIGH ACP_I2S_RX_LINEARPOSITIONCNTR_HIGH
|
|
||||||
#define ACP_AUDIO_RX_LINEARPOSITIONCNTR_LOW ACP_I2S_RX_LINEARPOSITIONCNTR_LOW
|
|
||||||
#define ACP_AUDIO_RX_INTR_WATERMARK_SIZE ACP_I2S_RX_INTR_WATERMARK_SIZE
|
|
||||||
#define ACP_AUDIO_TX_RINGBUFADDR ACP_I2S_TX_RINGBUFADDR
|
|
||||||
#define ACP_AUDIO_TX_RINGBUFSIZE ACP_I2S_TX_RINGBUFSIZE
|
|
||||||
#define ACP_AUDIO_TX_LINKPOSITIONCNTR ACP_I2S_TX_LINKPOSITIONCNTR
|
|
||||||
#define ACP_AUDIO_TX_FIFOADDR ACP_I2S_TX_FIFOADDR
|
|
||||||
#define ACP_AUDIO_TX_FIFOSIZE ACP_I2S_TX_FIFOSIZE
|
|
||||||
#define ACP_AUDIO_TX_DMA_SIZE ACP_I2S_TX_DMA_SIZE
|
|
||||||
#define ACP_AUDIO_TX_LINEARPOSITIONCNTR_HIGH ACP_I2S_TX_LINEARPOSITIONCNTR_HIGH
|
|
||||||
#define ACP_AUDIO_TX_LINEARPOSITIONCNTR_LOW ACP_I2S_TX_LINEARPOSITIONCNTR_LOW
|
|
||||||
#define ACP_AUDIO_TX_INTR_WATERMARK_SIZE ACP_I2S_TX_INTR_WATERMARK_SIZE
|
|
||||||
|
|
||||||
/* Registers from ACP_I2S_TDM block */
|
/* Registers from ACP_I2S_TDM block */
|
||||||
#define ACP_I2STDM_IER 0x0002400
|
#define ACP_I2STDM_IER 0x0002400
|
||||||
@ -292,367 +274,222 @@
|
|||||||
#define ACP_WOV_ERROR_STATUS_REGISTER 0x0002C68
|
#define ACP_WOV_ERROR_STATUS_REGISTER 0x0002C68
|
||||||
#define ACP_PDM_CLKDIV 0x0002C6C
|
#define ACP_PDM_CLKDIV 0x0002C6C
|
||||||
|
|
||||||
/* Registers from ACP_SW_SWCLK block */
|
/* Registers from ACP_SW0_SWCLK block */
|
||||||
#define ACP_SW_EN 0x0003000
|
#define ACP_SW0_EN 0x0003000
|
||||||
#define ACP_SW_EN_STATUS 0x0003004
|
#define ACP_SW0_EN_STATUS 0x0003004
|
||||||
#define ACP_SW_FRAMESIZE 0x0003008
|
#define ACP_SW0_FRAMESIZE 0x0003008
|
||||||
#define ACP_SW_SSP_COUNTER 0x000300C
|
#define ACP_SW0_SSP_COUNTER 0x000300C
|
||||||
#define ACP_SW_AUDIO_TX_EN 0x0003010
|
#define ACP_SW0_AUDIO0_TX_EN 0x0003010
|
||||||
#define ACP_SW_AUDIO_TX_EN_STATUS 0x0003014
|
#define ACP_SW0_AUDIO0_TX_EN_STATUS 0x0003014
|
||||||
#define ACP_SW_AUDIO_TX_FRAME_FORMAT 0x0003018
|
#define ACP_SW0_AUDIO0_TX_FRAME_FORMAT 0x0003018
|
||||||
#define ACP_SW_AUDIO_TX_SAMPLEINTERVAL 0x000301C
|
#define ACP_SW0_AUDIO0_TX_SAMPLEINTERVAL 0x000301C
|
||||||
#define ACP_SW_AUDIO_TX_HCTRL_DP0 0x0003020
|
#define ACP_SW0_AUDIO0_TX_HCTRL_DP0 0x0003020
|
||||||
#define ACP_SW_AUDIO_TX_HCTRL_DP1 0x0003024
|
#define ACP_SW0_AUDIO0_TX_HCTRL_DP1 0x0003024
|
||||||
#define ACP_SW_AUDIO_TX_HCTRL_DP2 0x0003028
|
#define ACP_SW0_AUDIO0_TX_HCTRL_DP2 0x0003028
|
||||||
#define ACP_SW_AUDIO_TX_HCTRL_DP3 0x000302C
|
#define ACP_SW0_AUDIO0_TX_HCTRL_DP3 0x000302C
|
||||||
#define ACP_SW_AUDIO_TX_OFFSET_DP0 0x0003030
|
#define ACP_SW0_AUDIO0_TX_OFFSET_DP0 0x0003030
|
||||||
#define ACP_SW_AUDIO_TX_OFFSET_DP1 0x0003034
|
#define ACP_SW0_AUDIO0_TX_OFFSET_DP1 0x0003034
|
||||||
#define ACP_SW_AUDIO_TX_OFFSET_DP2 0x0003038
|
#define ACP_SW0_AUDIO0_TX_OFFSET_DP2 0x0003038
|
||||||
#define ACP_SW_AUDIO_TX_OFFSET_DP3 0x000303C
|
#define ACP_SW0_AUDIO0_TX_OFFSET_DP3 0x000303C
|
||||||
#define ACP_SW_AUDIO_TX_CHANNEL_ENABLE_DP0 0x0003040
|
#define ACP_SW0_AUDIO0_TX_CHANNEL_ENABLE_DP0 0x0003040
|
||||||
#define ACP_SW_AUDIO_TX_CHANNEL_ENABLE_DP1 0x0003044
|
#define ACP_SW0_AUDIO0_TX_CHANNEL_ENABLE_DP1 0x0003044
|
||||||
#define ACP_SW_AUDIO_TX_CHANNEL_ENABLE_DP2 0x0003048
|
#define ACP_SW0_AUDIO0_TX_CHANNEL_ENABLE_DP2 0x0003048
|
||||||
#define ACP_SW_AUDIO_TX_CHANNEL_ENABLE_DP3 0x000304C
|
#define ACP_SW0_AUDIO0_TX_CHANNEL_ENABLE_DP3 0x000304C
|
||||||
#define ACP_SW_BT_TX_EN 0x0003050
|
#define ACP_SW0_AUDIO1_TX_EN 0x0003050
|
||||||
#define ACP_SW_BT_TX_EN_STATUS 0x0003054
|
#define ACP_SW0_AUDIO1_TX_EN_STATUS 0x0003054
|
||||||
#define ACP_SW_BT_TX_FRAME_FORMAT 0x0003058
|
#define ACP_SW0_AUDIO1_TX_FRAME_FORMAT 0x0003058
|
||||||
#define ACP_SW_BT_TX_SAMPLEINTERVAL 0x000305C
|
#define ACP_SW0_AUDIO1_TX_SAMPLEINTERVAL 0x000305C
|
||||||
#define ACP_SW_BT_TX_HCTRL 0x0003060
|
#define ACP_SW0_AUDIO1_TX_HCTRL 0x0003060
|
||||||
#define ACP_SW_BT_TX_OFFSET 0x0003064
|
#define ACP_SW0_AUDIO1_TX_OFFSET 0x0003064
|
||||||
#define ACP_SW_BT_TX_CHANNEL_ENABLE_DP0 0x0003068
|
#define ACP_SW0_AUDIO1_TX_CHANNEL_ENABLE_DP0 0x0003068
|
||||||
#define ACP_SW_HEADSET_TX_EN 0x000306C
|
#define ACP_SW0_AUDIO2_TX_EN 0x000306C
|
||||||
#define ACP_SW_HEADSET_TX_EN_STATUS 0x0003070
|
#define ACP_SW0_AUDIO2_TX_EN_STATUS 0x0003070
|
||||||
#define ACP_SW_HEADSET_TX_FRAME_FORMAT 0x0003074
|
#define ACP_SW0_AUDIO2_TX_FRAME_FORMAT 0x0003074
|
||||||
#define ACP_SW_HEADSET_TX_SAMPLEINTERVAL 0x0003078
|
#define ACP_SW0_AUDIO2_TX_SAMPLEINTERVAL 0x0003078
|
||||||
#define ACP_SW_HEADSET_TX_HCTRL 0x000307C
|
#define ACP_SW0_AUDIO2_TX_HCTRL 0x000307C
|
||||||
#define ACP_SW_HEADSET_TX_OFFSET 0x0003080
|
#define ACP_SW0_AUDIO2_TX_OFFSET 0x0003080
|
||||||
#define ACP_SW_HEADSET_TX_CHANNEL_ENABLE_DP0 0x0003084
|
#define ACP_SW0_AUDIO2_TX_CHANNEL_ENABLE_DP0 0x0003084
|
||||||
#define ACP_SW_AUDIO_RX_EN 0x0003088
|
#define ACP_SW0_AUDIO0_RX_EN 0x0003088
|
||||||
#define ACP_SW_AUDIO_RX_EN_STATUS 0x000308C
|
#define ACP_SW0_AUDIO0_RX_EN_STATUS 0x000308C
|
||||||
#define ACP_SW_AUDIO_RX_FRAME_FORMAT 0x0003090
|
#define ACP_SW0_AUDIO0_RX_FRAME_FORMAT 0x0003090
|
||||||
#define ACP_SW_AUDIO_RX_SAMPLEINTERVAL 0x0003094
|
#define ACP_SW0_AUDIO0_RX_SAMPLEINTERVAL 0x0003094
|
||||||
#define ACP_SW_AUDIO_RX_HCTRL_DP0 0x0003098
|
#define ACP_SW0_AUDIO0_RX_HCTRL_DP0 0x0003098
|
||||||
#define ACP_SW_AUDIO_RX_HCTRL_DP1 0x000309C
|
#define ACP_SW0_AUDIO0_RX_HCTRL_DP1 0x000309C
|
||||||
#define ACP_SW_AUDIO_RX_HCTRL_DP2 0x0003100
|
#define ACP_SW0_AUDIO0_RX_HCTRL_DP2 0x0003100
|
||||||
#define ACP_SW_AUDIO_RX_HCTRL_DP3 0x0003104
|
#define ACP_SW0_AUDIO0_RX_HCTRL_DP3 0x0003104
|
||||||
#define ACP_SW_AUDIO_RX_OFFSET_DP0 0x0003108
|
#define ACP_SW0_AUDIO0_RX_OFFSET_DP0 0x0003108
|
||||||
#define ACP_SW_AUDIO_RX_OFFSET_DP1 0x000310C
|
#define ACP_SW0_AUDIO0_RX_OFFSET_DP1 0x000310C
|
||||||
#define ACP_SW_AUDIO_RX_OFFSET_DP2 0x0003110
|
#define ACP_SW0_AUDIO0_RX_OFFSET_DP2 0x0003110
|
||||||
#define ACP_SW_AUDIO_RX_OFFSET_DP3 0x0003114
|
#define ACP_SW0_AUDIO0_RX_OFFSET_DP3 0x0003114
|
||||||
#define ACP_SW_AUDIO_RX_CHANNEL_ENABLE_DP0 0x0003118
|
#define ACP_SW0_AUDIO0_RX_CHANNEL_ENABLE_DP0 0x0003118
|
||||||
#define ACP_SW_AUDIO_RX_CHANNEL_ENABLE_DP1 0x000311C
|
#define ACP_SW0_AUDIO0_RX_CHANNEL_ENABLE_DP1 0x000311C
|
||||||
#define ACP_SW_AUDIO_RX_CHANNEL_ENABLE_DP2 0x0003120
|
#define ACP_SW0_AUDIO0_RX_CHANNEL_ENABLE_DP2 0x0003120
|
||||||
#define ACP_SW_AUDIO_RX_CHANNEL_ENABLE_DP3 0x0003124
|
#define ACP_SW0_AUDIO0_RX_CHANNEL_ENABLE_DP3 0x0003124
|
||||||
#define ACP_SW_BT_RX_EN 0x0003128
|
#define ACP_SW0_AUDIO1_RX_EN 0x0003128
|
||||||
#define ACP_SW_BT_RX_EN_STATUS 0x000312C
|
#define ACP_SW0_AUDIO1_RX_EN_STATUS 0x000312C
|
||||||
#define ACP_SW_BT_RX_FRAME_FORMAT 0x0003130
|
#define ACP_SW0_AUDIO1_RX_FRAME_FORMAT 0x0003130
|
||||||
#define ACP_SW_BT_RX_SAMPLEINTERVAL 0x0003134
|
#define ACP_SW0_AUDIO1_RX_SAMPLEINTERVAL 0x0003134
|
||||||
#define ACP_SW_BT_RX_HCTRL 0x0003138
|
#define ACP_SW0_AUDIO1_RX_HCTRL 0x0003138
|
||||||
#define ACP_SW_BT_RX_OFFSET 0x000313C
|
#define ACP_SW0_AUDIO1_RX_OFFSET 0x000313C
|
||||||
#define ACP_SW_BT_RX_CHANNEL_ENABLE_DP0 0x0003140
|
#define ACP_SW0_AUDIO1_RX_CHANNEL_ENABLE_DP0 0x0003140
|
||||||
#define ACP_SW_HEADSET_RX_EN 0x0003144
|
#define ACP_SW0_AUDIO2_RX_EN 0x0003144
|
||||||
#define ACP_SW_HEADSET_RX_EN_STATUS 0x0003148
|
#define ACP_SW0_AUDIO2_RX_EN_STATUS 0x0003148
|
||||||
#define ACP_SW_HEADSET_RX_FRAME_FORMAT 0x000314C
|
#define ACP_SW0_AUDIO2_RX_FRAME_FORMAT 0x000314C
|
||||||
#define ACP_SW_HEADSET_RX_SAMPLEINTERVAL 0x0003150
|
#define ACP_SW0_AUDIO2_RX_SAMPLEINTERVAL 0x0003150
|
||||||
#define ACP_SW_HEADSET_RX_HCTRL 0x0003154
|
#define ACP_SW0_AUDIO2_RX_HCTRL 0x0003154
|
||||||
#define ACP_SW_HEADSET_RX_OFFSET 0x0003158
|
#define ACP_SW0_AUDIO2_RX_OFFSET 0x0003158
|
||||||
#define ACP_SW_HEADSET_RX_CHANNEL_ENABLE_DP0 0x000315C
|
#define ACP_SW0_AUDIO2_RX_CHANNEL_ENABLE_DP0 0x000315C
|
||||||
#define ACP_SW_BPT_PORT_EN 0x0003160
|
#define ACP_SW0_BPT_PORT_EN 0x0003160
|
||||||
#define ACP_SW_BPT_PORT_EN_STATUS 0x0003164
|
#define ACP_SW0_BPT_PORT_EN_STATUS 0x0003164
|
||||||
#define ACP_SW_BPT_PORT_FRAME_FORMAT 0x0003168
|
#define ACP_SW0_BPT_PORT_FRAME_FORMAT 0x0003168
|
||||||
#define ACP_SW_BPT_PORT_SAMPLEINTERVAL 0x000316C
|
#define ACP_SW0_BPT_PORT_SAMPLEINTERVAL 0x000316C
|
||||||
#define ACP_SW_BPT_PORT_HCTRL 0x0003170
|
#define ACP_SW0_BPT_PORT_HCTRL 0x0003170
|
||||||
#define ACP_SW_BPT_PORT_OFFSET 0x0003174
|
#define ACP_SW0_BPT_PORT_OFFSET 0x0003174
|
||||||
#define ACP_SW_BPT_PORT_CHANNEL_ENABLE 0x0003178
|
#define ACP_SW0_BPT_PORT_CHANNEL_ENABLE 0x0003178
|
||||||
#define ACP_SW_BPT_PORT_FIRST_BYTE_ADDR 0x000317C
|
#define ACP_SW0_BPT_PORT_FIRST_BYTE_ADDR 0x000317C
|
||||||
#define ACP_SW_CLK_RESUME_CTRL 0x0003180
|
#define ACP_SW0_CLK_RESUME_CTRL 0x0003180
|
||||||
#define ACP_SW_CLK_RESUME_DELAY_CNTR 0x0003184
|
#define ACP_SW0_CLK_RESUME_DELAY_CNTR 0x0003184
|
||||||
#define ACP_SW_BUS_RESET_CTRL 0x0003188
|
#define ACP_SW0_BUS_RESET_CTRL 0x0003188
|
||||||
#define ACP_SW_PRBS_ERR_STATUS 0x000318C
|
#define ACP_SW0_PRBS_ERR_STATUS 0x000318C
|
||||||
#define SW_IMM_CMD_UPPER_WORD 0x0003230
|
#define ACP_SW0_IMM_CMD_UPPER_WORD 0x0003230
|
||||||
#define SW_IMM_CMD_LOWER_QWORD 0x0003234
|
#define ACP_SW0_IMM_CMD_LOWER_QWORD 0x0003234
|
||||||
#define SW_IMM_RESP_UPPER_WORD 0x0003238
|
#define ACP_SW0_IMM_RESP_UPPER_WORD 0x0003238
|
||||||
#define SW_IMM_RESP_LOWER_QWORD 0x000323C
|
#define ACP_SW0_IMM_RESP_LOWER_QWORD 0x000323C
|
||||||
#define SW_IMM_CMD_STS 0x0003240
|
#define ACP_SW0_IMM_CMD_STS 0x0003240
|
||||||
#define SW_BRA_BASE_ADDRESS 0x0003244
|
#define ACP_SW0_BRA_BASE_ADDRESS 0x0003244
|
||||||
#define SW_BRA_TRANSFER_SIZE 0x0003248
|
#define ACP_SW0_BRA_TRANSFER_SIZE 0x0003248
|
||||||
#define SW_BRA_DMA_BUSY 0x000324C
|
#define ACP_SW0_BRA_DMA_BUSY 0x000324C
|
||||||
#define SW_BRA_RESP 0x0003250
|
#define ACP_SW0_BRA_RESP 0x0003250
|
||||||
#define SW_BRA_RESP_FRAME_ADDR 0x0003254
|
#define ACP_SW0_BRA_RESP_FRAME_ADDR 0x0003254
|
||||||
#define SW_BRA_CURRENT_TRANSFER_SIZE 0x0003258
|
#define ACP_SW0_BRA_CURRENT_TRANSFER_SIZE 0x0003258
|
||||||
#define SW_STATE_CHANGE_STATUS_0TO7 0x000325C
|
#define ACP_SW0_STATECHANGE_STATUS_0TO7 0x000325C
|
||||||
#define SW_STATE_CHANGE_STATUS_8TO11 0x0003260
|
#define ACP_SW0_STATECHANGE_STATUS_8TO11 0x0003260
|
||||||
#define SW_STATE_CHANGE_STATUS_MASK_0TO7 0x0003264
|
#define ACP_SW0_STATECHANGE_STATUS_MASK_0TO7 0x0003264
|
||||||
#define SW_STATE_CHANGE_STATUS_MASK_8TO11 0x0003268
|
#define ACP_SW0_STATECHANGE_STATUS_MASK_8TO11 0x0003268
|
||||||
#define SW_CLK_FREQUENCY_CTRL 0x000326C
|
#define ACP_SW0_CLK_FREQUENCY_CTRL 0x000326C
|
||||||
#define SW_ERROR_INTR_MASK 0x0003270
|
#define ACP_SW0_ERROR_INTR_MASK 0x0003270
|
||||||
#define SW_PHY_TEST_MODE_DATA_OFF 0x0003274
|
#define ACP_SW0_PHY_TEST_MODE_DATA_OFF 0x0003274
|
||||||
|
|
||||||
/* Registers from ACP_P1_AUDIO_BUFFERS block */
|
/* Registers from ACP_P1_AUDIO_BUFFERS block */
|
||||||
#define ACP_P1_I2S_RX_RINGBUFADDR 0x0003A00
|
#define ACP_P1_AUDIO0_RX_RINGBUFADDR 0x0003A00
|
||||||
#define ACP_P1_I2S_RX_RINGBUFSIZE 0x0003A04
|
#define ACP_P1_AUDIO0_RX_RINGBUFSIZE 0x0003A04
|
||||||
#define ACP_P1_I2S_RX_LINKPOSITIONCNTR 0x0003A08
|
#define ACP_P1_AUDIO0_RX_LINKPOSITIONCNTR 0x0003A08
|
||||||
#define ACP_P1_I2S_RX_FIFOADDR 0x0003A0C
|
#define ACP_P1_AUDIO0_RX_FIFOADDR 0x0003A0C
|
||||||
#define ACP_P1_I2S_RX_FIFOSIZE 0x0003A10
|
#define ACP_P1_AUDIO0_RX_FIFOSIZE 0x0003A10
|
||||||
#define ACP_P1_I2S_RX_DMA_SIZE 0x0003A14
|
#define ACP_P1_AUDIO0_RX_DMA_SIZE 0x0003A14
|
||||||
#define ACP_P1_I2S_RX_LINEARPOSITIONCNTR_HIGH 0x0003A18
|
#define ACP_P1_AUDIO0_RX_LINEARPOSITIONCNTR_HIGH 0x0003A18
|
||||||
#define ACP_P1_I2S_RX_LINEARPOSITIONCNTR_LOW 0x0003A1C
|
#define ACP_P1_AUDIO0_RX_LINEARPOSITIONCNTR_LOW 0x0003A1C
|
||||||
#define ACP_P1_I2S_RX_INTR_WATERMARK_SIZE 0x0003A20
|
#define ACP_P1_AUDIO0_RX_INTR_WATERMARK_SIZE 0x0003A20
|
||||||
#define ACP_P1_I2S_TX_RINGBUFADDR 0x0003A24
|
#define ACP_P1_AUDIO0_TX_RINGBUFADDR 0x0003A24
|
||||||
#define ACP_P1_I2S_TX_RINGBUFSIZE 0x0003A28
|
#define ACP_P1_AUDIO0_TX_RINGBUFSIZE 0x0003A28
|
||||||
#define ACP_P1_I2S_TX_LINKPOSITIONCNTR 0x0003A2C
|
#define ACP_P1_AUDIO0_TX_LINKPOSITIONCNTR 0x0003A2C
|
||||||
#define ACP_P1_I2S_TX_FIFOADDR 0x0003A30
|
#define ACP_P1_AUDIO0_TX_FIFOADDR 0x0003A30
|
||||||
#define ACP_P1_I2S_TX_FIFOSIZE 0x0003A34
|
#define ACP_P1_AUDIO0_TX_FIFOSIZE 0x0003A34
|
||||||
#define ACP_P1_I2S_TX_DMA_SIZE 0x0003A38
|
#define ACP_P1_AUDIO0_TX_DMA_SIZE 0x0003A38
|
||||||
#define ACP_P1_I2S_TX_LINEARPOSITIONCNTR_HIGH 0x0003A3C
|
#define ACP_P1_AUDIO0_TX_LINEARPOSITIONCNTR_HIGH 0x0003A3C
|
||||||
#define ACP_P1_I2S_TX_LINEARPOSITIONCNTR_LOW 0x0003A40
|
#define ACP_P1_AUDIO0_TX_LINEARPOSITIONCNTR_LOW 0x0003A40
|
||||||
#define ACP_P1_I2S_TX_INTR_WATERMARK_SIZE 0x0003A44
|
#define ACP_P1_AUDIO0_TX_INTR_WATERMARK_SIZE 0x0003A44
|
||||||
#define ACP_P1_BT_RX_RINGBUFADDR 0x0003A48
|
#define ACP_P1_AUDIO1_RX_RINGBUFADDR 0x0003A48
|
||||||
#define ACP_P1_BT_RX_RINGBUFSIZE 0x0003A4C
|
#define ACP_P1_AUDIO1_RX_RINGBUFSIZE 0x0003A4C
|
||||||
#define ACP_P1_BT_RX_LINKPOSITIONCNTR 0x0003A50
|
#define ACP_P1_AUDIO1_RX_LINKPOSITIONCNTR 0x0003A50
|
||||||
#define ACP_P1_BT_RX_FIFOADDR 0x0003A54
|
#define ACP_P1_AUDIO1_RX_FIFOADDR 0x0003A54
|
||||||
#define ACP_P1_BT_RX_FIFOSIZE 0x0003A58
|
#define ACP_P1_AUDIO1_RX_FIFOSIZE 0x0003A58
|
||||||
#define ACP_P1_BT_RX_DMA_SIZE 0x0003A5C
|
#define ACP_P1_AUDIO1_RX_DMA_SIZE 0x0003A5C
|
||||||
#define ACP_P1_BT_RX_LINEARPOSITIONCNTR_HIGH 0x0003A60
|
#define ACP_P1_AUDIO1_RX_LINEARPOSITIONCNTR_HIGH 0x0003A60
|
||||||
#define ACP_P1_BT_RX_LINEARPOSITIONCNTR_LOW 0x0003A64
|
#define ACP_P1_AUDIO1_RX_LINEARPOSITIONCNTR_LOW 0x0003A64
|
||||||
#define ACP_P1_BT_RX_INTR_WATERMARK_SIZE 0x0003A68
|
#define ACP_P1_AUDIO1_RX_INTR_WATERMARK_SIZE 0x0003A68
|
||||||
#define ACP_P1_BT_TX_RINGBUFADDR 0x0003A6C
|
#define ACP_P1_AUDIO1_TX_RINGBUFADDR 0x0003A6C
|
||||||
#define ACP_P1_BT_TX_RINGBUFSIZE 0x0003A70
|
#define ACP_P1_AUDIO1_TX_RINGBUFSIZE 0x0003A70
|
||||||
#define ACP_P1_BT_TX_LINKPOSITIONCNTR 0x0003A74
|
#define ACP_P1_AUDIO1_TX_LINKPOSITIONCNTR 0x0003A74
|
||||||
#define ACP_P1_BT_TX_FIFOADDR 0x0003A78
|
#define ACP_P1_AUDIO1_TX_FIFOADDR 0x0003A78
|
||||||
#define ACP_P1_BT_TX_FIFOSIZE 0x0003A7C
|
#define ACP_P1_AUDIO1_TX_FIFOSIZE 0x0003A7C
|
||||||
#define ACP_P1_BT_TX_DMA_SIZE 0x0003A80
|
#define ACP_P1_AUDIO1_TX_DMA_SIZE 0x0003A80
|
||||||
#define ACP_P1_BT_TX_LINEARPOSITIONCNTR_HIGH 0x0003A84
|
#define ACP_P1_AUDIO1_TX_LINEARPOSITIONCNTR_HIGH 0x0003A84
|
||||||
#define ACP_P1_BT_TX_LINEARPOSITIONCNTR_LOW 0x0003A88
|
#define ACP_P1_AUDIO1_TX_LINEARPOSITIONCNTR_LOW 0x0003A88
|
||||||
#define ACP_P1_BT_TX_INTR_WATERMARK_SIZE 0x0003A8C
|
#define ACP_P1_AUDIO1_TX_INTR_WATERMARK_SIZE 0x0003A8C
|
||||||
#define ACP_P1_HS_RX_RINGBUFADDR 0x0003A90
|
#define ACP_P1_AUDIO2_RX_RINGBUFADDR 0x0003A90
|
||||||
#define ACP_P1_HS_RX_RINGBUFSIZE 0x0003A94
|
#define ACP_P1_AUDIO2_RX_RINGBUFSIZE 0x0003A94
|
||||||
#define ACP_P1_HS_RX_LINKPOSITIONCNTR 0x0003A98
|
#define ACP_P1_AUDIO2_RX_LINKPOSITIONCNTR 0x0003A98
|
||||||
#define ACP_P1_HS_RX_FIFOADDR 0x0003A9C
|
#define ACP_P1_AUDIO2_RX_FIFOADDR 0x0003A9C
|
||||||
#define ACP_P1_HS_RX_FIFOSIZE 0x0003AA0
|
#define ACP_P1_AUDIO2_RX_FIFOSIZE 0x0003AA0
|
||||||
#define ACP_P1_HS_RX_DMA_SIZE 0x0003AA4
|
#define ACP_P1_AUDIO2_RX_DMA_SIZE 0x0003AA4
|
||||||
#define ACP_P1_HS_RX_LINEARPOSITIONCNTR_HIGH 0x0003AA8
|
#define ACP_P1_AUDIO2_RX_LINEARPOSITIONCNTR_HIGH 0x0003AA8
|
||||||
#define ACP_P1_HS_RX_LINEARPOSITIONCNTR_LOW 0x0003AAC
|
#define ACP_P1_AUDIO2_RX_LINEARPOSITIONCNTR_LOW 0x0003AAC
|
||||||
#define ACP_P1_HS_RX_INTR_WATERMARK_SIZE 0x0003AB0
|
#define ACP_P1_AUDIO2_RX_INTR_WATERMARK_SIZE 0x0003AB0
|
||||||
#define ACP_P1_HS_TX_RINGBUFADDR 0x0003AB4
|
#define ACP_P1_AUDIO2_TX_RINGBUFADDR 0x0003AB4
|
||||||
#define ACP_P1_HS_TX_RINGBUFSIZE 0x0003AB8
|
#define ACP_P1_AUDIO2_TX_RINGBUFSIZE 0x0003AB8
|
||||||
#define ACP_P1_HS_TX_LINKPOSITIONCNTR 0x0003ABC
|
#define ACP_P1_AUDIO2_TX_LINKPOSITIONCNTR 0x0003ABC
|
||||||
#define ACP_P1_HS_TX_FIFOADDR 0x0003AC0
|
#define ACP_P1_AUDIO2_TX_FIFOADDR 0x0003AC0
|
||||||
#define ACP_P1_HS_TX_FIFOSIZE 0x0003AC4
|
#define ACP_P1_AUDIO2_TX_FIFOSIZE 0x0003AC4
|
||||||
#define ACP_P1_HS_TX_DMA_SIZE 0x0003AC8
|
#define ACP_P1_AUDIO2_TX_DMA_SIZE 0x0003AC8
|
||||||
#define ACP_P1_HS_TX_LINEARPOSITIONCNTR_HIGH 0x0003ACC
|
#define ACP_P1_AUDIO2_TX_LINEARPOSITIONCNTR_HIGH 0x0003ACC
|
||||||
#define ACP_P1_HS_TX_LINEARPOSITIONCNTR_LOW 0x0003AD0
|
#define ACP_P1_AUDIO2_TX_LINEARPOSITIONCNTR_LOW 0x0003AD0
|
||||||
#define ACP_P1_HS_TX_INTR_WATERMARK_SIZE 0x0003AD4
|
#define ACP_P1_AUDIO2_TX_INTR_WATERMARK_SIZE 0x0003AD4
|
||||||
#define ACP_P1_AUDIO_RX_RINGBUFADDR ACP_P1_I2S_RX_RINGBUFADDR
|
|
||||||
#define ACP_P1_AUDIO_RX_RINGBUFSIZE ACP_P1_I2S_RX_RINGBUFSIZE
|
|
||||||
#define ACP_P1_AUDIO_RX_LINKPOSITIONCNTR ACP_P1_I2S_RX_LINKPOSITIONCNTR
|
|
||||||
#define ACP_P1_AUDIO_RX_FIFOADDR ACP_P1_I2S_RX_FIFOADDR
|
|
||||||
#define ACP_P1_AUDIO_RX_FIFOSIZE ACP_P1_I2S_RX_FIFOSIZE
|
|
||||||
#define ACP_P1_AUDIO_RX_DMA_SIZE ACP_P1_I2S_RX_DMA_SIZE
|
|
||||||
#define ACP_P1_AUDIO_RX_LINEARPOSITIONCNTR_HIGH ACP_P1_I2S_RX_LINEARPOSITIONCNTR_HIGH
|
|
||||||
#define ACP_P1_AUDIO_RX_LINEARPOSITIONCNTR_LOW ACP_P1_I2S_RX_LINEARPOSITIONCNTR_LOW
|
|
||||||
#define ACP_P1_AUDIO_RX_INTR_WATERMARK_SIZE ACP_P1_I2S_RX_INTR_WATERMARK_SIZE
|
|
||||||
#define ACP_P1_AUDIO_TX_RINGBUFADDR ACP_P1_I2S_TX_RINGBUFADDR
|
|
||||||
#define ACP_P1_AUDIO_TX_RINGBUFSIZE ACP_P1_I2S_TX_RINGBUFSIZE
|
|
||||||
#define ACP_P1_AUDIO_TX_LINKPOSITIONCNTR ACP_P1_I2S_TX_LINKPOSITIONCNTR
|
|
||||||
#define ACP_P1_AUDIO_TX_FIFOADDR ACP_P1_I2S_TX_FIFOADDR
|
|
||||||
#define ACP_P1_AUDIO_TX_FIFOSIZE ACP_P1_I2S_TX_FIFOSIZE
|
|
||||||
#define ACP_P1_AUDIO_TX_DMA_SIZE ACP_P1_I2S_TX_DMA_SIZE
|
|
||||||
#define ACP_P1_AUDIO_TX_LINEARPOSITIONCNTR_HIGH ACP_P1_I2S_TX_LINEARPOSITIONCNTR_HIGH
|
|
||||||
#define ACP_P1_AUDIO_TX_LINEARPOSITIONCNTR_LOW ACP_P1_I2S_TX_LINEARPOSITIONCNTR_LOW
|
|
||||||
#define ACP_P1_AUDIO_TX_INTR_WATERMARK_SIZE ACP_P1_I2S_TX_INTR_WATERMARK_SIZE
|
|
||||||
|
|
||||||
/* Registers from ACP_P1_SW_SWCLK block */
|
/* Registers from ACP_SW1_SWCLK block */
|
||||||
#define ACP_P1_SW_EN 0x0003C00
|
#define ACP_SW1_EN 0x0003C00
|
||||||
#define ACP_P1_SW_EN_STATUS 0x0003C04
|
#define ACP_SW1_EN_STATUS 0x0003C04
|
||||||
#define ACP_P1_SW_FRAMESIZE 0x0003C08
|
#define ACP_SW1_FRAMESIZE 0x0003C08
|
||||||
#define ACP_P1_SW_SSP_COUNTER 0x0003C0C
|
#define ACP_SW1_SSP_COUNTER 0x0003C0C
|
||||||
#define ACP_P1_SW_BT_TX_EN 0x0003C50
|
#define ACP_SW1_AUDIO1_TX_EN 0x0003C50
|
||||||
#define ACP_P1_SW_BT_TX_EN_STATUS 0x0003C54
|
#define ACP_SW1_AUDIO1_TX_EN_STATUS 0x0003C54
|
||||||
#define ACP_P1_SW_BT_TX_FRAME_FORMAT 0x0003C58
|
#define ACP_SW1_AUDIO1_TX_FRAME_FORMAT 0x0003C58
|
||||||
#define ACP_P1_SW_BT_TX_SAMPLEINTERVAL 0x0003C5C
|
#define ACP_SW1_AUDIO1_TX_SAMPLEINTERVAL 0x0003C5C
|
||||||
#define ACP_P1_SW_BT_TX_HCTRL 0x0003C60
|
#define ACP_SW1_AUDIO1_TX_HCTRL 0x0003C60
|
||||||
#define ACP_P1_SW_BT_TX_OFFSET 0x0003C64
|
#define ACP_SW1_AUDIO1_TX_OFFSET 0x0003C64
|
||||||
#define ACP_P1_SW_BT_TX_CHANNEL_ENABLE_DP0 0x0003C68
|
#define ACP_SW1_AUDIO1_TX_CHANNEL_ENABLE_DP0 0x0003C68
|
||||||
#define ACP_P1_SW_BT_RX_EN 0x0003D28
|
#define ACP_SW1_AUDIO1_RX_EN 0x0003D28
|
||||||
#define ACP_P1_SW_BT_RX_EN_STATUS 0x0003D2C
|
#define ACP_SW1_AUDIO1_RX_EN_STATUS 0x0003D2C
|
||||||
#define ACP_P1_SW_BT_RX_FRAME_FORMAT 0x0003D30
|
#define ACP_SW1_AUDIO1_RX_FRAME_FORMAT 0x0003D30
|
||||||
#define ACP_P1_SW_BT_RX_SAMPLEINTERVAL 0x0003D34
|
#define ACP_SW1_AUDIO1_RX_SAMPLEINTERVAL 0x0003D34
|
||||||
#define ACP_P1_SW_BT_RX_HCTRL 0x0003D38
|
#define ACP_SW1_AUDIO1_RX_HCTRL 0x0003D38
|
||||||
#define ACP_P1_SW_BT_RX_OFFSET 0x0003D3C
|
#define ACP_SW1_AUDIO1_RX_OFFSET 0x0003D3C
|
||||||
#define ACP_P1_SW_BT_RX_CHANNEL_ENABLE_DP0 0x0003D40
|
#define ACP_SW1_AUDIO1_RX_CHANNEL_ENABLE_DP0 0x0003D40
|
||||||
#define ACP_P1_SW_BPT_PORT_EN 0x0003D60
|
#define ACP_SW1_BPT_PORT_EN 0x0003D60
|
||||||
#define ACP_P1_SW_BPT_PORT_EN_STATUS 0x0003D64
|
#define ACP_SW1_BPT_PORT_EN_STATUS 0x0003D64
|
||||||
#define ACP_P1_SW_BPT_PORT_FRAME_FORMAT 0x0003D68
|
#define ACP_SW1_BPT_PORT_FRAME_FORMAT 0x0003D68
|
||||||
#define ACP_P1_SW_BPT_PORT_SAMPLEINTERVAL 0x0003D6C
|
#define ACP_SW1_BPT_PORT_SAMPLEINTERVAL 0x0003D6C
|
||||||
#define ACP_P1_SW_BPT_PORT_HCTRL 0x0003D70
|
#define ACP_SW1_BPT_PORT_HCTRL 0x0003D70
|
||||||
#define ACP_P1_SW_BPT_PORT_OFFSET 0x0003D74
|
#define ACP_SW1_BPT_PORT_OFFSET 0x0003D74
|
||||||
#define ACP_P1_SW_BPT_PORT_CHANNEL_ENABLE 0x0003D78
|
#define ACP_SW1_BPT_PORT_CHANNEL_ENABLE 0x0003D78
|
||||||
#define ACP_P1_SW_BPT_PORT_FIRST_BYTE_ADDR 0x0003D7C
|
#define ACP_SW1_BPT_PORT_FIRST_BYTE_ADDR 0x0003D7C
|
||||||
#define ACP_P1_SW_CLK_RESUME_CTRL 0x0003D80
|
#define ACP_SW1_CLK_RESUME_CTRL 0x0003D80
|
||||||
#define ACP_P1_SW_CLK_RESUME_DELAY_CNTR 0x0003D84
|
#define ACP_SW1_CLK_RESUME_DELAY_CNTR 0x0003D84
|
||||||
#define ACP_P1_SW_BUS_RESET_CTRL 0x0003D88
|
#define ACP_SW1_BUS_RESET_CTRL 0x0003D88
|
||||||
#define ACP_P1_SW_PRBS_ERR_STATUS 0x0003D8C
|
#define ACP_SW1_PRBS_ERR_STATUS 0x0003D8C
|
||||||
|
|
||||||
/* Registers from ACP_P1_SW_ACLK block */
|
/* Registers from ACP_SW1_ACLK block */
|
||||||
#define P1_SW_CORB_BASE_ADDRESS 0x0003E00
|
#define ACP_SW1_CORB_BASE_ADDRESS 0x0003E00
|
||||||
#define P1_SW_CORB_WRITE_POINTER 0x0003E04
|
#define ACP_SW1_CORB_WRITE_POINTER 0x0003E04
|
||||||
#define P1_SW_CORB_READ_POINTER 0x0003E08
|
#define ACP_SW1_CORB_READ_POINTER 0x0003E08
|
||||||
#define P1_SW_CORB_CONTROL 0x0003E0C
|
#define ACP_SW1_CORB_CONTROL 0x0003E0C
|
||||||
#define P1_SW_CORB_SIZE 0x0003E14
|
#define ACP_SW1_CORB_SIZE 0x0003E14
|
||||||
#define P1_SW_RIRB_BASE_ADDRESS 0x0003E18
|
#define ACP_SW1_RIRB_BASE_ADDRESS 0x0003E18
|
||||||
#define P1_SW_RIRB_WRITE_POINTER 0x0003E1C
|
#define ACP_SW1_RIRB_WRITE_POINTER 0x0003E1C
|
||||||
#define P1_SW_RIRB_RESPONSE_INTERRUPT_COUNT 0x0003E20
|
#define ACP_SW1_RIRB_RESPONSE_INTERRUPT_COUNT 0x0003E20
|
||||||
#define P1_SW_RIRB_CONTROL 0x0003E24
|
#define ACP_SW1_RIRB_CONTROL 0x0003E24
|
||||||
#define P1_SW_RIRB_SIZE 0x0003E28
|
#define ACP_SW1_RIRB_SIZE 0x0003E28
|
||||||
#define P1_SW_RIRB_FIFO_MIN_THDL 0x0003E2C
|
#define ACP_SW1_RIRB_FIFO_MIN_THDL 0x0003E2C
|
||||||
#define P1_SW_IMM_CMD_UPPER_WORD 0x0003E30
|
#define ACP_SW1_IMM_CMD_UPPER_WORD 0x0003E30
|
||||||
#define P1_SW_IMM_CMD_LOWER_QWORD 0x0003E34
|
#define ACP_SW1_IMM_CMD_LOWER_QWORD 0x0003E34
|
||||||
#define P1_SW_IMM_RESP_UPPER_WORD 0x0003E38
|
#define ACP_SW1_IMM_RESP_UPPER_WORD 0x0003E38
|
||||||
#define P1_SW_IMM_RESP_LOWER_QWORD 0x0003E3C
|
#define ACP_SW1_IMM_RESP_LOWER_QWORD 0x0003E3C
|
||||||
#define P1_SW_IMM_CMD_STS 0x0003E40
|
#define ACP_SW1_IMM_CMD_STS 0x0003E40
|
||||||
#define P1_SW_BRA_BASE_ADDRESS 0x0003E44
|
#define ACP_SW1_BRA_BASE_ADDRESS 0x0003E44
|
||||||
#define P1_SW_BRA_TRANSFER_SIZE 0x0003E48
|
#define ACP_SW1_BRA_TRANSFER_SIZE 0x0003E48
|
||||||
#define P1_SW_BRA_DMA_BUSY 0x0003E4C
|
#define ACP_SW1_BRA_DMA_BUSY 0x0003E4C
|
||||||
#define P1_SW_BRA_RESP 0x0003E50
|
#define ACP_SW1_BRA_RESP 0x0003E50
|
||||||
#define P1_SW_BRA_RESP_FRAME_ADDR 0x0003E54
|
#define ACP_SW1_BRA_RESP_FRAME_ADDR 0x0003E54
|
||||||
#define P1_SW_BRA_CURRENT_TRANSFER_SIZE 0x0003E58
|
#define ACP_SW1_BRA_CURRENT_TRANSFER_SIZE 0x0003E58
|
||||||
#define P1_SW_STATE_CHANGE_STATUS_0TO7 0x0003E5C
|
#define ACP_SW1_STATECHANGE_STATUS_0TO7 0x0003E5C
|
||||||
#define P1_SW_STATE_CHANGE_STATUS_8TO11 0x0003E60
|
#define ACP_SW1_STATECHANGE_STATUS_8TO11 0x0003E60
|
||||||
#define P1_SW_STATE_CHANGE_STATUS_MASK_0TO7 0x0003E64
|
#define ACP_SW1_STATECHANGE_STATUS_MASK_0TO7 0x0003E64
|
||||||
#define P1_SW_STATE_CHANGE_STATUS_MASK_8TO11 0x0003E68
|
#define ACP_SW1_STATECHANGE_STATUS_MASK_8TO11 0x0003E68
|
||||||
#define P1_SW_CLK_FREQUENCY_CTRL 0x0003E6C
|
#define ACP_SW1_CLK_FREQUENCY_CTRL 0x0003E6C
|
||||||
#define P1_SW_ERROR_INTR_MASK 0x0003E70
|
#define ACP_SW1_ERROR_INTR_MASK 0x0003E70
|
||||||
#define P1_SW_PHY_TEST_MODE_DATA_OFF 0x0003E74
|
#define ACP_SW1_PHY_TEST_MODE_DATA_OFF 0x0003E74
|
||||||
|
|
||||||
/* Registers from ACP_SCRATCH block */
|
/* Registers from ACP_SCRATCH block */
|
||||||
#define ACP_SCRATCH_REG_0 0x0010000
|
#define ACP_SCRATCH_REG_0 0x0010000
|
||||||
#define ACP_SCRATCH_REG_1 0x0010004
|
|
||||||
#define ACP_SCRATCH_REG_2 0x0010008
|
|
||||||
#define ACP_SCRATCH_REG_3 0x001000C
|
|
||||||
#define ACP_SCRATCH_REG_4 0x0010010
|
|
||||||
#define ACP_SCRATCH_REG_5 0x0010014
|
|
||||||
#define ACP_SCRATCH_REG_6 0x0010018
|
|
||||||
#define ACP_SCRATCH_REG_7 0x001001C
|
|
||||||
#define ACP_SCRATCH_REG_8 0x0010020
|
|
||||||
#define ACP_SCRATCH_REG_9 0x0010024
|
|
||||||
#define ACP_SCRATCH_REG_10 0x0010028
|
|
||||||
#define ACP_SCRATCH_REG_11 0x001002C
|
|
||||||
#define ACP_SCRATCH_REG_12 0x0010030
|
|
||||||
#define ACP_SCRATCH_REG_13 0x0010034
|
|
||||||
#define ACP_SCRATCH_REG_14 0x0010038
|
|
||||||
#define ACP_SCRATCH_REG_15 0x001003C
|
|
||||||
#define ACP_SCRATCH_REG_16 0x0010040
|
|
||||||
#define ACP_SCRATCH_REG_17 0x0010044
|
|
||||||
#define ACP_SCRATCH_REG_18 0x0010048
|
|
||||||
#define ACP_SCRATCH_REG_19 0x001004C
|
|
||||||
#define ACP_SCRATCH_REG_20 0x0010050
|
|
||||||
#define ACP_SCRATCH_REG_21 0x0010054
|
|
||||||
#define ACP_SCRATCH_REG_22 0x0010058
|
|
||||||
#define ACP_SCRATCH_REG_23 0x001005C
|
|
||||||
#define ACP_SCRATCH_REG_24 0x0010060
|
|
||||||
#define ACP_SCRATCH_REG_25 0x0010064
|
|
||||||
#define ACP_SCRATCH_REG_26 0x0010068
|
|
||||||
#define ACP_SCRATCH_REG_27 0x001006C
|
|
||||||
#define ACP_SCRATCH_REG_28 0x0010070
|
|
||||||
#define ACP_SCRATCH_REG_29 0x0010074
|
|
||||||
#define ACP_SCRATCH_REG_30 0x0010078
|
|
||||||
#define ACP_SCRATCH_REG_31 0x001007C
|
|
||||||
#define ACP_SCRATCH_REG_32 0x0010080
|
|
||||||
#define ACP_SCRATCH_REG_33 0x0010084
|
|
||||||
#define ACP_SCRATCH_REG_34 0x0010088
|
|
||||||
#define ACP_SCRATCH_REG_35 0x001008C
|
|
||||||
#define ACP_SCRATCH_REG_36 0x0010090
|
|
||||||
#define ACP_SCRATCH_REG_37 0x0010094
|
|
||||||
#define ACP_SCRATCH_REG_38 0x0010098
|
|
||||||
#define ACP_SCRATCH_REG_39 0x001009C
|
|
||||||
#define ACP_SCRATCH_REG_40 0x00100A0
|
|
||||||
#define ACP_SCRATCH_REG_41 0x00100A4
|
|
||||||
#define ACP_SCRATCH_REG_42 0x00100A8
|
|
||||||
#define ACP_SCRATCH_REG_43 0x00100AC
|
|
||||||
#define ACP_SCRATCH_REG_44 0x00100B0
|
|
||||||
#define ACP_SCRATCH_REG_45 0x00100B4
|
|
||||||
#define ACP_SCRATCH_REG_46 0x00100B8
|
|
||||||
#define ACP_SCRATCH_REG_47 0x00100BC
|
|
||||||
#define ACP_SCRATCH_REG_48 0x00100C0
|
|
||||||
#define ACP_SCRATCH_REG_49 0x00100C4
|
|
||||||
#define ACP_SCRATCH_REG_50 0x00100C8
|
|
||||||
#define ACP_SCRATCH_REG_51 0x00100CC
|
|
||||||
#define ACP_SCRATCH_REG_52 0x00100D0
|
|
||||||
#define ACP_SCRATCH_REG_53 0x00100D4
|
|
||||||
#define ACP_SCRATCH_REG_54 0x00100D8
|
|
||||||
#define ACP_SCRATCH_REG_55 0x00100DC
|
|
||||||
#define ACP_SCRATCH_REG_56 0x00100E0
|
|
||||||
#define ACP_SCRATCH_REG_57 0x00100E4
|
|
||||||
#define ACP_SCRATCH_REG_58 0x00100E8
|
|
||||||
#define ACP_SCRATCH_REG_59 0x00100EC
|
|
||||||
#define ACP_SCRATCH_REG_60 0x00100F0
|
|
||||||
#define ACP_SCRATCH_REG_61 0x00100F4
|
|
||||||
#define ACP_SCRATCH_REG_62 0x00100F8
|
|
||||||
#define ACP_SCRATCH_REG_63 0x00100FC
|
|
||||||
#define ACP_SCRATCH_REG_64 0x0010100
|
|
||||||
#define ACP_SCRATCH_REG_65 0x0010104
|
|
||||||
#define ACP_SCRATCH_REG_66 0x0010108
|
|
||||||
#define ACP_SCRATCH_REG_67 0x001010C
|
|
||||||
#define ACP_SCRATCH_REG_68 0x0010110
|
|
||||||
#define ACP_SCRATCH_REG_69 0x0010114
|
|
||||||
#define ACP_SCRATCH_REG_70 0x0010118
|
|
||||||
#define ACP_SCRATCH_REG_71 0x001011C
|
|
||||||
#define ACP_SCRATCH_REG_72 0x0010120
|
|
||||||
#define ACP_SCRATCH_REG_73 0x0010124
|
|
||||||
#define ACP_SCRATCH_REG_74 0x0010128
|
|
||||||
#define ACP_SCRATCH_REG_75 0x001012C
|
|
||||||
#define ACP_SCRATCH_REG_76 0x0010130
|
|
||||||
#define ACP_SCRATCH_REG_77 0x0010134
|
|
||||||
#define ACP_SCRATCH_REG_78 0x0010138
|
|
||||||
#define ACP_SCRATCH_REG_79 0x001013C
|
|
||||||
#define ACP_SCRATCH_REG_80 0x0010140
|
|
||||||
#define ACP_SCRATCH_REG_81 0x0010144
|
|
||||||
#define ACP_SCRATCH_REG_82 0x0010148
|
|
||||||
#define ACP_SCRATCH_REG_83 0x001014C
|
|
||||||
#define ACP_SCRATCH_REG_84 0x0010150
|
|
||||||
#define ACP_SCRATCH_REG_85 0x0010154
|
|
||||||
#define ACP_SCRATCH_REG_86 0x0010158
|
|
||||||
#define ACP_SCRATCH_REG_87 0x001015C
|
|
||||||
#define ACP_SCRATCH_REG_88 0x0010160
|
|
||||||
#define ACP_SCRATCH_REG_89 0x0010164
|
|
||||||
#define ACP_SCRATCH_REG_90 0x0010168
|
|
||||||
#define ACP_SCRATCH_REG_91 0x001016C
|
|
||||||
#define ACP_SCRATCH_REG_92 0x0010170
|
|
||||||
#define ACP_SCRATCH_REG_93 0x0010174
|
|
||||||
#define ACP_SCRATCH_REG_94 0x0010178
|
|
||||||
#define ACP_SCRATCH_REG_95 0x001017C
|
|
||||||
#define ACP_SCRATCH_REG_96 0x0010180
|
|
||||||
#define ACP_SCRATCH_REG_97 0x0010184
|
|
||||||
#define ACP_SCRATCH_REG_98 0x0010188
|
|
||||||
#define ACP_SCRATCH_REG_99 0x001018C
|
|
||||||
#define ACP_SCRATCH_REG_100 0x0010190
|
|
||||||
#define ACP_SCRATCH_REG_101 0x0010194
|
|
||||||
#define ACP_SCRATCH_REG_102 0x0010198
|
|
||||||
#define ACP_SCRATCH_REG_103 0x001019C
|
|
||||||
#define ACP_SCRATCH_REG_104 0x00101A0
|
|
||||||
#define ACP_SCRATCH_REG_105 0x00101A4
|
|
||||||
#define ACP_SCRATCH_REG_106 0x00101A8
|
|
||||||
#define ACP_SCRATCH_REG_107 0x00101AC
|
|
||||||
#define ACP_SCRATCH_REG_108 0x00101B0
|
|
||||||
#define ACP_SCRATCH_REG_109 0x00101B4
|
|
||||||
#define ACP_SCRATCH_REG_110 0x00101B8
|
|
||||||
#define ACP_SCRATCH_REG_111 0x00101BC
|
|
||||||
#define ACP_SCRATCH_REG_112 0x00101C0
|
|
||||||
#define ACP_SCRATCH_REG_113 0x00101C4
|
|
||||||
#define ACP_SCRATCH_REG_114 0x00101C8
|
|
||||||
#define ACP_SCRATCH_REG_115 0x00101CC
|
|
||||||
#define ACP_SCRATCH_REG_116 0x00101D0
|
|
||||||
#define ACP_SCRATCH_REG_117 0x00101D4
|
|
||||||
#define ACP_SCRATCH_REG_118 0x00101D8
|
|
||||||
#define ACP_SCRATCH_REG_119 0x00101DC
|
|
||||||
#define ACP_SCRATCH_REG_120 0x00101E0
|
|
||||||
#define ACP_SCRATCH_REG_121 0x00101E4
|
|
||||||
#define ACP_SCRATCH_REG_122 0x00101E8
|
|
||||||
#define ACP_SCRATCH_REG_123 0x00101EC
|
|
||||||
#define ACP_SCRATCH_REG_124 0x00101F0
|
|
||||||
#define ACP_SCRATCH_REG_125 0x00101F4
|
|
||||||
#define ACP_SCRATCH_REG_126 0x00101F8
|
|
||||||
#define ACP_SCRATCH_REG_127 0x00101FC
|
|
||||||
#define ACP_SCRATCH_REG_128 0x0010200
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -286,10 +286,10 @@ int snd_devm_card_new(struct device *parent, int idx, const char *xid,
|
|||||||
struct module *module, size_t extra_size,
|
struct module *module, size_t extra_size,
|
||||||
struct snd_card **card_ret);
|
struct snd_card **card_ret);
|
||||||
|
|
||||||
int snd_card_disconnect(struct snd_card *card);
|
void snd_card_disconnect(struct snd_card *card);
|
||||||
void snd_card_disconnect_sync(struct snd_card *card);
|
void snd_card_disconnect_sync(struct snd_card *card);
|
||||||
int snd_card_free(struct snd_card *card);
|
void snd_card_free(struct snd_card *card);
|
||||||
int snd_card_free_when_closed(struct snd_card *card);
|
void snd_card_free_when_closed(struct snd_card *card);
|
||||||
int snd_card_free_on_error(struct device *dev, int ret);
|
int snd_card_free_on_error(struct device *dev, int ret);
|
||||||
void snd_card_set_id(struct snd_card *card, const char *id);
|
void snd_card_set_id(struct snd_card *card, const char *id);
|
||||||
int snd_card_register(struct snd_card *card);
|
int snd_card_register(struct snd_card *card);
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#define CS42L42_PAGE_24 0x2400
|
#define CS42L42_PAGE_24 0x2400
|
||||||
#define CS42L42_PAGE_25 0x2500
|
#define CS42L42_PAGE_25 0x2500
|
||||||
#define CS42L42_PAGE_26 0x2600
|
#define CS42L42_PAGE_26 0x2600
|
||||||
|
#define CS42L42_PAGE_27 0x2700
|
||||||
#define CS42L42_PAGE_28 0x2800
|
#define CS42L42_PAGE_28 0x2800
|
||||||
#define CS42L42_PAGE_29 0x2900
|
#define CS42L42_PAGE_29 0x2900
|
||||||
#define CS42L42_PAGE_2A 0x2A00
|
#define CS42L42_PAGE_2A 0x2A00
|
||||||
@ -720,6 +721,10 @@
|
|||||||
|
|
||||||
#define CS42L42_SRC_SDOUT_FS (CS42L42_PAGE_26 + 0x09)
|
#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 */
|
/* Page 0x28 S/PDIF Registers */
|
||||||
#define CS42L42_SPDIF_CTL1 (CS42L42_PAGE_28 + 0x01)
|
#define CS42L42_SPDIF_CTL1 (CS42L42_PAGE_28 + 0x01)
|
||||||
#define CS42L42_SPDIF_CTL2 (CS42L42_PAGE_28 + 0x02)
|
#define CS42L42_SPDIF_CTL2 (CS42L42_PAGE_28 + 0x02)
|
||||||
|
@ -259,6 +259,7 @@ struct hda_codec {
|
|||||||
unsigned int relaxed_resume:1; /* don't resume forcibly for jack */
|
unsigned int relaxed_resume:1; /* don't resume forcibly for jack */
|
||||||
unsigned int forced_resume:1; /* forced resume for jack */
|
unsigned int forced_resume:1; /* forced resume for jack */
|
||||||
unsigned int no_stream_clean_at_suspend:1; /* do not clean streams at suspend */
|
unsigned int no_stream_clean_at_suspend:1; /* do not clean streams at suspend */
|
||||||
|
unsigned int ctl_dev_id:1; /* old control element id build behaviour */
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
unsigned long power_on_acct;
|
unsigned long power_on_acct;
|
||||||
|
@ -575,7 +575,7 @@ void snd_hdac_stream_cleanup(struct hdac_stream *azx_dev);
|
|||||||
int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
|
int snd_hdac_stream_setup_periods(struct hdac_stream *azx_dev);
|
||||||
int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
|
int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
|
||||||
unsigned int format_val);
|
unsigned int format_val);
|
||||||
void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start);
|
void snd_hdac_stream_start(struct hdac_stream *azx_dev);
|
||||||
void snd_hdac_stream_stop(struct hdac_stream *azx_dev);
|
void snd_hdac_stream_stop(struct hdac_stream *azx_dev);
|
||||||
void snd_hdac_stop_streams(struct hdac_bus *bus);
|
void snd_hdac_stop_streams(struct hdac_bus *bus);
|
||||||
void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus);
|
void snd_hdac_stop_streams_and_chip(struct hdac_bus *bus);
|
||||||
|
@ -69,6 +69,7 @@ struct asoc_simple_priv {
|
|||||||
} *dai_props;
|
} *dai_props;
|
||||||
struct asoc_simple_jack hp_jack;
|
struct asoc_simple_jack hp_jack;
|
||||||
struct asoc_simple_jack mic_jack;
|
struct asoc_simple_jack mic_jack;
|
||||||
|
struct snd_soc_jack *aux_jacks;
|
||||||
struct snd_soc_dai_link *dai_link;
|
struct snd_soc_dai_link *dai_link;
|
||||||
struct asoc_simple_dai *dais;
|
struct asoc_simple_dai *dais;
|
||||||
struct snd_soc_dai_link_component *dlcs;
|
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,
|
int asoc_simple_init_jack(struct snd_soc_card *card,
|
||||||
struct asoc_simple_jack *sjack,
|
struct asoc_simple_jack *sjack,
|
||||||
int is_hp, char *prefix, char *pin);
|
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,
|
int asoc_simple_init_priv(struct asoc_simple_priv *priv,
|
||||||
struct link_info *li);
|
struct link_info *li);
|
||||||
int asoc_simple_remove(struct platform_device *pdev);
|
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 source, unsigned int freq_in, unsigned int freq_out);
|
||||||
int (*set_jack)(struct snd_soc_component *component,
|
int (*set_jack)(struct snd_soc_component *component,
|
||||||
struct snd_soc_jack *jack, void *data);
|
struct snd_soc_jack *jack, void *data);
|
||||||
|
int (*get_jack_type)(struct snd_soc_component *component);
|
||||||
|
|
||||||
/* DT */
|
/* DT */
|
||||||
int (*of_xlate_dai_name)(struct snd_soc_component *component,
|
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);
|
unsigned int freq_out);
|
||||||
int snd_soc_component_set_jack(struct snd_soc_component *component,
|
int snd_soc_component_set_jack(struct snd_soc_component *component,
|
||||||
struct snd_soc_jack *jack, void *data);
|
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,
|
void snd_soc_component_seq_notifier(struct snd_soc_component *component,
|
||||||
enum snd_soc_dapm_type type, int subseq);
|
enum snd_soc_dapm_type type, int subseq);
|
||||||
|
@ -423,6 +423,16 @@ struct snd_soc_dai_driver {
|
|||||||
int remove_order;
|
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.
|
* Digital Audio Interface runtime data.
|
||||||
*
|
*
|
||||||
@ -437,14 +447,7 @@ struct snd_soc_dai {
|
|||||||
struct snd_soc_dai_driver *driver;
|
struct snd_soc_dai_driver *driver;
|
||||||
|
|
||||||
/* DAI runtime info */
|
/* DAI runtime info */
|
||||||
unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1]; /* usage count */
|
struct snd_soc_dai_stream stream[SNDRV_PCM_STREAM_LAST + 1];
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
/* Symmetry data - only valid if symmetry is being enforced */
|
/* Symmetry data - only valid if symmetry is being enforced */
|
||||||
unsigned int rate;
|
unsigned int rate;
|
||||||
@ -454,10 +457,6 @@ struct snd_soc_dai {
|
|||||||
/* parent platform/codec */
|
/* parent platform/codec */
|
||||||
struct snd_soc_component *component;
|
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;
|
struct list_head list;
|
||||||
|
|
||||||
/* function mark */
|
/* 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;
|
&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
|
static inline
|
||||||
struct snd_soc_dapm_widget *snd_soc_dai_get_widget(
|
struct snd_soc_dapm_widget *snd_soc_dai_get_widget(struct snd_soc_dai *dai, int stream)
|
||||||
struct snd_soc_dai *dai, int stream)
|
|
||||||
{
|
{
|
||||||
return (stream == SNDRV_PCM_STREAM_PLAYBACK) ?
|
return dai->stream[stream].widget;
|
||||||
dai->playback_widget : dai->capture_widget;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai,
|
#define snd_soc_dai_set_widget_playback(dai, widget) snd_soc_dai_set_widget(dai, SNDRV_PCM_STREAM_PLAYBACK, widget)
|
||||||
const struct snd_pcm_substream *ss)
|
#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->stream[stream].widget = widget;
|
||||||
dai->playback_dma_data : dai->capture_dma_data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai,
|
#define snd_soc_dai_dma_data_get_playback(dai) snd_soc_dai_dma_data_get(dai, SNDRV_PCM_STREAM_PLAYBACK)
|
||||||
const struct snd_pcm_substream *ss,
|
#define snd_soc_dai_dma_data_get_capture(dai) snd_soc_dai_dma_data_get(dai, SNDRV_PCM_STREAM_CAPTURE)
|
||||||
void *data)
|
#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)
|
return dai->stream[stream].dma_data;
|
||||||
dai->playback_dma_data = data;
|
|
||||||
else
|
|
||||||
dai->capture_dma_data = data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void snd_soc_dai_init_dma_data(struct snd_soc_dai *dai,
|
#define snd_soc_dai_dma_data_set_playback(dai, data) snd_soc_dai_dma_data_set(dai, SNDRV_PCM_STREAM_PLAYBACK, data)
|
||||||
void *playback, void *capture)
|
#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->playback_dma_data = playback;
|
dai->stream[stream].dma_data = data;
|
||||||
dai->capture_dma_data = capture;
|
}
|
||||||
|
|
||||||
|
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_tdm_mask_set(struct snd_soc_dai *dai, int stream,
|
||||||
|
unsigned int tdm_mask)
|
||||||
|
{
|
||||||
|
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,
|
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);
|
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
|
#endif
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <sound/asoc.h>
|
#include <sound/asoc.h>
|
||||||
|
|
||||||
struct device;
|
struct device;
|
||||||
|
struct snd_pcm_substream;
|
||||||
struct snd_soc_pcm_runtime;
|
struct snd_soc_pcm_runtime;
|
||||||
struct soc_enum;
|
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 dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir,
|
||||||
int event);
|
int event);
|
||||||
bool dpcm_end_walk_at_be(struct snd_soc_dapm_widget *widget, enum snd_soc_dapm_direction dir);
|
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) \
|
#define dpcm_be_dai_startup_rollback(fe, stream, last) \
|
||||||
dpcm_be_dai_stop(fe, stream, 0, last)
|
dpcm_be_dai_stop(fe, stream, 0, last)
|
||||||
|
@ -62,7 +62,7 @@ struct snd_soc_dobj {
|
|||||||
enum snd_soc_dobj_type type;
|
enum snd_soc_dobj_type type;
|
||||||
unsigned int index; /* objects can belong in different groups */
|
unsigned int index; /* objects can belong in different groups */
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
struct snd_soc_tplg_ops *ops;
|
int (*unload)(struct snd_soc_component *comp, struct snd_soc_dobj *dobj);
|
||||||
union {
|
union {
|
||||||
struct snd_soc_dobj_control control;
|
struct snd_soc_dobj_control control;
|
||||||
struct snd_soc_dobj_widget widget;
|
struct snd_soc_dobj_widget widget;
|
||||||
|
@ -1052,6 +1052,12 @@ struct snd_soc_card {
|
|||||||
#define for_each_card_widgets_safe(card, w, _w) \
|
#define for_each_card_widgets_safe(card, w, _w) \
|
||||||
list_for_each_entry_safe(w, _w, &card->widgets, list)
|
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 */
|
/* SoC machine DAI configuration, glues a codec and cpu DAI together */
|
||||||
struct snd_soc_pcm_runtime {
|
struct snd_soc_pcm_runtime {
|
||||||
struct device *dev;
|
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_MASK GENMASK(15, 0)
|
||||||
#define SOF_IPC4_GLB_PIPE_STATE(x) ((x) << SOF_IPC4_GLB_PIPE_STATE_SHIFT)
|
#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 */
|
/* load library ipc msg */
|
||||||
#define SOF_IPC4_GLB_LOAD_LIBRARY_LIB_ID_SHIFT 16
|
#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)
|
#define SOF_IPC4_GLB_LOAD_LIBRARY_LIB_ID(x) ((x) << SOF_IPC4_GLB_LOAD_LIBRARY_LIB_ID_SHIFT)
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479
|
#define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479
|
||||||
#define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d
|
#define SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL 0x7473636d
|
||||||
#define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE 0x4d545244
|
#define SNDRV_FIREWIRE_EVENT_MOTU_REGISTER_DSP_CHANGE 0x4d545244
|
||||||
|
#define SNDRV_FIREWIRE_EVENT_FF400_MESSAGE 0x4f6c6761
|
||||||
|
|
||||||
struct snd_firewire_event_common {
|
struct snd_firewire_event_common {
|
||||||
unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */
|
unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */
|
||||||
@ -72,6 +73,30 @@ struct snd_firewire_event_motu_register_dsp_change {
|
|||||||
__u32 changes[]; /* Encoded event for change of register DSP. */
|
__u32 changes[]; /* Encoded event for change of register DSP. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct snd_firewire_event_ff400_message - the container for message from Fireface 400 when
|
||||||
|
* operating hardware knob.
|
||||||
|
*
|
||||||
|
* @type: Fixed to SNDRV_FIREWIRE_EVENT_FF400_MESSAGE.
|
||||||
|
* @message_count: The number of messages.
|
||||||
|
* @messages.message: The messages expressing hardware knob operation.
|
||||||
|
* @messages.tstamp: The isochronous cycle at which the request subaction of asynchronous
|
||||||
|
* transaction was sent to deliver the message. It has 16 bit unsigned integer
|
||||||
|
* value. The higher 3 bits of value expresses the lower three bits of second
|
||||||
|
* field in the format of CYCLE_TIME, up to 7. The rest 13 bits expresses cycle
|
||||||
|
* field up to 7999.
|
||||||
|
*
|
||||||
|
* The structure expresses message transmitted by Fireface 400 when operating hardware knob.
|
||||||
|
*/
|
||||||
|
struct snd_firewire_event_ff400_message {
|
||||||
|
unsigned int type;
|
||||||
|
unsigned int message_count;
|
||||||
|
struct {
|
||||||
|
__u32 message;
|
||||||
|
__u32 tstamp;
|
||||||
|
} messages[];
|
||||||
|
};
|
||||||
|
|
||||||
union snd_firewire_event {
|
union snd_firewire_event {
|
||||||
struct snd_firewire_event_common common;
|
struct snd_firewire_event_common common;
|
||||||
struct snd_firewire_event_lock_status lock_status;
|
struct snd_firewire_event_lock_status lock_status;
|
||||||
@ -81,6 +106,7 @@ union snd_firewire_event {
|
|||||||
struct snd_firewire_event_tascam_control tascam_control;
|
struct snd_firewire_event_tascam_control tascam_control;
|
||||||
struct snd_firewire_event_motu_notification motu_notification;
|
struct snd_firewire_event_motu_notification motu_notification;
|
||||||
struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
|
struct snd_firewire_event_motu_register_dsp_change motu_register_dsp_change;
|
||||||
|
struct snd_firewire_event_ff400_message ff400_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -108,6 +108,7 @@ enum avs_tplg_token {
|
|||||||
AVS_TKN_MOD_CORE_ID_U8 = 1704,
|
AVS_TKN_MOD_CORE_ID_U8 = 1704,
|
||||||
AVS_TKN_MOD_PROC_DOMAIN_U8 = 1705,
|
AVS_TKN_MOD_PROC_DOMAIN_U8 = 1705,
|
||||||
AVS_TKN_MOD_MODCFG_EXT_ID_U32 = 1706,
|
AVS_TKN_MOD_MODCFG_EXT_ID_U32 = 1706,
|
||||||
|
AVS_TKN_MOD_KCONTROL_ID_U32 = 1707,
|
||||||
|
|
||||||
/* struct avs_tplg_path_template */
|
/* struct avs_tplg_path_template */
|
||||||
AVS_TKN_PATH_TMPL_ID_U32 = 1801,
|
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_INDEX_U32 = 2201,
|
||||||
AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
|
AVS_TKN_PIN_FMT_IOBS_U32 = 2202,
|
||||||
AVS_TKN_PIN_FMT_AFMT_ID_U32 = 2203,
|
AVS_TKN_PIN_FMT_AFMT_ID_U32 = 2203,
|
||||||
|
|
||||||
|
/* struct avs_tplg_kcontrol */
|
||||||
|
AVS_TKN_KCONTROL_ID_U32 = 2301,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -524,10 +524,9 @@ static void ac97_bus_remove(struct device *dev)
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = adrv->remove(adev);
|
adrv->remove(adev);
|
||||||
pm_runtime_put_noidle(dev);
|
pm_runtime_put_noidle(dev);
|
||||||
if (ret == 0)
|
ac97_put_disable_clk(adev);
|
||||||
ac97_put_disable_clk(adev);
|
|
||||||
|
|
||||||
pm_runtime_disable(dev);
|
pm_runtime_disable(dev);
|
||||||
}
|
}
|
||||||
|
@ -1094,7 +1094,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
|
static void aoa_fabric_layout_remove(struct soundbus_dev *sdev)
|
||||||
{
|
{
|
||||||
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
|
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
|
||||||
int i;
|
int i;
|
||||||
@ -1123,7 +1123,6 @@ static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
|
|||||||
kfree(ldev);
|
kfree(ldev);
|
||||||
sdev->pcmid = -1;
|
sdev->pcmid = -1;
|
||||||
sdev->pcmname = NULL;
|
sdev->pcmname = NULL;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
|
@ -185,7 +185,7 @@ struct soundbus_driver {
|
|||||||
/* we don't implement any matching at all */
|
/* we don't implement any matching at all */
|
||||||
|
|
||||||
int (*probe)(struct soundbus_dev* dev);
|
int (*probe)(struct soundbus_dev* dev);
|
||||||
int (*remove)(struct soundbus_dev* dev);
|
void (*remove)(struct soundbus_dev *dev);
|
||||||
|
|
||||||
int (*shutdown)(struct soundbus_dev* dev);
|
int (*shutdown)(struct soundbus_dev* dev);
|
||||||
|
|
||||||
|
@ -489,17 +489,17 @@ static const struct file_operations snd_shutdown_f_ops =
|
|||||||
* Note: The current implementation replaces all active file->f_op with special
|
* Note: The current implementation replaces all active file->f_op with special
|
||||||
* dummy file operations (they do nothing except release).
|
* dummy file operations (they do nothing except release).
|
||||||
*/
|
*/
|
||||||
int snd_card_disconnect(struct snd_card *card)
|
void snd_card_disconnect(struct snd_card *card)
|
||||||
{
|
{
|
||||||
struct snd_monitor_file *mfile;
|
struct snd_monitor_file *mfile;
|
||||||
|
|
||||||
if (!card)
|
if (!card)
|
||||||
return -EINVAL;
|
return;
|
||||||
|
|
||||||
spin_lock(&card->files_lock);
|
spin_lock(&card->files_lock);
|
||||||
if (card->shutdown) {
|
if (card->shutdown) {
|
||||||
spin_unlock(&card->files_lock);
|
spin_unlock(&card->files_lock);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
card->shutdown = 1;
|
card->shutdown = 1;
|
||||||
|
|
||||||
@ -548,7 +548,6 @@ int snd_card_disconnect(struct snd_card *card)
|
|||||||
wake_up(&card->power_sleep);
|
wake_up(&card->power_sleep);
|
||||||
snd_power_sync_ref(card);
|
snd_power_sync_ref(card);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(snd_card_disconnect);
|
EXPORT_SYMBOL(snd_card_disconnect);
|
||||||
|
|
||||||
@ -563,15 +562,7 @@ EXPORT_SYMBOL(snd_card_disconnect);
|
|||||||
*/
|
*/
|
||||||
void snd_card_disconnect_sync(struct snd_card *card)
|
void snd_card_disconnect_sync(struct snd_card *card)
|
||||||
{
|
{
|
||||||
int err;
|
snd_card_disconnect(card);
|
||||||
|
|
||||||
err = snd_card_disconnect(card);
|
|
||||||
if (err < 0) {
|
|
||||||
dev_err(card->dev,
|
|
||||||
"snd_card_disconnect error (%d), skipping sync\n",
|
|
||||||
err);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_lock_irq(&card->files_lock);
|
spin_lock_irq(&card->files_lock);
|
||||||
wait_event_lock_irq(card->remove_sleep,
|
wait_event_lock_irq(card->remove_sleep,
|
||||||
@ -617,13 +608,14 @@ static int snd_card_do_free(struct snd_card *card)
|
|||||||
*
|
*
|
||||||
* Return: zero if successful, or a negative error code
|
* Return: zero if successful, or a negative error code
|
||||||
*/
|
*/
|
||||||
int snd_card_free_when_closed(struct snd_card *card)
|
void snd_card_free_when_closed(struct snd_card *card)
|
||||||
{
|
{
|
||||||
int ret = snd_card_disconnect(card);
|
if (!card)
|
||||||
if (ret)
|
return;
|
||||||
return ret;
|
|
||||||
|
snd_card_disconnect(card);
|
||||||
put_device(&card->card_dev);
|
put_device(&card->card_dev);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(snd_card_free_when_closed);
|
EXPORT_SYMBOL(snd_card_free_when_closed);
|
||||||
|
|
||||||
@ -640,10 +632,9 @@ EXPORT_SYMBOL(snd_card_free_when_closed);
|
|||||||
* Return: Zero. Frees all associated devices and frees the control
|
* Return: Zero. Frees all associated devices and frees the control
|
||||||
* interface associated to given soundcard.
|
* interface associated to given soundcard.
|
||||||
*/
|
*/
|
||||||
int snd_card_free(struct snd_card *card)
|
void snd_card_free(struct snd_card *card)
|
||||||
{
|
{
|
||||||
DECLARE_COMPLETION_ONSTACK(released);
|
DECLARE_COMPLETION_ONSTACK(released);
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* The call of snd_card_free() is allowed from various code paths;
|
/* The call of snd_card_free() is allowed from various code paths;
|
||||||
* a manual call from the driver and the call via devres_free, and
|
* a manual call from the driver and the call via devres_free, and
|
||||||
@ -652,16 +643,13 @@ int snd_card_free(struct snd_card *card)
|
|||||||
* the check here at the beginning.
|
* the check here at the beginning.
|
||||||
*/
|
*/
|
||||||
if (card->releasing)
|
if (card->releasing)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
card->release_completion = &released;
|
card->release_completion = &released;
|
||||||
ret = snd_card_free_when_closed(card);
|
snd_card_free_when_closed(card);
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
/* wait, until all devices are ready for the free operation */
|
/* wait, until all devices are ready for the free operation */
|
||||||
wait_for_completion(&released);
|
wait_for_completion(&released);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(snd_card_free);
|
EXPORT_SYMBOL(snd_card_free);
|
||||||
|
|
||||||
|
@ -36,8 +36,6 @@ struct amdtp_am824 {
|
|||||||
|
|
||||||
u8 pcm_positions[AM824_MAX_CHANNELS_FOR_PCM];
|
u8 pcm_positions[AM824_MAX_CHANNELS_FOR_PCM];
|
||||||
u8 midi_position;
|
u8 midi_position;
|
||||||
|
|
||||||
unsigned int frame_multiplier;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,8 +57,8 @@ int amdtp_am824_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
|||||||
{
|
{
|
||||||
struct amdtp_am824 *p = s->protocol;
|
struct amdtp_am824 *p = s->protocol;
|
||||||
unsigned int midi_channels;
|
unsigned int midi_channels;
|
||||||
unsigned int i;
|
unsigned int pcm_frame_multiplier;
|
||||||
int err;
|
int i, err;
|
||||||
|
|
||||||
if (amdtp_stream_running(s))
|
if (amdtp_stream_running(s))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -77,8 +75,18 @@ int amdtp_am824_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
|||||||
WARN_ON(midi_channels > AM824_MAX_CHANNELS_FOR_MIDI))
|
WARN_ON(midi_channels > AM824_MAX_CHANNELS_FOR_MIDI))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
err = amdtp_stream_set_parameters(s, rate,
|
/*
|
||||||
pcm_channels + midi_channels);
|
* In IEC 61883-6, one data block represents one event. In ALSA, one
|
||||||
|
* event equals to one PCM frame. But Dice has a quirk at higher
|
||||||
|
* sampling rate to transfer two PCM frames in one data block.
|
||||||
|
*/
|
||||||
|
if (double_pcm_frames)
|
||||||
|
pcm_frame_multiplier = 2;
|
||||||
|
else
|
||||||
|
pcm_frame_multiplier = 1;
|
||||||
|
|
||||||
|
err = amdtp_stream_set_parameters(s, rate, pcm_channels + midi_channels,
|
||||||
|
pcm_frame_multiplier);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -88,16 +96,6 @@ int amdtp_am824_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
|||||||
p->pcm_channels = pcm_channels;
|
p->pcm_channels = pcm_channels;
|
||||||
p->midi_ports = midi_ports;
|
p->midi_ports = midi_ports;
|
||||||
|
|
||||||
/*
|
|
||||||
* In IEC 61883-6, one data block represents one event. In ALSA, one
|
|
||||||
* event equals to one PCM frame. But Dice has a quirk at higher
|
|
||||||
* sampling rate to transfer two PCM frames in one data block.
|
|
||||||
*/
|
|
||||||
if (double_pcm_frames)
|
|
||||||
p->frame_multiplier = 2;
|
|
||||||
else
|
|
||||||
p->frame_multiplier = 1;
|
|
||||||
|
|
||||||
/* init the position map for PCM and MIDI channels */
|
/* init the position map for PCM and MIDI channels */
|
||||||
for (i = 0; i < pcm_channels; i++)
|
for (i = 0; i < pcm_channels; i++)
|
||||||
p->pcm_positions[i] = i;
|
p->pcm_positions[i] = i;
|
||||||
@ -346,23 +344,20 @@ static void read_midi_messages(struct amdtp_stream *s, __be32 *buffer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
|
static void process_it_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
|
||||||
const struct pkt_desc *descs,
|
unsigned int count, struct snd_pcm_substream *pcm)
|
||||||
unsigned int packets,
|
|
||||||
struct snd_pcm_substream *pcm)
|
|
||||||
{
|
{
|
||||||
struct amdtp_am824 *p = s->protocol;
|
struct amdtp_am824 *p = s->protocol;
|
||||||
unsigned int pcm_frames = 0;
|
unsigned int pcm_frames = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < packets; ++i) {
|
for (i = 0; i < count; ++i) {
|
||||||
const struct pkt_desc *desc = descs + i;
|
|
||||||
__be32 *buf = desc->ctx_payload;
|
__be32 *buf = desc->ctx_payload;
|
||||||
unsigned int data_blocks = desc->data_blocks;
|
unsigned int data_blocks = desc->data_blocks;
|
||||||
|
|
||||||
if (pcm) {
|
if (pcm) {
|
||||||
write_pcm_s32(s, pcm, buf, data_blocks, pcm_frames);
|
write_pcm_s32(s, pcm, buf, data_blocks, pcm_frames);
|
||||||
pcm_frames += data_blocks * p->frame_multiplier;
|
pcm_frames += data_blocks * s->pcm_frame_multiplier;
|
||||||
} else {
|
} else {
|
||||||
write_pcm_silence(s, buf, data_blocks);
|
write_pcm_silence(s, buf, data_blocks);
|
||||||
}
|
}
|
||||||
@ -371,37 +366,34 @@ static unsigned int process_it_ctx_payloads(struct amdtp_stream *s,
|
|||||||
write_midi_messages(s, buf, data_blocks,
|
write_midi_messages(s, buf, data_blocks,
|
||||||
desc->data_block_counter);
|
desc->data_block_counter);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return pcm_frames;
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s,
|
static void process_ir_ctx_payloads(struct amdtp_stream *s, const struct pkt_desc *desc,
|
||||||
const struct pkt_desc *descs,
|
unsigned int count, struct snd_pcm_substream *pcm)
|
||||||
unsigned int packets,
|
|
||||||
struct snd_pcm_substream *pcm)
|
|
||||||
{
|
{
|
||||||
struct amdtp_am824 *p = s->protocol;
|
struct amdtp_am824 *p = s->protocol;
|
||||||
unsigned int pcm_frames = 0;
|
unsigned int pcm_frames = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < packets; ++i) {
|
for (i = 0; i < count; ++i) {
|
||||||
const struct pkt_desc *desc = descs + i;
|
|
||||||
__be32 *buf = desc->ctx_payload;
|
__be32 *buf = desc->ctx_payload;
|
||||||
unsigned int data_blocks = desc->data_blocks;
|
unsigned int data_blocks = desc->data_blocks;
|
||||||
|
|
||||||
if (pcm) {
|
if (pcm) {
|
||||||
read_pcm_s32(s, pcm, buf, data_blocks, pcm_frames);
|
read_pcm_s32(s, pcm, buf, data_blocks, pcm_frames);
|
||||||
pcm_frames += data_blocks * p->frame_multiplier;
|
pcm_frames += data_blocks * s->pcm_frame_multiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->midi_ports) {
|
if (p->midi_ports) {
|
||||||
read_midi_messages(s, buf, data_blocks,
|
read_midi_messages(s, buf, data_blocks,
|
||||||
desc->data_block_counter);
|
desc->data_block_counter);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return pcm_frames;
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,9 +14,10 @@
|
|||||||
#include <linux/tracepoint.h>
|
#include <linux/tracepoint.h>
|
||||||
|
|
||||||
TRACE_EVENT(amdtp_packet,
|
TRACE_EVENT(amdtp_packet,
|
||||||
TP_PROTO(const struct amdtp_stream *s, u32 cycles, const __be32 *cip_header, unsigned int payload_length, unsigned int data_blocks, unsigned int data_block_counter, unsigned int packet_index, unsigned int index),
|
TP_PROTO(const struct amdtp_stream *s, u32 cycles, const __be32 *cip_header, unsigned int payload_length, unsigned int data_blocks, unsigned int data_block_counter, unsigned int packet_index, unsigned int index, u32 curr_cycle_time),
|
||||||
TP_ARGS(s, cycles, cip_header, payload_length, data_blocks, data_block_counter, packet_index, index),
|
TP_ARGS(s, cycles, cip_header, payload_length, data_blocks, data_block_counter, packet_index, index, curr_cycle_time),
|
||||||
TP_STRUCT__entry(
|
TP_STRUCT__entry(
|
||||||
|
__field(unsigned int, cycle_time)
|
||||||
__field(unsigned int, second)
|
__field(unsigned int, second)
|
||||||
__field(unsigned int, cycle)
|
__field(unsigned int, cycle)
|
||||||
__field(int, channel)
|
__field(int, channel)
|
||||||
@ -31,6 +32,7 @@ TRACE_EVENT(amdtp_packet,
|
|||||||
__field(unsigned int, index)
|
__field(unsigned int, index)
|
||||||
),
|
),
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
|
__entry->cycle_time = curr_cycle_time;
|
||||||
__entry->second = cycles / CYCLES_PER_SECOND;
|
__entry->second = cycles / CYCLES_PER_SECOND;
|
||||||
__entry->cycle = cycles % CYCLES_PER_SECOND;
|
__entry->cycle = cycles % CYCLES_PER_SECOND;
|
||||||
__entry->channel = s->context->channel;
|
__entry->channel = s->context->channel;
|
||||||
@ -53,7 +55,8 @@ TRACE_EVENT(amdtp_packet,
|
|||||||
__entry->index = index;
|
__entry->index = index;
|
||||||
),
|
),
|
||||||
TP_printk(
|
TP_printk(
|
||||||
"%02u %04u %04x %04x %02d %03u %02u %03u %02u %01u %02u %s",
|
"%08x %02u %04u %04x %04x %02d %03u %02u %03u %02u %01u %02u %s",
|
||||||
|
__entry->cycle_time,
|
||||||
__entry->second,
|
__entry->second,
|
||||||
__entry->cycle,
|
__entry->cycle,
|
||||||
__entry->src,
|
__entry->src,
|
||||||
|
@ -271,12 +271,14 @@ EXPORT_SYMBOL(amdtp_stream_add_pcm_hw_constraints);
|
|||||||
* @s: the AMDTP stream to configure
|
* @s: the AMDTP stream to configure
|
||||||
* @rate: the sample rate
|
* @rate: the sample rate
|
||||||
* @data_block_quadlets: the size of a data block in quadlet unit
|
* @data_block_quadlets: the size of a data block in quadlet unit
|
||||||
|
* @pcm_frame_multiplier: the multiplier to compute the number of PCM frames by the number of AMDTP
|
||||||
|
* events.
|
||||||
*
|
*
|
||||||
* The parameters must be set before the stream is started, and must not be
|
* The parameters must be set before the stream is started, and must not be
|
||||||
* changed while the stream is running.
|
* changed while the stream is running.
|
||||||
*/
|
*/
|
||||||
int amdtp_stream_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
int amdtp_stream_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
||||||
unsigned int data_block_quadlets)
|
unsigned int data_block_quadlets, unsigned int pcm_frame_multiplier)
|
||||||
{
|
{
|
||||||
unsigned int sfc;
|
unsigned int sfc;
|
||||||
|
|
||||||
@ -298,6 +300,8 @@ int amdtp_stream_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
|||||||
if (s->flags & CIP_BLOCKING)
|
if (s->flags & CIP_BLOCKING)
|
||||||
s->transfer_delay += TICKS_PER_SECOND * s->syt_interval / rate;
|
s->transfer_delay += TICKS_PER_SECOND * s->syt_interval / rate;
|
||||||
|
|
||||||
|
s->pcm_frame_multiplier = pcm_frame_multiplier;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(amdtp_stream_set_parameters);
|
EXPORT_SYMBOL(amdtp_stream_set_parameters);
|
||||||
@ -348,27 +352,29 @@ void amdtp_stream_pcm_prepare(struct amdtp_stream *s)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL(amdtp_stream_pcm_prepare);
|
EXPORT_SYMBOL(amdtp_stream_pcm_prepare);
|
||||||
|
|
||||||
|
#define prev_packet_desc(s, desc) \
|
||||||
|
list_prev_entry_circular(desc, &s->packet_descs_list, link)
|
||||||
|
|
||||||
static void pool_blocking_data_blocks(struct amdtp_stream *s, struct seq_desc *descs,
|
static void pool_blocking_data_blocks(struct amdtp_stream *s, struct seq_desc *descs,
|
||||||
const unsigned int seq_size, unsigned int seq_tail,
|
unsigned int size, unsigned int pos, unsigned int count)
|
||||||
unsigned int count)
|
|
||||||
{
|
{
|
||||||
const unsigned int syt_interval = s->syt_interval;
|
const unsigned int syt_interval = s->syt_interval;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < count; ++i) {
|
for (i = 0; i < count; ++i) {
|
||||||
struct seq_desc *desc = descs + seq_tail;
|
struct seq_desc *desc = descs + pos;
|
||||||
|
|
||||||
if (desc->syt_offset != CIP_SYT_NO_INFO)
|
if (desc->syt_offset != CIP_SYT_NO_INFO)
|
||||||
desc->data_blocks = syt_interval;
|
desc->data_blocks = syt_interval;
|
||||||
else
|
else
|
||||||
desc->data_blocks = 0;
|
desc->data_blocks = 0;
|
||||||
|
|
||||||
seq_tail = (seq_tail + 1) % seq_size;
|
pos = (pos + 1) % size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pool_ideal_nonblocking_data_blocks(struct amdtp_stream *s, struct seq_desc *descs,
|
static void pool_ideal_nonblocking_data_blocks(struct amdtp_stream *s, struct seq_desc *descs,
|
||||||
const unsigned int seq_size, unsigned int seq_tail,
|
unsigned int size, unsigned int pos,
|
||||||
unsigned int count)
|
unsigned int count)
|
||||||
{
|
{
|
||||||
const enum cip_sfc sfc = s->sfc;
|
const enum cip_sfc sfc = s->sfc;
|
||||||
@ -376,7 +382,7 @@ static void pool_ideal_nonblocking_data_blocks(struct amdtp_stream *s, struct se
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < count; ++i) {
|
for (i = 0; i < count; ++i) {
|
||||||
struct seq_desc *desc = descs + seq_tail;
|
struct seq_desc *desc = descs + pos;
|
||||||
|
|
||||||
if (!cip_sfc_is_base_44100(sfc)) {
|
if (!cip_sfc_is_base_44100(sfc)) {
|
||||||
// Sample_rate / 8000 is an integer, and precomputed.
|
// Sample_rate / 8000 is an integer, and precomputed.
|
||||||
@ -403,7 +409,7 @@ static void pool_ideal_nonblocking_data_blocks(struct amdtp_stream *s, struct se
|
|||||||
state = phase;
|
state = phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
seq_tail = (seq_tail + 1) % seq_size;
|
pos = (pos + 1) % size;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->ctx_data.rx.data_block_state = state;
|
s->ctx_data.rx.data_block_state = state;
|
||||||
@ -449,8 +455,7 @@ static unsigned int calculate_syt_offset(unsigned int *last_syt_offset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void pool_ideal_syt_offsets(struct amdtp_stream *s, struct seq_desc *descs,
|
static void pool_ideal_syt_offsets(struct amdtp_stream *s, struct seq_desc *descs,
|
||||||
const unsigned int seq_size, unsigned int seq_tail,
|
unsigned int size, unsigned int pos, unsigned int count)
|
||||||
unsigned int count)
|
|
||||||
{
|
{
|
||||||
const enum cip_sfc sfc = s->sfc;
|
const enum cip_sfc sfc = s->sfc;
|
||||||
unsigned int last = s->ctx_data.rx.last_syt_offset;
|
unsigned int last = s->ctx_data.rx.last_syt_offset;
|
||||||
@ -458,11 +463,11 @@ static void pool_ideal_syt_offsets(struct amdtp_stream *s, struct seq_desc *desc
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < count; ++i) {
|
for (i = 0; i < count; ++i) {
|
||||||
struct seq_desc *desc = descs + seq_tail;
|
struct seq_desc *desc = descs + pos;
|
||||||
|
|
||||||
desc->syt_offset = calculate_syt_offset(&last, &state, sfc);
|
desc->syt_offset = calculate_syt_offset(&last, &state, sfc);
|
||||||
|
|
||||||
seq_tail = (seq_tail + 1) % seq_size;
|
pos = (pos + 1) % size;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->ctx_data.rx.last_syt_offset = last;
|
s->ctx_data.rx.last_syt_offset = last;
|
||||||
@ -497,7 +502,7 @@ static unsigned int compute_syt_offset(unsigned int syt, unsigned int cycle,
|
|||||||
static unsigned int calculate_cached_cycle_count(struct amdtp_stream *s, unsigned int head)
|
static unsigned int calculate_cached_cycle_count(struct amdtp_stream *s, unsigned int head)
|
||||||
{
|
{
|
||||||
const unsigned int cache_size = s->ctx_data.tx.cache.size;
|
const unsigned int cache_size = s->ctx_data.tx.cache.size;
|
||||||
unsigned int cycles = s->ctx_data.tx.cache.tail;
|
unsigned int cycles = s->ctx_data.tx.cache.pos;
|
||||||
|
|
||||||
if (cycles < head)
|
if (cycles < head)
|
||||||
cycles += cache_size;
|
cycles += cache_size;
|
||||||
@ -506,18 +511,17 @@ static unsigned int calculate_cached_cycle_count(struct amdtp_stream *s, unsigne
|
|||||||
return cycles;
|
return cycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cache_seq(struct amdtp_stream *s, const struct pkt_desc *descs, unsigned int desc_count)
|
static void cache_seq(struct amdtp_stream *s, const struct pkt_desc *src, unsigned int desc_count)
|
||||||
{
|
{
|
||||||
const unsigned int transfer_delay = s->transfer_delay;
|
const unsigned int transfer_delay = s->transfer_delay;
|
||||||
const unsigned int cache_size = s->ctx_data.tx.cache.size;
|
const unsigned int cache_size = s->ctx_data.tx.cache.size;
|
||||||
struct seq_desc *cache = s->ctx_data.tx.cache.descs;
|
struct seq_desc *cache = s->ctx_data.tx.cache.descs;
|
||||||
unsigned int cache_tail = s->ctx_data.tx.cache.tail;
|
unsigned int cache_pos = s->ctx_data.tx.cache.pos;
|
||||||
bool aware_syt = !(s->flags & CIP_UNAWARE_SYT);
|
bool aware_syt = !(s->flags & CIP_UNAWARE_SYT);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < desc_count; ++i) {
|
for (i = 0; i < desc_count; ++i) {
|
||||||
struct seq_desc *dst = cache + cache_tail;
|
struct seq_desc *dst = cache + cache_pos;
|
||||||
const struct pkt_desc *src = descs + i;
|
|
||||||
|
|
||||||
if (aware_syt && src->syt != CIP_SYT_NO_INFO)
|
if (aware_syt && src->syt != CIP_SYT_NO_INFO)
|
||||||
dst->syt_offset = compute_syt_offset(src->syt, src->cycle, transfer_delay);
|
dst->syt_offset = compute_syt_offset(src->syt, src->cycle, transfer_delay);
|
||||||
@ -525,70 +529,68 @@ static void cache_seq(struct amdtp_stream *s, const struct pkt_desc *descs, unsi
|
|||||||
dst->syt_offset = CIP_SYT_NO_INFO;
|
dst->syt_offset = CIP_SYT_NO_INFO;
|
||||||
dst->data_blocks = src->data_blocks;
|
dst->data_blocks = src->data_blocks;
|
||||||
|
|
||||||
cache_tail = (cache_tail + 1) % cache_size;
|
cache_pos = (cache_pos + 1) % cache_size;
|
||||||
|
src = amdtp_stream_next_packet_desc(s, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
s->ctx_data.tx.cache.tail = cache_tail;
|
s->ctx_data.tx.cache.pos = cache_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pool_ideal_seq_descs(struct amdtp_stream *s, unsigned int count)
|
static void pool_ideal_seq_descs(struct amdtp_stream *s, struct seq_desc *descs, unsigned int size,
|
||||||
|
unsigned int pos, unsigned int count)
|
||||||
{
|
{
|
||||||
struct seq_desc *descs = s->ctx_data.rx.seq.descs;
|
pool_ideal_syt_offsets(s, descs, size, pos, count);
|
||||||
unsigned int seq_tail = s->ctx_data.rx.seq.tail;
|
|
||||||
const unsigned int seq_size = s->ctx_data.rx.seq.size;
|
|
||||||
|
|
||||||
pool_ideal_syt_offsets(s, descs, seq_size, seq_tail, count);
|
|
||||||
|
|
||||||
if (s->flags & CIP_BLOCKING)
|
if (s->flags & CIP_BLOCKING)
|
||||||
pool_blocking_data_blocks(s, descs, seq_size, seq_tail, count);
|
pool_blocking_data_blocks(s, descs, size, pos, count);
|
||||||
else
|
else
|
||||||
pool_ideal_nonblocking_data_blocks(s, descs, seq_size, seq_tail, count);
|
pool_ideal_nonblocking_data_blocks(s, descs, size, pos, count);
|
||||||
|
|
||||||
s->ctx_data.rx.seq.tail = (seq_tail + count) % seq_size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pool_replayed_seq(struct amdtp_stream *s, unsigned int count)
|
static void pool_replayed_seq(struct amdtp_stream *s, struct seq_desc *descs, unsigned int size,
|
||||||
|
unsigned int pos, unsigned int count)
|
||||||
{
|
{
|
||||||
struct amdtp_stream *target = s->ctx_data.rx.replay_target;
|
struct amdtp_stream *target = s->ctx_data.rx.replay_target;
|
||||||
const struct seq_desc *cache = target->ctx_data.tx.cache.descs;
|
const struct seq_desc *cache = target->ctx_data.tx.cache.descs;
|
||||||
const unsigned int cache_size = target->ctx_data.tx.cache.size;
|
const unsigned int cache_size = target->ctx_data.tx.cache.size;
|
||||||
unsigned int cache_head = s->ctx_data.rx.cache_head;
|
unsigned int cache_pos = s->ctx_data.rx.cache_pos;
|
||||||
struct seq_desc *descs = s->ctx_data.rx.seq.descs;
|
|
||||||
const unsigned int seq_size = s->ctx_data.rx.seq.size;
|
|
||||||
unsigned int seq_tail = s->ctx_data.rx.seq.tail;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < count; ++i) {
|
for (i = 0; i < count; ++i) {
|
||||||
descs[seq_tail] = cache[cache_head];
|
descs[pos] = cache[cache_pos];
|
||||||
seq_tail = (seq_tail + 1) % seq_size;
|
cache_pos = (cache_pos + 1) % cache_size;
|
||||||
cache_head = (cache_head + 1) % cache_size;
|
pos = (pos + 1) % size;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->ctx_data.rx.seq.tail = seq_tail;
|
s->ctx_data.rx.cache_pos = cache_pos;
|
||||||
s->ctx_data.rx.cache_head = cache_head;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pool_seq_descs(struct amdtp_stream *s, unsigned int count)
|
static void pool_seq_descs(struct amdtp_stream *s, struct seq_desc *descs, unsigned int size,
|
||||||
|
unsigned int pos, unsigned int count)
|
||||||
{
|
{
|
||||||
struct amdtp_domain *d = s->domain;
|
struct amdtp_domain *d = s->domain;
|
||||||
|
void (*pool_seq_descs)(struct amdtp_stream *s, struct seq_desc *descs, unsigned int size,
|
||||||
|
unsigned int pos, unsigned int count);
|
||||||
|
|
||||||
if (!d->replay.enable || !s->ctx_data.rx.replay_target) {
|
if (!d->replay.enable || !s->ctx_data.rx.replay_target) {
|
||||||
pool_ideal_seq_descs(s, count);
|
pool_seq_descs = pool_ideal_seq_descs;
|
||||||
} else {
|
} else {
|
||||||
if (!d->replay.on_the_fly) {
|
if (!d->replay.on_the_fly) {
|
||||||
pool_replayed_seq(s, count);
|
pool_seq_descs = pool_replayed_seq;
|
||||||
} else {
|
} else {
|
||||||
struct amdtp_stream *tx = s->ctx_data.rx.replay_target;
|
struct amdtp_stream *tx = s->ctx_data.rx.replay_target;
|
||||||
const unsigned int cache_size = tx->ctx_data.tx.cache.size;
|
const unsigned int cache_size = tx->ctx_data.tx.cache.size;
|
||||||
const unsigned int cache_head = s->ctx_data.rx.cache_head;
|
const unsigned int cache_pos = s->ctx_data.rx.cache_pos;
|
||||||
unsigned int cached_cycles = calculate_cached_cycle_count(tx, cache_head);
|
unsigned int cached_cycles = calculate_cached_cycle_count(tx, cache_pos);
|
||||||
|
|
||||||
if (cached_cycles > count && cached_cycles > cache_size / 2)
|
if (cached_cycles > count && cached_cycles > cache_size / 2)
|
||||||
pool_replayed_seq(s, count);
|
pool_seq_descs = pool_replayed_seq;
|
||||||
else
|
else
|
||||||
pool_ideal_seq_descs(s, count);
|
pool_seq_descs = pool_ideal_seq_descs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pool_seq_descs(s, descs, size, pos, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_pcm_pointers(struct amdtp_stream *s,
|
static void update_pcm_pointers(struct amdtp_stream *s,
|
||||||
@ -679,7 +681,7 @@ static void build_it_pkt_header(struct amdtp_stream *s, unsigned int cycle,
|
|||||||
struct fw_iso_packet *params, unsigned int header_length,
|
struct fw_iso_packet *params, unsigned int header_length,
|
||||||
unsigned int data_blocks,
|
unsigned int data_blocks,
|
||||||
unsigned int data_block_counter,
|
unsigned int data_block_counter,
|
||||||
unsigned int syt, unsigned int index)
|
unsigned int syt, unsigned int index, u32 curr_cycle_time)
|
||||||
{
|
{
|
||||||
unsigned int payload_length;
|
unsigned int payload_length;
|
||||||
__be32 *cip_header;
|
__be32 *cip_header;
|
||||||
@ -696,7 +698,7 @@ static void build_it_pkt_header(struct amdtp_stream *s, unsigned int cycle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
trace_amdtp_packet(s, cycle, cip_header, payload_length + header_length, data_blocks,
|
trace_amdtp_packet(s, cycle, cip_header, payload_length + header_length, data_blocks,
|
||||||
data_block_counter, s->packet_index, index);
|
data_block_counter, s->packet_index, index, curr_cycle_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int check_cip_header(struct amdtp_stream *s, const __be32 *buf,
|
static int check_cip_header(struct amdtp_stream *s, const __be32 *buf,
|
||||||
@ -798,7 +800,8 @@ static int parse_ir_ctx_header(struct amdtp_stream *s, unsigned int cycle,
|
|||||||
const __be32 *ctx_header,
|
const __be32 *ctx_header,
|
||||||
unsigned int *data_blocks,
|
unsigned int *data_blocks,
|
||||||
unsigned int *data_block_counter,
|
unsigned int *data_block_counter,
|
||||||
unsigned int *syt, unsigned int packet_index, unsigned int index)
|
unsigned int *syt, unsigned int packet_index, unsigned int index,
|
||||||
|
u32 curr_cycle_time)
|
||||||
{
|
{
|
||||||
unsigned int payload_length;
|
unsigned int payload_length;
|
||||||
const __be32 *cip_header;
|
const __be32 *cip_header;
|
||||||
@ -843,7 +846,7 @@ static int parse_ir_ctx_header(struct amdtp_stream *s, unsigned int cycle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
trace_amdtp_packet(s, cycle, cip_header, payload_length, *data_blocks,
|
trace_amdtp_packet(s, cycle, cip_header, payload_length, *data_blocks,
|
||||||
*data_block_counter, packet_index, index);
|
*data_block_counter, packet_index, index, curr_cycle_time);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -851,10 +854,15 @@ static int parse_ir_ctx_header(struct amdtp_stream *s, unsigned int cycle,
|
|||||||
// In CYCLE_TIMER register of IEEE 1394, 7 bits are used to represent second. On
|
// In CYCLE_TIMER register of IEEE 1394, 7 bits are used to represent second. On
|
||||||
// the other hand, in DMA descriptors of 1394 OHCI, 3 bits are used to represent
|
// the other hand, in DMA descriptors of 1394 OHCI, 3 bits are used to represent
|
||||||
// it. Thus, via Linux firewire subsystem, we can get the 3 bits for second.
|
// it. Thus, via Linux firewire subsystem, we can get the 3 bits for second.
|
||||||
|
static inline u32 compute_ohci_iso_ctx_cycle_count(u32 tstamp)
|
||||||
|
{
|
||||||
|
return (((tstamp >> 13) & 0x07) * CYCLES_PER_SECOND) + (tstamp & 0x1fff);
|
||||||
|
}
|
||||||
|
|
||||||
static inline u32 compute_ohci_cycle_count(__be32 ctx_header_tstamp)
|
static inline u32 compute_ohci_cycle_count(__be32 ctx_header_tstamp)
|
||||||
{
|
{
|
||||||
u32 tstamp = be32_to_cpu(ctx_header_tstamp) & HEADER_TSTAMP_MASK;
|
u32 tstamp = be32_to_cpu(ctx_header_tstamp) & HEADER_TSTAMP_MASK;
|
||||||
return (((tstamp >> 13) & 0x07) * 8000) + (tstamp & 0x1fff);
|
return compute_ohci_iso_ctx_cycle_count(tstamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline u32 increment_ohci_cycle_count(u32 cycle, unsigned int addend)
|
static inline u32 increment_ohci_cycle_count(u32 cycle, unsigned int addend)
|
||||||
@ -865,6 +873,14 @@ static inline u32 increment_ohci_cycle_count(u32 cycle, unsigned int addend)
|
|||||||
return cycle;
|
return cycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline u32 decrement_ohci_cycle_count(u32 minuend, u32 subtrahend)
|
||||||
|
{
|
||||||
|
if (minuend < subtrahend)
|
||||||
|
minuend += OHCI_SECOND_MODULUS * CYCLES_PER_SECOND;
|
||||||
|
|
||||||
|
return minuend - subtrahend;
|
||||||
|
}
|
||||||
|
|
||||||
static int compare_ohci_cycle_count(u32 lval, u32 rval)
|
static int compare_ohci_cycle_count(u32 lval, u32 rval)
|
||||||
{
|
{
|
||||||
if (lval == rval)
|
if (lval == rval)
|
||||||
@ -886,22 +902,23 @@ static inline u32 compute_ohci_it_cycle(const __be32 ctx_header_tstamp,
|
|||||||
return increment_ohci_cycle_count(cycle, queue_size);
|
return increment_ohci_cycle_count(cycle, queue_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int generate_device_pkt_descs(struct amdtp_stream *s,
|
static int generate_tx_packet_descs(struct amdtp_stream *s, struct pkt_desc *desc,
|
||||||
struct pkt_desc *descs,
|
const __be32 *ctx_header, unsigned int packet_count,
|
||||||
const __be32 *ctx_header,
|
unsigned int *desc_count)
|
||||||
unsigned int packets,
|
|
||||||
unsigned int *desc_count)
|
|
||||||
{
|
{
|
||||||
unsigned int next_cycle = s->next_cycle;
|
unsigned int next_cycle = s->next_cycle;
|
||||||
unsigned int dbc = s->data_block_counter;
|
unsigned int dbc = s->data_block_counter;
|
||||||
unsigned int packet_index = s->packet_index;
|
unsigned int packet_index = s->packet_index;
|
||||||
unsigned int queue_size = s->queue_size;
|
unsigned int queue_size = s->queue_size;
|
||||||
|
u32 curr_cycle_time = 0;
|
||||||
int i;
|
int i;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
if (trace_amdtp_packet_enabled())
|
||||||
|
(void)fw_card_read_cycle_time(fw_parent_device(s->unit)->card, &curr_cycle_time);
|
||||||
|
|
||||||
*desc_count = 0;
|
*desc_count = 0;
|
||||||
for (i = 0; i < packets; ++i) {
|
for (i = 0; i < packet_count; ++i) {
|
||||||
struct pkt_desc *desc = descs + *desc_count;
|
|
||||||
unsigned int cycle;
|
unsigned int cycle;
|
||||||
bool lost;
|
bool lost;
|
||||||
unsigned int data_blocks;
|
unsigned int data_blocks;
|
||||||
@ -925,7 +942,7 @@ static int generate_device_pkt_descs(struct amdtp_stream *s,
|
|||||||
desc->data_blocks = 0;
|
desc->data_blocks = 0;
|
||||||
desc->data_block_counter = dbc;
|
desc->data_block_counter = dbc;
|
||||||
desc->ctx_payload = NULL;
|
desc->ctx_payload = NULL;
|
||||||
++desc;
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
++(*desc_count);
|
++(*desc_count);
|
||||||
}
|
}
|
||||||
} else if (s->flags & CIP_JUMBO_PAYLOAD) {
|
} else if (s->flags & CIP_JUMBO_PAYLOAD) {
|
||||||
@ -944,7 +961,7 @@ static int generate_device_pkt_descs(struct amdtp_stream *s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = parse_ir_ctx_header(s, cycle, ctx_header, &data_blocks, &dbc, &syt,
|
err = parse_ir_ctx_header(s, cycle, ctx_header, &data_blocks, &dbc, &syt,
|
||||||
packet_index, i);
|
packet_index, i, curr_cycle_time);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -958,6 +975,7 @@ static int generate_device_pkt_descs(struct amdtp_stream *s,
|
|||||||
dbc = (dbc + desc->data_blocks) & 0xff;
|
dbc = (dbc + desc->data_blocks) & 0xff;
|
||||||
|
|
||||||
next_cycle = increment_ohci_cycle_count(next_cycle, 1);
|
next_cycle = increment_ohci_cycle_count(next_cycle, 1);
|
||||||
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
++(*desc_count);
|
++(*desc_count);
|
||||||
ctx_header += s->ctx_data.tx.ctx_header_size / sizeof(*ctx_header);
|
ctx_header += s->ctx_data.tx.ctx_header_size / sizeof(*ctx_header);
|
||||||
packet_index = (packet_index + 1) % queue_size;
|
packet_index = (packet_index + 1) % queue_size;
|
||||||
@ -980,20 +998,21 @@ static unsigned int compute_syt(unsigned int syt_offset, unsigned int cycle,
|
|||||||
return syt & CIP_SYT_MASK;
|
return syt & CIP_SYT_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void generate_pkt_descs(struct amdtp_stream *s, const __be32 *ctx_header, unsigned int packets)
|
static void generate_rx_packet_descs(struct amdtp_stream *s, struct pkt_desc *desc,
|
||||||
|
const __be32 *ctx_header, unsigned int packet_count)
|
||||||
{
|
{
|
||||||
struct pkt_desc *descs = s->pkt_descs;
|
struct seq_desc *seq_descs = s->ctx_data.rx.seq.descs;
|
||||||
const struct seq_desc *seq_descs = s->ctx_data.rx.seq.descs;
|
unsigned int seq_size = s->ctx_data.rx.seq.size;
|
||||||
const unsigned int seq_size = s->ctx_data.rx.seq.size;
|
unsigned int seq_pos = s->ctx_data.rx.seq.pos;
|
||||||
unsigned int dbc = s->data_block_counter;
|
unsigned int dbc = s->data_block_counter;
|
||||||
unsigned int seq_head = s->ctx_data.rx.seq.head;
|
|
||||||
bool aware_syt = !(s->flags & CIP_UNAWARE_SYT);
|
bool aware_syt = !(s->flags & CIP_UNAWARE_SYT);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < packets; ++i) {
|
pool_seq_descs(s, seq_descs, seq_size, seq_pos, packet_count);
|
||||||
struct pkt_desc *desc = descs + i;
|
|
||||||
|
for (i = 0; i < packet_count; ++i) {
|
||||||
unsigned int index = (s->packet_index + i) % s->queue_size;
|
unsigned int index = (s->packet_index + i) % s->queue_size;
|
||||||
const struct seq_desc *seq = seq_descs + seq_head;
|
const struct seq_desc *seq = seq_descs + seq_pos;
|
||||||
|
|
||||||
desc->cycle = compute_ohci_it_cycle(*ctx_header, s->queue_size);
|
desc->cycle = compute_ohci_it_cycle(*ctx_header, s->queue_size);
|
||||||
|
|
||||||
@ -1014,13 +1033,14 @@ static void generate_pkt_descs(struct amdtp_stream *s, const __be32 *ctx_header,
|
|||||||
|
|
||||||
desc->ctx_payload = s->buffer.packets[index].buffer;
|
desc->ctx_payload = s->buffer.packets[index].buffer;
|
||||||
|
|
||||||
seq_head = (seq_head + 1) % seq_size;
|
seq_pos = (seq_pos + 1) % seq_size;
|
||||||
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
|
|
||||||
++ctx_header;
|
++ctx_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->data_block_counter = dbc;
|
s->data_block_counter = dbc;
|
||||||
s->ctx_data.rx.seq.head = seq_head;
|
s->ctx_data.rx.seq.pos = seq_pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cancel_stream(struct amdtp_stream *s)
|
static inline void cancel_stream(struct amdtp_stream *s)
|
||||||
@ -1031,17 +1051,85 @@ static inline void cancel_stream(struct amdtp_stream *s)
|
|||||||
WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
|
WRITE_ONCE(s->pcm_buffer_pointer, SNDRV_PCM_POS_XRUN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static snd_pcm_sframes_t compute_pcm_extra_delay(struct amdtp_stream *s,
|
||||||
|
const struct pkt_desc *desc, unsigned int count)
|
||||||
|
{
|
||||||
|
unsigned int data_block_count = 0;
|
||||||
|
u32 latest_cycle;
|
||||||
|
u32 cycle_time;
|
||||||
|
u32 curr_cycle;
|
||||||
|
u32 cycle_gap;
|
||||||
|
int i, err;
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
// Forward to the latest record.
|
||||||
|
for (i = 0; i < count - 1; ++i)
|
||||||
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
|
latest_cycle = desc->cycle;
|
||||||
|
|
||||||
|
err = fw_card_read_cycle_time(fw_parent_device(s->unit)->card, &cycle_time);
|
||||||
|
if (err < 0)
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
// Compute cycle count with lower 3 bits of second field and cycle field like timestamp
|
||||||
|
// format of 1394 OHCI isochronous context.
|
||||||
|
curr_cycle = compute_ohci_iso_ctx_cycle_count((cycle_time >> 12) & 0x0000ffff);
|
||||||
|
|
||||||
|
if (s->direction == AMDTP_IN_STREAM) {
|
||||||
|
// NOTE: The AMDTP packet descriptor should be for the past isochronous cycle since
|
||||||
|
// it corresponds to arrived isochronous packet.
|
||||||
|
if (compare_ohci_cycle_count(latest_cycle, curr_cycle) > 0)
|
||||||
|
goto end;
|
||||||
|
cycle_gap = decrement_ohci_cycle_count(curr_cycle, latest_cycle);
|
||||||
|
|
||||||
|
// NOTE: estimate delay by recent history of arrived AMDTP packets. The estimated
|
||||||
|
// value expectedly corresponds to a few packets (0-2) since the packet arrived at
|
||||||
|
// the most recent isochronous cycle has been already processed.
|
||||||
|
for (i = 0; i < cycle_gap; ++i) {
|
||||||
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
|
data_block_count += desc->data_blocks;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// NOTE: The AMDTP packet descriptor should be for the future isochronous cycle
|
||||||
|
// since it was already scheduled.
|
||||||
|
if (compare_ohci_cycle_count(latest_cycle, curr_cycle) < 0)
|
||||||
|
goto end;
|
||||||
|
cycle_gap = decrement_ohci_cycle_count(latest_cycle, curr_cycle);
|
||||||
|
|
||||||
|
// NOTE: use history of scheduled packets.
|
||||||
|
for (i = 0; i < cycle_gap; ++i) {
|
||||||
|
data_block_count += desc->data_blocks;
|
||||||
|
desc = prev_packet_desc(s, desc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end:
|
||||||
|
return data_block_count * s->pcm_frame_multiplier;
|
||||||
|
}
|
||||||
|
|
||||||
static void process_ctx_payloads(struct amdtp_stream *s,
|
static void process_ctx_payloads(struct amdtp_stream *s,
|
||||||
const struct pkt_desc *descs,
|
const struct pkt_desc *desc,
|
||||||
unsigned int packets)
|
unsigned int count)
|
||||||
{
|
{
|
||||||
struct snd_pcm_substream *pcm;
|
struct snd_pcm_substream *pcm;
|
||||||
unsigned int pcm_frames;
|
int i;
|
||||||
|
|
||||||
pcm = READ_ONCE(s->pcm);
|
pcm = READ_ONCE(s->pcm);
|
||||||
pcm_frames = s->process_ctx_payloads(s, descs, packets, pcm);
|
s->process_ctx_payloads(s, desc, count, pcm);
|
||||||
if (pcm)
|
|
||||||
update_pcm_pointers(s, pcm, pcm_frames);
|
if (pcm) {
|
||||||
|
unsigned int data_block_count = 0;
|
||||||
|
|
||||||
|
pcm->runtime->delay = compute_pcm_extra_delay(s, desc, count);
|
||||||
|
|
||||||
|
for (i = 0; i < count; ++i) {
|
||||||
|
data_block_count += desc->data_blocks;
|
||||||
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
update_pcm_pointers(s, pcm, data_block_count * s->pcm_frame_multiplier);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_t header_length,
|
static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_t header_length,
|
||||||
@ -1052,8 +1140,10 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
const __be32 *ctx_header = header;
|
const __be32 *ctx_header = header;
|
||||||
const unsigned int events_per_period = d->events_per_period;
|
const unsigned int events_per_period = d->events_per_period;
|
||||||
unsigned int event_count = s->ctx_data.rx.event_count;
|
unsigned int event_count = s->ctx_data.rx.event_count;
|
||||||
|
struct pkt_desc *desc = s->packet_descs_cursor;
|
||||||
unsigned int pkt_header_length;
|
unsigned int pkt_header_length;
|
||||||
unsigned int packets;
|
unsigned int packets;
|
||||||
|
u32 curr_cycle_time;
|
||||||
bool need_hw_irq;
|
bool need_hw_irq;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -1063,11 +1153,9 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
// Calculate the number of packets in buffer and check XRUN.
|
// Calculate the number of packets in buffer and check XRUN.
|
||||||
packets = header_length / sizeof(*ctx_header);
|
packets = header_length / sizeof(*ctx_header);
|
||||||
|
|
||||||
pool_seq_descs(s, packets);
|
generate_rx_packet_descs(s, desc, ctx_header, packets);
|
||||||
|
|
||||||
generate_pkt_descs(s, ctx_header, packets);
|
process_ctx_payloads(s, desc, packets);
|
||||||
|
|
||||||
process_ctx_payloads(s, s->pkt_descs, packets);
|
|
||||||
|
|
||||||
if (!(s->flags & CIP_NO_HEADER))
|
if (!(s->flags & CIP_NO_HEADER))
|
||||||
pkt_header_length = IT_PKT_HEADER_SIZE_CIP;
|
pkt_header_length = IT_PKT_HEADER_SIZE_CIP;
|
||||||
@ -1084,8 +1172,10 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
need_hw_irq = false;
|
need_hw_irq = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (trace_amdtp_packet_enabled())
|
||||||
|
(void)fw_card_read_cycle_time(fw_parent_device(s->unit)->card, &curr_cycle_time);
|
||||||
|
|
||||||
for (i = 0; i < packets; ++i) {
|
for (i = 0; i < packets; ++i) {
|
||||||
const struct pkt_desc *desc = s->pkt_descs + i;
|
|
||||||
struct {
|
struct {
|
||||||
struct fw_iso_packet params;
|
struct fw_iso_packet params;
|
||||||
__be32 header[CIP_HEADER_QUADLETS];
|
__be32 header[CIP_HEADER_QUADLETS];
|
||||||
@ -1094,7 +1184,7 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
|
|
||||||
build_it_pkt_header(s, desc->cycle, &template.params, pkt_header_length,
|
build_it_pkt_header(s, desc->cycle, &template.params, pkt_header_length,
|
||||||
desc->data_blocks, desc->data_block_counter,
|
desc->data_blocks, desc->data_block_counter,
|
||||||
desc->syt, i);
|
desc->syt, i, curr_cycle_time);
|
||||||
|
|
||||||
if (s == s->domain->irq_target) {
|
if (s == s->domain->irq_target) {
|
||||||
event_count += desc->data_blocks;
|
event_count += desc->data_blocks;
|
||||||
@ -1108,9 +1198,12 @@ static void process_rx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
cancel_stream(s);
|
cancel_stream(s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
s->ctx_data.rx.event_count = event_count;
|
s->ctx_data.rx.event_count = event_count;
|
||||||
|
s->packet_descs_cursor = desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void skip_rx_packets(struct fw_iso_context *context, u32 tstamp, size_t header_length,
|
static void skip_rx_packets(struct fw_iso_context *context, u32 tstamp, size_t header_length,
|
||||||
@ -1188,6 +1281,9 @@ static void process_rx_packets_intermediately(struct fw_iso_context *context, u3
|
|||||||
s->ready_processing = true;
|
s->ready_processing = true;
|
||||||
wake_up(&s->ready_wait);
|
wake_up(&s->ready_wait);
|
||||||
|
|
||||||
|
if (d->replay.enable)
|
||||||
|
s->ctx_data.rx.cache_pos = 0;
|
||||||
|
|
||||||
process_rx_packets(context, tstamp, header_length, ctx_header, private_data);
|
process_rx_packets(context, tstamp, header_length, ctx_header, private_data);
|
||||||
if (amdtp_streaming_error(s))
|
if (amdtp_streaming_error(s))
|
||||||
return;
|
return;
|
||||||
@ -1204,7 +1300,8 @@ static void process_tx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
{
|
{
|
||||||
struct amdtp_stream *s = private_data;
|
struct amdtp_stream *s = private_data;
|
||||||
__be32 *ctx_header = header;
|
__be32 *ctx_header = header;
|
||||||
unsigned int packets;
|
struct pkt_desc *desc = s->packet_descs_cursor;
|
||||||
|
unsigned int packet_count;
|
||||||
unsigned int desc_count;
|
unsigned int desc_count;
|
||||||
int i;
|
int i;
|
||||||
int err;
|
int err;
|
||||||
@ -1213,10 +1310,10 @@ static void process_tx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Calculate the number of packets in buffer and check XRUN.
|
// Calculate the number of packets in buffer and check XRUN.
|
||||||
packets = header_length / s->ctx_data.tx.ctx_header_size;
|
packet_count = header_length / s->ctx_data.tx.ctx_header_size;
|
||||||
|
|
||||||
desc_count = 0;
|
desc_count = 0;
|
||||||
err = generate_device_pkt_descs(s, s->pkt_descs, ctx_header, packets, &desc_count);
|
err = generate_tx_packet_descs(s, desc, ctx_header, packet_count, &desc_count);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
if (err != -EAGAIN) {
|
if (err != -EAGAIN) {
|
||||||
cancel_stream(s);
|
cancel_stream(s);
|
||||||
@ -1225,13 +1322,17 @@ static void process_tx_packets(struct fw_iso_context *context, u32 tstamp, size_
|
|||||||
} else {
|
} else {
|
||||||
struct amdtp_domain *d = s->domain;
|
struct amdtp_domain *d = s->domain;
|
||||||
|
|
||||||
process_ctx_payloads(s, s->pkt_descs, desc_count);
|
process_ctx_payloads(s, desc, desc_count);
|
||||||
|
|
||||||
if (d->replay.enable)
|
if (d->replay.enable)
|
||||||
cache_seq(s, s->pkt_descs, desc_count);
|
cache_seq(s, desc, desc_count);
|
||||||
|
|
||||||
|
for (i = 0; i < desc_count; ++i)
|
||||||
|
desc = amdtp_stream_next_packet_desc(s, desc);
|
||||||
|
s->packet_descs_cursor = desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < packets; ++i) {
|
for (i = 0; i < packet_count; ++i) {
|
||||||
struct fw_iso_packet params = {0};
|
struct fw_iso_packet params = {0};
|
||||||
|
|
||||||
if (queue_in_packet(s, ¶ms) < 0) {
|
if (queue_in_packet(s, ¶ms) < 0) {
|
||||||
@ -1551,7 +1652,8 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
|
|||||||
unsigned int ctx_header_size;
|
unsigned int ctx_header_size;
|
||||||
unsigned int max_ctx_payload_size;
|
unsigned int max_ctx_payload_size;
|
||||||
enum dma_data_direction dir;
|
enum dma_data_direction dir;
|
||||||
int type, tag, err;
|
struct pkt_desc *descs;
|
||||||
|
int i, type, tag, err;
|
||||||
|
|
||||||
mutex_lock(&s->mutex);
|
mutex_lock(&s->mutex);
|
||||||
|
|
||||||
@ -1616,7 +1718,7 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
|
|||||||
// possible to cache much unexpectedly.
|
// possible to cache much unexpectedly.
|
||||||
s->ctx_data.tx.cache.size = max_t(unsigned int, s->syt_interval * 2,
|
s->ctx_data.tx.cache.size = max_t(unsigned int, s->syt_interval * 2,
|
||||||
queue_size * 3 / 2);
|
queue_size * 3 / 2);
|
||||||
s->ctx_data.tx.cache.tail = 0;
|
s->ctx_data.tx.cache.pos = 0;
|
||||||
s->ctx_data.tx.cache.descs = kcalloc(s->ctx_data.tx.cache.size,
|
s->ctx_data.tx.cache.descs = kcalloc(s->ctx_data.tx.cache.size,
|
||||||
sizeof(*s->ctx_data.tx.cache.descs), GFP_KERNEL);
|
sizeof(*s->ctx_data.tx.cache.descs), GFP_KERNEL);
|
||||||
if (!s->ctx_data.tx.cache.descs) {
|
if (!s->ctx_data.tx.cache.descs) {
|
||||||
@ -1644,8 +1746,7 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
|
|||||||
goto err_context;
|
goto err_context;
|
||||||
}
|
}
|
||||||
s->ctx_data.rx.seq.size = queue_size;
|
s->ctx_data.rx.seq.size = queue_size;
|
||||||
s->ctx_data.rx.seq.tail = 0;
|
s->ctx_data.rx.seq.pos = 0;
|
||||||
s->ctx_data.rx.seq.head = 0;
|
|
||||||
|
|
||||||
entry = &initial_state[s->sfc];
|
entry = &initial_state[s->sfc];
|
||||||
s->ctx_data.rx.data_block_state = entry->data_block;
|
s->ctx_data.rx.data_block_state = entry->data_block;
|
||||||
@ -1660,12 +1761,24 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
|
|||||||
else
|
else
|
||||||
s->tag = TAG_CIP;
|
s->tag = TAG_CIP;
|
||||||
|
|
||||||
s->pkt_descs = kcalloc(s->queue_size, sizeof(*s->pkt_descs),
|
// NOTE: When operating without hardIRQ/softIRQ, applications tends to call ioctl request
|
||||||
GFP_KERNEL);
|
// for runtime of PCM substream in the interval equivalent to the size of PCM buffer. It
|
||||||
if (!s->pkt_descs) {
|
// could take a round over queue of AMDTP packet descriptors and small loss of history. For
|
||||||
|
// safe, keep more 8 elements for the queue, equivalent to 1 ms.
|
||||||
|
descs = kcalloc(s->queue_size + 8, sizeof(*descs), GFP_KERNEL);
|
||||||
|
if (!descs) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_context;
|
goto err_context;
|
||||||
}
|
}
|
||||||
|
s->packet_descs = descs;
|
||||||
|
|
||||||
|
INIT_LIST_HEAD(&s->packet_descs_list);
|
||||||
|
for (i = 0; i < s->queue_size; ++i) {
|
||||||
|
INIT_LIST_HEAD(&descs->link);
|
||||||
|
list_add_tail(&descs->link, &s->packet_descs_list);
|
||||||
|
++descs;
|
||||||
|
}
|
||||||
|
s->packet_descs_cursor = list_first_entry(&s->packet_descs_list, struct pkt_desc, link);
|
||||||
|
|
||||||
s->packet_index = 0;
|
s->packet_index = 0;
|
||||||
do {
|
do {
|
||||||
@ -1704,7 +1817,8 @@ static int amdtp_stream_start(struct amdtp_stream *s, int channel, int speed,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err_pkt_descs:
|
err_pkt_descs:
|
||||||
kfree(s->pkt_descs);
|
kfree(s->packet_descs);
|
||||||
|
s->packet_descs = NULL;
|
||||||
err_context:
|
err_context:
|
||||||
if (s->direction == AMDTP_OUT_STREAM) {
|
if (s->direction == AMDTP_OUT_STREAM) {
|
||||||
kfree(s->ctx_data.rx.seq.descs);
|
kfree(s->ctx_data.rx.seq.descs);
|
||||||
@ -1798,7 +1912,8 @@ static void amdtp_stream_stop(struct amdtp_stream *s)
|
|||||||
fw_iso_context_destroy(s->context);
|
fw_iso_context_destroy(s->context);
|
||||||
s->context = ERR_PTR(-1);
|
s->context = ERR_PTR(-1);
|
||||||
iso_packets_buffer_destroy(&s->buffer, s->unit);
|
iso_packets_buffer_destroy(&s->buffer, s->unit);
|
||||||
kfree(s->pkt_descs);
|
kfree(s->packet_descs);
|
||||||
|
s->packet_descs = NULL;
|
||||||
|
|
||||||
if (s->direction == AMDTP_OUT_STREAM) {
|
if (s->direction == AMDTP_OUT_STREAM) {
|
||||||
kfree(s->ctx_data.rx.seq.descs);
|
kfree(s->ctx_data.rx.seq.descs);
|
||||||
@ -1917,7 +2032,6 @@ static int make_association(struct amdtp_domain *d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rx->ctx_data.rx.replay_target = tx;
|
rx->ctx_data.rx.replay_target = tx;
|
||||||
rx->ctx_data.rx.cache_head = 0;
|
|
||||||
|
|
||||||
++dst_index;
|
++dst_index;
|
||||||
}
|
}
|
||||||
|
@ -103,14 +103,14 @@ struct pkt_desc {
|
|||||||
unsigned int data_blocks;
|
unsigned int data_blocks;
|
||||||
unsigned int data_block_counter;
|
unsigned int data_block_counter;
|
||||||
__be32 *ctx_payload;
|
__be32 *ctx_payload;
|
||||||
|
struct list_head link;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct amdtp_stream;
|
struct amdtp_stream;
|
||||||
typedef unsigned int (*amdtp_stream_process_ctx_payloads_t)(
|
typedef void (*amdtp_stream_process_ctx_payloads_t)(struct amdtp_stream *s,
|
||||||
struct amdtp_stream *s,
|
const struct pkt_desc *desc,
|
||||||
const struct pkt_desc *desc,
|
unsigned int count,
|
||||||
unsigned int packets,
|
struct snd_pcm_substream *pcm);
|
||||||
struct snd_pcm_substream *pcm);
|
|
||||||
|
|
||||||
struct amdtp_domain;
|
struct amdtp_domain;
|
||||||
struct amdtp_stream {
|
struct amdtp_stream {
|
||||||
@ -125,7 +125,9 @@ struct amdtp_stream {
|
|||||||
struct iso_packets_buffer buffer;
|
struct iso_packets_buffer buffer;
|
||||||
unsigned int queue_size;
|
unsigned int queue_size;
|
||||||
int packet_index;
|
int packet_index;
|
||||||
struct pkt_desc *pkt_descs;
|
struct pkt_desc *packet_descs;
|
||||||
|
struct list_head packet_descs_list;
|
||||||
|
struct pkt_desc *packet_descs_cursor;
|
||||||
int tag;
|
int tag;
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@ -145,7 +147,7 @@ struct amdtp_stream {
|
|||||||
struct {
|
struct {
|
||||||
struct seq_desc *descs;
|
struct seq_desc *descs;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
unsigned int tail;
|
unsigned int pos;
|
||||||
} cache;
|
} cache;
|
||||||
} tx;
|
} tx;
|
||||||
struct {
|
struct {
|
||||||
@ -159,8 +161,7 @@ struct amdtp_stream {
|
|||||||
struct {
|
struct {
|
||||||
struct seq_desc *descs;
|
struct seq_desc *descs;
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
unsigned int tail;
|
unsigned int pos;
|
||||||
unsigned int head;
|
|
||||||
} seq;
|
} seq;
|
||||||
|
|
||||||
unsigned int data_block_state;
|
unsigned int data_block_state;
|
||||||
@ -168,7 +169,7 @@ struct amdtp_stream {
|
|||||||
unsigned int last_syt_offset;
|
unsigned int last_syt_offset;
|
||||||
|
|
||||||
struct amdtp_stream *replay_target;
|
struct amdtp_stream *replay_target;
|
||||||
unsigned int cache_head;
|
unsigned int cache_pos;
|
||||||
} rx;
|
} rx;
|
||||||
} ctx_data;
|
} ctx_data;
|
||||||
|
|
||||||
@ -188,6 +189,7 @@ struct amdtp_stream {
|
|||||||
struct snd_pcm_substream *pcm;
|
struct snd_pcm_substream *pcm;
|
||||||
snd_pcm_uframes_t pcm_buffer_pointer;
|
snd_pcm_uframes_t pcm_buffer_pointer;
|
||||||
unsigned int pcm_period_pointer;
|
unsigned int pcm_period_pointer;
|
||||||
|
unsigned int pcm_frame_multiplier;
|
||||||
|
|
||||||
// To start processing content of packets at the same cycle in several contexts for
|
// To start processing content of packets at the same cycle in several contexts for
|
||||||
// each direction.
|
// each direction.
|
||||||
@ -214,7 +216,7 @@ int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
|
|||||||
void amdtp_stream_destroy(struct amdtp_stream *s);
|
void amdtp_stream_destroy(struct amdtp_stream *s);
|
||||||
|
|
||||||
int amdtp_stream_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
int amdtp_stream_set_parameters(struct amdtp_stream *s, unsigned int rate,
|
||||||
unsigned int data_block_quadlets);
|
unsigned int data_block_quadlets, unsigned int pcm_frame_multiplier);
|
||||||
unsigned int amdtp_stream_get_max_payload(struct amdtp_stream *s);
|
unsigned int amdtp_stream_get_max_payload(struct amdtp_stream *s);
|
||||||
|
|
||||||
void amdtp_stream_update(struct amdtp_stream *s);
|
void amdtp_stream_update(struct amdtp_stream *s);
|
||||||
@ -277,6 +279,16 @@ static inline void amdtp_stream_pcm_trigger(struct amdtp_stream *s,
|
|||||||
WRITE_ONCE(s->pcm, pcm);
|
WRITE_ONCE(s->pcm, pcm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* amdtp_stream_next_packet_desc - retrieve next descriptor for amdtp packet.
|
||||||
|
* @s: the AMDTP stream
|
||||||
|
* @desc: the descriptor of packet
|
||||||
|
*
|
||||||
|
* This macro computes next descriptor so that the list of descriptors behaves circular queue.
|
||||||
|
*/
|
||||||
|
#define amdtp_stream_next_packet_desc(s, desc) \
|
||||||
|
list_next_entry_circular(desc, &s->packet_descs_list, link)
|
||||||
|
|
||||||
static inline bool cip_sfc_is_base_44100(enum cip_sfc sfc)
|
static inline bool cip_sfc_is_base_44100(enum cip_sfc sfc)
|
||||||
{
|
{
|
||||||
return sfc & 1;
|
return sfc & 1;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user