Commit 598100be authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-v5.11' of...

Merge tag 'asoc-v5.11' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v5.11

There's a lot of changes here but mostly cleanups and driver specific
things, the most user visible change is the support for boot time
selection of Intel DSP firmware which will make it easier for people to
move over to the preferred modern implementations in distros and other
large scale deployments.

This also includes a merge of the new auxillary bus which was done in
anticipation of use by the Intel DSP drivers which didn't quite make it.

 - Lots more cleanups and simplifications from Morimoto-san.
 - Support for some basic DPCM systems in the audio graph card from
   Sameer Pujar.
 - Remove some old pre-DT Freescale drivers for platforms that are now
   DT only.
 - Move selection of which Intel DSP implementation to use to boot time
   rather than requiring it to be selected at build time.
 - Support for Allwinner H6 I2S, Analog Devices ADAU1372, Intel
   Alderlake-S, GMediatek MT8192, NXP i.MX HDMI and XCVR, Realtek RT715,
   Qualcomm SM8250 and simple GPIO based muxes.
parents 175b8d89 460aa020
...@@ -199,8 +199,6 @@ patternProperties: ...@@ -199,8 +199,6 @@ patternProperties:
description: description:
From common IIO binding. Used to pipe external sigma delta From common IIO binding. Used to pipe external sigma delta
modulator or internal ADC output to DFSDM channel. modulator or internal ADC output to DFSDM channel.
This is not required for "st,stm32-dfsdm-pdm" compatibility as
PDM microphone is binded in Audio DT node.
required: required:
- io-channels - io-channels
...@@ -235,6 +233,10 @@ patternProperties: ...@@ -235,6 +233,10 @@ patternProperties:
description: child node description: child node
properties: properties:
compatible:
enum:
- st,stm32h7-dfsdm-dai
"#sound-dai-cells": "#sound-dai-cells":
const: 0 const: 0
...@@ -244,6 +246,7 @@ patternProperties: ...@@ -244,6 +246,7 @@ patternProperties:
modulator or internal ADC output to DFSDM channel. modulator or internal ADC output to DFSDM channel.
required: required:
- compatible
- "#sound-dai-cells" - "#sound-dai-cells"
- io-channels - io-channels
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,adau1372.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices ADAU1372 CODEC
maintainers:
- Alexandre Belloni <alexandre.belloni@bootlin.om>
description: |
Analog Devices ADAU1372 four inputs and two outputs codec.
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1372.pdf
properties:
compatible:
enum:
- adi,adau1372
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
clocks:
maxItems: 1
clock-names:
const: "mclk"
powerdown-gpios:
description: GPIO used for hardware power-down.
maxItems: 1
required:
- "#sound-dai-cells"
- compatible
- reg
- clocks
- clock-names
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@3c {
compatible = "adi,adau1372";
reg = <0x3c>;
#sound-dai-cells = <0>;
clock-names = "mclk";
clocks = <&adau1372z_xtal>;
};
};
adau1372z_xtal: clock {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12288000>;
};
...
Analog Devices ADAU1977/ADAU1978/ADAU1979
Datasheets:
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
This driver supports both the I2C and SPI bus.
Required properties:
- compatible: Should contain one of the following:
"adi,adau1977"
"adi,adau1978"
"adi,adau1979"
- AVDD-supply: analog power supply for the device, please consult
Documentation/devicetree/bindings/regulator/regulator.txt
Optional properties:
- reset-gpios: the reset pin for the chip, for more details consult
Documentation/devicetree/bindings/gpio/gpio.txt
- DVDD-supply: supply voltage for the digital core, please consult
Documentation/devicetree/bindings/regulator/regulator.txt
- adi,micbias: configures the voltage setting for the MICBIAS pin.
Select 0/1/2/3/4/5/6/7/8 to specify MICBIAS voltage
5V/5.5V/6V/6.5V/7V/7.5V/8V/8.5V/9V
If not specified the default value will be "7" meaning 8.5 Volts.
This property is only valid for the ADAU1977
For required properties on SPI, please consult
Documentation/devicetree/bindings/spi/spi-bus.txt
Required properties on I2C:
- reg: The i2c address. Value depends on the state of ADDR0
and ADDR1, as wired in hardware.
Examples:
adau1977_spi: adau1977@0 {
compatible = "adi,adau1977";
spi-max-frequency = <600000>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
adi,micbias = <3>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
adau1977_i2c: adau1977@11 {
compatible = "adi,adau1977";
reg = <0x11>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/adi,adau1977.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices ADAU1977/ADAU1978/ADAU1979 Quad ADC with Diagnostics
maintainers:
- Lars-Peter Clausen <lars@metafoo.de>
- Bogdan Togorean <bogdan.togorean@analog.com>
description: |
Analog Devices ADAU1977 and similar quad ADC with Diagnostics
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
properties:
compatible:
enum:
- adi,adau1977
- adi,adau1978
- adi,adau1979
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
reset-gpios:
maxItems: 1
spi-max-frequency: true
AVDD-supply:
description: Analog power support for the device.
DVDD-supply:
description: Supply voltage for digital core.
adi,micbias:
description: |
Configures the voltage setting for the MICBIAS pin.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2, 3, 4, 5, 6, 7, 8]
default: 7
required:
- reg
- compatible
- AVDD-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
adau1977_spi: adau1977@0 {
compatible = "adi,adau1977";
reg = <0>;
spi-max-frequency = <600000>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
adi,micbias = <3>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
adau1977_i2c: adau1977@11 {
compatible = "adi,adau1977";
reg = <0x11>;
AVDD-supply = <&regulator>;
DVDD-supply = <&regulator_digital>;
reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
};
};
...@@ -24,6 +24,7 @@ properties: ...@@ -24,6 +24,7 @@ properties:
- items: - items:
- const: allwinner,sun50i-a64-i2s - const: allwinner,sun50i-a64-i2s
- const: allwinner,sun8i-h3-i2s - const: allwinner,sun8i-h3-i2s
- const: allwinner,sun50i-h6-i2s
reg: reg:
maxItems: 1 maxItems: 1
...@@ -59,6 +60,7 @@ allOf: ...@@ -59,6 +60,7 @@ allOf:
- allwinner,sun8i-a83t-i2s - allwinner,sun8i-a83t-i2s
- allwinner,sun8i-h3-i2s - allwinner,sun8i-h3-i2s
- allwinner,sun50i-a64-codec-i2s - allwinner,sun50i-a64-codec-i2s
- allwinner,sun50i-h6-i2s
then: then:
required: required:
...@@ -68,7 +70,9 @@ allOf: ...@@ -68,7 +70,9 @@ allOf:
properties: properties:
compatible: compatible:
contains: contains:
const: allwinner,sun8i-a83t-i2s enum:
- allwinner,sun8i-a83t-i2s
- allwinner,sun8i-h3-i2s
then: then:
properties: properties:
......
Audio Graph Card:
Audio Graph Card specifies audio DAI connections of SoC <-> codec.
It is based on common bindings for device graphs.
see ${LINUX}/Documentation/devicetree/bindings/graph.txt
Basically, Audio Graph Card property is same as Simple Card.
see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.yaml
Below are same as Simple-Card.
- label
- widgets
- routing
- dai-format
- frame-master
- bitclock-master
- bitclock-inversion
- frame-inversion
- mclk-fs
- hp-det-gpio
- mic-det-gpio
- dai-tdm-slot-num
- dai-tdm-slot-width
- clocks / system-clock-frequency
Required properties:
- compatible : "audio-graph-card";
- dais : list of CPU DAI port{s}
Optional properties:
- pa-gpios: GPIO used to control external amplifier.
-----------------------
Example: Single DAI case
-----------------------
sound_card {
compatible = "audio-graph-card";
dais = <&cpu_port>;
};
dai-controller {
...
cpu_port: port {
cpu_endpoint: endpoint {
remote-endpoint = <&codec_endpoint>;
dai-format = "left_j";
...
};
};
};
audio-codec {
...
port {
codec_endpoint: endpoint {
remote-endpoint = <&cpu_endpoint>;
};
};
};
-----------------------
Example: Multi DAI case
-----------------------
sound-card {
compatible = "audio-graph-card";
label = "sound-card";
dais = <&cpu_port0
&cpu_port1
&cpu_port2>;
};
audio-codec@0 {
...
port {
codec0_endpoint: endpoint {
remote-endpoint = <&cpu_endpoint0>;
};
};
};
audio-codec@1 {
...
port {
codec1_endpoint: endpoint {
remote-endpoint = <&cpu_endpoint1>;
};
};
};
audio-codec@2 {
...
port {
codec2_endpoint: endpoint {
remote-endpoint = <&cpu_endpoint2>;
};
};
};
dai-controller {
...
ports {
cpu_port0: port@0 {
cpu_endpoint0: endpoint {
remote-endpoint = <&codec0_endpoint>;
dai-format = "left_j";
...
};
};
cpu_port1: port@1 {
cpu_endpoint1: endpoint {
remote-endpoint = <&codec1_endpoint>;
dai-format = "i2s";
...
};
};
cpu_port2: port@2 {
cpu_endpoint2: endpoint {
remote-endpoint = <&codec2_endpoint>;
dai-format = "i2s";
...
};
};
};
};
-----------------------
Example: Sampling Rate Conversion
-----------------------
sound_card {
compatible = "audio-graph-card";
label = "sound-card";
prefix = "codec";
routing = "codec Playback", "DAI0 Playback",
"DAI0 Capture", "codec Capture";
convert-rate = <48000>;
dais = <&cpu_port>;
};
audio-codec {
...
port {
codec_endpoint: endpoint {
remote-endpoint = <&cpu_endpoint>;
};
};
};
dai-controller {
...
cpu_port: port {
cpu_endpoint: endpoint {
remote-endpoint = <&codec_endpoint>;
dai-format = "left_j";
...
};
};
};
-----------------------
Example: 2 CPU 1 Codec (Mixing)
-----------------------
sound_card {
compatible = "audio-graph-card";
label = "sound-card";
routing = "codec Playback", "DAI0 Playback",
"codec Playback", "DAI1 Playback",
"DAI0 Capture", "codec Capture";
dais = <&cpu_port>;
};
audio-codec {
...
audio-graph-card,prefix = "codec";
audio-graph-card,convert-rate = <48000>;
port {
reg = <0>;
codec_endpoint0: endpoint@0 {
remote-endpoint = <&cpu_endpoint0>;
};
codec_endpoint1: endpoint@1 {
remote-endpoint = <&cpu_endpoint1>;
};
};
};
dai-controller {
...
cpu_port: port {
cpu_endpoint0: endpoint@0 {
remote-endpoint = <&codec_endpoint0>;
dai-format = "left_j";
...
};
cpu_endpoint1: endpoint@1 {
remote-endpoint = <&codec_endpoint1>;
dai-format = "left_j";
...
};
};
};
-----------------------
Example: Multi DAI with DPCM
-----------------------
CPU0 ------ ak4613
CPU1 ------ HDMI
CPU2 ------ PCM3168A-p /* DPCM 1ch/2ch */
CPU3 --/ /* DPCM 3ch/4ch */
CPU4 --/ /* DPCM 5ch/6ch */
CPU5 --/ /* DPCM 7ch/8ch */
CPU6 ------ PCM3168A-c
sound_card: sound {
compatible = "audio-graph-card";
label = "sound-card";
routing = "pcm3168a Playback", "DAI2 Playback",
"pcm3168a Playback", "DAI3 Playback",
"pcm3168a Playback", "DAI4 Playback",
"pcm3168a Playback", "DAI5 Playback";
dais = <&snd_port0 /* ak4613 */
&snd_port1 /* HDMI0 */
&snd_port2 /* pcm3168a playback */
&snd_port3 /* pcm3168a capture */
>;
};
ak4613: codec@10 {
...
port {
ak4613_endpoint: endpoint {
remote-endpoint = <&rsnd_endpoint0>;
};
};
};
pcm3168a: audio-codec@44 {
...
audio-graph-card,prefix = "pcm3168a";
audio-graph-card,convert-channels = <8>; /* TDM Split */
ports {
port@0 {
reg = <0>;
pcm3168a_endpoint_p1: endpoint@1 {
remote-endpoint = <&rsnd_endpoint2>;
...
};
pcm3168a_endpoint_p2: endpoint@2 {
remote-endpoint = <&rsnd_endpoint3>;
...
};
pcm3168a_endpoint_p3: endpoint@3 {
remote-endpoint = <&rsnd_endpoint4>;
...
};
pcm3168a_endpoint_p4: endpoint@4 {
remote-endpoint = <&rsnd_endpoint5>;
...
};
};
port@1 {
reg = <1>;
pcm3168a_endpoint_c: endpoint {
remote-endpoint = <&rsnd_endpoint6>;
...
};
};
};
};
&sound {
ports {
snd_port0: port@0 {
rsnd_endpoint0: endpoint {
remote-endpoint = <&ak4613_endpoint>;
...
};
};
snd_port1: port@1 {
rsnd_endpoint1: endpoint {
remote-endpoint = <&dw_hdmi0_snd_in>;
...
};
};
snd_port2: port@2 {
#address-cells = <1>;
#size-cells = <0>;
rsnd_endpoint2: endpoint@2 {
remote-endpoint = <&pcm3168a_endpoint_p1>;
...
};
rsnd_endpoint3: endpoint@3 {
remote-endpoint = <&pcm3168a_endpoint_p2>;
...
};
rsnd_endpoint4: endpoint@4 {
remote-endpoint = <&pcm3168a_endpoint_p3>;
...
};
rsnd_endpoint5: endpoint@5 {
remote-endpoint = <&pcm3168a_endpoint_p4>;
...
};
};
snd_port3: port@6 {
rsnd_endpoint6: endpoint {
remote-endpoint = <&pcm3168a_endpoint_c>;
...
};
};
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/audio-graph-card.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Audio Graph Card Device Tree Bindings
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
allOf:
- $ref: /schemas/sound/audio-graph.yaml#
properties:
compatible:
enum:
- audio-graph-card
- audio-graph-scu-card
required:
- compatible
unevaluatedProperties: false
examples:
- |
sound {
compatible = "audio-graph-card";
dais = <&cpu_port_a>;
};
cpu {
/*
* dai-controller own settings
*/
port {
cpu_endpoint: endpoint {
remote-endpoint = <&codec_endpoint>;
dai-format = "left_j";
};
};
};
codec {
/*
* codec own settings
*/
port {
codec_endpoint: endpoint {
remote-endpoint = <&cpu_endpoint>;
};
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/audio-graph-port.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Audio Graph Card 'port' Node Bindings
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
select: false
properties:
port:
description: single OF-Graph subnode
type: object
properties:
reg:
maxItems: 1
prefix:
description: "device name prefix"
$ref: /schemas/types.yaml#/definitions/string
convert-rate:
description: CPU to Codec rate convert.
$ref: /schemas/types.yaml#/definitions/uint32
convert-channels:
description: CPU to Codec rate channels.
$ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
"^endpoint(@[0-9a-f]+)?":
type: object
properties:
remote-endpoint:
maxItems: 1
mclk-fs:
description: |
Multiplication factor between stream rate and codec mclk.
When defined, mclk-fs property defined in dai-link sub nodes are
ignored.
$ref: /schemas/types.yaml#/definitions/uint32
frame-inversion:
description: dai-link uses frame clock inversion
$ref: /schemas/types.yaml#/definitions/flag
bitclock-inversion:
description: dai-link uses bit clock inversion
$ref: /schemas/types.yaml#/definitions/flag
frame-master:
description: Indicates dai-link frame master.
$ref: /schemas/types.yaml#/definitions/phandle
bitclock-master:
description: Indicates dai-link bit clock master
$ref: /schemas/types.yaml#/definitions/phandle
dai-format:
description: audio format.
items:
enum:
- i2s
- right_j
- left_j
- dsp_a
- dsp_b
- ac97
- pdm
- msb
- lsb
convert-rate:
description: CPU to Codec rate convert.
$ref: /schemas/types.yaml#/definitions/uint32
convert-channels:
description: CPU to Codec rate channels.
$ref: /schemas/types.yaml#/definitions/uint32
required:
- remote-endpoint
ports:
description: multi OF-Graph subnode
type: object
patternProperties:
"^port(@[0-9a-f]+)?":
$ref: "#/properties/port"
additionalProperties: true
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/audio-graph.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Audio Graph Device Tree Bindings
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
properties:
dais:
$ref: /schemas/types.yaml#/definitions/phandle-array
label:
maxItems: 1
prefix:
description: "device name prefix"
$ref: /schemas/types.yaml#/definitions/string
routing:
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.
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
widgets:
description: User specified audio sound widgets.
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
convert-rate:
description: CPU to Codec rate convert.
$ref: /schemas/types.yaml#/definitions/uint32
convert-channels:
description: CPU to Codec rate channels.
$ref: /schemas/types.yaml#/definitions/uint32
pa-gpios:
maxItems: 1
hp-det-gpio:
maxItems: 1
mic-det-gpio:
maxItems: 1
required:
- dais
additionalProperties: true
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,aud2htx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP Audio Subsystem to HDMI RTX Subsystem Controller
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
properties:
compatible:
const: fsl,imx8mp-aud2htx
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: Peripheral clock
clock-names:
items:
- const: bus
dmas:
items:
- description: DMA controller phandle and request line for TX
dma-names:
items:
- const: tx
power-domains:
maxItems: 1
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- dmas
- dma-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/imx8mp-clock.h>
aud2htx: aud2htx@30cb0000 {
compatible = "fsl,imx8mp-aud2htx";
reg = <0x30cb0000 0x10000>;
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_AUD2HTX_IPG>;
clock-names = "bus";
dmas = <&sdma2 26 2 0>;
dma-names = "tx";
power-domains = <&audiomix_pd>;
};
...@@ -20,6 +20,7 @@ properties: ...@@ -20,6 +20,7 @@ properties:
- fsl,imx35-spdif - fsl,imx35-spdif
- fsl,vf610-spdif - fsl,vf610-spdif
- fsl,imx6sx-spdif - fsl,imx6sx-spdif
- fsl,imx8qm-spdif
reg: reg:
maxItems: 1 maxItems: 1
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,xcvr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP Audio Transceiver (XCVR) Controller
maintainers:
- Viorel Suman <viorel.suman@nxp.com>
description: |
NXP XCVR (Audio Transceiver) is a on-chip functional module
that allows CPU to receive and transmit digital audio via
HDMI2.1 eARC, HDMI1.4 ARC and SPDIF.
properties:
$nodename:
pattern: "^xcvr@.*"
compatible:
enum:
- fsl,imx8mp-xcvr
reg:
items:
- description: 20K RAM for code and data
- description: registers space
- description: RX FIFO address
- description: TX FIFO address
reg-names:
items:
- const: ram
- const: regs
- const: rxfifo
- const: txfifo
interrupts:
maxItems: 1
clocks:
items:
- description: Peripheral clock
- description: PHY clock
- description: SPBA clock
- description: PLL clock
clock-names:
items:
- const: ipg
- const: phy
- const: spba
- const: pll_ipg
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
resets:
maxItems: 1
required:
- compatible
- reg
- reg-names
- interrupts
- clocks
- clock-names
- dmas
- dma-names
- resets
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/imx8mp-clock.h>
#include <dt-bindings/reset/imx8mp-reset.h>
xcvr: xcvr@30cc0000 {
compatible = "fsl,imx8mp-xcvr";
reg = <0x30cc0000 0x800>,
<0x30cc0800 0x400>,
<0x30cc0c00 0x080>,
<0x30cc0e00 0x080>;
reg-names = "ram", "regs", "rxfifo", "txfifo";
interrupts = <0x0 128 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_IPG>,
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_PHY>,
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_SPBA2_ROOT>,
<&audiomix_clk IMX8MP_CLK_AUDIOMIX_AUDPLL_ROOT>;
clock-names = "ipg", "phy", "spba", "pll_ipg";
dmas = <&sdma2 30 2 0>, <&sdma2 31 2 0>;
dma-names = "rx", "tx";
resets = <&audiomix_reset 0>;
};
...@@ -40,6 +40,8 @@ The compatible list for this generic sound card currently: ...@@ -40,6 +40,8 @@ The compatible list for this generic sound card currently:
"fsl,imx-audio-tlv320aic32x4" "fsl,imx-audio-tlv320aic32x4"
"fsl,imx-audio-si476x"
Required properties: Required properties:
- compatible : Contains one of entries in the compatible list. - compatible : Contains one of entries in the compatible list.
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/google,sc7180-trogdor.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Google SC7180-Trogdor ASoC sound card driver
maintainers:
- Rohit kumar <rohitkr@codeaurora.org>
- Cheng-Yi Chiang <cychiang@chromium.org>
description:
This binding describes the SC7180 sound card which uses LPASS for audio.
properties:
compatible:
enum:
- google,sc7180-trogdor
- google,sc7180-coachz
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.
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
"#address-cells":
const: 1
"#size-cells":
const: 0
dmic-gpios:
maxItems: 1
description: GPIO for switching between DMICs
patternProperties:
"^dai-link(@[0-9])?$":
description:
Each subnode represents a dai link. Subnodes of each dai links would be
cpu/codec dais.
type: object
properties:
link-name:
description: Indicates dai-link name and PCM stream name.
$ref: /schemas/types.yaml#/definitions/string
maxItems: 1
reg:
description: dai link address.
cpu:
description: Holds subnode which indicates cpu dai.
type: object
properties:
sound-dai: true
codec:
description: Holds subnode which indicates codec dai.
type: object
properties:
sound-dai: true
required:
- link-name
- cpu
- codec
additionalProperties: false
required:
- compatible
- model
- "#address-cells"
- "#size-cells"
additionalProperties: false
examples:
- |
sound {
compatible = "google,sc7180-trogdor";
model = "sc7180-rt5682-max98357a-2mic";
audio-routing =
"Headphone Jack", "HPOL",
"Headphone Jack", "HPOR";
#address-cells = <1>;
#size-cells = <0>;
dmic-gpios = <&tlmm 86 0>;
dai-link@0 {
link-name = "MultiMedia0";
reg = <0>;
cpu {
sound-dai = <&lpass_cpu 0>;
};
codec {
sound-dai = <&alc5682 0>;
};
};
dai-link@1 {
link-name = "MultiMedia1";
reg = <1>;
cpu {
sound-dai = <&lpass_cpu 1>;
};
codec {
sound-dai = <&max98357a>;
};
};
dai-link@2 {
link-name = "MultiMedia2";
reg = <2>;
cpu {
sound-dai = <&lpass_hdmi 0>;
};
codec {
sound-dai = <&msm_dp>;
};
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/imx-audio-hdmi.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP i.MX audio complex with HDMI
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
properties:
compatible:
enum:
- fsl,imx-audio-hdmi
- fsl,imx-audio-sii902x
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
audio-cpu:
description: The phandle of an CPU DAI controller
hdmi-out:
description: |
This is a boolean property. If present, the transmitting function
of HDMI will be enabled, indicating there's a physical HDMI out
connector or jack on the board or it's connecting to some other IP
block, such as an HDMI encoder or display-controller.
hdmi-in:
description: |
This is a boolean property. If present, the receiving function of
HDMI will be enabled, indicating there is a physical HDMI in
connector/jack on the board.
required:
- compatible
- model
- audio-cpu
additionalProperties: false
examples:
- |
sound-hdmi {
compatible = "fsl,imx-audio-hdmi";
model = "audio-hdmi";
audio-cpu = <&aud2htx>;
hdmi-out;
};
...@@ -9,6 +9,9 @@ title: Marvel SSPA Digital Audio Interface Bindings ...@@ -9,6 +9,9 @@ title: Marvel SSPA Digital Audio Interface Bindings
maintainers: maintainers:
- Lubomir Rintel <lkundrak@v3.sk> - Lubomir Rintel <lkundrak@v3.sk>
allOf:
- $ref: audio-graph-port.yaml#
properties: properties:
$nodename: $nodename:
pattern: "^audio-controller(@.*)?$" pattern: "^audio-controller(@.*)?$"
...@@ -58,29 +61,9 @@ properties: ...@@ -58,29 +61,9 @@ properties:
type: object type: object
properties: properties:
remote-endpoint: true
frame-master:
type: boolean
description: SoC generates the frame clock
bitclock-master:
type: boolean
description: SoC generates the bit clock
dai-format: dai-format:
$ref: /schemas/types.yaml#/definitions/string
description: The digital audio format
const: i2s const: i2s
required:
- remote-endpoint
required:
- endpoint
additionalProperties: false
required: required:
- "#sound-dai-cells" - "#sound-dai-cells"
- compatible - compatible
...@@ -112,8 +95,6 @@ examples: ...@@ -112,8 +95,6 @@ examples:
port { port {
endpoint { endpoint {
remote-endpoint = <&rt5631_0>; remote-endpoint = <&rt5631_0>;
frame-master;
bitclock-master;
dai-format = "i2s"; dai-format = "i2s";
}; };
}; };
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/mt8192-mt6359-rt1015-rt5682.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mediatek MT8192 with MT6359, RT1015 and RT5682 ASoC sound card driver
maintainers:
- Jiaxin Yu <jiaxin.yu@mediatek.com>
- Shane Chien <shane.chien@mediatek.com>
description:
This binding describes the MT8192 sound card.
properties:
compatible:
enum:
- mediatek,mt8192_mt6359_rt1015_rt5682
- mediatek,mt8192_mt6359_rt1015p_rt5682
mediatek,platform:
$ref: "/schemas/types.yaml#/definitions/phandle"
description: The phandle of MT8192 ASoC platform.
additionalProperties: false
required:
- compatible
- mediatek,platform
examples:
- |
sound: mt8192-sound {
compatible = "mediatek,mt8192_mt6359_rt1015_rt5682";
mediatek,platform = <&afe>;
pinctrl-names = "aud_clk_mosi_off",
"aud_clk_mosi_on";
pinctrl-0 = <&aud_clk_mosi_off>;
pinctrl-1 = <&aud_clk_mosi_on>;
};
...
Nuvoton NAU8315 Mono Class-D Amplifier
Required properties:
- compatible : "nuvoton,nau8315"
Optional properties:
- enable-gpios : GPIO specifier for the chip's device enable input(EN) pin.
If this option is not specified then driver does not manage
the pin state (e.g. chip is always on).
Example:
#include <dt-bindings/gpio/gpio.h>
nau8315 {
compatible = "nuvoton,nau8315";
enable-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
};
NVIDIA Tegra30 HDA controller
Required properties:
- compatible : For Tegra30, must contain "nvidia,tegra30-hda". Otherwise,
must contain '"nvidia,<chip>-hda", "nvidia,tegra30-hda"', where <chip> is
tegra114, tegra124, or tegra132.
- reg : Should contain the HDA registers location and length.
- interrupts : The interrupt from the HDA controller.
- clocks : Must contain an entry for each required entry in clock-names.
See ../clocks/clock-bindings.txt for details.
- clock-names : Must include the following entries: hda, hda2hdmi, hda2codec_2x
- resets : Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names : Must include the following entries: hda, hda2hdmi, hda2codec_2x
Optional properties:
- nvidia,model : The user-visible name of this sound complex. Since the property
is optional, legacy boards can use default name provided in hda driver.
Example:
hda@70030000 {
compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
reg = <0x0 0x70030000 0x0 0x10000>;
interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_HDA>,
<&tegra_car TEGRA124_CLK_HDA2HDMI>,
<&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
clock-names = "hda", "hda2hdmi", "hda2codec_2x";
resets = <&tegra_car 125>, /* hda */
<&tegra_car 128>, /* hda2hdmi */
<&tegra_car 111>; /* hda2codec_2x */
reset-names = "hda", "hda2hdmi", "hda2codec_2x";
nvidia,model = "jetson-tk1-hda";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra30-hda.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVIDIA Tegra HDA controller
description: |
The High Definition Audio (HDA) block provides a serial interface to
audio codec. It supports multiple input and output streams.
maintainers:
- Thierry Reding <treding@nvidia.com>
- Jon Hunter <jonathanh@nvidia.com>
properties:
$nodename:
pattern: "^hda@[0-9a-f]*$"
compatible:
oneOf:
- const: nvidia,tegra30-hda
- items:
- enum:
- nvidia,tegra194-hda
- nvidia,tegra186-hda
- nvidia,tegra210-hda
- nvidia,tegra124-hda
- const: nvidia,tegra30-hda
- items:
- const: nvidia,tegra132-hda
- const: nvidia,tegra124-hda
- const: nvidia,tegra30-hda
reg:
maxItems: 1
interrupts:
description: The interrupt from the HDA controller
maxItems: 1
clocks:
maxItems: 3
clock-names:
maxItems: 3
items:
- const: hda
- const: hda2hdmi
- const: hda2codec_2x
resets:
maxItems: 3
reset-names:
maxItems: 3
items:
- const: hda
- const: hda2hdmi
- const: hda2codec_2x
power-domains:
maxItems: 1
interconnects:
maxItems: 2
interconnect-names:
items:
- const: dma-mem
- const: write
iommus:
maxItems: 1
nvidia,model:
$ref: /schemas/types.yaml#/definitions/string
description: |
The user-visible name of this sound complex. If this property is
not specified then boards can use default name provided in hda driver.
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include<dt-bindings/clock/tegra124-car-common.h>
#include<dt-bindings/interrupt-controller/arm-gic.h>
hda@70030000 {
compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
reg = <0x70030000 0x10000>;
interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&tegra_car TEGRA124_CLK_HDA>,
<&tegra_car TEGRA124_CLK_HDA2HDMI>,
<&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
clock-names = "hda", "hda2hdmi", "hda2codec_2x";
resets = <&tegra_car 125>, /* hda */
<&tegra_car 128>, /* hda2hdmi */
<&tegra_car 111>; /* hda2codec_2x */
reset-names = "hda", "hda2hdmi", "hda2codec_2x";
nvidia,model = "jetson-tk1-hda";
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,lpass-va-macro.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LPASS(Low Power Audio Subsystem) VA Macro audio codec DT bindings
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
properties:
compatible:
const: qcom,sm8250-lpass-va-macro
reg:
maxItems: 1
"#sound-dai-cells":
const: 1
'#clock-cells':
const: 0
clocks:
maxItems: 3
clock-names:
items:
- const: mclk
- const: core
- const: dcodec
clock-output-names:
items:
- const: fsgen
qcom,dmic-sample-rate:
description: dmic sample rate
$ref: /schemas/types.yaml#/definitions/uint32
vdd-micb-supply:
description: phandle to voltage regulator of MIC Bias
required:
- compatible
- reg
- "#sound-dai-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/sound/qcom,q6afe.h>
codec@3370000 {
compatible = "qcom,sm8250-lpass-va-macro";
reg = <0x3370000 0x1000>;
#sound-dai-cells = <1>;
#clock-cells = <0>;
clocks = <&aoncc 0>,
<&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
clock-names = "mclk", "core", "dcodec";
clock-output-names = "fsgen";
qcom,dmic-sample-rate = <600000>;
vdd-micb-supply = <&vreg_s4a_1p8>;
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,lpass-wsa-macro.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LPASS(Low Power Audio Subsystem) VA Macro audio codec DT bindings
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
properties:
compatible:
const: qcom,sm8250-lpass-wsa-macro
reg:
maxItems: 1
"#sound-dai-cells":
const: 1
'#clock-cells':
const: 0
clocks:
maxItems: 5
clock-names:
items:
- const: mclk
- const: npl
- const: macro
- const: dcodec
- const: fsgen
clock-output-names:
items:
- const: mclk
qcom,dmic-sample-rate:
description: dmic sample rate
$ref: /schemas/types.yaml#/definitions/uint32
vdd-micb-supply:
description: phandle to voltage regulator of MIC Bias
required:
- compatible
- reg
- "#sound-dai-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/sound/qcom,q6afe.h>
codec@3240000 {
compatible = "qcom,sm8250-lpass-wsa-macro";
reg = <0x3240000 0x1000>;
#sound-dai-cells = <1>;
#clock-cells = <0>;
clocks = <&audiocc 1>,
<&audiocc 0>,
<&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
<&vamacro>;
clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
clock-output-names = "mclk";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,sm8250.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Technologies Inc. SM8250 ASoC sound card driver
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description:
This bindings describes SC8250 SoC based sound cards
which uses LPASS internal codec for audio.
properties:
compatible:
oneOf:
- const: qcom,sm8250-sndcard
- const: qcom,qrb5165-rb5-sndcard
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. Valid names could be power supplies,
MicBias of codec and the jacks on the board.
model:
$ref: /schemas/types.yaml#/definitions/string
description: User visible long sound card name
patternProperties:
".*-dai-link$":
description:
Each subnode represents a dai link. Subnodes of each dai links would be
cpu/codec dais.
type: object
properties:
link-name:
description: Indicates dai-link name and PCM stream name.
$ref: /schemas/types.yaml#/definitions/string
maxItems: 1
cpu:
description: Holds subnode which indicates cpu dai.
type: object
properties:
sound-dai: true
platform:
description: Holds subnode which indicates platform dai.
type: object
properties:
sound-dai: true
codec:
description: Holds subnode which indicates codec dai.
type: object
properties:
sound-dai: true
required:
- link-name
- cpu
additionalProperties: false
required:
- compatible
- model
additionalProperties: false
examples:
- |
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
sound {
compatible = "qcom,qrb5165-rb5-sndcard";
model = "Qualcomm-qrb5165-RB5-WSA8815-Speakers-DMIC0";
audio-routing = "SpkrLeft IN", "WSA_SPK1 OUT",
"SpkrRight IN", "WSA_SPK2 OUT",
"VA DMIC0", "vdd-micb",
"VA DMIC1", "vdd-micb",
"MM_DL1", "MultiMedia1 Playback",
"MM_DL2", "MultiMedia2 Playback",
"MultiMedia3 Capture", "MM_UL3";
mm1-dai-link {
link-name = "MultiMedia0";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};
mm2-dai-link {
link-name = "MultiMedia2";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
};
};
mm3-dai-link {
link-name = "MultiMedia3";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
};
};
hdmi-dai-link {
link-name = "HDMI Playback";
cpu {
sound-dai = <&q6afedai TERTIARY_MI2S_RX>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&lt9611_codec 0>;
};
};
wsa-dai-link {
link-name = "WSA Playback";
cpu {
sound-dai = <&q6afedai WSA_CODEC_DMA_RX_0>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro>;
};
};
va-dai-link {
link-name = "VA Capture";
cpu {
sound-dai = <&q6afedai VA_CODEC_DMA_TX_0>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&vamacro 0>;
};
};
};
This diff is collapsed.
...@@ -44,6 +44,8 @@ Optional properties: ...@@ -44,6 +44,8 @@ Optional properties:
- realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of - realtek,dmic-delay-ms : Set the delay time (ms) for the requirement of
the particular DMIC. the particular DMIC.
- realtek,dmic-clk-driving-high : Set the high drving of the DMIC clock out.
Pins on the device (for linking into audio routes) for RT5682: Pins on the device (for linking into audio routes) for RT5682:
* DMIC L1 * DMIC L1
......
# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/simple-audio-mux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Simple Audio Multiplexer
maintainers:
- Alexandre Belloni <aleandre.belloni@bootlin.com>
description: |
Simple audio multiplexers are driven using gpios, allowing to select which of
their input line is connected to the output line.
properties:
compatible:
const: simple-audio-mux
mux-gpios:
description: |
GPIOs used to select the input line.
sound-name-prefix:
$ref: /schemas/types.yaml#/definitions/string
description:
Used as prefix for sink/source names of the component. Must be a
unique string among multiple instances of the same component.
required:
- compatible
- mux-gpios
additionalProperties: false
examples:
- |
mux {
compatible = "simple-audio-mux";
mux-gpios = <&gpio 3 0>;
};
...@@ -13,13 +13,11 @@ definitions: ...@@ -13,13 +13,11 @@ definitions:
frame-master: frame-master:
description: Indicates dai-link frame master. description: Indicates dai-link frame master.
$ref: /schemas/types.yaml#/definitions/phandle-array $ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
bitclock-master: bitclock-master:
description: Indicates dai-link bit clock master description: Indicates dai-link bit clock master
$ref: /schemas/types.yaml#/definitions/phandle-array $ref: /schemas/types.yaml#/definitions/phandle
maxItems: 1
frame-inversion: frame-inversion:
description: dai-link uses frame clock inversion description: dai-link uses frame clock inversion
......
STMicroelectronics Audio Digital Filter Sigma Delta modulators(DFSDM)
The DFSDM allows PDM microphones capture through SPI interface. The Audio
interface is seems as a sub block of the DFSDM device.
For details on DFSDM bindings refer to ../iio/adc/st,stm32-dfsdm-adc.txt
Required properties:
- compatible: "st,stm32h7-dfsdm-dai".
- #sound-dai-cells : Must be equal to 0
- io-channels : phandle to iio dfsdm instance node.
Example of a sound card using audio DFSDM node.
sound_card {
compatible = "audio-graph-card";
dais = <&cpu_port>;
};
dfsdm: dfsdm@40017000 {
compatible = "st,stm32h7-dfsdm";
reg = <0x40017000 0x400>;
clocks = <&rcc DFSDM1_CK>;
clock-names = "dfsdm";
#interrupt-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
dfsdm_adc0: filter@0 {
compatible = "st,stm32-dfsdm-dmic";
reg = <0>;
interrupts = <110>;
dmas = <&dmamux1 101 0x400 0x00>;
dma-names = "rx";
st,adc-channels = <1>;
st,adc-channel-names = "dmic0";
st,adc-channel-types = "SPI_R";
st,adc-channel-clk-src = "CLKOUT";
st,filter-order = <5>;
dfsdm_dai0: dfsdm-dai {
compatible = "st,stm32h7-dfsdm-dai";
#sound-dai-cells = <0>;
io-channels = <&dfsdm_adc0 0>;
cpu_port: port {
dfsdm_endpoint: endpoint {
remote-endpoint = <&dmic0_endpoint>;
};
};
};
};
dmic0: dmic@0 {
compatible = "dmic-codec";
#sound-dai-cells = <0>;
port {
dmic0_endpoint: endpoint {
remote-endpoint = <&dfsdm_endpoint>;
};
};
};
STMicroelectronics STM32 Serial Audio Interface (SAI).
The SAI interface (Serial Audio Interface) offers a wide set of audio protocols
as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97.
The SAI contains two independent audio sub-blocks. Each sub-block has
its own clock generator and I/O lines controller.
Required properties:
- compatible: Should be "st,stm32f4-sai" or "st,stm32h7-sai"
- reg: Base address and size of SAI common register set.
- clocks: Must contain phandle and clock specifier pairs for each entry
in clock-names.
- clock-names: Must contain "pclk" "x8k" and "x11k"
"pclk": Clock which feeds the peripheral bus interface.
Mandatory for "st,stm32h7-sai" compatible.
Not used for "st,stm32f4-sai" compatible.
"x8k": SAI parent clock for sampling rates multiple of 8kHz.
"x11k": SAI parent clock for sampling rates multiple of 11.025kHz.
- interrupts: cpu DAI interrupt line shared by SAI sub-blocks
Optional properties:
- resets: Reference to a reset controller asserting the SAI
SAI subnodes:
Two subnodes corresponding to SAI sub-block instances A et B can be defined.
Subnode can be omitted for unsused sub-block.
SAI subnodes required properties:
- compatible: Should be "st,stm32-sai-sub-a" or "st,stm32-sai-sub-b"
for SAI sub-block A or B respectively.
- reg: Base address and size of SAI sub-block register set.
- clocks: Must contain one phandle and clock specifier pair
for sai_ck which feeds the internal clock generator.
If the SAI shares a master clock, with another SAI set as MCLK
clock provider, SAI provider phandle must be specified here.
- clock-names: Must contain "sai_ck".
Must also contain "MCLK", if SAI shares a master clock,
with a SAI set as MCLK clock provider.
- dmas: see Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
- dma-names: identifier string for each DMA request line
"tx": if sai sub-block is configured as playback DAI
"rx": if sai sub-block is configured as capture DAI
- pinctrl-names: should contain only value "default"
- pinctrl-0: see Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
SAI subnodes Optional properties:
- st,sync: specify synchronization mode.
By default SAI sub-block is in asynchronous mode.
This property sets SAI sub-block as slave of another SAI sub-block.
Must contain the phandle and index of the sai sub-block providing
the synchronization.
- st,iec60958: support S/PDIF IEC6958 protocol for playback
IEC60958 protocol is not available for capture.
By default, custom protocol is assumed, meaning that protocol is
configured according to protocol defined in related DAI link node,
such as i2s, left justified, right justified, dsp and pdm protocols.
Note: ac97 protocol is not supported by SAI driver
- #clock-cells: should be 0. This property must be present if the SAI device
is a master clock provider, according to clocks bindings, described in
Documentation/devicetree/bindings/clock/clock-bindings.txt.
The device node should contain one 'port' child node with one child 'endpoint'
node, according to the bindings defined in Documentation/devicetree/bindings/
graph.txt.
Example:
sound_card {
compatible = "audio-graph-card";
dais = <&sai1b_port>;
};
sai1: sai1@40015800 {
compatible = "st,stm32h7-sai";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x40015800 0x400>;
reg = <0x40015800 0x4>;
clocks = <&rcc SAI1_CK>, <&rcc PLL1_Q>, <&rcc PLL2_P>;
clock-names = "pclk", "x8k", "x11k";
interrupts = <87>;
sai1a: audio-controller@40015804 {
compatible = "st,stm32-sai-sub-a";
reg = <0x4 0x1C>;
clocks = <&rcc SAI1_CK>;
clock-names = "sai_ck";
dmas = <&dmamux1 1 87 0x400 0x0>;
dma-names = "tx";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai1a>;
sai1b_port: port {
cpu_endpoint: endpoint {
remote-endpoint = <&codec_endpoint>;
format = "i2s";
};
};
};
};
audio-codec {
codec_port: port {
codec_endpoint: endpoint {
remote-endpoint = <&cpu_endpoint>;
};
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/st,stm32-sai.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: STMicroelectronics STM32 Serial Audio Interface (SAI)
maintainers:
- Olivier Moysan <olivier.moysan@st.com>
description:
The SAI interface (Serial Audio Interface) offers a wide set of audio
protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97.
The SAI contains two independent audio sub-blocks. Each sub-block has
its own clock generator and I/O lines controller.
properties:
compatible:
enum:
- st,stm32f4-sai
- st,stm32h7-sai
reg:
items:
- description: Base address and size of SAI common register set.
- description: Base address and size of SAI identification register set.
minItems: 1
maxItems: 2
ranges:
maxItems: 1
interrupts:
maxItems: 1
resets:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 1
clocks:
maxItems: 3
clock-names:
maxItems: 3
required:
- compatible
- reg
- ranges
- "#address-cells"
- "#size-cells"
- clocks
- clock-names
patternProperties:
"^audio-controller@[0-9a-f]+$":
type: object
description:
Two subnodes corresponding to SAI sub-block instances A et B
can be defined. Subnode can be omitted for unsused sub-block.
properties:
compatible:
description: Compatible for SAI sub-block A or B.
pattern: "st,stm32-sai-sub-[ab]"
"#sound-dai-cells":
const: 0
reg:
maxItems: 1
clocks:
items:
- description: sai_ck clock feeding the internal clock generator.
- description: MCLK clock from a SAI set as master clock provider.
minItems: 1
maxItems: 2
clock-names:
items:
- const: sai_ck
- const: MCLK
minItems: 1
maxItems: 2
dmas:
maxItems: 1
dma-names:
description: |
rx: SAI sub-block is configured as a capture DAI.
tx: SAI sub-block is configured as a playback DAI.
enum: [ rx, tx ]
st,sync:
description:
Configure the SAI sub-block as slave of another SAI sub-block.
By default SAI sub-block is in asynchronous mode.
Must contain the phandle and index of the SAI sub-block providing
the synchronization.
allOf:
- $ref: /schemas/types.yaml#definitions/phandle-array
- maxItems: 1
st,iec60958:
description:
If set, support S/PDIF IEC6958 protocol for playback.
IEC60958 protocol is not available for capture.
By default, custom protocol is assumed, meaning that protocol is
configured according to protocol defined in related DAI link node,
such as i2s, left justified, right justified, dsp and pdm protocols.
allOf:
- $ref: /schemas/types.yaml#definitions/flag
"#clock-cells":
description: Configure the SAI device as master clock provider.
const: 0
required:
- compatible
- "#sound-dai-cells"
- reg
- clocks
- clock-names
- dmas
- dma-names
allOf:
- if:
properties:
compatible:
contains:
const: st,stm32f4-sai
- then:
properties:
clocks:
items:
- description: x8k, SAI parent clock for sampling rates multiple of 8kHz.
- description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz.
clock-names:
items:
- const: x8k
- const: x11k
- else:
properties:
clocks:
items:
- description: pclk feeds the peripheral bus interface.
- description: x8k, SAI parent clock for sampling rates multiple of 8kHz.
- description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz.
clock-names:
items:
- const: pclk
- const: x8k
- const: x11k
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/reset/stm32mp1-resets.h>
sai2: sai@4400b000 {
compatible = "st,stm32h7-sai";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x4400b000 0x400>;
reg = <0x4400b000 0x4>, <0x4400b3f0 0x10>;
clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>;
clock-names = "pclk", "x8k", "x11k";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&sai2a_pins_a>, <&sai2b_pins_b>;
pinctrl-1 = <&sai2a_sleep_pins_a>, <&sai2b_sleep_pins_b>;
status = "okay";
sai2a: audio-controller@4400b004 {
#sound-dai-cells = <0>;
compatible = "st,stm32-sai-sub-a";
reg = <0x4 0x1c>;
dmas = <&dmamux1 89 0x400 0x01>;
dma-names = "tx";
clocks = <&rcc SAI2_K>;
clock-names = "sai_ck";
status = "okay";
};
};
...
This diff is collapsed.
...@@ -72,6 +72,7 @@ available subsections can be seen below. ...@@ -72,6 +72,7 @@ available subsections can be seen below.
thermal/index thermal/index
fpga/index fpga/index
acpi/index acpi/index
auxiliary_bus
backlight/lp855x-driver.rst backlight/lp855x-driver.rst
connector connector
console console
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
menu "Generic Driver Options" menu "Generic Driver Options"
config AUXILIARY_BUS
bool
config UEVENT_HELPER config UEVENT_HELPER
bool "Support for uevent helper" bool "Support for uevent helper"
help help
......
...@@ -7,6 +7,7 @@ obj-y := component.o core.o bus.o dd.o syscore.o \ ...@@ -7,6 +7,7 @@ obj-y := component.o core.o bus.o dd.o syscore.o \
attribute_container.o transport_class.o \ attribute_container.o transport_class.o \
topology.o container.o property.o cacheinfo.o \ topology.o container.o property.o cacheinfo.o \
swnode.o swnode.o
obj-$(CONFIG_AUXILIARY_BUS) += auxiliary.o
obj-$(CONFIG_DEVTMPFS) += devtmpfs.o obj-$(CONFIG_DEVTMPFS) += devtmpfs.o
obj-y += power/ obj-y += power/
obj-$(CONFIG_ISA_BUS_API) += isa.o obj-$(CONFIG_ISA_BUS_API) += isa.o
......
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2019-2020 Intel Corporation
*
* Please see Documentation/driver-api/auxiliary_bus.rst for more information.
*/
#define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__
#include <linux/device.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/pm_domain.h>
#include <linux/pm_runtime.h>
#include <linux/string.h>
#include <linux/auxiliary_bus.h>
static const struct auxiliary_device_id *auxiliary_match_id(const struct auxiliary_device_id *id,
const struct auxiliary_device *auxdev)
{
for (; id->name[0]; id++) {
const char *p = strrchr(dev_name(&auxdev->dev), '.');
int match_size;
if (!p)
continue;
match_size = p - dev_name(&auxdev->dev);
/* use dev_name(&auxdev->dev) prefix before last '.' char to match to */
if (strlen(id->name) == match_size &&
!strncmp(dev_name(&auxdev->dev), id->name, match_size))
return id;
}
return NULL;
}
static int auxiliary_match(struct device *dev, struct device_driver *drv)
{
struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
struct auxiliary_driver *auxdrv = to_auxiliary_drv(drv);
return !!auxiliary_match_id(auxdrv->id_table, auxdev);
}
static int auxiliary_uevent(struct device *dev, struct kobj_uevent_env *env)
{
const char *name, *p;
name = dev_name(dev);
p = strrchr(name, '.');
return add_uevent_var(env, "MODALIAS=%s%.*s", AUXILIARY_MODULE_PREFIX,
(int)(p - name), name);
}
static const struct dev_pm_ops auxiliary_dev_pm_ops = {
SET_RUNTIME_PM_OPS(pm_generic_runtime_suspend, pm_generic_runtime_resume, NULL)
SET_SYSTEM_SLEEP_PM_OPS(pm_generic_suspend, pm_generic_resume)
};
static int auxiliary_bus_probe(struct device *dev)
{
struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver);
struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
int ret;
ret = dev_pm_domain_attach(dev, true);
if (ret) {
dev_warn(dev, "Failed to attach to PM Domain : %d\n", ret);
return ret;
}
ret = auxdrv->probe(auxdev, auxiliary_match_id(auxdrv->id_table, auxdev));
if (ret)
dev_pm_domain_detach(dev, true);
return ret;
}
static int auxiliary_bus_remove(struct device *dev)
{
struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver);
struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
if (auxdrv->remove)
auxdrv->remove(auxdev);
dev_pm_domain_detach(dev, true);
return 0;
}
static void auxiliary_bus_shutdown(struct device *dev)
{
struct auxiliary_driver *auxdrv = to_auxiliary_drv(dev->driver);
struct auxiliary_device *auxdev = to_auxiliary_dev(dev);
if (auxdrv->shutdown)
auxdrv->shutdown(auxdev);
}
static struct bus_type auxiliary_bus_type = {
.name = "auxiliary",
.probe = auxiliary_bus_probe,
.remove = auxiliary_bus_remove,
.shutdown = auxiliary_bus_shutdown,
.match = auxiliary_match,
.uevent = auxiliary_uevent,
.pm = &auxiliary_dev_pm_ops,
};
/**
* auxiliary_device_init - check auxiliary_device and initialize
* @auxdev: auxiliary device struct
*
* This is the first step in the two-step process to register an
* auxiliary_device.
*
* When this function returns an error code, then the device_initialize will
* *not* have been performed, and the caller will be responsible to free any
* memory allocated for the auxiliary_device in the error path directly.
*
* It returns 0 on success. On success, the device_initialize has been
* performed. After this point any error unwinding will need to include a call
* to auxiliary_device_uninit(). In this post-initialize error scenario, a call
* to the device's .release callback will be triggered, and all memory clean-up
* is expected to be handled there.
*/
int auxiliary_device_init(struct auxiliary_device *auxdev)
{
struct device *dev = &auxdev->dev;
if (!dev->parent) {
pr_err("auxiliary_device has a NULL dev->parent\n");
return -EINVAL;
}
if (!auxdev->name) {
pr_err("auxiliary_device has a NULL name\n");
return -EINVAL;
}
dev->bus = &auxiliary_bus_type;
device_initialize(&auxdev->dev);
return 0;
}
EXPORT_SYMBOL_GPL(auxiliary_device_init);
/**
* __auxiliary_device_add - add an auxiliary bus device
* @auxdev: auxiliary bus device to add to the bus
* @modname: name of the parent device's driver module
*
* This is the second step in the two-step process to register an
* auxiliary_device.
*
* This function must be called after a successful call to
* auxiliary_device_init(), which will perform the device_initialize. This
* means that if this returns an error code, then a call to
* auxiliary_device_uninit() must be performed so that the .release callback
* will be triggered to free the memory associated with the auxiliary_device.
*
* The expectation is that users will call the "auxiliary_device_add" macro so
* that the caller's KBUILD_MODNAME is automatically inserted for the modname
* parameter. Only if a user requires a custom name would this version be
* called directly.
*/
int __auxiliary_device_add(struct auxiliary_device *auxdev, const char *modname)
{
struct device *dev = &auxdev->dev;
int ret;
if (!modname) {
dev_err(dev, "auxiliary device modname is NULL\n");
return -EINVAL;
}
ret = dev_set_name(dev, "%s.%s.%d", modname, auxdev->name, auxdev->id);
if (ret) {
dev_err(dev, "auxiliary device dev_set_name failed: %d\n", ret);
return ret;
}
ret = device_add(dev);
if (ret)
dev_err(dev, "adding auxiliary device failed!: %d\n", ret);
return ret;
}
EXPORT_SYMBOL_GPL(__auxiliary_device_add);
/**
* auxiliary_find_device - auxiliary device iterator for locating a particular device.
* @start: Device to begin with
* @data: Data to pass to match function
* @match: Callback function to check device
*
* This function returns a reference to a device that is 'found'
* for later use, as determined by the @match callback.
*
* The callback should return 0 if the device doesn't match and non-zero
* if it does. If the callback returns non-zero, this function will
* return to the caller and not iterate over any more devices.
*/
struct auxiliary_device *auxiliary_find_device(struct device *start,
const void *data,
int (*match)(struct device *dev, const void *data))
{
struct device *dev;
dev = bus_find_device(&auxiliary_bus_type, start, data, match);
if (!dev)
return NULL;
return to_auxiliary_dev(dev);
}
EXPORT_SYMBOL_GPL(auxiliary_find_device);
/**
* __auxiliary_driver_register - register a driver for auxiliary bus devices
* @auxdrv: auxiliary_driver structure
* @owner: owning module/driver
* @modname: KBUILD_MODNAME for parent driver
*/
int __auxiliary_driver_register(struct auxiliary_driver *auxdrv,
struct module *owner, const char *modname)
{
if (WARN_ON(!auxdrv->probe) || WARN_ON(!auxdrv->id_table))
return -EINVAL;
if (auxdrv->name)
auxdrv->driver.name = kasprintf(GFP_KERNEL, "%s.%s", modname,
auxdrv->name);
else
auxdrv->driver.name = kasprintf(GFP_KERNEL, "%s", modname);
if (!auxdrv->driver.name)
return -ENOMEM;
auxdrv->driver.owner = owner;
auxdrv->driver.bus = &auxiliary_bus_type;
auxdrv->driver.mod_name = modname;
return driver_register(&auxdrv->driver);
}
EXPORT_SYMBOL_GPL(__auxiliary_driver_register);
/**
* auxiliary_driver_unregister - unregister a driver
* @auxdrv: auxiliary_driver structure
*/
void auxiliary_driver_unregister(struct auxiliary_driver *auxdrv)
{
driver_unregister(&auxdrv->driver);
kfree(auxdrv->driver.name);
}
EXPORT_SYMBOL_GPL(auxiliary_driver_unregister);
static int __init auxiliary_bus_init(void)
{
return bus_register(&auxiliary_bus_type);
}
static void __exit auxiliary_bus_exit(void)
{
bus_unregister(&auxiliary_bus_type);
}
module_init(auxiliary_bus_init);
module_exit(auxiliary_bus_exit);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("Auxiliary Bus");
MODULE_AUTHOR("David Ertman <david.m.ertman@intel.com>");
MODULE_AUTHOR("Kiran Patil <kiran.patil@intel.com>");
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# subsystems should select the appropriate symbols. # subsystems should select the appropriate symbols.
config REGMAP config REGMAP
default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM) default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM)
select IRQ_DOMAIN if REGMAP_IRQ select IRQ_DOMAIN if REGMAP_IRQ
bool bool
...@@ -46,6 +46,10 @@ config REGMAP_SOUNDWIRE ...@@ -46,6 +46,10 @@ config REGMAP_SOUNDWIRE
tristate tristate
depends on SOUNDWIRE depends on SOUNDWIRE
config REGMAP_SOUNDWIRE_MBQ
tristate
depends on SOUNDWIRE
config REGMAP_SCCB config REGMAP_SCCB
tristate tristate
depends on I2C depends on I2C
......
...@@ -15,6 +15,7 @@ obj-$(CONFIG_REGMAP_MMIO) += regmap-mmio.o ...@@ -15,6 +15,7 @@ obj-$(CONFIG_REGMAP_MMIO) += regmap-mmio.o
obj-$(CONFIG_REGMAP_IRQ) += regmap-irq.o obj-$(CONFIG_REGMAP_IRQ) += regmap-irq.o
obj-$(CONFIG_REGMAP_W1) += regmap-w1.o obj-$(CONFIG_REGMAP_W1) += regmap-w1.o
obj-$(CONFIG_REGMAP_SOUNDWIRE) += regmap-sdw.o obj-$(CONFIG_REGMAP_SOUNDWIRE) += regmap-sdw.o
obj-$(CONFIG_REGMAP_SOUNDWIRE_MBQ) += regmap-sdw-mbq.o
obj-$(CONFIG_REGMAP_SCCB) += regmap-sccb.o obj-$(CONFIG_REGMAP_SCCB) += regmap-sccb.o
obj-$(CONFIG_REGMAP_I3C) += regmap-i3c.o obj-$(CONFIG_REGMAP_I3C) += regmap-i3c.o
obj-$(CONFIG_REGMAP_SPI_AVMM) += regmap-spi-avmm.o obj-$(CONFIG_REGMAP_SPI_AVMM) += regmap-spi-avmm.o
// SPDX-License-Identifier: GPL-2.0
// Copyright(c) 2020 Intel Corporation.
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_registers.h>
#include "internal.h"
static int regmap_sdw_mbq_write(void *context, unsigned int reg, unsigned int val)
{
struct device *dev = context;
struct sdw_slave *slave = dev_to_sdw_dev(dev);
int ret;
ret = sdw_write(slave, SDW_SDCA_MBQ_CTL(reg), (val >> 8) & 0xff);
if (ret < 0)
return ret;
return sdw_write(slave, reg, val & 0xff);
}
static int regmap_sdw_mbq_read(void *context, unsigned int reg, unsigned int *val)
{
struct device *dev = context;
struct sdw_slave *slave = dev_to_sdw_dev(dev);
int read0;
int read1;
read0 = sdw_read(slave, reg);
if (read0 < 0)
return read0;
read1 = sdw_read(slave, SDW_SDCA_MBQ_CTL(reg));
if (read1 < 0)
return read1;
*val = (read1 << 8) | read0;
return 0;
}
static struct regmap_bus regmap_sdw_mbq = {
.reg_read = regmap_sdw_mbq_read,
.reg_write = regmap_sdw_mbq_write,
.reg_format_endian_default = REGMAP_ENDIAN_LITTLE,
.val_format_endian_default = REGMAP_ENDIAN_LITTLE,
};
static int regmap_sdw_mbq_config_check(const struct regmap_config *config)
{
/* MBQ-based controls are only 16-bits for now */
if (config->val_bits != 16)
return -ENOTSUPP;
/* Registers are 32 bits wide */
if (config->reg_bits != 32)
return -ENOTSUPP;
if (config->pad_bits != 0)
return -ENOTSUPP;
return 0;
}
struct regmap *__regmap_init_sdw_mbq(struct sdw_slave *sdw,
const struct regmap_config *config,
struct lock_class_key *lock_key,
const char *lock_name)
{
int ret;
ret = regmap_sdw_mbq_config_check(config);
if (ret)
return ERR_PTR(ret);
return __regmap_init(&sdw->dev, &regmap_sdw_mbq,
&sdw->dev, config, lock_key, lock_name);
}
EXPORT_SYMBOL_GPL(__regmap_init_sdw_mbq);
struct regmap *__devm_regmap_init_sdw_mbq(struct sdw_slave *sdw,
const struct regmap_config *config,
struct lock_class_key *lock_key,
const char *lock_name)
{
int ret;
ret = regmap_sdw_mbq_config_check(config);
if (ret)
return ERR_PTR(ret);
return __devm_regmap_init(&sdw->dev, &regmap_sdw_mbq,
&sdw->dev, config, lock_key, lock_name);
}
EXPORT_SYMBOL_GPL(__devm_regmap_init_sdw_mbq);
MODULE_DESCRIPTION("Regmap SoundWire MBQ Module");
MODULE_LICENSE("GPL v2");
...@@ -1424,6 +1424,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1424,6 +1424,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
int port_num, stat, ret, count = 0; int port_num, stat, ret, count = 0;
unsigned long port; unsigned long port;
bool slave_notify = false; bool slave_notify = false;
u8 sdca_cascade = 0;
u8 buf, buf2[2], _buf, _buf2[2]; u8 buf, buf2[2], _buf, _buf2[2];
bool parity_check; bool parity_check;
bool parity_quirk; bool parity_quirk;
...@@ -1453,6 +1454,16 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1453,6 +1454,16 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
goto io_err; goto io_err;
} }
if (slave->prop.is_sdca) {
ret = sdw_read(slave, SDW_DP0_INT);
if (ret < 0) {
dev_err(slave->bus->dev,
"SDW_DP0_INT read failed:%d\n", ret);
goto io_err;
}
sdca_cascade = ret & SDW_DP0_SDCA_CASCADE;
}
do { do {
/* /*
* Check parity, bus clash and Slave (impl defined) * Check parity, bus clash and Slave (impl defined)
...@@ -1489,6 +1500,10 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1489,6 +1500,10 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
clear |= SDW_SCP_INT1_IMPL_DEF; clear |= SDW_SCP_INT1_IMPL_DEF;
} }
/* the SDCA interrupts are cleared in the codec driver .interrupt_callback() */
if (sdca_cascade)
slave_notify = true;
/* Check port 0 - 3 interrupts */ /* Check port 0 - 3 interrupts */
port = buf & SDW_SCP_INT1_PORT0_3; port = buf & SDW_SCP_INT1_PORT0_3;
...@@ -1526,6 +1541,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1526,6 +1541,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
/* Update the Slave driver */ /* Update the Slave driver */
if (slave_notify && slave->ops && if (slave_notify && slave->ops &&
slave->ops->interrupt_callback) { slave->ops->interrupt_callback) {
slave_intr.sdca_cascade = sdca_cascade;
slave_intr.control_port = clear; slave_intr.control_port = clear;
memcpy(slave_intr.port, &port_status, memcpy(slave_intr.port, &port_status,
sizeof(slave_intr.port)); sizeof(slave_intr.port));
...@@ -1563,11 +1579,21 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) ...@@ -1563,11 +1579,21 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
goto io_err; goto io_err;
} }
if (slave->prop.is_sdca) {
ret = sdw_read(slave, SDW_DP0_INT);
if (ret < 0) {
dev_err(slave->bus->dev,
"SDW_DP0_INT read failed:%d\n", ret);
goto io_err;
}
sdca_cascade = ret & SDW_DP0_SDCA_CASCADE;
}
/* Make sure no interrupts are pending */ /* Make sure no interrupts are pending */
buf &= _buf; buf &= _buf;
buf2[0] &= _buf2[0]; buf2[0] &= _buf2[0];
buf2[1] &= _buf2[1]; buf2[1] &= _buf2[1];
stat = buf || buf2[0] || buf2[1]; stat = buf || buf2[0] || buf2[1] || sdca_cascade;
/* /*
* Exit loop if Slave is continuously in ALERT state even * Exit loop if Slave is continuously in ALERT state even
......
...@@ -37,6 +37,7 @@ static int field##_attribute_alloc(struct device *dev, \ ...@@ -37,6 +37,7 @@ static int field##_attribute_alloc(struct device *dev, \
return -ENOMEM; \ return -ENOMEM; \
dpn_attr->N = N; \ dpn_attr->N = N; \
dpn_attr->dir = dir; \ dpn_attr->dir = dir; \
sysfs_attr_init(&dpn_attr->dev_attr.attr); \
dpn_attr->format_string = format_string; \ dpn_attr->format_string = format_string; \
dpn_attr->dev_attr.attr.name = __stringify(field); \ dpn_attr->dev_attr.attr.name = __stringify(field); \
dpn_attr->dev_attr.attr.mode = 0444; \ dpn_attr->dev_attr.attr.mode = 0444; \
......
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __DT_BINDINGS_ADI_ADAU1977_H__
#define __DT_BINDINGS_ADI_ADAU1977_H__
#define ADAU1977_MICBIAS_5V0 0x0
#define ADAU1977_MICBIAS_5V5 0x1
#define ADAU1977_MICBIAS_6V0 0x2
#define ADAU1977_MICBIAS_6V5 0x3
#define ADAU1977_MICBIAS_7V0 0x4
#define ADAU1977_MICBIAS_7V5 0x5
#define ADAU1977_MICBIAS_8V0 0x6
#define ADAU1977_MICBIAS_8V5 0x7
#define ADAU1977_MICBIAS_9V0 0x8
#endif /* __DT_BINDINGS_ADI_ADAU1977_H__ */
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2019-2020 Intel Corporation
*
* Please see Documentation/driver-api/auxiliary_bus.rst for more information.
*/
#ifndef _AUXILIARY_BUS_H_
#define _AUXILIARY_BUS_H_
#include <linux/device.h>
#include <linux/mod_devicetable.h>
struct auxiliary_device {
struct device dev;
const char *name;
u32 id;
};
struct auxiliary_driver {
int (*probe)(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id);
void (*remove)(struct auxiliary_device *auxdev);
void (*shutdown)(struct auxiliary_device *auxdev);
int (*suspend)(struct auxiliary_device *auxdev, pm_message_t state);
int (*resume)(struct auxiliary_device *auxdev);
const char *name;
struct device_driver driver;
const struct auxiliary_device_id *id_table;
};
static inline struct auxiliary_device *to_auxiliary_dev(struct device *dev)
{
return container_of(dev, struct auxiliary_device, dev);
}
static inline struct auxiliary_driver *to_auxiliary_drv(struct device_driver *drv)
{
return container_of(drv, struct auxiliary_driver, driver);
}
int auxiliary_device_init(struct auxiliary_device *auxdev);
int __auxiliary_device_add(struct auxiliary_device *auxdev, const char *modname);
#define auxiliary_device_add(auxdev) __auxiliary_device_add(auxdev, KBUILD_MODNAME)
static inline void auxiliary_device_uninit(struct auxiliary_device *auxdev)
{
put_device(&auxdev->dev);
}
static inline void auxiliary_device_delete(struct auxiliary_device *auxdev)
{
device_del(&auxdev->dev);
}
int __auxiliary_driver_register(struct auxiliary_driver *auxdrv, struct module *owner,
const char *modname);
#define auxiliary_driver_register(auxdrv) \
__auxiliary_driver_register(auxdrv, THIS_MODULE, KBUILD_MODNAME)
void auxiliary_driver_unregister(struct auxiliary_driver *auxdrv);
/**
* module_auxiliary_driver() - Helper macro for registering an auxiliary driver
* @__auxiliary_driver: auxiliary driver struct
*
* Helper macro for auxiliary drivers which do not do anything special in
* module init/exit. This eliminates a lot of boilerplate. Each module may only
* use this macro once, and calling it replaces module_init() and module_exit()
*/
#define module_auxiliary_driver(__auxiliary_driver) \
module_driver(__auxiliary_driver, auxiliary_driver_register, auxiliary_driver_unregister)
struct auxiliary_device *auxiliary_find_device(struct device *start,
const void *data,
int (*match)(struct device *dev, const void *data));
#endif /* _AUXILIARY_BUS_H_ */
...@@ -838,4 +838,12 @@ struct mhi_device_id { ...@@ -838,4 +838,12 @@ struct mhi_device_id {
kernel_ulong_t driver_data; kernel_ulong_t driver_data;
}; };
#define AUXILIARY_NAME_SIZE 32
#define AUXILIARY_MODULE_PREFIX "auxiliary:"
struct auxiliary_device_id {
char name[AUXILIARY_NAME_SIZE];
kernel_ulong_t driver_data;
};
#endif /* LINUX_MOD_DEVICETABLE_H */ #endif /* LINUX_MOD_DEVICETABLE_H */
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* ADAU1977/ADAU1978/ADAU1979 driver
*
* Copyright 2014 Analog Devices Inc.
* Author: Lars-Peter Clausen <lars@metafoo.de>
*/
#ifndef __LINUX_PLATFORM_DATA_ADAU1977_H__
#define __LINUX_PLATFORM_DATA_ADAU1977_H__
/**
* enum adau1977_micbias - ADAU1977 MICBIAS pin voltage setting
* @ADAU1977_MICBIAS_5V0: MICBIAS is set to 5.0 V
* @ADAU1977_MICBIAS_5V5: MICBIAS is set to 5.5 V
* @ADAU1977_MICBIAS_6V0: MICBIAS is set to 6.0 V
* @ADAU1977_MICBIAS_6V5: MICBIAS is set to 6.5 V
* @ADAU1977_MICBIAS_7V0: MICBIAS is set to 7.0 V
* @ADAU1977_MICBIAS_7V5: MICBIAS is set to 7.5 V
* @ADAU1977_MICBIAS_8V0: MICBIAS is set to 8.0 V
* @ADAU1977_MICBIAS_8V5: MICBIAS is set to 8.5 V
* @ADAU1977_MICBIAS_9V0: MICBIAS is set to 9.0 V
*/
enum adau1977_micbias {
ADAU1977_MICBIAS_5V0 = 0x0,
ADAU1977_MICBIAS_5V5 = 0x1,
ADAU1977_MICBIAS_6V0 = 0x2,
ADAU1977_MICBIAS_6V5 = 0x3,
ADAU1977_MICBIAS_7V0 = 0x4,
ADAU1977_MICBIAS_7V5 = 0x5,
ADAU1977_MICBIAS_8V0 = 0x6,
ADAU1977_MICBIAS_8V5 = 0x7,
ADAU1977_MICBIAS_9V0 = 0x8,
};
/**
* struct adau1977_platform_data - Platform configuration data for the ADAU1977
* @micbias: Specifies the voltage for the MICBIAS pin
*/
struct adau1977_platform_data {
enum adau1977_micbias micbias;
};
#endif
...@@ -570,6 +570,10 @@ struct regmap *__regmap_init_sdw(struct sdw_slave *sdw, ...@@ -570,6 +570,10 @@ struct regmap *__regmap_init_sdw(struct sdw_slave *sdw,
const struct regmap_config *config, const struct regmap_config *config,
struct lock_class_key *lock_key, struct lock_class_key *lock_key,
const char *lock_name); const char *lock_name);
struct regmap *__regmap_init_sdw_mbq(struct sdw_slave *sdw,
const struct regmap_config *config,
struct lock_class_key *lock_key,
const char *lock_name);
struct regmap *__regmap_init_spi_avmm(struct spi_device *spi, struct regmap *__regmap_init_spi_avmm(struct spi_device *spi,
const struct regmap_config *config, const struct regmap_config *config,
struct lock_class_key *lock_key, struct lock_class_key *lock_key,
...@@ -619,6 +623,10 @@ struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw, ...@@ -619,6 +623,10 @@ struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw,
const struct regmap_config *config, const struct regmap_config *config,
struct lock_class_key *lock_key, struct lock_class_key *lock_key,
const char *lock_name); const char *lock_name);
struct regmap *__devm_regmap_init_sdw_mbq(struct sdw_slave *sdw,
const struct regmap_config *config,
struct lock_class_key *lock_key,
const char *lock_name);
struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus, struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
const struct regmap_config *config, const struct regmap_config *config,
struct lock_class_key *lock_key, struct lock_class_key *lock_key,
...@@ -817,6 +825,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); ...@@ -817,6 +825,19 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
__regmap_lockdep_wrapper(__regmap_init_sdw, #config, \ __regmap_lockdep_wrapper(__regmap_init_sdw, #config, \
sdw, config) sdw, config)
/**
* regmap_init_sdw_mbq() - Initialise register map
*
* @sdw: Device that will be interacted with
* @config: Configuration for register map
*
* The return value will be an ERR_PTR() on error or a valid pointer to
* a struct regmap.
*/
#define regmap_init_sdw_mbq(sdw, config) \
__regmap_lockdep_wrapper(__regmap_init_sdw_mbq, #config, \
sdw, config)
/** /**
* regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave * regmap_init_spi_avmm() - Initialize register map for Intel SPI Slave
* to AVMM Bus Bridge * to AVMM Bus Bridge
...@@ -989,6 +1010,20 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg); ...@@ -989,6 +1010,20 @@ bool regmap_ac97_default_volatile(struct device *dev, unsigned int reg);
__regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config, \ __regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config, \
sdw, config) sdw, config)
/**
* devm_regmap_init_sdw_mbq() - Initialise managed register map
*
* @sdw: Device that will be interacted with
* @config: Configuration for register map
*
* The return value will be an ERR_PTR() on error or a valid pointer
* to a struct regmap. The regmap will be automatically freed by the
* device management code.
*/
#define devm_regmap_init_sdw_mbq(sdw, config) \
__regmap_lockdep_wrapper(__devm_regmap_init_sdw_mbq, #config, \
sdw, config)
/** /**
* devm_regmap_init_slimbus() - Initialise managed register map * devm_regmap_init_slimbus() - Initialise managed register map
* *
......
...@@ -359,6 +359,7 @@ struct sdw_dpn_prop { ...@@ -359,6 +359,7 @@ struct sdw_dpn_prop {
* @sink_dpn_prop: Sink Data Port N properties * @sink_dpn_prop: Sink Data Port N properties
* @scp_int1_mask: SCP_INT1_MASK desired settings * @scp_int1_mask: SCP_INT1_MASK desired settings
* @quirks: bitmask identifying deltas from the MIPI specification * @quirks: bitmask identifying deltas from the MIPI specification
* @is_sdca: the Slave supports the SDCA specification
*/ */
struct sdw_slave_prop { struct sdw_slave_prop {
u32 mipi_revision; u32 mipi_revision;
...@@ -382,6 +383,7 @@ struct sdw_slave_prop { ...@@ -382,6 +383,7 @@ struct sdw_slave_prop {
struct sdw_dpn_prop *sink_dpn_prop; struct sdw_dpn_prop *sink_dpn_prop;
u8 scp_int1_mask; u8 scp_int1_mask;
u32 quirks; u32 quirks;
bool is_sdca;
}; };
#define SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY BIT(0) #define SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY BIT(0)
...@@ -479,10 +481,12 @@ struct sdw_slave_id { ...@@ -479,10 +481,12 @@ struct sdw_slave_id {
/** /**
* struct sdw_slave_intr_status - Slave interrupt status * struct sdw_slave_intr_status - Slave interrupt status
* @sdca_cascade: set if the Slave device reports an SDCA interrupt
* @control_port: control port status * @control_port: control port status
* @port: data port status * @port: data port status
*/ */
struct sdw_slave_intr_status { struct sdw_slave_intr_status {
bool sdca_cascade;
u8 control_port; u8 control_port;
u8 port[15]; u8 port[15];
}; };
......
...@@ -298,4 +298,36 @@ ...@@ -298,4 +298,36 @@
#define SDW_CASC_PORT_MASK_INTSTAT3 1 #define SDW_CASC_PORT_MASK_INTSTAT3 1
#define SDW_CASC_PORT_REG_OFFSET_INTSTAT3 2 #define SDW_CASC_PORT_REG_OFFSET_INTSTAT3 2
/*
* v1.2 device - SDCA address mapping
*
* Spec definition
* Bits Contents
* 31 0 (required by addressing range)
* 30:26 0b10000 (Control Prefix)
* 25 0 (Reserved)
* 24:22 Function Number [2:0]
* 21 Entity[6]
* 20:19 Control Selector[5:4]
* 18 0 (Reserved)
* 17:15 Control Number[5:3]
* 14 Next
* 13 MBQ
* 12:7 Entity[5:0]
* 6:3 Control Selector[3:0]
* 2:0 Control Number[2:0]
*/
#define SDW_SDCA_CTL(fun, ent, ctl, ch) (BIT(30) | \
(((fun) & 0x7) << 22) | \
(((ent) & 0x40) << 15) | \
(((ent) & 0x3f) << 7) | \
(((ctl) & 0x30) << 15) | \
(((ctl) & 0x0f) << 3) | \
(((ch) & 0x38) << 12) | \
((ch) & 0x07))
#define SDW_SDCA_MBQ_CTL(reg) ((reg) | BIT(13))
#define SDW_SDCA_NEXT_CTL(reg) ((reg) | BIT(14))
#endif /* __SDW_REGISTERS_H */ #endif /* __SDW_REGISTERS_H */
/* SPDX-License-Identifier: GPL-2.0
*
* ASoC audio graph card support
*
*/
#ifndef __GRAPH_CARD_H
#define __GRAPH_CARD_H
#include <sound/simple_card_utils.h>
int graph_card_probe(struct snd_soc_card *card);
int graph_parse_of(struct asoc_simple_priv *priv, struct device *dev);
#endif /* __GRAPH_CARD_H */
...@@ -21,6 +21,7 @@ enum { ...@@ -21,6 +21,7 @@ enum {
#if IS_ENABLED(CONFIG_SND_INTEL_DSP_CONFIG) #if IS_ENABLED(CONFIG_SND_INTEL_DSP_CONFIG)
int snd_intel_dsp_driver_probe(struct pci_dev *pci); int snd_intel_dsp_driver_probe(struct pci_dev *pci);
int snd_intel_acpi_dsp_driver_probe(struct device *dev, const u8 acpi_hid[ACPI_ID_LEN]);
#else #else
...@@ -29,6 +30,12 @@ static inline int snd_intel_dsp_driver_probe(struct pci_dev *pci) ...@@ -29,6 +30,12 @@ static inline int snd_intel_dsp_driver_probe(struct pci_dev *pci)
return SND_INTEL_DSP_DRIVER_ANY; return SND_INTEL_DSP_DRIVER_ANY;
} }
static inline
int snd_intel_acpi_dsp_driver_probe(struct device *dev, const u8 acpi_hid[ACPI_ID_LEN])
{
return SND_INTEL_DSP_DRIVER_ANY;
}
#endif #endif
#endif #endif
...@@ -40,6 +40,7 @@ struct rt5682_platform_data { ...@@ -40,6 +40,7 @@ struct rt5682_platform_data {
unsigned int btndet_delay; unsigned int btndet_delay;
unsigned int dmic_clk_rate; unsigned int dmic_clk_rate;
unsigned int dmic_delay; unsigned int dmic_delay;
bool dmic_clk_driving_high;
const char *dai_clk_names[RT5682_DAI_NUM_CLKS]; const char *dai_clk_names[RT5682_DAI_NUM_CLKS];
}; };
......
...@@ -56,6 +56,9 @@ struct asoc_simple_priv { ...@@ -56,6 +56,9 @@ struct asoc_simple_priv {
struct asoc_simple_dai *dais; struct asoc_simple_dai *dais;
struct snd_soc_codec_conf *codec_conf; struct snd_soc_codec_conf *codec_conf;
struct gpio_desc *pa_gpio; struct gpio_desc *pa_gpio;
const struct snd_soc_ops *ops;
unsigned int dpcm_selectable:1;
unsigned int force_dpcm:1;
}; };
#define simple_priv_to_card(priv) (&(priv)->snd_card) #define simple_priv_to_card(priv) (&(priv)->snd_card)
#define simple_priv_to_props(priv, i) ((priv)->dai_props + (i)) #define simple_priv_to_props(priv, i) ((priv)->dai_props + (i))
......
...@@ -29,12 +29,14 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[]; ...@@ -29,12 +29,14 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_ehl_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_jsl_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_sdw_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cfl_sdw_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cml_sdw_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_sdw_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_intel_tgl_sdw_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_sdw_machines[];
/* /*
* generic table used for HDA codec-based platforms, possibly with * generic table used for HDA codec-based platforms, possibly with
......
...@@ -171,4 +171,10 @@ struct snd_soc_acpi_codecs { ...@@ -171,4 +171,10 @@ struct snd_soc_acpi_codecs {
u8 codecs[SND_SOC_ACPI_MAX_CODECS][ACPI_ID_LEN]; u8 codecs[SND_SOC_ACPI_MAX_CODECS][ACPI_ID_LEN];
}; };
static inline bool snd_soc_acpi_sof_parent(struct device *dev)
{
return dev->parent && dev->parent->driver && dev->parent->driver->name &&
!strcmp(dev->parent->driver->name, "sof-audio-acpi");
}
#endif #endif
...@@ -220,6 +220,9 @@ struct snd_soc_component { ...@@ -220,6 +220,9 @@ struct snd_soc_component {
/* function mark */ /* function mark */
struct snd_pcm_substream *mark_module; struct snd_pcm_substream *mark_module;
struct snd_pcm_substream *mark_open; struct snd_pcm_substream *mark_open;
struct snd_pcm_substream *mark_hw_params;
struct snd_pcm_substream *mark_trigger;
struct snd_compr_stream *mark_compr_open;
void *mark_pm; void *mark_pm;
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
...@@ -443,6 +446,27 @@ int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component, ...@@ -443,6 +446,27 @@ int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component,
int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component, int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
struct of_phandle_args *args, struct of_phandle_args *args,
const char **dai_name); const char **dai_name);
int snd_soc_component_compr_open(struct snd_compr_stream *cstream);
void snd_soc_component_compr_free(struct snd_compr_stream *cstream,
int rollback);
int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd);
int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream,
struct snd_compr_params *params);
int snd_soc_component_compr_get_params(struct snd_compr_stream *cstream,
struct snd_codec *params);
int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream,
struct snd_compr_caps *caps);
int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream,
struct snd_compr_codec_caps *codec);
int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes);
int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream,
struct snd_compr_tstamp *tstamp);
int snd_soc_component_compr_copy(struct snd_compr_stream *cstream,
char __user *buf, size_t count);
int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);
int snd_soc_component_compr_get_metadata(struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);
int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream); int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream, int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
...@@ -459,12 +483,11 @@ int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd); ...@@ -459,12 +483,11 @@ int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd);
void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd); void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd);
int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream); int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream);
int snd_soc_pcm_component_hw_params(struct snd_pcm_substream *substream, int snd_soc_pcm_component_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_pcm_hw_params *params);
struct snd_soc_component **last);
void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream, void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_component *last); int rollback);
int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream, int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream,
int cmd); int cmd, int rollback);
int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd, int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd,
void *stream); void *stream);
void snd_soc_pcm_component_pm_runtime_put(struct snd_soc_pcm_runtime *rtd, void snd_soc_pcm_component_pm_runtime_put(struct snd_soc_pcm_runtime *rtd,
......
...@@ -72,21 +72,29 @@ struct snd_compr_stream; ...@@ -72,21 +72,29 @@ struct snd_compr_stream;
#define SND_SOC_DAIFMT_IB_IF (4 << 8) /* invert BCLK + FRM */ #define SND_SOC_DAIFMT_IB_IF (4 << 8) /* invert BCLK + FRM */
/* /*
* DAI hardware clock masters. * DAI hardware clock providers/consumers
* *
* This is wrt the codec, the inverse is true for the interface * This is wrt the codec, the inverse is true for the interface
* i.e. if the codec is clk and FRM master then the interface is * i.e. if the codec is clk and FRM provider then the interface is
* clk and frame secondary. * clk and frame consumer.
*/ */
#define SND_SOC_DAIFMT_CBM_CFM (1 << 12) /* codec clk & FRM master */ #define SND_SOC_DAIFMT_CBP_CFP (1 << 12) /* codec clk provider & frame provider */
#define SND_SOC_DAIFMT_CBS_CFM (2 << 12) /* codec clk secondary & FRM master */ #define SND_SOC_DAIFMT_CBC_CFP (2 << 12) /* codec clk consumer & frame provider */
#define SND_SOC_DAIFMT_CBM_CFS (3 << 12) /* codec clk master & frame secondary */ #define SND_SOC_DAIFMT_CBP_CFC (3 << 12) /* codec clk provider & frame consumer */
#define SND_SOC_DAIFMT_CBS_CFS (4 << 12) /* codec clk & FRM secondary */ #define SND_SOC_DAIFMT_CBC_CFC (4 << 12) /* codec clk consumer & frame follower */
/* previous definitions kept for backwards-compatibility, do not use in new contributions */
#define SND_SOC_DAIFMT_CBM_CFM SND_SOC_DAIFMT_CBP_CFP
#define SND_SOC_DAIFMT_CBS_CFM SND_SOC_DAIFMT_CBC_CFP
#define SND_SOC_DAIFMT_CBM_CFS SND_SOC_DAIFMT_CBP_CFC
#define SND_SOC_DAIFMT_CBS_CFS SND_SOC_DAIFMT_CBC_CFC
#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f #define SND_SOC_DAIFMT_FORMAT_MASK 0x000f
#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0 #define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0
#define SND_SOC_DAIFMT_INV_MASK 0x0f00 #define SND_SOC_DAIFMT_INV_MASK 0x0f00
#define SND_SOC_DAIFMT_MASTER_MASK 0xf000 #define SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK 0xf000
#define SND_SOC_DAIFMT_MASTER_MASK SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK
/* /*
* Master Clock Directions * Master Clock Directions
...@@ -149,7 +157,8 @@ int snd_soc_dai_hw_params(struct snd_soc_dai *dai, ...@@ -149,7 +157,8 @@ int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream, struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params); struct snd_pcm_hw_params *params);
void snd_soc_dai_hw_free(struct snd_soc_dai *dai, void snd_soc_dai_hw_free(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream); struct snd_pcm_substream *substream,
int rollback);
int snd_soc_dai_startup(struct snd_soc_dai *dai, int snd_soc_dai_startup(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream); struct snd_pcm_substream *substream);
void snd_soc_dai_shutdown(struct snd_soc_dai *dai, void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
...@@ -180,14 +189,16 @@ int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order); ...@@ -180,14 +189,16 @@ int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order);
int snd_soc_pcm_dai_remove(struct snd_soc_pcm_runtime *rtd, int order); int snd_soc_pcm_dai_remove(struct snd_soc_pcm_runtime *rtd, int order);
int snd_soc_pcm_dai_new(struct snd_soc_pcm_runtime *rtd); int snd_soc_pcm_dai_new(struct snd_soc_pcm_runtime *rtd);
int snd_soc_pcm_dai_prepare(struct snd_pcm_substream *substream); int snd_soc_pcm_dai_prepare(struct snd_pcm_substream *substream);
int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd); int snd_soc_pcm_dai_trigger(struct snd_pcm_substream *substream, int cmd,
int rollback);
int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream, int snd_soc_pcm_dai_bespoke_trigger(struct snd_pcm_substream *substream,
int cmd); int cmd);
int snd_soc_dai_compr_startup(struct snd_soc_dai *dai, int snd_soc_dai_compr_startup(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream); struct snd_compr_stream *cstream);
void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai, void snd_soc_dai_compr_shutdown(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream); struct snd_compr_stream *cstream,
int rollback);
int snd_soc_dai_compr_trigger(struct snd_soc_dai *dai, int snd_soc_dai_compr_trigger(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream, int cmd); struct snd_compr_stream *cstream, int cmd);
int snd_soc_dai_compr_set_params(struct snd_soc_dai *dai, int snd_soc_dai_compr_set_params(struct snd_soc_dai *dai,
...@@ -390,6 +401,9 @@ struct snd_soc_dai { ...@@ -390,6 +401,9 @@ struct snd_soc_dai {
/* function mark */ /* function mark */
struct snd_pcm_substream *mark_startup; struct snd_pcm_substream *mark_startup;
struct snd_pcm_substream *mark_hw_params;
struct snd_pcm_substream *mark_trigger;
struct snd_compr_stream *mark_compr_startup;
/* bit field */ /* bit field */
unsigned int probed:1; unsigned int probed:1;
......
/* SPDX-License-Identifier: GPL-2.0
*
* soc-jack.h
*
* Copyright (C) 2019 Renesas Electronics Corp.
* Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
*/
#ifndef __SOC_JACK_H
#define __SOC_JACK_H
/**
* struct snd_soc_jack_pin - Describes a pin to update based on jack detection
*
* @pin: name of the pin to update
* @mask: bits to check for in reported jack status
* @invert: if non-zero then pin is enabled when status is not reported
* @list: internal list entry
*/
struct snd_soc_jack_pin {
struct list_head list;
const char *pin;
int mask;
bool invert;
};
/**
* struct snd_soc_jack_zone - Describes voltage zones of jack detection
*
* @min_mv: start voltage in mv
* @max_mv: end voltage in mv
* @jack_type: type of jack that is expected for this voltage
* @debounce_time: debounce_time for jack, codec driver should wait for this
* duration before reading the adc for voltages
* @list: internal list entry
*/
struct snd_soc_jack_zone {
unsigned int min_mv;
unsigned int max_mv;
unsigned int jack_type;
unsigned int debounce_time;
struct list_head list;
};
/**
* struct snd_soc_jack_gpio - Describes a gpio pin for jack detection
*
* @gpio: legacy gpio number
* @idx: gpio descriptor index within the function of the GPIO
* consumer device
* @gpiod_dev: GPIO consumer device
* @name: gpio name. Also as connection ID for the GPIO consumer
* device function name lookup
* @report: value to report when jack detected
* @invert: report presence in low state
* @debounce_time: debounce time in ms
* @wake: enable as wake source
* @jack_status_check: callback function which overrides the detection
* to provide more complex checks (eg, reading an
* ADC).
*/
struct snd_soc_jack_gpio {
unsigned int gpio;
unsigned int idx;
struct device *gpiod_dev;
const char *name;
int report;
int invert;
int debounce_time;
bool wake;
/* private: */
struct snd_soc_jack *jack;
struct delayed_work work;
struct notifier_block pm_notifier;
struct gpio_desc *desc;
void *data;
/* public: */
int (*jack_status_check)(void *data);
};
struct snd_soc_jack {
struct mutex mutex;
struct snd_jack *jack;
struct snd_soc_card *card;
struct list_head pins;
int status;
struct blocking_notifier_head notifier;
struct list_head jack_zones;
};
/* Jack reporting */
void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask);
int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_pin *pins);
void snd_soc_jack_notifier_register(struct snd_soc_jack *jack,
struct notifier_block *nb);
void snd_soc_jack_notifier_unregister(struct snd_soc_jack *jack,
struct notifier_block *nb);
int snd_soc_jack_add_zones(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_zone *zones);
int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage);
#ifdef CONFIG_GPIOLIB
int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios);
int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
struct snd_soc_jack *jack,
int count, struct snd_soc_jack_gpio *gpios);
void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios);
#else
static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios)
{
return 0;
}
static inline int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
struct snd_soc_jack *jack,
int count,
struct snd_soc_jack_gpio *gpios)
{
return 0;
}
static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios)
{
}
#endif
#endif /* __SOC_JACK_H */
...@@ -19,11 +19,14 @@ void snd_soc_link_shutdown(struct snd_pcm_substream *substream, ...@@ -19,11 +19,14 @@ void snd_soc_link_shutdown(struct snd_pcm_substream *substream,
int snd_soc_link_prepare(struct snd_pcm_substream *substream); int snd_soc_link_prepare(struct snd_pcm_substream *substream);
int snd_soc_link_hw_params(struct snd_pcm_substream *substream, int snd_soc_link_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params); struct snd_pcm_hw_params *params);
void snd_soc_link_hw_free(struct snd_pcm_substream *substream); void snd_soc_link_hw_free(struct snd_pcm_substream *substream,
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd); int rollback);
int snd_soc_link_trigger(struct snd_pcm_substream *substream, int cmd,
int rollback);
int snd_soc_link_compr_startup(struct snd_compr_stream *cstream); int snd_soc_link_compr_startup(struct snd_compr_stream *cstream);
void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream); void snd_soc_link_compr_shutdown(struct snd_compr_stream *cstream,
int rollback);
int snd_soc_link_compr_set_params(struct snd_compr_stream *cstream); int snd_soc_link_compr_set_params(struct snd_compr_stream *cstream);
#endif /* __SOC_LINK_H */ #endif /* __SOC_LINK_H */
...@@ -31,9 +31,6 @@ struct snd_soc_dai_driver; ...@@ -31,9 +31,6 @@ struct snd_soc_dai_driver;
struct snd_soc_dai; struct snd_soc_dai;
struct snd_soc_dapm_route; struct snd_soc_dapm_route;
/* object scan be loaded and unloaded in groups with identfying indexes */
#define SND_SOC_TPLG_INDEX_ALL 0 /* ID that matches all FW objects */
/* dynamic object type */ /* dynamic object type */
enum snd_soc_dobj_type { enum snd_soc_dobj_type {
SND_SOC_DOBJ_NONE = 0, /* object is not dynamic */ SND_SOC_DOBJ_NONE = 0, /* object is not dynamic */
...@@ -181,14 +178,8 @@ static inline const void *snd_soc_tplg_get_data(struct snd_soc_tplg_hdr *hdr) ...@@ -181,14 +178,8 @@ static inline const void *snd_soc_tplg_get_data(struct snd_soc_tplg_hdr *hdr)
/* Dynamic Object loading and removal for component drivers */ /* Dynamic Object loading and removal for component drivers */
int snd_soc_tplg_component_load(struct snd_soc_component *comp, int snd_soc_tplg_component_load(struct snd_soc_component *comp,
struct snd_soc_tplg_ops *ops, const struct firmware *fw, struct snd_soc_tplg_ops *ops, const struct firmware *fw);
u32 index); int snd_soc_tplg_component_remove(struct snd_soc_component *comp);
int snd_soc_tplg_component_remove(struct snd_soc_component *comp, u32 index);
/* Widget removal - widgets also removed wth component API */
void snd_soc_tplg_widget_remove(struct snd_soc_dapm_widget *w);
void snd_soc_tplg_widget_remove_all(struct snd_soc_dapm_context *dapm,
u32 index);
/* Binds event handlers to dynamic widgets */ /* Binds event handlers to dynamic widgets */
int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w, int snd_soc_tplg_widget_bind_event(struct snd_soc_dapm_widget *w,
......
...@@ -490,46 +490,6 @@ int snd_soc_params_to_bclk(struct snd_pcm_hw_params *parms); ...@@ -490,46 +490,6 @@ int snd_soc_params_to_bclk(struct snd_pcm_hw_params *parms);
int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream, int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
const struct snd_pcm_hardware *hw); const struct snd_pcm_hardware *hw);
/* Jack reporting */
void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask);
int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_pin *pins);
void snd_soc_jack_notifier_register(struct snd_soc_jack *jack,
struct notifier_block *nb);
void snd_soc_jack_notifier_unregister(struct snd_soc_jack *jack,
struct notifier_block *nb);
int snd_soc_jack_add_zones(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_zone *zones);
int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage);
#ifdef CONFIG_GPIOLIB
int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios);
int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
struct snd_soc_jack *jack,
int count, struct snd_soc_jack_gpio *gpios);
void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios);
#else
static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios)
{
return 0;
}
static inline int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
struct snd_soc_jack *jack,
int count,
struct snd_soc_jack_gpio *gpios)
{
return 0;
}
static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
struct snd_soc_jack_gpio *gpios)
{
}
#endif
struct snd_ac97 *snd_soc_alloc_ac97_component(struct snd_soc_component *component); struct snd_ac97 *snd_soc_alloc_ac97_component(struct snd_soc_component *component);
struct snd_ac97 *snd_soc_new_ac97_component(struct snd_soc_component *component, struct snd_ac97 *snd_soc_new_ac97_component(struct snd_soc_component *component,
unsigned int id, unsigned int id_mask); unsigned int id, unsigned int id_mask);
...@@ -616,87 +576,6 @@ int snd_soc_get_strobe(struct snd_kcontrol *kcontrol, ...@@ -616,87 +576,6 @@ int snd_soc_get_strobe(struct snd_kcontrol *kcontrol,
int snd_soc_put_strobe(struct snd_kcontrol *kcontrol, int snd_soc_put_strobe(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol); struct snd_ctl_elem_value *ucontrol);
/**
* struct snd_soc_jack_pin - Describes a pin to update based on jack detection
*
* @pin: name of the pin to update
* @mask: bits to check for in reported jack status
* @invert: if non-zero then pin is enabled when status is not reported
* @list: internal list entry
*/
struct snd_soc_jack_pin {
struct list_head list;
const char *pin;
int mask;
bool invert;
};
/**
* struct snd_soc_jack_zone - Describes voltage zones of jack detection
*
* @min_mv: start voltage in mv
* @max_mv: end voltage in mv
* @jack_type: type of jack that is expected for this voltage
* @debounce_time: debounce_time for jack, codec driver should wait for this
* duration before reading the adc for voltages
* @list: internal list entry
*/
struct snd_soc_jack_zone {
unsigned int min_mv;
unsigned int max_mv;
unsigned int jack_type;
unsigned int debounce_time;
struct list_head list;
};
/**
* struct snd_soc_jack_gpio - Describes a gpio pin for jack detection
*
* @gpio: legacy gpio number
* @idx: gpio descriptor index within the function of the GPIO
* consumer device
* @gpiod_dev: GPIO consumer device
* @name: gpio name. Also as connection ID for the GPIO consumer
* device function name lookup
* @report: value to report when jack detected
* @invert: report presence in low state
* @debounce_time: debounce time in ms
* @wake: enable as wake source
* @jack_status_check: callback function which overrides the detection
* to provide more complex checks (eg, reading an
* ADC).
*/
struct snd_soc_jack_gpio {
unsigned int gpio;
unsigned int idx;
struct device *gpiod_dev;
const char *name;
int report;
int invert;
int debounce_time;
bool wake;
/* private: */
struct snd_soc_jack *jack;
struct delayed_work work;
struct notifier_block pm_notifier;
struct gpio_desc *desc;
void *data;
/* public: */
int (*jack_status_check)(void *data);
};
struct snd_soc_jack {
struct mutex mutex;
struct snd_jack *jack;
struct snd_soc_card *card;
struct list_head pins;
int status;
struct blocking_notifier_head notifier;
struct list_head jack_zones;
};
/* SoC PCM stream information */ /* SoC PCM stream information */
struct snd_soc_pcm_stream { struct snd_soc_pcm_stream {
const char *stream_name; const char *stream_name;
...@@ -1084,6 +963,7 @@ struct snd_soc_card { ...@@ -1084,6 +963,7 @@ struct snd_soc_card {
unsigned int fully_routed:1; unsigned int fully_routed:1;
unsigned int disable_route_checks:1; unsigned int disable_route_checks:1;
unsigned int probed:1; unsigned int probed:1;
unsigned int component_chaining:1;
void *drvdata; void *drvdata;
}; };
...@@ -1161,6 +1041,9 @@ struct snd_soc_pcm_runtime { ...@@ -1161,6 +1041,9 @@ struct snd_soc_pcm_runtime {
/* function mark */ /* function mark */
struct snd_pcm_substream *mark_startup; struct snd_pcm_substream *mark_startup;
struct snd_pcm_substream *mark_hw_params;
struct snd_pcm_substream *mark_trigger;
struct snd_compr_stream *mark_compr_startup;
/* bit field */ /* bit field */
unsigned int pop_wait:1; unsigned int pop_wait:1;
...@@ -1183,21 +1066,15 @@ struct snd_soc_pcm_runtime { ...@@ -1183,21 +1066,15 @@ struct snd_soc_pcm_runtime {
for ((i) = 0; \ for ((i) = 0; \
((i) < rtd->num_cpus) && ((dai) = asoc_rtd_to_cpu(rtd, i)); \ ((i) < rtd->num_cpus) && ((dai) = asoc_rtd_to_cpu(rtd, i)); \
(i)++) (i)++)
#define for_each_rtd_cpu_dais_rollback(rtd, i, dai) \
for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_cpu(rtd, i));)
#define for_each_rtd_codec_dais(rtd, i, dai) \ #define for_each_rtd_codec_dais(rtd, i, dai) \
for ((i) = 0; \ for ((i) = 0; \
((i) < rtd->num_codecs) && ((dai) = asoc_rtd_to_codec(rtd, i)); \ ((i) < rtd->num_codecs) && ((dai) = asoc_rtd_to_codec(rtd, i)); \
(i)++) (i)++)
#define for_each_rtd_codec_dais_rollback(rtd, i, dai) \
for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_codec(rtd, i));)
#define for_each_rtd_dais(rtd, i, dai) \ #define for_each_rtd_dais(rtd, i, dai) \
for ((i) = 0; \ for ((i) = 0; \
((i) < (rtd)->num_cpus + (rtd)->num_codecs) && \ ((i) < (rtd)->num_cpus + (rtd)->num_codecs) && \
((dai) = (rtd)->dais[i]); \ ((dai) = (rtd)->dais[i]); \
(i)++) (i)++)
#define for_each_rtd_dais_rollback(rtd, i, dai) \
for (; (--(i) >= 0) && ((dai) = (rtd)->dais[i]);)
void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd); void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
...@@ -1418,5 +1295,6 @@ static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm) ...@@ -1418,5 +1295,6 @@ static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
#include <sound/soc-component.h> #include <sound/soc-component.h>
#include <sound/soc-card.h> #include <sound/soc-card.h>
#include <sound/soc-jack.h>
#endif #endif
...@@ -100,6 +100,8 @@ struct sof_dev_desc { ...@@ -100,6 +100,8 @@ struct sof_dev_desc {
const struct snd_sof_dsp_ops *ops; const struct snd_sof_dsp_ops *ops;
}; };
int sof_nocodec_setup(struct device *dev, int sof_nocodec_setup(struct device *dev, const struct snd_sof_dsp_ops *ops,
const struct snd_sof_dsp_ops *ops); int (*pcm_dai_link_fixup)(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params));
#endif #endif
...@@ -34,15 +34,21 @@ ...@@ -34,15 +34,21 @@
#define SOF_DAI_FMT_IB_NF (3 << 8) /**< invert BCLK + nor FRM */ #define SOF_DAI_FMT_IB_NF (3 << 8) /**< invert BCLK + nor FRM */
#define SOF_DAI_FMT_IB_IF (4 << 8) /**< invert BCLK + FRM */ #define SOF_DAI_FMT_IB_IF (4 << 8) /**< invert BCLK + FRM */
#define SOF_DAI_FMT_CBM_CFM (0 << 12) /**< codec clk & FRM master */ #define SOF_DAI_FMT_CBP_CFP (0 << 12) /**< codec bclk provider & frame provider */
#define SOF_DAI_FMT_CBS_CFM (2 << 12) /**< codec clk slave & FRM master */ #define SOF_DAI_FMT_CBC_CFP (2 << 12) /**< codec bclk consumer & frame provider */
#define SOF_DAI_FMT_CBM_CFS (3 << 12) /**< codec clk master & frame slave */ #define SOF_DAI_FMT_CBP_CFC (3 << 12) /**< codec bclk provider & frame consumer */
#define SOF_DAI_FMT_CBS_CFS (4 << 12) /**< codec clk & FRM slave */ #define SOF_DAI_FMT_CBC_CFC (4 << 12) /**< codec bclk consumer & frame consumer */
/* keep old definitions for backwards compatibility */
#define SOF_DAI_FMT_CBM_CFM SOF_DAI_FMT_CBP_CFP
#define SOF_DAI_FMT_CBS_CFM SOF_DAI_FMT_CBC_CFP
#define SOF_DAI_FMT_CBM_CFS SOF_DAI_FMT_CBP_CFC
#define SOF_DAI_FMT_CBS_CFS SOF_DAI_FMT_CBC_CFC
#define SOF_DAI_FMT_FORMAT_MASK 0x000f #define SOF_DAI_FMT_FORMAT_MASK 0x000f
#define SOF_DAI_FMT_CLOCK_MASK 0x00f0 #define SOF_DAI_FMT_CLOCK_MASK 0x00f0
#define SOF_DAI_FMT_INV_MASK 0x0f00 #define SOF_DAI_FMT_INV_MASK 0x0f00
#define SOF_DAI_FMT_MASTER_MASK 0xf000 #define SOF_DAI_FMT_CLOCK_PROVIDER_MASK 0xf000
/** \brief Types of DAI */ /** \brief Types of DAI */
enum sof_ipc_dai_type { enum sof_ipc_dai_type {
......
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
/*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* Copyright(c) 2020 Intel Corporation. All rights reserved.
*
* Author: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
*/
#ifndef __INCLUDE_SOUND_SOF_DEBUG_H__
#define __INCLUDE_SOUND_SOF_DEBUG_H__
#include <sound/sof/header.h>
/** ABI3.18 */
enum sof_ipc_dbg_mem_zone {
SOF_IPC_MEM_ZONE_SYS = 0, /**< System zone */
SOF_IPC_MEM_ZONE_SYS_RUNTIME = 1, /**< System-runtime zone */
SOF_IPC_MEM_ZONE_RUNTIME = 2, /**< Runtime zone */
SOF_IPC_MEM_ZONE_BUFFER = 3, /**< Buffer zone */
};
/** ABI3.18 */
struct sof_ipc_dbg_mem_usage_elem {
uint32_t zone; /**< see sof_ipc_dbg_mem_zone */
uint32_t id; /**< heap index within zone */
uint32_t used; /**< number of bytes used in zone */
uint32_t free; /**< number of bytes free to use within zone */
uint32_t reserved; /**< for future use */
} __packed;
/** ABI3.18 */
struct sof_ipc_dbg_mem_usage {
struct sof_ipc_reply rhdr; /**< generic IPC reply header */
uint32_t reserved[4]; /**< reserved for future use */
uint32_t num_elems; /**< elems[] counter */
struct sof_ipc_dbg_mem_usage_elem elems[]; /**< memory usage information */
} __packed;
#endif
...@@ -61,6 +61,8 @@ enum sof_ext_man_elem_type { ...@@ -61,6 +61,8 @@ enum sof_ext_man_elem_type {
SOF_EXT_MAN_ELEM_WINDOW = SOF_IPC_EXT_WINDOW, SOF_EXT_MAN_ELEM_WINDOW = SOF_IPC_EXT_WINDOW,
SOF_EXT_MAN_ELEM_CC_VERSION = SOF_IPC_EXT_CC_INFO, SOF_EXT_MAN_ELEM_CC_VERSION = SOF_IPC_EXT_CC_INFO,
SOF_EXT_MAN_ELEM_DBG_ABI = SOF_IPC_EXT_USER_ABI_INFO, SOF_EXT_MAN_ELEM_DBG_ABI = SOF_IPC_EXT_USER_ABI_INFO,
SOF_EXT_MAN_ELEM_CONFIG_DATA = 5, /**< ABI3.17 */
SOF_EXT_MAN_ELEM_PLATFORM_CONFIG_DATA = 6,
}; };
/* extended manifest element header */ /* extended manifest element header */
...@@ -99,4 +101,23 @@ struct ext_man_dbg_abi { ...@@ -99,4 +101,23 @@ struct ext_man_dbg_abi {
struct sof_ipc_user_abi_version dbg_abi; struct sof_ipc_user_abi_version dbg_abi;
} __packed; } __packed;
/* EXT_MAN_ELEM_CONFIG_DATA elements identificators, ABI3.17 */
enum config_elem_type {
SOF_EXT_MAN_CONFIG_EMPTY = 0,
SOF_EXT_MAN_CONFIG_IPC_MSG_SIZE = 1,
SOF_EXT_MAN_CONFIG_MEMORY_USAGE_SCAN = 2, /**< ABI 3.18 */
};
struct sof_config_elem {
uint32_t token;
uint32_t value;
} __packed;
/* firmware configuration information */
struct sof_ext_man_config_data {
struct sof_ext_man_elem_header hdr;
struct sof_config_elem elems[];
} __packed;
#endif /* __SOF_FIRMWARE_EXT_MANIFEST_H__ */ #endif /* __SOF_FIRMWARE_EXT_MANIFEST_H__ */
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
/* Global Message - Generic */ /* Global Message - Generic */
#define SOF_GLB_TYPE_SHIFT 28 #define SOF_GLB_TYPE_SHIFT 28
#define SOF_GLB_TYPE_MASK (0xf << SOF_GLB_TYPE_SHIFT) #define SOF_GLB_TYPE_MASK (0xfL << SOF_GLB_TYPE_SHIFT)
#define SOF_GLB_TYPE(x) ((x) << SOF_GLB_TYPE_SHIFT) #define SOF_GLB_TYPE(x) ((x) << SOF_GLB_TYPE_SHIFT)
/* Command Message - Generic */ /* Command Message - Generic */
#define SOF_CMD_TYPE_SHIFT 16 #define SOF_CMD_TYPE_SHIFT 16
#define SOF_CMD_TYPE_MASK (0xfff << SOF_CMD_TYPE_SHIFT) #define SOF_CMD_TYPE_MASK (0xfffL << SOF_CMD_TYPE_SHIFT)
#define SOF_CMD_TYPE(x) ((x) << SOF_CMD_TYPE_SHIFT) #define SOF_CMD_TYPE(x) ((x) << SOF_CMD_TYPE_SHIFT)
/* Global Message Types */ /* Global Message Types */
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU) #define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU)
#define SOF_IPC_GLB_TEST_MSG SOF_GLB_TYPE(0xBU) #define SOF_IPC_GLB_TEST_MSG SOF_GLB_TYPE(0xBU)
#define SOF_IPC_GLB_PROBE SOF_GLB_TYPE(0xCU) #define SOF_IPC_GLB_PROBE SOF_GLB_TYPE(0xCU)
#define SOF_IPC_GLB_DEBUG SOF_GLB_TYPE(0xDU)
/* /*
* DSP Command Message Types * DSP Command Message Types
...@@ -117,8 +118,12 @@ ...@@ -117,8 +118,12 @@
#define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001) #define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001)
#define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002) #define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002)
#define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003) #define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003)
#define SOF_IPC_TRACE_FILTER_UPDATE SOF_CMD_TYPE(0x004) /**< ABI3.17 */
/* debug */ /* debug */
#define SOF_IPC_DEBUG_MEM_USAGE SOF_CMD_TYPE(0x001)
/* test */
#define SOF_IPC_TEST_IPC_FLOOD SOF_CMD_TYPE(0x001) #define SOF_IPC_TEST_IPC_FLOOD SOF_CMD_TYPE(0x001)
/* Get message component id */ /* Get message component id */
......
...@@ -43,6 +43,34 @@ struct sof_ipc_dma_trace_posn { ...@@ -43,6 +43,34 @@ struct sof_ipc_dma_trace_posn {
uint32_t messages; /* total trace messages */ uint32_t messages; /* total trace messages */
} __packed; } __packed;
/* Values used in sof_ipc_trace_filter_elem: */
/* bits 6..0 */
#define SOF_IPC_TRACE_FILTER_ELEM_SET_LEVEL 0x01 /**< trace level for selected components */
#define SOF_IPC_TRACE_FILTER_ELEM_BY_UUID 0x02 /**< filter by uuid key */
#define SOF_IPC_TRACE_FILTER_ELEM_BY_PIPE 0x03 /**< filter by pipeline */
#define SOF_IPC_TRACE_FILTER_ELEM_BY_COMP 0x04 /**< filter by component id */
/* bit 7 */
#define SOF_IPC_TRACE_FILTER_ELEM_FIN 0x80 /**< mark last filter in set */
/* bits 31..8: Unused */
/** part of sof_ipc_trace_filter, ABI3.17 */
struct sof_ipc_trace_filter_elem {
uint32_t key; /**< SOF_IPC_TRACE_FILTER_ELEM_ {LEVEL, UUID, COMP, PIPE} */
uint32_t value; /**< element value */
} __packed;
/** Runtime tracing filtration data - SOF_IPC_TRACE_FILTER_UPDATE, ABI3.17 */
struct sof_ipc_trace_filter {
struct sof_ipc_cmd_hdr hdr; /**< IPC command header */
uint32_t elem_cnt; /**< number of entries in elems[] array */
uint32_t reserved[8]; /**< reserved for future usage */
/** variable size array with new filtering settings */
struct sof_ipc_trace_filter_elem elems[];
} __packed;
/* /*
* Commom debug * Commom debug
*/ */
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/ktime.h> #include <linux/ktime.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <sound/jack.h>
#define DAPM_DIRECT "(direct)" #define DAPM_DIRECT "(direct)"
#define DAPM_ARROW(dir) (((dir) == SND_SOC_DAPM_DIR_OUT) ? "->" : "<-") #define DAPM_ARROW(dir) (((dir) == SND_SOC_DAPM_DIR_OUT) ? "->" : "<-")
......
...@@ -170,16 +170,22 @@ ...@@ -170,16 +170,22 @@
#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3) #define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3)
/* DAI topology BCLK parameter /* DAI topology BCLK parameter
* For the backwards capability, by default codec is bclk master * For the backwards capability, by default codec is bclk provider
*/ */
#define SND_SOC_TPLG_BCLK_CM 0 /* codec is bclk master */ #define SND_SOC_TPLG_BCLK_CP 0 /* codec is bclk provider */
#define SND_SOC_TPLG_BCLK_CS 1 /* codec is bclk slave */ #define SND_SOC_TPLG_BCLK_CC 1 /* codec is bclk consumer */
/* keep previous definitions for compatibility */
#define SND_SOC_TPLG_BCLK_CM SND_SOC_TPLG_BCLK_CP
#define SND_SOC_TPLG_BCLK_CS SND_SOC_TPLG_BCLK_CC
/* DAI topology FSYNC parameter /* DAI topology FSYNC parameter
* For the backwards capability, by default codec is fsync master * For the backwards capability, by default codec is fsync provider
*/ */
#define SND_SOC_TPLG_FSYNC_CM 0 /* codec is fsync master */ #define SND_SOC_TPLG_FSYNC_CP 0 /* codec is fsync provider */
#define SND_SOC_TPLG_FSYNC_CS 1 /* codec is fsync slave */ #define SND_SOC_TPLG_FSYNC_CC 1 /* codec is fsync consumer */
/* keep previous definitions for compatibility */
#define SND_SOC_TPLG_FSYNC_CM SND_SOC_TPLG_FSYNC_CP
#define SND_SOC_TPLG_FSYNC_CS SND_SOC_TPLG_FSYNC_CC
/* /*
* Block Header. * Block Header.
...@@ -336,8 +342,8 @@ struct snd_soc_tplg_hw_config { ...@@ -336,8 +342,8 @@ struct snd_soc_tplg_hw_config {
__u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */
__u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */
__u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */
__u8 bclk_master; /* SND_SOC_TPLG_BCLK_ value */ __u8 bclk_provider; /* SND_SOC_TPLG_BCLK_ value */
__u8 fsync_master; /* SND_SOC_TPLG_FSYNC_ value */ __u8 fsync_provider; /* SND_SOC_TPLG_FSYNC_ value */
__u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */
__le16 reserved; /* for 32bit alignment */ __le16 reserved; /* for 32bit alignment */
__le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* SOF ABI version major, minor and patch numbers */ /* SOF ABI version major, minor and patch numbers */
#define SOF_ABI_MAJOR 3 #define SOF_ABI_MAJOR 3
#define SOF_ABI_MINOR 17 #define SOF_ABI_MINOR 18
#define SOF_ABI_PATCH 0 #define SOF_ABI_PATCH 0
/* SOF ABI version number. Format within 32bit word is MMmmmppp */ /* SOF ABI version number. Format within 32bit word is MMmmmppp */
......
...@@ -243,5 +243,8 @@ int main(void) ...@@ -243,5 +243,8 @@ int main(void)
DEVID(mhi_device_id); DEVID(mhi_device_id);
DEVID_FIELD(mhi_device_id, chan); DEVID_FIELD(mhi_device_id, chan);
DEVID(auxiliary_device_id);
DEVID_FIELD(auxiliary_device_id, name);
return 0; return 0;
} }
...@@ -1364,6 +1364,13 @@ static int do_mhi_entry(const char *filename, void *symval, char *alias) ...@@ -1364,6 +1364,13 @@ static int do_mhi_entry(const char *filename, void *symval, char *alias)
{ {
DEF_FIELD_ADDR(symval, mhi_device_id, chan); DEF_FIELD_ADDR(symval, mhi_device_id, chan);
sprintf(alias, MHI_DEVICE_MODALIAS_FMT, *chan); sprintf(alias, MHI_DEVICE_MODALIAS_FMT, *chan);
return 1;
}
static int do_auxiliary_entry(const char *filename, void *symval, char *alias)
{
DEF_FIELD_ADDR(symval, auxiliary_device_id, name);
sprintf(alias, AUXILIARY_MODULE_PREFIX "%s", *name);
return 1; return 1;
} }
...@@ -1442,6 +1449,7 @@ static const struct devtable devtable[] = { ...@@ -1442,6 +1449,7 @@ static const struct devtable devtable[] = {
{"tee", SIZE_tee_client_device_id, do_tee_entry}, {"tee", SIZE_tee_client_device_id, do_tee_entry},
{"wmi", SIZE_wmi_device_id, do_wmi_entry}, {"wmi", SIZE_wmi_device_id, do_wmi_entry},
{"mhi", SIZE_mhi_device_id, do_mhi_entry}, {"mhi", SIZE_mhi_device_id, do_mhi_entry},
{"auxiliary", SIZE_auxiliary_device_id, do_auxiliary_entry},
}; };
/* Create MODULE_ALIAS() statements. /* Create MODULE_ALIAS() statements.
......
This diff is collapsed.
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
config SND_SOC_ADI config SND_SOC_ADI
tristate "Audio support for Analog Devices reference designs" tristate "Audio support for Analog Devices reference designs"
depends on MICROBLAZE || ARCH_ZYNQ || COMPILE_TEST
help help
Audio support for various reference designs by Analog Devices. Audio support for various reference designs by Analog Devices.
......
...@@ -73,8 +73,13 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) ...@@ -73,8 +73,13 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
da7219_dai_wclk = clk_get(component->dev, "da7219-dai-wclk"); da7219_dai_wclk = devm_clk_get(component->dev, "da7219-dai-wclk");
da7219_dai_bclk = clk_get(component->dev, "da7219-dai-bclk"); if (IS_ERR(da7219_dai_wclk))
return PTR_ERR(da7219_dai_wclk);
da7219_dai_bclk = devm_clk_get(component->dev, "da7219-dai-bclk");
if (IS_ERR(da7219_dai_bclk))
return PTR_ERR(da7219_dai_bclk);
ret = snd_soc_card_jack_new(card, "Headset Jack", ret = snd_soc_card_jack_new(card, "Headset Jack",
SND_JACK_HEADSET | SND_JACK_LINEOUT | SND_JACK_HEADSET | SND_JACK_LINEOUT |
......
...@@ -118,6 +118,10 @@ static int snd_acp3x_probe(struct pci_dev *pci, ...@@ -118,6 +118,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,
int ret, i; int ret, i;
u32 addr, val; u32 addr, val;
/* Raven device detection */
if (pci->revision != 0x00)
return -ENODEV;
if (pci_enable_device(pci)) { if (pci_enable_device(pci)) {
dev_err(&pci->dev, "pci_enable_device failed\n"); dev_err(&pci->dev, "pci_enable_device failed\n");
return -ENODEV; return -ENODEV;
...@@ -231,9 +235,8 @@ static int snd_acp3x_probe(struct pci_dev *pci, ...@@ -231,9 +235,8 @@ static int snd_acp3x_probe(struct pci_dev *pci,
} }
break; break;
default: default:
dev_err(&pci->dev, "Invalid ACP audio mode : %d\n", val); dev_info(&pci->dev, "ACP audio mode : %d\n", val);
ret = -ENODEV; break;
goto disable_msi;
} }
pm_runtime_set_autosuspend_delay(&pci->dev, 2000); pm_runtime_set_autosuspend_delay(&pci->dev, 2000);
pm_runtime_use_autosuspend(&pci->dev); pm_runtime_use_autosuspend(&pci->dev);
......
This diff is collapsed.
...@@ -148,6 +148,7 @@ config SND_MCHP_SOC_SPDIFTX ...@@ -148,6 +148,7 @@ config SND_MCHP_SOC_SPDIFTX
config SND_MCHP_SOC_SPDIFRX config SND_MCHP_SOC_SPDIFRX
tristate "Microchip ASoC driver for boards using S/PDIF RX" tristate "Microchip ASoC driver for boards using S/PDIF RX"
depends on OF && (ARCH_AT91 || COMPILE_TEST) depends on OF && (ARCH_AT91 || COMPILE_TEST)
depends on COMMON_CLK
select SND_SOC_GENERIC_DMAENGINE_PCM select SND_SOC_GENERIC_DMAENGINE_PCM
select REGMAP_MMIO select REGMAP_MMIO
help help
......
...@@ -563,7 +563,7 @@ static int atmel_i2s_sama5d2_mck_init(struct atmel_i2s_dev *dev, ...@@ -563,7 +563,7 @@ static int atmel_i2s_sama5d2_mck_init(struct atmel_i2s_dev *dev,
err = PTR_ERR(muxclk); err = PTR_ERR(muxclk);
if (err == -EPROBE_DEFER) if (err == -EPROBE_DEFER)
return -EPROBE_DEFER; return -EPROBE_DEFER;
dev_warn(dev->dev, dev_dbg(dev->dev,
"failed to get the I2S clock control: %d\n", err); "failed to get the I2S clock control: %d\n", err);
return 0; return 0;
} }
......
...@@ -797,7 +797,7 @@ static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg) ...@@ -797,7 +797,7 @@ static bool bcm2835_i2s_volatile_reg(struct device *dev, unsigned int reg)
return true; return true;
default: default:
return false; return false;
}; }
} }
static bool bcm2835_i2s_precious_reg(struct device *dev, unsigned int reg) static bool bcm2835_i2s_precious_reg(struct device *dev, unsigned int reg)
...@@ -807,7 +807,7 @@ static bool bcm2835_i2s_precious_reg(struct device *dev, unsigned int reg) ...@@ -807,7 +807,7 @@ static bool bcm2835_i2s_precious_reg(struct device *dev, unsigned int reg)
return true; return true;
default: default:
return false; return false;
}; }
} }
static const struct regmap_config bcm2835_regmap_config = { static const struct regmap_config bcm2835_regmap_config = {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment