Commit 12cc3d53 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "Lots of changes in this cycle, but mostly for cleanups and
  refactoring.

  Significant amount of changes are about DT schema conversions for ASoC
  at this time while we see other usual suspects, too.

  Some highlights below:

  Core:
   - Re-introduction of PCM sync ID support API
   - MIDI2 time-base extension in ALSA sequencer API

  ASoC:
   - Syncing of features between simple-audio-card and the two
     audio-graph cards
   - Support for specifying the order of operations for components
     within cards to allow quirking for unusual systems
   - Lots of DT schema conversions
   - Continued SOF/Intel updates for topology, SoundWire, IPC3/4
   - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest
     Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS v2.5
     and WCD937x, Realtek RT1318 and RT1320 and Texas Instruments
     PCM5242

  HD-audio:
   - More quirks, Intel PantherLake support, senarytech codec support
   - Refactoring of Cirrus codec component-binding

  Others:
   - ALSA control kselftest improvements, and fixes for input value
     checks in various drivers"

* tag 'sound-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (349 commits)
  kselftest/alsa: Log the PCM ID in pcm-test
  kselftest/alsa: Use card name rather than number in test names
  ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
  ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop
  ALSA: seq: ump: Skip useless ports for static blocks
  ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
  ALSA: usb: Use BIT() for bit values
  ALSA: usb: Fix UBSAN warning in parse_audio_unit()
  ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
  ASoC: tas2781: Add new Kontrol to set tas2563 digital Volume
  ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply
  ASoC: codecs: wcd937x: Remove the string compare in MIC BIAS widget settings
  ASoC: codecs: wcd937x-sdw: Fix Unbalanced pm_runtime_enable
  ASoC: dt-bindings: cirrus,cs42xx8: Convert to dtschema
  ASoC: cs530x: Remove bclk from private structure
  ASoC: cs530x: Calculate proper bclk rate using TDM
  ASoC: dt-bindings: cirrus,cs4270: Convert to dtschema
  firmware: cs_dsp: Rename fw_ver to wmfw_ver
  firmware: cs_dsp: Clarify wmfw format version log message
  firmware: cs_dsp: Make wmfw and bin filename arguments const char *
  ...
parents a4f92855 4594d26f
AK4104 S/PDIF transmitter
This device supports SPI mode only.
Required properties:
- compatible : "asahi-kasei,ak4104"
- reg : The chip select number on the SPI bus
- vdd-supply : A regulator node, providing 2.7V - 3.6V
Optional properties:
- reset-gpios : a GPIO spec for the reset pin. If specified, it will be
deasserted before communication to the device starts.
Example:
spdif: ak4104@0 {
compatible = "asahi-kasei,ak4104";
reg = <0>;
spi-max-frequency = <5000000>;
vdd-supply = <&vdd_3v3_reg>;
};
AK4554 ADC/DAC
Required properties:
- compatible : "asahi-kasei,ak4554"
Example:
ak4554-adc-dac {
compatible = "asahi-kasei,ak4554";
};
* Amlogic HDMI Tx control glue
Required properties:
- compatible: "amlogic,g12a-tohdmitx" or
"amlogic,sm1-tohdmitx"
- reg: physical base address of the controller and length of memory
mapped region.
- #sound-dai-cells: should be 1.
- resets: phandle to the dedicated reset line of the hdmitx glue.
Example on the S905X2 SoC:
tohdmitx: audio-controller@744 {
compatible = "amlogic,g12a-tohdmitx";
reg = <0x0 0x744 0x0 0x4>;
#sound-dai-cells = <1>;
resets = <&clkc_audio AUD_RESET_TOHDMITX>;
};
Example of an 'amlogic,axg-sound-card':
sound {
compatible = "amlogic,axg-sound-card";
[...]
dai-link-x {
sound-dai = <&tdmif_a>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
codec-0 {
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
};
codec-1 {
sound-dai = <&external_dac>;
};
};
dai-link-y {
sound-dai = <&tdmif_c>;
dai-format = "i2s";
dai-tdm-slot-tx-mask-0 = <1 1>;
codec {
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
};
};
dai-link-z {
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
codec {
sound-dai = <&hdmi_tx>;
};
};
};
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/amlogic,g12a-tohdmitx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic G12a HDMI TX Control Glue
maintainers:
- Jerome Brunet <jbrunet@baylibre.com>
allOf:
- $ref: dai-common.yaml#
properties:
$nodename:
pattern: "^audio-controller@.*"
compatible:
oneOf:
- items:
- const: amlogic,g12a-tohdmitx
- items:
- enum:
- amlogic,sm1-tohdmitx
- const: amlogic,g12a-tohdmitx
reg:
maxItems: 1
resets:
maxItems: 1
"#sound-dai-cells":
const: 1
required:
- compatible
- reg
- resets
- "#sound-dai-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
tohdmitx: audio-controller@744 {
compatible = "amlogic,g12a-tohdmitx";
reg = <0x744 0x4>;
resets = <&clkc_audio AUD_RESET_TOHDMITX>;
#sound-dai-cells = <1>;
};
......@@ -23,7 +23,6 @@ properties:
audio-widgets:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
minItems: 2
description: |-
A list off component DAPM widget. Each entry is a pair of strings,
the first being the widget type, the second being the widget name
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4104.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4104 S/PDIF transmitter
allOf:
- $ref: dai-common.yaml#
maintainers:
- Daniel Mack <github@zonque.org>
- Xiaxi Shen <shenxiaxi26@gmail.com>
properties:
compatible:
const: asahi-kasei,ak4104
reg:
description: Chip select number on the SPI bus
maxItems: 1
vdd-supply:
description: A regulator node providing between 2.7V and 3.6V.
reset-gpios:
maxItems: 1
description: Optional GPIO spec for the reset pin, deasserted
before communication starts.
required:
- compatible
- reg
- vdd-supply
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@0 {
compatible = "asahi-kasei,ak4104";
reg = <0>;
vdd-supply = <&vdd_3v3_reg>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4375.yaml#
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4375.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4375 DAC and headphones amplifier
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4554.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4554 sound codec
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
- Liam Girdwood <lgirdwood@gmail.com>
- Mark Brown <broonie@kernel.org>
properties:
compatible:
const: asahi-kasei,ak4554
required:
- compatible
additionalProperties: false
examples:
- |
codec {
compatible = "asahi-kasei,ak4554";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4613.yaml#
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4613.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4613 I2C transmitter
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4619.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4619 I2C transmitter
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
- Khanh Le <khanh.le.xr@renesas.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: asahi-kasei,ak4619
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
items:
- const: mclk
"#sound-dai-cells":
const: 0
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@10 {
compatible = "asahi-kasei,ak4619";
reg = <0x10>;
clocks = <&rcar_sound>;
clock-names = "mclk";
#sound-dai-cells = <0>;
port {
ak4619_endpoint: endpoint {
remote-endpoint = <&rsnd_endpoint>;
};
};
};
};
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4642.yaml#
$id: http://devicetree.org/schemas/sound/asahi-kasei,ak4642.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4642 I2C transmitter
......
......@@ -23,6 +23,11 @@ properties:
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
aux-devs:
description: |
List of phandles pointing to auxiliary devices, such
as amplifiers, to be added to the sound card.
$ref: /schemas/types.yaml#/definitions/phandle-array
multi:
type: object
description: Multi-CPU/Codec node
......
......@@ -25,6 +25,15 @@ definitions:
capture-only:
description: port connection used only for capture
$ref: /schemas/types.yaml#/definitions/flag
link-trigger-order:
description: trigger order for both start/stop
$ref: /schemas/types.yaml#/definitions/uint32-array
link-trigger-order-start:
description: trigger order for start
$ref: /schemas/types.yaml#/definitions/uint32-array
link-trigger-order-stop:
description: trigger order for stop
$ref: /schemas/types.yaml#/definitions/uint32-array
endpoint-base:
allOf:
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs4270.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus Logic CS4270 audio CODEC
maintainers:
- patches@opensource.cirrus.com
description:
The CS4270 is a stereo audio codec. The driver for this device currently only
supports I2C.
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: cirrus,cs4270
reg:
maxItems: 1
'#sound-dai-cells':
const: 0
reset-gpios:
description:
This pin will be deasserted before communication to the codec starts.
maxItems: 1
va-supply:
description: Analog power supply.
vd-supply:
description: Digital power supply.
vlc-supply:
description: Serial Control Port power supply.
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@48 {
compatible = "cirrus,cs4270";
reg = <0x48>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs42xx8.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus Logic CS42448/CS42888 audio CODEC
maintainers:
- patches@opensource.cirrus.com
properties:
compatible:
enum:
- cirrus,cs42448
- cirrus,cs42888
reg:
maxItems: 1
clocks:
minItems: 1
maxItems: 2
clock-names:
const: mclk
VA-supply:
description: Analog power supply.
VD-supply:
description: Digital power supply.
VLC-supply:
description: Control port power supply
VLS-supply:
description: Serial port interface power supply.
reset-gpios:
description: This pin is connected to the chip's RESET pin.
maxItems: 1
required:
- compatible
- reg
- clocks
- clock-names
if:
properties:
compatible:
contains:
const: cirrus,cs42888
then:
required:
- VA-supply
- VD-supply
- VLC-supply
- VLS-supply
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@48 {
compatible = "cirrus,cs42888";
reg = <0x48>;
clocks = <&codec_mclk 0>;
clock-names = "mclk";
VA-supply = <&reg_audio>;
VD-supply = <&reg_audio>;
VLS-supply = <&reg_audio>;
VLC-supply = <&reg_audio>;
reset-gpios = <&gpio 1>;
};
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs530x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cirrus Logic cs530x family of audio ADCs
maintainers:
- Paul Handrigan <paulha@opensource.cirrus.com>
- patches@opensource.cirrus.com
description:
The CS530X devices are a family of high performance audio ADCs.
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- cirrus,cs5302
- cirrus,cs5304
- cirrus,cs5308
reg:
maxItems: 1
'#sound-dai-cells':
const: 1
reset-gpios:
maxItems: 1
vdd-a-supply:
description: Analog power supply
vdd-io-supply:
description: Digital IO power supply
cirrus,in-hiz-pin12:
description:
Sets input channels one and two to high impedance.
type: boolean
cirrus,in-hiz-pin34:
description:
Sets input channels three and four to high impedance.
type: boolean
cirrus,in-hiz-pin56:
description:
Sets input channels five and six to high impedance.
type: boolean
cirrus,in-hiz-pin78:
description:
Sets input channels seven and eight to high impedance.
type: boolean
required:
- compatible
- reg
- "#sound-dai-cells"
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
cs5304: adc@48 {
compatible = "cirrus,cs5304";
reg = <0x48>;
#sound-dai-cells = <1>;
reset-gpios = <&gpio 110 GPIO_ACTIVE_LOW>;
vdd-a-supply = <&vreg>;
vdd-io-supply = <&vreg>;
cirrus,in-hiz-pin34;
};
};
CS4270 audio CODEC
The driver for this device currently only supports I2C.
Required properties:
- compatible : "cirrus,cs4270"
- reg : the I2C address of the device for I2C
Optional properties:
- reset-gpios : a GPIO spec for the reset pin. If specified, it will be
deasserted before communication to the codec starts.
Example:
codec: cs4270@48 {
compatible = "cirrus,cs4270";
reg = <0x48>;
};
CS42448/CS42888 audio CODEC
Required properties:
- compatible : must contain one of "cirrus,cs42448" and "cirrus,cs42888"
- reg : the I2C address of the device for I2C
- clocks : a list of phandles + clock-specifiers, one for each entry in
clock-names
- clock-names : must contain "mclk"
- VA-supply, VD-supply, VLS-supply, VLC-supply: power supplies for the device,
as covered in Documentation/devicetree/bindings/regulator/regulator.txt
Optional properties:
- reset-gpios : a GPIO spec to define which pin is connected to the chip's
!RESET pin
Example:
cs42888: codec@48 {
compatible = "cirrus,cs42888";
reg = <0x48>;
clocks = <&codec_mclk 0>;
clock-names = "mclk";
VA-supply = <&reg_audio>;
VD-supply = <&reg_audio>;
VLS-supply = <&reg_audio>;
VLC-supply = <&reg_audio>;
reset-gpios = <&pca9557_b 1 GPIO_ACTIVE_LOW>;
};
ES7134 i2s DA converter
Required properties:
- compatible : "everest,es7134" or
"everest,es7144" or
"everest,es7154"
- VDD-supply : regulator phandle for the VDD supply
- PVDD-supply: regulator phandle for the PVDD supply for the es7154
Example:
i2s_codec: external-codec {
compatible = "everest,es7134";
VDD-supply = <&vcc_5v>;
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/everest,es71x4.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES7134/7144/7154 2 channels I2S analog to digital converter
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
properties:
compatible:
enum:
- everest,es7134
- everest,es7144
- everest,es7154
VDD-supply: true
PVDD-supply: true
'#sound-dai-cells':
const: 0
required:
- compatible
- VDD-supply
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- everest,es7134
- everest,es7144
then:
properties:
PVDD-supply: false
- if:
properties:
compatible:
contains:
enum:
- everest,es7154
then:
required:
- PVDD-supply
unevaluatedProperties: false
examples:
- |
codec {
compatible = "everest,es7134";
#sound-dai-cells = <0>;
VDD-supply = <&vdd_supply>;
};
...
ES7241 i2s AD converter
Required properties:
- compatible : "everest,es7241"
- VDDP-supply: regulator phandle for the VDDA supply
- VDDA-supply: regulator phandle for the VDDP supply
- VDDD-supply: regulator phandle for the VDDD supply
Optional properties:
- reset-gpios: gpio connected to the reset pin
- m0-gpios : gpio connected to the m0 pin
- m1-gpios : gpio connected to the m1 pin
- everest,sdout-pull-down:
Format used by the serial interface is controlled by pulling
the sdout. If the sdout is pulled down, leftj format is used.
If this property is not provided, sdout is assumed to pulled
up and i2s format is used
Example:
linein: audio-codec@2 {
#sound-dai-cells = <0>;
compatible = "everest,es7241";
VDDA-supply = <&vcc_3v3>;
VDDP-supply = <&vcc_3v3>;
VDDD-supply = <&vcc_3v3>;
reset-gpios = <&gpio GPIOH_42>;
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/everest,es7241.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES7241 2 channels I2S analog to digital converter
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
properties:
compatible:
enum:
- everest,es7241
reset-gpios:
maxItems: 1
description: GPIO connected to the reset pin
m0-gpios:
maxItems: 1
description: GPIO connected to the m0 pin
m1-gpios:
maxItems: 1
description: GPIO connected to the m0 pin
everest,sdout-pull-down:
type: boolean
description:
Format used by the serial interface is controlled by pulling
the sdout. If the sdout is pulled down, leftj format is used.
If this property is not provided, sdout is assumed to pulled
up and i2s format is used
VDDP-supply: true
VDDA-supply: true
VDDD-supply: true
'#sound-dai-cells':
const: 0
required:
- compatible
- VDDP-supply
- VDDA-supply
- VDDD-supply
allOf:
- $ref: dai-common.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
codec {
compatible = "everest,es7241";
#sound-dai-cells = <0>;
reset-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
VDDP-supply = <&vddp_supply>;
VDDA-supply = <&vdda_supply>;
VDDD-supply = <&vddd_supply>;
};
...
......@@ -4,18 +4,21 @@
$id: http://devicetree.org/schemas/sound/everest,es8316.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES8316 audio CODEC
title: Everest ES8311 and ES8316 audio CODECs
maintainers:
- Daniel Drake <drake@endlessm.com>
- Katsuhiro Suzuki <katsuhiro@katsuster.net>
- Matteo Martelli <matteomartelli3@gmail.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: everest,es8316
enum:
- everest,es8311
- everest,es8316
reg:
maxItems: 1
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/fsl,imx-audio-spdif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX audio complex with S/PDIF transceiver
maintainers:
- Shengjiu Wang <shengjiu.wang@nxp.com>
properties:
compatible:
oneOf:
- items:
- enum:
- fsl,imx-sabreauto-spdif
- fsl,imx6sx-sdb-spdif
- const: fsl,imx-audio-spdif
- enum:
- fsl,imx-audio-spdif
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
spdif-controller:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the i.MX S/PDIF controller
spdif-out:
type: boolean
description:
If present, the transmitting function of S/PDIF will be enabled,
indicating there's a physical S/PDIF out connector or jack on the
board or it's connecting to some other IP block, such as an HDMI
encoder or display-controller.
spdif-in:
type: boolean
description:
If present, the receiving function of S/PDIF will be enabled,
indicating there is a physical S/PDIF in connector/jack on the board.
required:
- compatible
- model
- spdif-controller
anyOf:
- required:
- spdif-in
- required:
- spdif-out
additionalProperties: false
examples:
- |
sound-spdif {
compatible = "fsl,imx-audio-spdif";
model = "imx-spdif";
spdif-controller = <&spdif>;
spdif-out;
spdif-in;
};
......@@ -23,6 +23,8 @@ properties:
- fsl,imx8qm-mqs
- fsl,imx8qxp-mqs
- fsl,imx93-mqs
- fsl,imx95-aonmix-mqs
- fsl,imx95-netcmix-mqs
clocks:
minItems: 1
......
......@@ -12,7 +12,9 @@ maintainers:
description: |
The QMC audio is an ASoC component which uses QMC (QUICC Multichannel
Controller) channels to transfer the audio data.
It provides as many DAI as the number of QMC channel used.
It provides several DAIs. For each DAI, the DAI is working in interleaved mode
if only one QMC channel is used by the DAI or it is working in non-interleaved
mode if several QMC channels are used by the DAI.
allOf:
- $ref: dai-common.yaml#
......@@ -45,12 +47,19 @@ patternProperties:
fsl,qmc-chan:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to QMC node
- description: Channel number
items:
- description: phandle to QMC node
- description: Channel number
minItems: 1
description:
Should be a phandle/number pair. The phandle to QMC node and the QMC
channel to use for this DAI.
Should be a phandle/number pair list. The list of phandle to QMC node
and the QMC channel pair to use for this DAI.
If only one phandle/number pair is provided, this DAI works in
interleaved mode, i.e. audio channels for this DAI are interleaved in
the QMC channel. If more than one pair is provided, this DAI works
in non-interleave mode. In that case the first audio channel uses the
the first QMC channel, the second audio channel uses the second QMC
channel, etc...
required:
- reg
......@@ -79,6 +88,11 @@ examples:
reg = <17>;
fsl,qmc-chan = <&qmc 17>;
};
dai@18 {
reg = <18>;
/* Non-interleaved mode */
fsl,qmc-chan = <&qmc 18>, <&qmc 19>;
};
};
sound {
......@@ -115,4 +129,19 @@ examples:
dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>;
};
};
simple-audio-card,dai-link@2 {
reg = <2>;
format = "dsp_b";
cpu {
sound-dai = <&audio_controller 18>;
};
codec {
sound-dai = <&codec3>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <8>;
/* TS 9, 10 */
dai-tdm-slot-tx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
dai-tdm-slot-rx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
};
};
};
......@@ -29,6 +29,7 @@ properties:
- fsl,imx8mp-rpmsg-audio
- fsl,imx8ulp-rpmsg-audio
- fsl,imx93-rpmsg-audio
- fsl,imx95-rpmsg-audio
clocks:
items:
......
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/sgtl5000.yaml#
$id: http://devicetree.org/schemas/sound/fsl,sgtl5000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale SGTL5000 Stereo Codec
......
......@@ -22,6 +22,7 @@ properties:
enum:
- fsl,imx8mp-xcvr
- fsl,imx93-xcvr
- fsl,imx95-xcvr
reg:
items:
......@@ -41,6 +42,7 @@ properties:
items:
- description: WAKEUPMIX Audio XCVR Interrupt 1
- description: WAKEUPMIX Audio XCVR Interrupt 2
- description: SPDIF wakeup interrupt from PHY
minItems: 1
clocks:
......@@ -49,6 +51,9 @@ properties:
- description: PHY clock
- description: SPBA clock
- description: PLL clock
- description: PLL clock source for 8kHz series
- description: PLL clock source for 11kHz series
minItems: 4
clock-names:
items:
......@@ -56,6 +61,9 @@ properties:
- const: phy
- const: spba
- const: pll_ipg
- const: pll8k
- const: pll11k
minItems: 4
dmas:
items:
......@@ -79,15 +87,25 @@ required:
- clock-names
- dmas
- dma-names
- resets
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
const: fsl,imx8mp-xcvr
then:
required:
- resets
- if:
properties:
compatible:
contains:
enum:
- fsl,imx93-xcvr
- fsl,imx95-xcvr
then:
properties:
interrupts:
......@@ -96,9 +114,24 @@ allOf:
else:
properties:
interrupts:
maxItems: 1
minItems: 3
maxItems: 3
- if:
properties:
compatible:
contains:
enum:
- fsl,imx8mp-xcvr
- fsl,imx93-xcvr
then:
properties:
clocks:
maxItems: 4
clock-names:
maxItems: 4
additionalProperties: false
unevaluatedProperties: false
examples:
- |
......@@ -113,7 +146,9 @@ examples:
<0x30cc0c00 0x080>,
<0x30cc0e00 0x080>;
reg-names = "ram", "regs", "rxfifo", "txfifo";
interrupts = <0x0 128 IRQ_TYPE_LEVEL_HIGH>;
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 146 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>,
......
......@@ -65,6 +65,11 @@ properties:
- fsl,imx-audio-sgtl5000
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- items:
- enum:
- fsl,imx-sabreauto-spdif
- fsl,imx6sx-sdb-spdif
- const: fsl,imx-audio-spdif
- items:
- enum:
- fsl,imx-audio-ac97
......@@ -81,6 +86,7 @@ properties:
- fsl,imx-audio-wm8960
- fsl,imx-audio-wm8962
- fsl,imx-audio-wm8958
- fsl,imx-audio-spdif
model:
$ref: /schemas/types.yaml#/definitions/string
......@@ -93,8 +99,15 @@ properties:
need to add ASRC support via DPCM.
audio-codec:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an audio codec
$ref: /schemas/types.yaml#/definitions/phandle-array
description: |
The phandle of an audio codec.
With "fsl,imx-audio-spdif", either SPDIF audio codec spdif_transmitter,
spdif_receiver or both.
minItems: 1
maxItems: 2
items:
maxItems: 1
audio-cpu:
$ref: /schemas/types.yaml#/definitions/phandle
......@@ -150,8 +163,10 @@ properties:
description: dai-link uses bit clock inversion.
mclk-id:
$ref: /schemas/types.yaml#/definitions/uint32
description: main clock id, specific for each card configuration.
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Main clock id for each codec, specific for each card configuration.
minItems: 1
maxItems: 2
mux-int-port:
$ref: /schemas/types.yaml#/definitions/uint32
......@@ -167,6 +182,27 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of an CPU DAI controller
spdif-controller:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description: The phandle of an S/PDIF CPU DAI controller.
spdif-out:
type: boolean
deprecated: true
description: |
If present, the transmitting function of S/PDIF will be enabled,
indicating there's a physical S/PDIF out connector or jack on the
board or it's connecting to some other IP block, such as an HDMI
encoder or display-controller.
spdif-in:
type: boolean
deprecated: true
description: |
If present, the receiving function of S/PDIF will be enabled,
indicating there is a physical S/PDIF in connector/jack on the board.
required:
- compatible
- model
......@@ -195,3 +231,12 @@ examples:
"AIN2L", "Line In Jack",
"AIN2R", "Line In Jack";
};
- |
sound-spdif-asrc {
compatible = "fsl,imx-audio-spdif";
model = "spdif-asrc-audio";
audio-cpu = <&spdif>;
audio-asrc = <&easrc>;
audio-codec = <&spdifdit>, <&spdifdir>;
};
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/linux,spdif-dit.yaml#
$id: http://devicetree.org/schemas/sound/linux,spdif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dummy SPDIF Transmitter
title: Dummy SPDIF Transmitter/Receiver
maintainers:
- Mark Brown <broonie@kernel.org>
......@@ -14,7 +14,9 @@ allOf:
properties:
compatible:
const: linux,spdif-dit
enum:
- linux,spdif-dit
- linux,spdif-dir
"#sound-dai-cells":
const: 0
......
MAX98088 audio CODEC
This device supports I2C only.
Required properties:
- compatible: "maxim,max98088" or "maxim,max98089".
- reg: The I2C address of the device.
Optional properties:
- clocks: the clock provider of MCLK, see ../clock/clock-bindings.txt section
"consumer" for more information.
- clock-names: must be set to "mclk"
Example:
max98089: codec@10 {
compatible = "maxim,max98089";
reg = <0x10>;
clocks = <&clks IMX6QDL_CLK_CKO2>;
clock-names = "mclk";
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98088.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MAX98088 audio CODEC
maintainers:
- Abdulrasaq Lawani <abdulrasaqolawani@gmail.com>
properties:
compatible:
enum:
- maxim,max98088
- maxim,max98089
reg:
maxItems: 1
clocks:
items:
- description: master clock
clock-names:
items:
- const: mclk
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
audio-codec@10 {
compatible = "maxim,max98089";
reg = <0x10>;
clocks = <&clks 0>;
clock-names = "mclk";
};
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/zl38060.yaml#
$id: http://devicetree.org/schemas/sound/mscc,zl38060.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ZL38060 Connected Home Audio Processor from Microsemi.
......
......@@ -23,6 +23,14 @@ properties:
'#sound-dai-cells':
const: 0
clocks:
items:
- description: The phandle of the master clock to the CODEC
clock-names:
items:
- const: mclk
interrupts:
maxItems: 1
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nxp,lpc3220-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP LPC32XX I2S Controller
description:
The I2S controller in LPC32XX SoCs, ASoC DAI.
maintainers:
- J.M.B. Downing <jonathan.downing@nautel.com>
- Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- nxp,lpc3220-i2s
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: input clock of the peripheral.
dmas:
items:
- description: RX DMA Channel
- description: TX DMA Channel
dma-names:
items:
- const: rx
- const: tx
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
- interrupts
- clocks
- dmas
- dma-names
- '#sound-dai-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/lpc32xx-clock.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2s@20094000 {
compatible = "nxp,lpc3220-i2s";
reg = <0x20094000 0x1000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk LPC32XX_CLK_I2S0>;
dmas = <&dma 0 1>, <&dma 13 1>;
dma-names = "rx", "tx";
#sound-dai-cells = <0>;
};
...
* Texas Instruments OMAP4+ McPDM
Required properties:
- compatible: "ti,omap4-mcpdm"
- reg: Register location and size as an array:
<MPU access base address, size>,
<L3 interconnect address, size>;
- interrupts: Interrupt number for McPDM
- ti,hwmods: Name of the hwmod associated to the McPDM
- clocks: phandle for the pdmclk provider, likely <&twl6040>
- clock-names: Must be "pdmclk"
Example:
mcpdm: mcpdm@40132000 {
compatible = "ti,omap4-mcpdm";
reg = <0x40132000 0x7f>, /* MPU private access */
<0x49032000 0x7f>; /* L3 Interconnect */
interrupts = <0 112 0x4>;
interrupt-parent = <&gic>;
ti,hwmods = "mcpdm";
};
In board DTS file the pdmclk needs to be added:
&mcpdm {
clocks = <&twl6040>;
clock-names = "pdmclk";
status = "okay";
};
......@@ -6,7 +6,7 @@ on the board). The TAS575x devices only support I2C.
Required properties:
- compatible : One of "ti,pcm5121", "ti,pcm5122", "ti,pcm5141",
"ti,pcm5142", "ti,tas5754" or "ti,tas5756"
"ti,pcm5142", "ti,pcm5242", "ti,tas5754" or "ti,tas5756"
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
......
* Qualcomm Technologies APQ8096 ASoC sound card driver
This binding describes the APQ8096 sound card, which uses qdsp for audio.
- compatible:
Usage: required
Value type: <stringlist>
Definition: must be "qcom,apq8096-sndcard"
- audio-routing:
Usage: Optional
Value type: <stringlist>
Definition: 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:
Valid names include:
Board Connectors:
"Headphone Left"
"Headphone Right"
"Earphone"
"Line Out1"
"Line Out2"
"Line Out3"
"Line Out4"
"Analog Mic1"
"Analog Mic2"
"Analog Mic3"
"Analog Mic4"
"Analog Mic5"
"Analog Mic6"
"Digital Mic2"
"Digital Mic3"
Audio pins and MicBias on WCD9335 Codec:
"MIC_BIAS1"
"MIC_BIAS2"
"MIC_BIAS3"
"MIC_BIAS4"
"AMIC1"
"AMIC2"
"AMIC3"
"AMIC4"
"AMIC5"
"AMIC6"
"AMIC6"
"DMIC1"
"DMIC2"
"DMIC3"
- model:
Usage: required
Value type: <stringlist>
Definition: The user-visible name of this sound card.
- aux-devs
Usage: optional
Value type: <array of phandles>
Definition: A list of phandles for auxiliary devices (e.g. analog
amplifiers) that do not appear directly within the DAI
links. Should be connected to another audio component
using "audio-routing".
= dailinks
Each subnode of sndcard represents either a dailink, and subnodes of each
dailinks would be cpu/codec/platform dais.
- link-name:
Usage: required
Value type: <string>
Definition: User friendly name for dai link
= CPU, PLATFORM, CODEC dais subnodes
- cpu:
Usage: required
Value type: <subnode>
Definition: cpu dai sub-node
- codec:
Usage: Optional
Value type: <subnode>
Definition: codec dai sub-node
- platform:
Usage: Optional
Value type: <subnode>
Definition: platform dai sub-node
- sound-dai:
Usage: required
Value type: <phandle with arguments>
Definition: dai phandle/s and port of CPU/CODEC/PLATFORM node.
Obsolete:
qcom,model: String for soundcard name (Use model instead)
qcom,audio-routing: A list of the connections between audio components.
(Use audio-routing instead)
Example:
audio {
compatible = "qcom,apq8096-sndcard";
model = "DB820c";
mm1-dai-link {
link-name = "MultiMedia1";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};
hdmi-dai-link {
link-name = "HDMI Playback";
cpu {
sound-dai = <&q6afe HDMI_RX>;
};
platform {
sound-dai = <&q6adm>;
};
codec {
sound-dai = <&hdmi 0>;
};
};
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,msm8916-wcd-digital-codec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm MSM8916 WCD Digital Audio Codec
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description:
The digital WCD audio codec found on Qualcomm MSM8916 LPASS.
properties:
compatible:
const: qcom,msm8916-wcd-digital-codec
reg:
maxItems: 1
clocks:
maxItems: 2
clock-names:
items:
- const: ahbix-clk
- const: mclk
'#sound-dai-cells':
const: 1
required:
- compatible
- reg
- clocks
- clock-names
- '#sound-dai-cells'
allOf:
- $ref: dai-common.yaml#
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/clock/qcom,gcc-msm8916.h>
audio-codec@771c000 {
compatible = "qcom,msm8916-wcd-digital-codec";
reg = <0x0771c000 0x400>;
clocks = <&gcc GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK>,
<&gcc GCC_CODEC_DIGCODEC_CLK>;
clock-names = "ahbix-clk", "mclk";
#sound-dai-cells = <1>;
};
msm8916 digital audio CODEC
## Bindings for codec core in lpass:
Required properties
- compatible = "qcom,msm8916-wcd-digital-codec";
- reg: address space for lpass codec.
- clocks: Handle to mclk and ahbclk
- clock-names: should be "mclk", "ahbix-clk".
Example:
audio-codec@771c000{
compatible = "qcom,msm8916-wcd-digital-codec";
reg = <0x0771c000 0x400>;
clocks = <&gcc GCC_ULTAUDIO_AHBFABRIC_IXFABRIC_CLK>,
<&gcc GCC_CODEC_DIGCODEC_CLK>;
clock-names = "ahbix-clk", "mclk";
#sound-dai-cells = <1>;
};
......@@ -28,6 +28,7 @@ properties:
- const: qcom,sm8450-sndcard
- enum:
- qcom,apq8016-sbc-sndcard
- qcom,apq8096-sndcard
- qcom,msm8916-qdsp6-sndcard
- qcom,qcm6490-idp-sndcard
- qcom,qcs6490-rb3gen2-sndcard
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,wcd937x-sdw.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm SoundWire Slave devices on WCD9370/WCD9375
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description: |
Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC.
It has RX and TX Soundwire slave devices. This bindings is for the
slave devices.
properties:
compatible:
const: sdw20217010a00
reg:
maxItems: 1
qcom,tx-port-mapping:
description: |
Specifies static port mapping between device and host tx ports.
In the order of the device port index which are adc1_port, adc23_port,
dmic03_mbhc_port, dmic46_port.
Supports maximum 4 tx soundwire ports.
WCD9370 TX Port 1 (ADC1) <=> SWR2 Port 2
WCD9370 TX Port 2 (ADC2, 3) <=> SWR2 Port 2
WCD9370 TX Port 3 (DMIC0,1,2,3 & MBHC) <=> SWR2 Port 3
WCD9370 TX Port 4 (DMIC4,5,6,7) <=> SWR2 Port 4
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 4
maxItems: 4
items:
enum: [1, 2, 3, 4]
qcom,rx-port-mapping:
description: |
Specifies static port mapping between device and host rx ports.
In the order of device port index which are hph_port, clsh_port,
comp_port, lo_port, dsd port.
Supports maximum 5 rx soundwire ports.
WCD9370 RX Port 1 (HPH_L/R) <==> SWR1 Port 1 (HPH_L/R)
WCD9370 RX Port 2 (CLSH) <==> SWR1 Port 2 (CLSH)
WCD9370 RX Port 3 (COMP_L/R) <==> SWR1 Port 3 (COMP_L/R)
WCD9370 RX Port 4 (LO) <==> SWR1 Port 4 (LO)
WCD9370 RX Port 5 (DSD_L/R) <==> SWR1 Port 5 (DSD)
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 5
maxItems: 5
items:
enum: [1, 2, 3, 4, 5]
required:
- compatible
- reg
additionalProperties: false
examples:
- |
soundwire@3210000 {
reg = <0x03210000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_rx: codec@0,4 {
compatible = "sdw20217010a00";
reg = <0 4>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
soundwire@3230000 {
reg = <0x03230000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_tx: codec@0,3 {
compatible = "sdw20217010a00";
reg = <0 3>;
qcom,tx-port-mapping = <2 2 3 4>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/qcom,wcd937x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm WCD9370/WCD9375 Audio Codec
maintainers:
- Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
description:
Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC.
It has RX and TX Soundwire slave devices.
allOf:
- $ref: dai-common.yaml#
- $ref: qcom,wcd93xx-common.yaml#
properties:
compatible:
oneOf:
- const: qcom,wcd9370-codec
- items:
- const: qcom,wcd9375-codec
- const: qcom,wcd9370-codec
vdd-px-supply:
description: A reference to the 1.8V I/O supply
required:
- compatible
- vdd-px-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
codec {
compatible = "qcom,wcd9370-codec";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&wcd_reset_n>;
pinctrl-1 = <&wcd_reset_n_sleep>;
reset-gpios = <&tlmm 83 GPIO_ACTIVE_HIGH>;
vdd-buck-supply = <&vreg_l17b_1p8>;
vdd-rxtx-supply = <&vreg_l18b_1p8>;
vdd-px-supply = <&vreg_l18b_1p8>;
vdd-mic-bias-supply = <&vreg_bob>;
qcom,micbias1-microvolt = <1800000>;
qcom,micbias2-microvolt = <1800000>;
qcom,micbias3-microvolt = <1800000>;
qcom,micbias4-microvolt = <1800000>;
qcom,rx-device = <&wcd937x_rx>;
qcom,tx-device = <&wcd937x_tx>;
#sound-dai-cells = <1>;
};
/* ... */
soundwire@3210000 {
reg = <0x03210000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_rx: codec@0,4 {
compatible = "sdw20217010a00";
reg = <0 4>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
soundwire@3230000 {
reg = <0x03230000 0x2000>;
#address-cells = <2>;
#size-cells = <0>;
wcd937x_tx: codec@0,3 {
compatible = "sdw20217010a00";
reg = <0 3>;
qcom,tx-port-mapping = <1 2 3 4>;
};
};
...
......@@ -32,6 +32,14 @@ properties:
vdd-supply:
description: VDD Supply for the Codec
qcom,port-mapping:
description: |
Specifies static port mapping between slave and master ports.
In the order of slave port index.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 4
maxItems: 4
'#thermal-sensor-cells':
const: 0
......
......@@ -32,6 +32,14 @@ properties:
description: Powerdown/Shutdown line to use (pin SD_N)
maxItems: 1
qcom,port-mapping:
description: |
Specifies static port mapping between slave and master ports.
In the order of slave port index.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 6
maxItems: 6
'#sound-dai-cells':
const: 0
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/rt1019.yaml#
$id: http://devicetree.org/schemas/sound/realtek,rt1019.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT1019 Mono Class-D Audio Amplifier
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5514.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5514 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports both I2C and SPI.
Pins on the device (for linking into audio routes) for I2C:
* DMIC1L
* DMIC1R
* DMIC2L
* DMIC2R
* AMICL
* AMICR
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
- $ref: dai-common.yaml#
properties:
compatible:
const: realtek,rt5514
reg:
maxItems: 1
clocks:
items:
- description: Master clock to the CODEC
clock-names:
items:
- const: mclk
interrupts:
maxItems: 1
description: The interrupt number to the cpu.
realtek,dmic-init-delay-ms:
description: Set the DMIC initial delay (ms) to wait it ready for I2C.
spi-max-frequency: true
wakeup-source:
type: boolean
description: Flag to indicate this device can wake system (suspend/resume).
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@57 {
compatible = "realtek,rt5514";
reg = <0x57>;
};
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5631.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ALC5631/RT5631 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes):
* SPK_OUT_R_P
* SPK_OUT_R_N
* SPK_OUT_L_P
* SPK_OUT_L_N
* HP_OUT_L
* HP_OUT_R
* AUX_OUT2_LP
* AUX_OUT2_RN
* AUX_OUT1_LP
* AUX_OUT1_RN
* AUX_IN_L_JD
* AUX_IN_R_JD
* MONO_IN_P
* MONO_IN_N
* MIC1_P
* MIC1_N
* MIC2_P
* MIC2_N
* MONO_OUT_P
* MONO_OUT_N
* MICBIAS1
* MICBIAS2
properties:
compatible:
enum:
- realtek,alc5631
- realtek,rt5631
reg:
maxItems: 1
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "realtek,alc5631";
reg = <0x1a>;
};
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5645.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5650/RT5645 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes) for RT5645/RT5650:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* Haptic Generator
* HPOL
* HPOR
* LOUTL
* LOUTR
* PDM1L
* PDM1R
* SPOL
* SPOR
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- realtek,rt5645
- realtek,rt5650
reg:
maxItems: 1
interrupts:
maxItems: 1
description: The CODEC's interrupt output.
avdd-supply:
description: Power supply for AVDD, providing 1.8V.
cpvdd-supply:
description: Power supply for CPVDD, providing 3.5V.
hp-detect-gpios:
description:
A GPIO spec for the external headphone detect pin. If jd-mode = 0, we
will get the JD status by getting the value of hp-detect-gpios.
maxItems: 1
cbj-sleeve-gpios:
description:
A GPIO spec to control the external combo jack circuit to tie the
sleeve/ring2 contacts to the ground or floating. It could avoid some
electric noise from the active speaker jacks.
maxItems: 1
realtek,in2-differential:
description:
Indicate MIC2 input are differential, rather than single-ended.
type: boolean
realtek,dmic1-data-pin:
description: Specify which pin to be used as DMIC1 data pin.
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic1 is not used
- 1 # using IN2P pin as dmic1 data pin
- 2 # using GPIO6 pin as dmic1 data pin
- 3 # using GPIO10 pin as dmic1 data pin
- 4 # using GPIO12 pin as dmic1 data pin
realtek,dmic2-data-pin:
description: Specify which pin to be used as DMIC2 data pin.
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic2 is not used
- 1 # using IN2N pin as dmic2 data pin
- 2 # using GPIO5 pin as dmic2 data pin
- 3 # using GPIO11 pin as dmic2 data pin
realtek,jd-mode:
description: The JD mode of rt5645/rt5650.
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # rt5645/rt5650 JD function is not used
- 1 # Mode-0 (VDD=3.3V), two port jack detection
- 2 # Mode-1 (VDD=3.3V), one port jack detection
- 3 # Mode-2 (VDD=1.8V), one port jack detection
required:
- compatible
- reg
- interrupts
- avdd-supply
- cpvdd-supply
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "realtek,rt5650";
reg = <0x1a>;
hp-detect-gpios = <&gpio 19 0>;
cbj-sleeve-gpios = <&gpio 20 0>;
interrupt-parent = <&gpio>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
avdd-supply = <&avdd_reg>;
cpvdd-supply = <&cpvdd_supply>;
realtek,jd-mode = <3>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5659.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5659/RT5658 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes) for RT5659/RT5658:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* IN3P
* IN3N
* IN4P
* IN4N
* HPOL
* HPOR
* SPOL
* SPOR
* LOUTL
* LOUTR
* MONOOUT
* PDML
* PDMR
* SPDIF
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
enum:
- realtek,rt5659
- realtek,rt5658
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: mclk
realtek,dmic1-data-pin:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic1 is not used
- 1 # using IN2N pin as dmic1 data pin
- 2 # using GPIO5 pin as dmic1 data pin
- 3 # using GPIO9 pin as dmic1 data pin
- 4 # using GPIO11 pin as dmic1 data pin
description: Specify which pin to be used as DMIC1 data pin.
default: 0
realtek,dmic2-data-pin:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # dmic2 is not used
- 1 # using IN2P pin as dmic2 data pin
- 2 # using GPIO6 pin as dmic2 data pin
- 3 # using GPIO10 pin as dmic2 data pin
- 4 # using GPIO12 pin as dmic2 data pin
description: Specify which pin to be used as DMIC2 data pin.
default: 0
realtek,jd-src:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # No JD is used
- 1 # using JD3 as JD source
- 2 # JD source for Intel HDA header
description: Specify which JD source be used.
default: 0
realtek,ldo1-en-gpios:
maxItems: 1
description: CODEC's LDO1_EN pin.
realtek,reset-gpios:
maxItems: 1
description: CODEC's RESET pin.
ports:
$ref: /schemas/graph.yaml#/properties/ports
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1b {
compatible = "realtek,rt5659";
reg = <0x1b>;
interrupt-parent = <&gpio>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
realtek,ldo1-en-gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/realtek,rt5677.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RT5677 audio CODEC
maintainers:
- Animesh Agarwal <animeshagarwal28@gmail.com>
description: |
This device supports I2C only.
Pins on the device (for linking into audio routes):
* IN1P
* IN1N
* IN2P
* IN2N
* MICBIAS1
* DMIC1
* DMIC2
* DMIC3
* DMIC4
* LOUT1
* LOUT2
* LOUT3
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: realtek,rt5677
reg:
maxItems: 1
interrupts:
maxItems: 1
gpio-controller: true
'#gpio-cells':
const: 2
realtek,pow-ldo2-gpio:
maxItems: 1
description: CODEC's POW_LDO2 pin.
realtek,reset-gpio:
maxItems: 1
description: CODEC's RESET pin. Active low.
realtek,gpio-config:
description: |
Array of six 8bit elements that configures GPIO.
0 - floating (reset value)
1 - pull down
2 - pull up
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 6
maxItems: 6
items:
maximum: 2
realtek,jd1-gpio:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # OFF
- 1 # GPIO1 for jd1.
- 2 # GPIO2 for jd1.
- 3 # GPIO3 for jd1.
description: Configures GPIO Mic Jack detection 1.
realtek,jd2-gpio:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # OFF
- 1 # GPIO4 for jd2.
- 2 # GPIO5 for jd2.
- 3 # GPIO6 for jd2.
description: Configures GPIO Mic Jack detection 2.
realtek,jd3-gpio:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # OFF
- 1 # GPIO4 for jd3.
- 2 # GPIO5 for jd3.
- 3 # GPIO6 for jd3.
description: Configures GPIO Mic Jack detection 3.
patternProperties:
'^realtek,in[1-2]-differential$':
type: boolean
description: Indicate MIC1/2 input are differential, rather than
single-ended.
'^realtek,lout[1-3]-differential$':
type: boolean
description: Indicate LOUT1/2/3 outputs are differential, rather than
single-ended.
required:
- compatible
- reg
- interrupts
- gpio-controller
- '#gpio-cells'
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@2c {
compatible = "realtek,rt5677";
reg = <0x2c>;
interrupt-parent = <&gpio>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
realtek,pow-ldo2-gpio = <&gpio 3 GPIO_ACTIVE_HIGH>;
realtek,reset-gpio = <&gpio 3 GPIO_ACTIVE_LOW>;
realtek,in1-differential;
realtek,gpio-config = <0 0 0 0 0 2>;
};
};
RT5514 audio CODEC
This device supports both I2C and SPI.
Required properties:
- compatible : "realtek,rt5514".
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
Optional properties:
- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"
- interrupts: The interrupt number to the cpu. The interrupt specifier format
depends on the interrupt controller.
- realtek,dmic-init-delay-ms
Set the DMIC initial delay (ms) to wait it ready for I2C.
Pins on the device (for linking into audio routes) for I2C:
* DMIC1L
* DMIC1R
* DMIC2L
* DMIC2R
* AMICL
* AMICR
Example:
rt5514: codec@57 {
compatible = "realtek,rt5514";
reg = <0x57>;
};
ALC5631/RT5631 audio CODEC
This device supports I2C only.
Required properties:
- compatible : "realtek,alc5631" or "realtek,rt5631"
- reg : the I2C address of the device.
Pins on the device (for linking into audio routes):
* SPK_OUT_R_P
* SPK_OUT_R_N
* SPK_OUT_L_P
* SPK_OUT_L_N
* HP_OUT_L
* HP_OUT_R
* AUX_OUT2_LP
* AUX_OUT2_RN
* AUX_OUT1_LP
* AUX_OUT1_RN
* AUX_IN_L_JD
* AUX_IN_R_JD
* MONO_IN_P
* MONO_IN_N
* MIC1_P
* MIC1_N
* MIC2_P
* MIC2_N
* MONO_OUT_P
* MONO_OUT_N
* MICBIAS1
* MICBIAS2
Example:
alc5631: audio-codec@1a {
compatible = "realtek,alc5631";
reg = <0x1a>;
};
or
rt5631: audio-codec@1a {
compatible = "realtek,rt5631";
reg = <0x1a>;
};
RT5650/RT5645 audio CODEC
This device supports I2C only.
Required properties:
- compatible : One of "realtek,rt5645" or "realtek,rt5650".
- reg : The I2C address of the device.
- interrupts : The CODEC's interrupt output.
- avdd-supply: Power supply for AVDD, providing 1.8V.
- cpvdd-supply: Power supply for CPVDD, providing 3.5V.
Optional properties:
- hp-detect-gpios:
a GPIO spec for the external headphone detect pin. If jd-mode = 0,
we will get the JD status by getting the value of hp-detect-gpios.
- cbj-sleeve-gpios:
a GPIO spec to control the external combo jack circuit to tie the sleeve/ring2
contacts to the ground or floating. It could avoid some electric noise from the
active speaker jacks.
- realtek,in2-differential
Boolean. Indicate MIC2 input are differential, rather than single-ended.
- realtek,dmic1-data-pin
0: dmic1 is not used
1: using IN2P pin as dmic1 data pin
2: using GPIO6 pin as dmic1 data pin
3: using GPIO10 pin as dmic1 data pin
4: using GPIO12 pin as dmic1 data pin
- realtek,dmic2-data-pin
0: dmic2 is not used
1: using IN2N pin as dmic2 data pin
2: using GPIO5 pin as dmic2 data pin
3: using GPIO11 pin as dmic2 data pin
-- realtek,jd-mode : The JD mode of rt5645/rt5650
0 : rt5645/rt5650 JD function is not used
1 : Mode-0 (VDD=3.3V), two port jack detection
2 : Mode-1 (VDD=3.3V), one port jack detection
3 : Mode-2 (VDD=1.8V), one port jack detection
Pins on the device (for linking into audio routes) for RT5645/RT5650:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* Haptic Generator
* HPOL
* HPOR
* LOUTL
* LOUTR
* PDM1L
* PDM1R
* SPOL
* SPOR
Example:
codec: rt5650@1a {
compatible = "realtek,rt5650";
reg = <0x1a>;
hp-detect-gpios = <&gpio 19 0>;
cbj-sleeve-gpios = <&gpio 20 0>;
interrupt-parent = <&gpio>;
interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
realtek,dmic-en = "true";
realtek,en-jd-func = "true";
realtek,jd-mode = <3>;
};
RT5659/RT5658 audio CODEC
This device supports I2C only.
Required properties:
- compatible : One of "realtek,rt5659" or "realtek,rt5658".
- reg : The I2C address of the device.
- interrupts : The CODEC's interrupt output.
Optional properties:
- clocks: The phandle of the master clock to the CODEC
- clock-names: Should be "mclk"
- realtek,in1-differential
- realtek,in3-differential
- realtek,in4-differential
Boolean. Indicate MIC1/3/4 input are differential, rather than single-ended.
- realtek,dmic1-data-pin
0: dmic1 is not used
1: using IN2N pin as dmic1 data pin
2: using GPIO5 pin as dmic1 data pin
3: using GPIO9 pin as dmic1 data pin
4: using GPIO11 pin as dmic1 data pin
- realtek,dmic2-data-pin
0: dmic2 is not used
1: using IN2P pin as dmic2 data pin
2: using GPIO6 pin as dmic2 data pin
3: using GPIO10 pin as dmic2 data pin
4: using GPIO12 pin as dmic2 data pin
- realtek,jd-src
0: No JD is used
1: using JD3 as JD source
2: JD source for Intel HDA header
- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
- realtek,reset-gpios : The GPIO that controls the CODEC's RESET pin.
- sound-name-prefix: Please refer to dai-common.yaml
- ports: A Codec may have a single or multiple I2S interfaces. These
interfaces on Codec side can be described under 'ports' or 'port'.
When the SoC or host device is connected to multiple interfaces of
the Codec, the connectivity can be described using 'ports' property.
If a single interface is used, then 'port' can be used. The usage
depends on the platform or board design.
Please refer to Documentation/devicetree/bindings/graph.txt
Pins on the device (for linking into audio routes) for RT5659/RT5658:
* DMIC L1
* DMIC R1
* DMIC L2
* DMIC R2
* IN1P
* IN1N
* IN2P
* IN2N
* IN3P
* IN3N
* IN4P
* IN4N
* HPOL
* HPOR
* SPOL
* SPOR
* LOUTL
* LOUTR
* MONOOUT
* PDML
* PDMR
* SPDIF
Example:
rt5659 {
compatible = "realtek,rt5659";
reg = <0x1b>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
realtek,ldo1-en-gpios =
<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
};
RT5677 audio CODEC
This device supports I2C only.
Required properties:
- compatible : "realtek,rt5677".
- reg : The I2C address of the device.
- interrupts : The CODEC's interrupt output.
- gpio-controller : Indicates this device is a GPIO controller.
- #gpio-cells : Should be two. The first cell is the pin number and the
second cell is used to specify optional parameters (currently unused).
Optional properties:
- realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin.
- realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin. Active low.
- realtek,in1-differential
- realtek,in2-differential
- realtek,lout1-differential
- realtek,lout2-differential
- realtek,lout3-differential
Boolean. Indicate MIC1/2 input and LOUT1/2/3 outputs are differential,
rather than single-ended.
- realtek,gpio-config
Array of six 8bit elements that configures GPIO.
0 - floating (reset value)
1 - pull down
2 - pull up
- realtek,jd1-gpio
Configures GPIO Mic Jack detection 1.
Select 0 ~ 3 as OFF, GPIO1, GPIO2 and GPIO3 respectively.
- realtek,jd2-gpio
- realtek,jd3-gpio
Configures GPIO Mic Jack detection 2 and 3.
Select 0 ~ 3 as OFF, GPIO4, GPIO5 and GPIO6 respectively.
Pins on the device (for linking into audio routes):
* IN1P
* IN1N
* IN2P
* IN2N
* MICBIAS1
* DMIC1
* DMIC2
* DMIC3
* DMIC4
* LOUT1
* LOUT2
* LOUT3
Example:
rt5677 {
compatible = "realtek,rt5677";
reg = <0x2c>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
realtek,pow-ldo2-gpio =
<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
realtek,reset-gpio = <&gpio TEGRA_GPIO(BB, 3) GPIO_ACTIVE_LOW>;
realtek,in1-differential = "true";
realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */
realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */
};
......@@ -53,6 +53,9 @@ properties:
submic-bias-supply:
description: Supply for the micbias on the Sub microphone
headset-mic-bias-supply:
description: Supply for the micbias on the Headset microphone
fm-sel-gpios:
maxItems: 1
description: GPIO pin for FM selection
......@@ -61,6 +64,36 @@ properties:
maxItems: 1
description: GPIO pin for line out selection
headset-detect-gpios:
maxItems: 1
description: GPIO for detection of headset insertion
headset-key-gpios:
maxItems: 1
description: GPIO for detection of headset key press
io-channels:
maxItems: 1
description: IO channel to read micbias voltage for headset detection
io-channel-names:
const: headset-detect
samsung,headset-4pole-threshold-microvolt:
minItems: 2
maxItems: 2
description:
Array containing minimum and maximum IO channel value for 4-pole
(with microphone/button) headsets. If the IO channel value is
outside of this range, a 3-pole headset is assumed.
samsung,headset-button-threshold-microvolt:
minItems: 3
maxItems: 3
description: |
Array of minimum (inclusive) IO channel values for headset button
detection, in order: "Media", "Volume Up" and "Volume Down".
required:
- compatible
- cpu
......
......@@ -24,6 +24,11 @@ properties:
description: |
GPIOs used to select the input line.
state-labels:
description: State of input line. default is "Input 1", "Input 2"
$ref: /schemas/types.yaml#/definitions/string-array
maxItems: 2
sound-name-prefix: true
required:
......@@ -37,4 +42,5 @@ examples:
mux {
compatible = "simple-audio-mux";
mux-gpios = <&gpio 3 0>;
state-labels = "Label_A", "Label_B";
};
Device-Tree bindings for dummy spdif receiver
Required properties:
- compatible: should be "linux,spdif-dir".
Example node:
codec: spdif-receiver {
compatible = "linux,spdif-dir";
};
Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers
The codec is controlled through an I2C interface. It also has two other
signals that can be wired up to GPIOs: reset (strongly recommended), and
powerdown (optional).
Required properties:
- compatible: should be one of the following:
- "ti,tas5707"
- "ti,tas5711",
- "ti,tas5717",
- "ti,tas5719",
- "ti,tas5721"
- "ti,tas5733"
- reg: The I2C address of the device
- #sound-dai-cells: must be equal to 0
Optional properties:
- reset-gpios: GPIO specifier for the TAS571x's active low reset line
- pdn-gpios: GPIO specifier for the TAS571x's active low powerdown line
- clocks: clock phandle for the MCLK input
- clock-names: should be "mclk"
- AVDD-supply: regulator phandle for the AVDD supply (all chips)
- DVDD-supply: regulator phandle for the DVDD supply (all chips)
- HPVDD-supply: regulator phandle for the HPVDD supply (5717/5719)
- PVDD_AB-supply: regulator phandle for the PVDD_AB supply (5717/5719)
- PVDD_CD-supply: regulator phandle for the PVDD_CD supply (5717/5719)
- PVDD_A-supply: regulator phandle for the PVDD_A supply (5711)
- PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
- PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
- PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
- DRVDD-supply: regulator phandle for the DRVDD supply (5721)
- PVDD-supply: regulator phandle for the PVDD supply (5721)
Example:
tas5717: audio-codec@2a {
compatible = "ti,tas5717";
reg = <0x2a>;
#sound-dai-cells = <0>;
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
pdn-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
clocks = <&clk_core CLK_I2S>;
clock-names = "mclk";
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,omap4-mcpdm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: OMAP McPDM
maintainers:
- Misael Lopez Cruz <misael.lopez@ti.com>
description:
OMAP ALSA SoC DAI driver using McPDM port used by TWL6040
properties:
compatible:
const: ti,omap4-mcpdm
reg:
items:
- description: MPU access base address
- description: L3 interconnect address
reg-names:
items:
- const: mpu
- const: dma
interrupts:
maxItems: 1
dmas:
maxItems: 2
dma-names:
items:
- const: up_link
- const: dn_link
clocks:
maxItems: 1
clock-names:
items:
- const: pdmclk
required:
- compatible
- reg
- reg-names
- interrupts
- dmas
- dma-names
- clocks
- clock-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
mcpdm@0 {
compatible = "ti,omap4-mcpdm";
reg = <0x0 0x7f>, /* MPU private access */
<0x49032000 0x7f>; /* L3 Interconnect */
reg-names = "mpu", "dma";
interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
dmas = <&sdma 65>, <&sdma 66>;
dma-names = "up_link", "dn_link";
clocks = <&twl6040>;
clock-names = "pdmclk";
};
......@@ -2,7 +2,7 @@
# Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas2562.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas2562.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS2562 Smart PA
......
......@@ -2,7 +2,7 @@
# Copyright (C) 2019-20 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas2770.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas2770.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS2770 Smart PA
......
......@@ -2,7 +2,7 @@
# Copyright (C) 2020-2022 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas27xx.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas27xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS2764/TAS2780 Smart PA
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,tas57xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TAS5711/TAS5717/TAS5719/TAS5721 stereo power amplifiers
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
properties:
compatible:
enum:
- ti,tas5707
- ti,tas5711
- ti,tas5717
- ti,tas5719
- ti,tas5721
- ti,tas5733
reg:
maxItems: 1
reset-gpios:
maxItems: 1
description: GPIO for the active low reset line
pdn-gpios:
maxItems: 1
description: GPIO for the active low powerdown line
clocks:
maxItems: 1
clock-names:
const: mclk
AVDD-supply: true
DVDD-supply: true
HPVDD-supply: true
PVDD_AB-supply: true
PVDD_CD-supply: true
PVDD_A-supply: true
PVDD_B-supply: true
PVDD_C-supply: true
PVDD_D-supply: true
DRVDD-supply: true
PVDD-supply: true
'#sound-dai-cells':
const: 0
port:
$ref: audio-graph-port.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
- '#sound-dai-cells'
allOf:
- $ref: dai-common.yaml#
- if:
properties:
compatible:
contains:
enum:
- ti,tas5717
- ti,tas5719
then:
properties:
PVDD_A-supply: false
PVDD_B-supply: false
PVDD_C-supply: false
PVDD_D-supply: false
DRVDD-supply: false
PVDD-supply: false
- if:
properties:
compatible:
contains:
enum:
- ti,tas5711
then:
properties:
HPVDD-supply: false
PVDD_AB-supply: false
PVDD_CD-supply: false
DRVDD-supply: false
PVDD-supply: false
- if:
properties:
compatible:
contains:
enum:
- ti,tas5721
then:
properties:
HPVDD-supply: false
PVDD_AB-supply: false
PVDD_CD-supply: false
PVDD_A-supply: false
PVDD_B-supply: false
PVDD_C-supply: false
PVDD_D-supply: false
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@2a {
compatible = "ti,tas5717";
reg = <0x2a>;
#sound-dai-cells = <0>;
reset-gpios = <&gpio1 15 0>;
pdn-gpios = <&gpio1 15 0>;
AVDD-supply = <&avdd_supply>;
DVDD-supply = <&dvdd_supply>;
HPVDD-supply = <&hpvdd_supply>;
PVDD_AB-supply = <&pvdd_ab_supply>;
PVDD_CD-supply = <&pvdd_cd_supply>;
};
};
...
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tas5805m.yaml#
$id: http://devicetree.org/schemas/sound/ti,tas5805m.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TAS5805M audio amplifier
......
......@@ -58,8 +58,8 @@ properties:
description: |
Configuration for DMDIN/GPIO1 pin.
When ADC3XXX_GPIO_GPO is configured, this causes corresponding the
ALSA control "GPIOx Output" to appear, as a switch control.
When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the
GPIO framework, as pin number 0 on the device.
ti,dmclk-gpio2:
$ref: /schemas/types.yaml#/definitions/uint32
......@@ -76,12 +76,32 @@ properties:
description: |
Configuration for DMCLK/GPIO2 pin.
When ADC3XXX_GPIO_GPO is configured, this causes corresponding the
ALSA control "GPIOx Output" to appear, as a switch control.
When ADC3XXX_GPIO_GPO is selected, the pin may be controlled via the
GPIO framework, as pin number 1 on the device.
Note that there is currently no support for reading the GPIO pins as
inputs.
ti,micbias1-gpo:
type: boolean
description: |
When set, the MICBIAS1 pin may be controlled via the GPIO framework,
as pin number 3 on the device.
In this mode, when the pin is activated, it will be set to the voltage
specified by the ti,micbias1-vg property. When deactivated, the pin will
float.
ti,micbias2-gpo:
type: boolean
description: |
When set, the MICBIAS2 pin may be controlled via the GPIO framework,
as pin number 4 on the device.
In this mode, when the pin is activated, it will be set to the voltage
specified by the ti,micbias2-vg property. When deactivated, the pin will
float.
ti,micbias1-vg:
$ref: /schemas/types.yaml#/definitions/uint32
enum:
......@@ -104,6 +124,10 @@ properties:
description: |
Mic bias voltage output on MICBIAS2 pin
dependencies:
ti,micbias1-gpo: ['ti,micbias1-vg']
ti,micbias2-gpo: ['ti,micbias2-vg']
required:
- compatible
- reg
......
......@@ -2,7 +2,7 @@
# Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/tlv320adcx140.yaml#
$id: http://devicetree.org/schemas/sound/ti,tlv320adcx140.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments TLV320ADCX140 Quad Channel Analog-to-Digital Converter
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wm8750.yaml#
$id: http://devicetree.org/schemas/sound/wlf,wm8750.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: WM8750 and WM8987 audio CODECs
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8782.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Wolfson Microelectromics WM8782 audio CODEC
maintainers:
- patches@opensource.cirrus.com
allOf:
- $ref: dai-common.yaml#
properties:
compatible:
const: wlf,wm8782
Vdda-supply:
description: Regulator for the analog power supply (2.7V - 5.5V)
Vdd-supply:
description: Regulator for the digital power supply (2.7V - 3.6V)
wlf,fsampen:
description: FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0, 1, 2]
"#sound-dai-cells":
const: 0
required:
- compatible
- Vdda-supply
- Vdd-supply
unevaluatedProperties: false
examples:
- |
wm8782: codec {
compatible = "wlf,wm8782";
Vdda-supply = <&vdda_supply>;
Vdd-supply = <&vdd_supply>;
wlf,fsampen = <2>;
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/wlf,wm8804.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: WM8804 audio codec
description: |
This device supports both I2C and SPI (configured with pin strapping on the
board).
maintainers:
- patches@opensource.cirrus.com
properties:
compatible:
const: wlf,wm8804
reg:
description:
The I2C address of the device for I2C, the chip select number for SPI.
maxItems: 1
"#sound-dai-cells":
const: 0
PVDD-supply:
description: PLL core supply
DVDD-supply:
description: Digital core supply
wlf,reset-gpio:
description: A GPIO specifier for the GPIO controlling the reset pin.
maxItems: 1
required:
- reg
- compatible
- PVDD-supply
- DVDD-supply
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@1a {
compatible = "wlf,wm8804";
reg = <0x1a>;
PVDD-supply = <&pvdd_reg>;
DVDD-supply = <&dvdd_reg>;
};
};
WM8782 stereo ADC
This device does not have any control interface or reset pins.
Required properties:
- compatible : "wlf,wm8782"
- Vdda-supply : phandle to a regulator for the analog power supply (2.7V - 5.5V)
- Vdd-supply : phandle to a regulator for the digital power supply (2.7V - 3.6V)
Optional properties:
- wlf,fsampen:
FSAMPEN pin value, 0 for low, 1 for high, 2 for disconnected.
Defaults to 0 if left unspecified.
Example:
wm8782: stereo-adc {
compatible = "wlf,wm8782";
Vdda-supply = <&vdda_supply>;
Vdd-supply = <&vdd_supply>;
wlf,fsampen = <2>; /* 192KHz */
};
WM8804 audio CODEC
This device supports both I2C and SPI (configured with pin strapping
on the board).
Required properties:
- compatible : "wlf,wm8804"
- reg : the I2C address of the device for I2C, the chip select
number for SPI.
- PVDD-supply, DVDD-supply : Power supplies for the device, as covered
in Documentation/devicetree/bindings/regulator/regulator.txt
Optional properties:
- wlf,reset-gpio: A GPIO specifier for the GPIO controlling the reset pin
Example:
wm8804: codec@1a {
compatible = "wlf,wm8804";
reg = <0x1a>;
};
......@@ -9028,6 +9028,16 @@ S: Maintained
F: sound/soc/fsl/fsl*
F: sound/soc/fsl/imx*
FREESCALE SOC LPC32XX SOUND DRIVERS
M: J.M.B. Downing <jonathan.downing@nautel.com>
M: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>
R: Vladimir Zapolskiy <vz@mleia.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
L: linuxppc-dev@lists.ozlabs.org
S: Maintained
F: Documentation/devicetree/bindings/sound/nxp,lpc3220-i2s.yaml
F: sound/soc/fsl/lpc3xxx-*
FREESCALE SOC SOUND QMC DRIVER
M: Herve Codina <herve.codina@bootlin.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
......@@ -16400,7 +16410,7 @@ NXP SGTL5000 DRIVER
M: Fabio Estevam <festevam@gmail.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/sgtl5000.yaml
F: Documentation/devicetree/bindings/sound/fsl,sgtl5000.yaml
F: sound/soc/codecs/sgtl5000*
NXP SJA1105 ETHERNET SWITCH DRIVER
......@@ -22442,13 +22452,13 @@ M: Baojun Xu <baojun.xu@ti.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/tas2552.txt
F: Documentation/devicetree/bindings/sound/tas2562.yaml
F: Documentation/devicetree/bindings/sound/tas2770.yaml
F: Documentation/devicetree/bindings/sound/tas27xx.yaml
F: Documentation/devicetree/bindings/sound/ti,tas2562.yaml
F: Documentation/devicetree/bindings/sound/ti,tas2770.yaml
F: Documentation/devicetree/bindings/sound/ti,tas27xx.yaml
F: Documentation/devicetree/bindings/sound/ti,pcm1681.yaml
F: Documentation/devicetree/bindings/sound/ti,pcm3168a.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320*.yaml
F: Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
F: Documentation/devicetree/bindings/sound/ti,tlv320adcx140.yaml
F: Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
F: Documentation/devicetree/bindings/sound/tpa6130a2.txt
F: include/sound/tas2*.h
......@@ -25221,6 +25231,12 @@ F: mm/zpool.c
F: mm/zswap.c
F: tools/testing/selftests/cgroup/test_zswap.c
SENARYTECH AUDIO CODEC DRIVER
M: bo liu <bo.liu@senarytech.com>
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
F: sound/pci/hda/patch_senarytech.c
THE REST
M: Linus Torvalds <torvalds@linux-foundation.org>
L: linux-kernel@vger.kernel.org
......
......@@ -318,7 +318,6 @@ CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_EUKREA_TLV320=y
CONFIG_SND_SOC_IMX_ES8328=y
CONFIG_SND_SOC_IMX_SGTL5000=y
CONFIG_SND_SOC_IMX_SPDIF=y
CONFIG_SND_SOC_FSL_ASOC_CARD=y
CONFIG_SND_SOC_AC97_CODEC=y
CONFIG_SND_SOC_CS42XX8_I2C=y
......
......@@ -951,7 +951,6 @@ CONFIG_SND_SOC_FSL_MICFIL=m
CONFIG_SND_SOC_FSL_EASRC=m
CONFIG_SND_IMX_SOC=m
CONFIG_SND_SOC_IMX_SGTL5000=m
CONFIG_SND_SOC_IMX_SPDIF=m
CONFIG_SND_SOC_FSL_ASOC_CARD=m
CONFIG_SND_SOC_IMX_AUDMIX=m
CONFIG_SND_SOC_MT8183=m
......
......@@ -277,15 +277,25 @@ acpi_evaluate_integer(acpi_handle handle,
EXPORT_SYMBOL(acpi_evaluate_integer);
int acpi_get_local_address(acpi_handle handle, u32 *addr)
int acpi_get_local_u64_address(acpi_handle handle, u64 *addr)
{
unsigned long long adr;
acpi_status status;
status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr);
status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, addr);
if (ACPI_FAILURE(status))
return -ENODATA;
return 0;
}
EXPORT_SYMBOL(acpi_get_local_u64_address);
int acpi_get_local_address(acpi_handle handle, u32 *addr)
{
u64 adr;
int ret;
ret = acpi_get_local_u64_address(handle, &adr);
if (ret < 0)
return ret;
*addr = (u32)adr;
return 0;
}
......
......@@ -12,6 +12,7 @@
#include <linux/ctype.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/minmax.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/seq_file.h>
......@@ -802,6 +803,9 @@ int cs_dsp_coeff_write_ctrl(struct cs_dsp_coeff_ctl *ctl,
lockdep_assert_held(&ctl->dsp->pwr_lock);
if (ctl->flags && !(ctl->flags & WMFW_CTL_FLAG_WRITEABLE))
return -EPERM;
if (len + off * sizeof(u32) > ctl->len)
return -EINVAL;
......@@ -1053,7 +1057,7 @@ static int cs_dsp_create_control(struct cs_dsp *dsp,
ctl->fw_name = dsp->fw_name;
ctl->alg_region = *alg_region;
if (subname && dsp->fw_ver >= 2) {
if (subname && dsp->wmfw_ver >= 2) {
ctl->subname_len = subname_len;
ctl->subname = kasprintf(GFP_KERNEL, "%.*s", subname_len, subname);
if (!ctl->subname) {
......@@ -1180,7 +1184,7 @@ static int cs_dsp_coeff_parse_alg(struct cs_dsp *dsp,
raw = (const struct wmfw_adsp_alg_data *)region->data;
switch (dsp->fw_ver) {
switch (dsp->wmfw_ver) {
case 0:
case 1:
if (sizeof(*raw) > data_len)
......@@ -1257,7 +1261,7 @@ static int cs_dsp_coeff_parse_coeff(struct cs_dsp *dsp,
blk->offset = le16_to_cpu(raw->hdr.offset);
blk->mem_type = le16_to_cpu(raw->hdr.type);
switch (dsp->fw_ver) {
switch (dsp->wmfw_ver) {
case 0:
case 1:
if (sizeof(*raw) > (data_len - pos))
......@@ -1476,7 +1480,6 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
const struct wmfw_region *region;
const struct cs_dsp_region *mem;
const char *region_name;
char *text = NULL;
struct cs_dsp_buf *buf;
unsigned int reg;
int regions = 0;
......@@ -1505,8 +1508,7 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
goto out_fw;
}
cs_dsp_info(dsp, "Firmware version: %d\n", header->ver);
dsp->fw_ver = header->ver;
dsp->wmfw_ver = header->ver;
if (header->core != dsp->type) {
cs_dsp_err(dsp, "%s: invalid core %d != %d\n",
......@@ -1529,8 +1531,8 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
goto out_fw;
}
cs_dsp_dbg(dsp, "%s: timestamp %llu\n", file,
le64_to_cpu(footer->timestamp));
cs_dsp_info(dsp, "%s: format %d timestamp %#llx\n", file, header->ver,
le64_to_cpu(footer->timestamp));
while (pos < firmware->size) {
/* Is there enough data for a complete block header? */
......@@ -1548,15 +1550,15 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
region_name = "Unknown";
reg = 0;
text = NULL;
offset = le32_to_cpu(region->offset) & 0xffffff;
type = be32_to_cpu(region->type) & 0xff;
switch (type) {
case WMFW_INFO_TEXT:
case WMFW_NAME_TEXT:
region_name = "Firmware name";
text = kzalloc(le32_to_cpu(region->len) + 1,
GFP_KERNEL);
region_name = "Info/Name";
cs_dsp_info(dsp, "%s: %.*s\n", file,
min(le32_to_cpu(region->len), 100), region->data);
break;
case WMFW_ALGORITHM_DATA:
region_name = "Algorithm";
......@@ -1564,11 +1566,6 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
if (ret != 0)
goto out_fw;
break;
case WMFW_INFO_TEXT:
region_name = "Information";
text = kzalloc(le32_to_cpu(region->len) + 1,
GFP_KERNEL);
break;
case WMFW_ABSOLUTE:
region_name = "Absolute";
reg = offset;
......@@ -1602,13 +1599,6 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
regions, le32_to_cpu(region->len), offset,
region_name);
if (text) {
memcpy(text, region->data, le32_to_cpu(region->len));
cs_dsp_info(dsp, "%s: %s\n", file, text);
kfree(text);
text = NULL;
}
if (reg) {
buf = cs_dsp_buf_alloc(region->data,
le32_to_cpu(region->len),
......@@ -1650,7 +1640,6 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware,
out_fw:
regmap_async_complete(regmap);
cs_dsp_buf_free(&buf_list);
kfree(text);
if (ret == -EOVERFLOW)
cs_dsp_err(dsp, "%s: file content overflows file data\n", file);
......@@ -1799,7 +1788,7 @@ static struct cs_dsp_alg_region *cs_dsp_create_region(struct cs_dsp *dsp,
list_add_tail(&alg_region->list, &dsp->alg_regions);
if (dsp->fw_ver > 0)
if (dsp->wmfw_ver > 0)
cs_dsp_ctl_fixup_base(dsp, alg_region);
return alg_region;
......@@ -1922,7 +1911,7 @@ static int cs_dsp_adsp1_setup_algs(struct cs_dsp *dsp)
ret = PTR_ERR(alg_region);
goto out;
}
if (dsp->fw_ver == 0) {
if (dsp->wmfw_ver == 0) {
if (i + 1 < n_algs) {
len = be32_to_cpu(adsp1_alg[i + 1].dm);
len -= be32_to_cpu(adsp1_alg[i].dm);
......@@ -1944,7 +1933,7 @@ static int cs_dsp_adsp1_setup_algs(struct cs_dsp *dsp)
ret = PTR_ERR(alg_region);
goto out;
}
if (dsp->fw_ver == 0) {
if (dsp->wmfw_ver == 0) {
if (i + 1 < n_algs) {
len = be32_to_cpu(adsp1_alg[i + 1].zm);
len -= be32_to_cpu(adsp1_alg[i].zm);
......@@ -2035,7 +2024,7 @@ static int cs_dsp_adsp2_setup_algs(struct cs_dsp *dsp)
ret = PTR_ERR(alg_region);
goto out;
}
if (dsp->fw_ver == 0) {
if (dsp->wmfw_ver == 0) {
if (i + 1 < n_algs) {
len = be32_to_cpu(adsp2_alg[i + 1].xm);
len -= be32_to_cpu(adsp2_alg[i].xm);
......@@ -2057,7 +2046,7 @@ static int cs_dsp_adsp2_setup_algs(struct cs_dsp *dsp)
ret = PTR_ERR(alg_region);
goto out;
}
if (dsp->fw_ver == 0) {
if (dsp->wmfw_ver == 0) {
if (i + 1 < n_algs) {
len = be32_to_cpu(adsp2_alg[i + 1].ym);
len -= be32_to_cpu(adsp2_alg[i].ym);
......@@ -2079,7 +2068,7 @@ static int cs_dsp_adsp2_setup_algs(struct cs_dsp *dsp)
ret = PTR_ERR(alg_region);
goto out;
}
if (dsp->fw_ver == 0) {
if (dsp->wmfw_ver == 0) {
if (i + 1 < n_algs) {
len = be32_to_cpu(adsp2_alg[i + 1].zm);
len -= be32_to_cpu(adsp2_alg[i].zm);
......@@ -2183,7 +2172,6 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware
struct cs_dsp_alg_region *alg_region;
const char *region_name;
int ret, pos, blocks, type, offset, reg, version;
char *text = NULL;
struct cs_dsp_buf *buf;
if (!firmware)
......@@ -2252,7 +2240,8 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware
region_name = "Unknown";
switch (type) {
case (WMFW_NAME_TEXT << 8):
text = kzalloc(le32_to_cpu(blk->len) + 1, GFP_KERNEL);
cs_dsp_info(dsp, "%s: %.*s\n", dsp->fw_name,
min(le32_to_cpu(blk->len), 100), blk->data);
break;
case (WMFW_INFO_TEXT << 8):
case (WMFW_METADATA << 8):
......@@ -2324,13 +2313,6 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware
break;
}
if (text) {
memcpy(text, blk->data, le32_to_cpu(blk->len));
cs_dsp_info(dsp, "%s: %s\n", dsp->fw_name, text);
kfree(text);
text = NULL;
}
if (reg) {
buf = cs_dsp_buf_alloc(blk->data,
le32_to_cpu(blk->len),
......@@ -2370,7 +2352,6 @@ static int cs_dsp_load_coeff(struct cs_dsp *dsp, const struct firmware *firmware
out_fw:
regmap_async_complete(regmap);
cs_dsp_buf_free(&buf_list);
kfree(text);
if (ret == -EOVERFLOW)
cs_dsp_err(dsp, "%s: file content overflows file data\n", file);
......@@ -2437,8 +2418,8 @@ EXPORT_SYMBOL_NS_GPL(cs_dsp_adsp1_init, FW_CS_DSP);
* Return: Zero for success, a negative number on error.
*/
int cs_dsp_adsp1_power_up(struct cs_dsp *dsp,
const struct firmware *wmfw_firmware, char *wmfw_filename,
const struct firmware *coeff_firmware, char *coeff_filename,
const struct firmware *wmfw_firmware, const char *wmfw_filename,
const struct firmware *coeff_firmware, const char *coeff_filename,
const char *fw_name)
{
unsigned int val;
......@@ -2731,8 +2712,8 @@ static void cs_dsp_halo_stop_watchdog(struct cs_dsp *dsp)
* Return: Zero for success, a negative number on error.
*/
int cs_dsp_power_up(struct cs_dsp *dsp,
const struct firmware *wmfw_firmware, char *wmfw_filename,
const struct firmware *coeff_firmware, char *coeff_filename,
const struct firmware *wmfw_firmware, const char *wmfw_filename,
const struct firmware *coeff_firmware, const char *coeff_filename,
const char *fw_name)
{
int ret;
......
......@@ -1777,13 +1777,28 @@ static struct qmc_chan *qmc_chan_get_from_qmc(struct device_node *qmc_np, unsign
return qmc_chan;
}
struct qmc_chan *qmc_chan_get_byphandle(struct device_node *np, const char *phandle_name)
int qmc_chan_count_phandles(struct device_node *np, const char *phandles_name)
{
int count;
/* phandles are fixed args phandles with one arg */
count = of_count_phandle_with_args(np, phandles_name, NULL);
if (count < 0)
return count;
return count / 2;
}
EXPORT_SYMBOL(qmc_chan_count_phandles);
struct qmc_chan *qmc_chan_get_byphandles_index(struct device_node *np,
const char *phandles_name,
int index)
{
struct of_phandle_args out_args;
struct qmc_chan *qmc_chan;
int ret;
ret = of_parse_phandle_with_fixed_args(np, phandle_name, 1, 0,
ret = of_parse_phandle_with_fixed_args(np, phandles_name, 1, index,
&out_args);
if (ret < 0)
return ERR_PTR(ret);
......@@ -1797,7 +1812,7 @@ struct qmc_chan *qmc_chan_get_byphandle(struct device_node *np, const char *phan
of_node_put(out_args.np);
return qmc_chan;
}
EXPORT_SYMBOL(qmc_chan_get_byphandle);
EXPORT_SYMBOL(qmc_chan_get_byphandles_index);
struct qmc_chan *qmc_chan_get_bychild(struct device_node *np)
{
......@@ -1827,9 +1842,10 @@ static void devm_qmc_chan_release(struct device *dev, void *res)
qmc_chan_put(*qmc_chan);
}
struct qmc_chan *devm_qmc_chan_get_byphandle(struct device *dev,
struct device_node *np,
const char *phandle_name)
struct qmc_chan *devm_qmc_chan_get_byphandles_index(struct device *dev,
struct device_node *np,
const char *phandles_name,
int index)
{
struct qmc_chan *qmc_chan;
struct qmc_chan **dr;
......@@ -1838,7 +1854,7 @@ struct qmc_chan *devm_qmc_chan_get_byphandle(struct device *dev,
if (!dr)
return ERR_PTR(-ENOMEM);
qmc_chan = qmc_chan_get_byphandle(np, phandle_name);
qmc_chan = qmc_chan_get_byphandles_index(np, phandles_name, index);
if (!IS_ERR(qmc_chan)) {
*dr = qmc_chan;
devres_add(dev, dr);
......@@ -1848,7 +1864,7 @@ struct qmc_chan *devm_qmc_chan_get_byphandle(struct device *dev,
return qmc_chan;
}
EXPORT_SYMBOL(devm_qmc_chan_get_byphandle);
EXPORT_SYMBOL(devm_qmc_chan_get_byphandles_index);
struct qmc_chan *devm_qmc_chan_get_bychild(struct device *dev,
struct device_node *np)
......
......@@ -97,18 +97,13 @@ static bool find_slave(struct sdw_bus *bus,
struct acpi_device *adev,
struct sdw_slave_id *id)
{
u64 addr;
unsigned int link_id;
acpi_status status;
status = acpi_evaluate_integer(adev->handle,
METHOD_NAME__ADR, NULL, &addr);
u64 addr;
int ret;
if (ACPI_FAILURE(status)) {
dev_err(bus->dev, "_ADR resolution failed: %x\n",
status);
ret = acpi_get_local_u64_address(adev->handle, &addr);
if (ret < 0)
return false;
}
if (bus->ops->override_adr)
addr = bus->ops->override_adr(bus, addr);
......
/* SPDX-License-Identifier: GPL-2.0
*
* audio-graph.h
*
* Copyright (c) 2024 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
*/
#ifndef __AUDIO_GRAPH_H
#define __AUDIO_GRAPH_H
/*
* used in
* link-trigger-order
* link-trigger-order-start
* link-trigger-order-stop
*
* default is
* link-trigger-order = <SND_SOC_TRIGGER_LINK
* SND_SOC_TRIGGER_COMPONENT
* SND_SOC_TRIGGER_DAI>;
*/
#define SND_SOC_TRIGGER_LINK 0
#define SND_SOC_TRIGGER_COMPONENT 1
#define SND_SOC_TRIGGER_DAI 2
#define SND_SOC_TRIGGER_SIZE 3 /* shoud be last */
#endif /* __AUDIO_GRAPH_H */
......@@ -759,6 +759,7 @@ static inline u64 acpi_arch_get_root_pointer(void)
}
#endif
int acpi_get_local_u64_address(acpi_handle handle, u64 *addr);
int acpi_get_local_address(acpi_handle handle, u32 *addr);
const char *acpi_get_subsystem_id(acpi_handle handle);
......
......@@ -177,7 +177,7 @@ struct cs_dsp {
const struct cs_dsp_region *mem;
int num_mems;
int fw_ver;
int wmfw_ver;
bool booted;
bool running;
......@@ -223,13 +223,13 @@ int cs_dsp_adsp2_init(struct cs_dsp *dsp);
int cs_dsp_halo_init(struct cs_dsp *dsp);
int cs_dsp_adsp1_power_up(struct cs_dsp *dsp,
const struct firmware *wmfw_firmware, char *wmfw_filename,
const struct firmware *coeff_firmware, char *coeff_filename,
const struct firmware *wmfw_firmware, const char *wmfw_filename,
const struct firmware *coeff_firmware, const char *coeff_filename,
const char *fw_name);
void cs_dsp_adsp1_power_down(struct cs_dsp *dsp);
int cs_dsp_power_up(struct cs_dsp *dsp,
const struct firmware *wmfw_firmware, char *wmfw_filename,
const struct firmware *coeff_firmware, char *coeff_filename,
const struct firmware *wmfw_firmware, const char *wmfw_filename,
const struct firmware *coeff_firmware, const char *coeff_filename,
const char *fw_name);
void cs_dsp_power_down(struct cs_dsp *dsp);
int cs_dsp_run(struct cs_dsp *dsp);
......
......@@ -40,7 +40,7 @@ struct mtk_adsp_chan {
struct mtk_adsp_ipc {
struct mtk_adsp_chan chans[MTK_ADSP_MBOX_NUM];
struct device *dev;
struct mtk_adsp_ipc_ops *ops;
const struct mtk_adsp_ipc_ops *ops;
void *private_data;
};
......
......@@ -3116,6 +3116,7 @@
#define PCI_DEVICE_ID_INTEL_HDA_LNL_P 0xa828
#define PCI_DEVICE_ID_INTEL_S21152BB 0xb152
#define PCI_DEVICE_ID_INTEL_HDA_BMG 0xe2f7
#define PCI_DEVICE_ID_INTEL_HDA_PTL 0xe428
#define PCI_DEVICE_ID_INTEL_HDA_CML_R 0xf0c8
#define PCI_DEVICE_ID_INTEL_HDA_RKL_S 0xf1c8
......
......@@ -16,11 +16,32 @@ struct device_node;
struct device;
struct qmc_chan;
struct qmc_chan *qmc_chan_get_byphandle(struct device_node *np, const char *phandle_name);
int qmc_chan_count_phandles(struct device_node *np, const char *phandles_name);
struct qmc_chan *qmc_chan_get_byphandles_index(struct device_node *np,
const char *phandles_name,
int index);
struct qmc_chan *devm_qmc_chan_get_byphandles_index(struct device *dev,
struct device_node *np,
const char *phandles_name,
int index);
static inline struct qmc_chan *qmc_chan_get_byphandle(struct device_node *np,
const char *phandle_name)
{
return qmc_chan_get_byphandles_index(np, phandle_name, 0);
}
static inline struct qmc_chan *devm_qmc_chan_get_byphandle(struct device *dev,
struct device_node *np,
const char *phandle_name)
{
return devm_qmc_chan_get_byphandles_index(dev, np, phandle_name, 0);
}
struct qmc_chan *qmc_chan_get_bychild(struct device_node *np);
void qmc_chan_put(struct qmc_chan *chan);
struct qmc_chan *devm_qmc_chan_get_byphandle(struct device *dev, struct device_node *np,
const char *phandle_name);
struct qmc_chan *devm_qmc_chan_get_bychild(struct device *dev, struct device_node *np);
enum qmc_mode {
......
......@@ -896,8 +896,8 @@ int cs35l41_test_key_lock(struct device *dev, struct regmap *regmap);
int cs35l41_otp_unpack(struct device *dev, struct regmap *regmap);
int cs35l41_register_errata_patch(struct device *dev, struct regmap *reg, unsigned int reg_revid);
int cs35l41_set_channels(struct device *dev, struct regmap *reg,
unsigned int tx_num, unsigned int *tx_slot,
unsigned int rx_num, unsigned int *rx_slot);
unsigned int tx_num, const unsigned int *tx_slot,
unsigned int rx_num, const unsigned int *rx_slot);
int cs35l41_gpio_config(struct regmap *regmap, struct cs35l41_hw_cfg *hw_cfg);
void cs35l41_configure_cs_dsp(struct device *dev, struct regmap *reg, struct cs_dsp *dsp);
int cs35l41_set_cspl_mbox_cmd(struct device *dev, struct regmap *regmap,
......
......@@ -80,9 +80,7 @@
#define CS35L56_DSP1_AHBM_WINDOW_DEBUG_1 0x25E2044
#define CS35L56_DSP1_XMEM_UNPACKED24_0 0x2800000
#define CS35L56_DSP1_FW_VER 0x2800010
#define CS35L56_DSP1_HALO_STATE_A1 0x2801E58
#define CS35L56_DSP1_HALO_STATE 0x28021E0
#define CS35L56_DSP1_PM_CUR_STATE_A1 0x2804000
#define CS35L56_DSP1_PM_CUR_STATE 0x2804308
#define CS35L56_DSP1_XMEM_UNPACKED24_8191 0x2807FFC
#define CS35L56_DSP1_CORE_BASE 0x2B80000
......@@ -209,7 +207,7 @@
/* CS35L56_MAIN_RENDER_USER_VOLUME */
#define CS35L56_MAIN_RENDER_USER_VOLUME_MIN -400
#define CS35L56_MAIN_RENDER_USER_VOLUME_MAX 400
#define CS35L56_MAIN_RENDER_USER_VOLUME_MAX 48
#define CS35L56_MAIN_RENDER_USER_VOLUME_MASK 0x0000FFC0
#define CS35L56_MAIN_RENDER_USER_VOLUME_SHIFT 6
#define CS35L56_MAIN_RENDER_USER_VOLUME_SIGNBIT 9
......@@ -267,13 +265,18 @@ struct cs35l56_base {
bool fw_patched;
bool secured;
bool can_hibernate;
bool fw_owns_asp1;
bool cal_data_valid;
s8 cal_index;
struct cirrus_amp_cal_data cal_data;
struct gpio_desc *reset_gpio;
};
/* Temporary to avoid a build break with the HDA driver */
static inline int cs35l56_force_sync_asp1_registers_from_cache(struct cs35l56_base *cs35l56_base)
{
return 0;
}
extern struct regmap_config cs35l56_regmap_i2c;
extern struct regmap_config cs35l56_regmap_spi;
extern struct regmap_config cs35l56_regmap_sdw;
......@@ -284,8 +287,6 @@ extern const char * const cs35l56_tx_input_texts[CS35L56_NUM_INPUT_SRC];
extern const unsigned int cs35l56_tx_input_values[CS35L56_NUM_INPUT_SRC];
int cs35l56_set_patch(struct cs35l56_base *cs35l56_base);
int cs35l56_init_asp1_regs_for_driver_control(struct cs35l56_base *cs35l56_base);
int cs35l56_force_sync_asp1_registers_from_cache(struct cs35l56_base *cs35l56_base);
int cs35l56_mbox_send(struct cs35l56_base *cs35l56_base, unsigned int command);
int cs35l56_firmware_shutdown(struct cs35l56_base *cs35l56_base);
int cs35l56_wait_for_firmware_boot(struct cs35l56_base *cs35l56_base);
......
......@@ -93,6 +93,7 @@ struct snd_pcm_ops {
#define SNDRV_PCM_IOCTL1_CHANNEL_INFO 2
/* 3 is absent slot. */
#define SNDRV_PCM_IOCTL1_FIFO_SIZE 4
#define SNDRV_PCM_IOCTL1_SYNC_ID 5
#define SNDRV_PCM_TRIGGER_STOP 0
#define SNDRV_PCM_TRIGGER_START 1
......@@ -401,7 +402,7 @@ struct snd_pcm_runtime {
snd_pcm_uframes_t silence_start; /* starting pointer to silence area */
snd_pcm_uframes_t silence_filled; /* already filled part of silence area */
union snd_pcm_sync_id sync; /* hardware synchronization ID */
bool std_sync_id; /* hardware synchronization - standard per card ID */
/* -- mmap -- */
struct snd_pcm_mmap_status *status;
......@@ -1155,7 +1156,18 @@ int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int
void snd_pcm_set_ops(struct snd_pcm * pcm, int direction,
const struct snd_pcm_ops *ops);
void snd_pcm_set_sync(struct snd_pcm_substream *substream);
void snd_pcm_set_sync_per_card(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params,
const unsigned char *id, unsigned int len);
/**
* snd_pcm_set_sync - set the PCM sync id
* @substream: the pcm substream
*
* Use the default PCM sync identifier for the specific card.
*/
static inline void snd_pcm_set_sync(struct snd_pcm_substream *substream)
{
substream->runtime->std_sync_id = true;
}
int snd_pcm_lib_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg);
void snd_pcm_period_elapsed_under_stream_lock(struct snd_pcm_substream *substream);
......
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* linux/sound/rt1318.h -- Platform data for RT1318
*
* Copyright 2024 Realtek Semiconductor Corp.
*/
#ifndef __LINUX_SND_RT1318_H
#define __LINUX_SND_RT1318_H
struct rt1318_platform_data {
unsigned int init_r0_l;
unsigned int init_r0_r;
};
#endif
......@@ -174,6 +174,8 @@ void simple_util_parse_convert(struct device_node *np, char *prefix,
struct simple_util_data *data);
bool simple_util_is_convert_required(const struct simple_util_data *data);
int simple_util_get_sample_fmt(struct simple_util_data *data);
int simple_util_parse_routing(struct snd_soc_card *card,
char *prefix);
int simple_util_parse_widgets(struct snd_soc_card *card,
......@@ -195,8 +197,12 @@ int graph_util_is_ports0(struct device_node *port);
int graph_util_parse_dai(struct device *dev, struct device_node *ep,
struct snd_soc_dai_link_component *dlc, int *is_single_link);
int graph_util_parse_link_direction(struct device_node *np,
void graph_util_parse_link_direction(struct device_node *np,
bool *is_playback_only, bool *is_capture_only);
void graph_util_parse_trigger_order(struct simple_util_priv *priv,
struct device_node *np,
enum snd_soc_trigger_order *trigger_start,
enum snd_soc_trigger_order *trigger_stop);
#ifdef DEBUG
static inline void simple_util_debug_dai(struct simple_util_priv *priv,
......
......@@ -180,16 +180,16 @@ int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio);
/* Digital Audio interface formatting */
int snd_soc_dai_get_fmt_max_priority(struct snd_soc_pcm_runtime *rtd);
u64 snd_soc_dai_get_fmt(struct snd_soc_dai *dai, int priority);
int snd_soc_dai_get_fmt_max_priority(const struct snd_soc_pcm_runtime *rtd);
u64 snd_soc_dai_get_fmt(const struct snd_soc_dai *dai, int priority);
int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width);
int snd_soc_dai_set_channel_map(struct snd_soc_dai *dai,
unsigned int tx_num, unsigned int *tx_slot,
unsigned int rx_num, unsigned int *rx_slot);
unsigned int tx_num, const unsigned int *tx_slot,
unsigned int rx_num, const unsigned int *rx_slot);
int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
......@@ -198,11 +198,11 @@ int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute,
int direction);
int snd_soc_dai_get_channel_map(struct snd_soc_dai *dai,
int snd_soc_dai_get_channel_map(const struct snd_soc_dai *dai,
unsigned int *tx_num, unsigned int *tx_slot,
unsigned int *rx_num, unsigned int *rx_slot);
int snd_soc_dai_is_dummy(struct snd_soc_dai *dai);
int snd_soc_dai_is_dummy(const struct snd_soc_dai *dai);
int snd_soc_dai_hw_params(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream,
......@@ -218,7 +218,7 @@ void snd_soc_dai_suspend(struct snd_soc_dai *dai);
void snd_soc_dai_resume(struct snd_soc_dai *dai);
int snd_soc_dai_compress_new(struct snd_soc_dai *dai,
struct snd_soc_pcm_runtime *rtd, int num);
bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int stream);
bool snd_soc_dai_stream_valid(const struct snd_soc_dai *dai, int stream);
void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link);
void snd_soc_dai_action(struct snd_soc_dai *dai,
int stream, int action);
......@@ -232,7 +232,7 @@ static inline void snd_soc_dai_deactivate(struct snd_soc_dai *dai,
{
snd_soc_dai_action(dai, stream, -1);
}
int snd_soc_dai_active(struct snd_soc_dai *dai);
int snd_soc_dai_active(const struct snd_soc_dai *dai);
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);
......@@ -271,7 +271,7 @@ int snd_soc_dai_compr_get_metadata(struct snd_soc_dai *dai,
struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);
const char *snd_soc_dai_name_get(struct snd_soc_dai *dai);
const char *snd_soc_dai_name_get(const struct snd_soc_dai *dai);
struct snd_soc_dai_ops {
/* DAI driver callbacks */
......@@ -305,9 +305,9 @@ struct snd_soc_dai_ops {
unsigned int tx_mask, unsigned int rx_mask,
int slots, int slot_width);
int (*set_channel_map)(struct snd_soc_dai *dai,
unsigned int tx_num, unsigned int *tx_slot,
unsigned int rx_num, unsigned int *rx_slot);
int (*get_channel_map)(struct snd_soc_dai *dai,
unsigned int tx_num, const unsigned int *tx_slot,
unsigned int rx_num, const unsigned int *rx_slot);
int (*get_channel_map)(const struct snd_soc_dai *dai,
unsigned int *tx_num, unsigned int *tx_slot,
unsigned int *rx_num, unsigned int *rx_slot);
int (*set_tristate)(struct snd_soc_dai *dai, int tristate);
......@@ -361,7 +361,7 @@ struct snd_soc_dai_ops {
* see
* snd_soc_dai_get_fmt()
*/
u64 *auto_selectable_formats;
const u64 *auto_selectable_formats;
int num_auto_selectable_formats;
/* probe ordering - for components with runtime dependencies */
......@@ -413,7 +413,7 @@ struct snd_soc_dai_driver {
unsigned int id;
unsigned int base;
struct snd_soc_dobj dobj;
struct of_phandle_args *dai_args;
const struct of_phandle_args *dai_args;
/* ops */
const struct snd_soc_dai_ops *ops;
......@@ -473,7 +473,7 @@ struct snd_soc_dai {
unsigned int probed:1;
};
static inline struct snd_soc_pcm_stream *
static inline const struct snd_soc_pcm_stream *
snd_soc_dai_get_pcm_stream(const struct snd_soc_dai *dai, int stream)
{
return (stream == SNDRV_PCM_STREAM_PLAYBACK) ?
......@@ -518,7 +518,8 @@ static inline void snd_soc_dai_init_dma_data(struct snd_soc_dai *dai, void *play
snd_soc_dai_dma_data_set_capture(dai, capture);
}
static inline unsigned int snd_soc_dai_tdm_mask_get(struct snd_soc_dai *dai, int stream)
static inline unsigned int snd_soc_dai_tdm_mask_get(const struct snd_soc_dai *dai,
int stream)
{
return dai->stream[stream].tdm_mask;
}
......@@ -529,7 +530,8 @@ static inline void snd_soc_dai_tdm_mask_set(struct snd_soc_dai *dai, int stream,
dai->stream[stream].tdm_mask = tdm_mask;
}
static inline unsigned int snd_soc_dai_stream_active(struct snd_soc_dai *dai, int stream)
static inline unsigned int snd_soc_dai_stream_active(const struct snd_soc_dai *dai,
int stream)
{
/* see snd_soc_dai_action() for setup */
return dai->stream[stream].active;
......
......@@ -457,7 +457,7 @@ int snd_soc_dapm_get_pin_switch(struct snd_kcontrol *kcontrol,
int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *uncontrol);
int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_widget *widget, int num);
const struct snd_soc_dapm_widget *widget, unsigned int num);
struct snd_soc_dapm_widget *snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
const struct snd_soc_dapm_widget *widget);
struct snd_soc_dapm_widget *snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
......
......@@ -178,7 +178,7 @@ static inline const void *snd_soc_tplg_get_data(struct snd_soc_tplg_hdr *hdr)
/* Dynamic Object loading and removal for component drivers */
int snd_soc_tplg_component_load(struct snd_soc_component *comp,
struct snd_soc_tplg_ops *ops, const struct firmware *fw);
const struct snd_soc_tplg_ops *ops, const struct firmware *fw);
int snd_soc_tplg_component_remove(struct snd_soc_component *comp);
/* Binds event handlers to dynamic widgets */
......
......@@ -534,10 +534,10 @@ static inline int snd_soc_set_dmi_name(struct snd_soc_card *card,
/* Utility functions to get clock rates from various things */
int snd_soc_calc_frame_size(int sample_size, int channels, int tdm_slots);
int snd_soc_params_to_frame_size(struct snd_pcm_hw_params *params);
int snd_soc_params_to_frame_size(const struct snd_pcm_hw_params *params);
int snd_soc_calc_bclk(int fs, int sample_size, int channels, int tdm_slots);
int snd_soc_params_to_bclk(struct snd_pcm_hw_params *parms);
int snd_soc_tdm_params_to_bclk(struct snd_pcm_hw_params *params,
int snd_soc_params_to_bclk(const struct snd_pcm_hw_params *parms);
int snd_soc_tdm_params_to_bclk(const struct snd_pcm_hw_params *params,
int tdm_width, int tdm_slots, int slot_multiple);
/* set runtime hw params */
......@@ -675,7 +675,7 @@ struct snd_soc_dai_link_component {
const char *name;
struct device_node *of_node;
const char *dai_name;
struct of_phandle_args *dai_args;
const struct of_phandle_args *dai_args;
};
/*
......@@ -837,7 +837,8 @@ struct snd_soc_dai_link {
#endif
};
static inline int snd_soc_link_num_ch_map(struct snd_soc_dai_link *link) {
static inline int snd_soc_link_num_ch_map(const struct snd_soc_dai_link *link)
{
return max(link->num_cpus, link->num_codecs);
}
......@@ -1299,7 +1300,7 @@ struct soc_enum {
#endif
};
static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
static inline bool snd_soc_volsw_is_stereo(const struct soc_mixer_control *mc)
{
if (mc->reg == mc->rreg && mc->shift == mc->rshift)
return false;
......@@ -1311,7 +1312,7 @@ static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
return true;
}
static inline unsigned int snd_soc_enum_val_to_item(struct soc_enum *e,
static inline unsigned int snd_soc_enum_val_to_item(const struct soc_enum *e,
unsigned int val)
{
unsigned int i;
......@@ -1326,7 +1327,7 @@ static inline unsigned int snd_soc_enum_val_to_item(struct soc_enum *e,
return 0;
}
static inline unsigned int snd_soc_enum_item_to_val(struct soc_enum *e,
static inline unsigned int snd_soc_enum_item_to_val(const struct soc_enum *e,
unsigned int item)
{
if (!e->values)
......@@ -1401,7 +1402,7 @@ unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np,
snd_soc_daifmt_clock_provider_from_bitmap( \
snd_soc_daifmt_parse_clock_provider_as_bitmap(np, prefix))
int snd_soc_get_stream_cpu(struct snd_soc_dai_link *dai_link, int stream);
int snd_soc_get_stream_cpu(const struct snd_soc_dai_link *dai_link, int stream);
int snd_soc_get_dlc(const struct of_phandle_args *args,
struct snd_soc_dai_link_component *dlc);
int snd_soc_of_get_dlc(struct device_node *of_node,
......
......@@ -173,5 +173,6 @@ struct sof_dev_desc {
int sof_dai_get_mclk(struct snd_soc_pcm_runtime *rtd);
int sof_dai_get_bclk(struct snd_soc_pcm_runtime *rtd);
int sof_dai_get_tdm_slots(struct snd_soc_pcm_runtime *rtd);
#endif
......@@ -117,10 +117,17 @@ struct tasdevice_fw {
struct device *dev;
};
enum tasdevice_dsp_fw_state {
TASDEVICE_DSP_FW_NONE = 0,
enum tasdevice_fw_state {
/* Driver in startup mode, not load any firmware. */
TASDEVICE_DSP_FW_PENDING,
/* DSP firmware in the system, but parsing error. */
TASDEVICE_DSP_FW_FAIL,
/*
* Only RCA (Reconfigurable Architecture) firmware load
* successfully.
*/
TASDEVICE_RCA_FW_OK,
/* Both RCA and DSP firmware load successfully. */
TASDEVICE_DSP_FW_ALL_OK,
};
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
//
// ALSA SoC Texas Instruments TAS2563/TAS2781 Audio Smart Amplifier
//
// Copyright (C) 2022 - 2023 Texas Instruments Incorporated
// Copyright (C) 2022 - 2024 Texas Instruments Incorporated
// https://www.ti.com
//
// The TAS2563/TAS2781 driver implements a flexible and configurable
......@@ -43,13 +43,14 @@
(page * 128)) + reg)
/*Software Reset */
#define TAS2781_REG_SWRESET TASDEVICE_REG(0x0, 0X0, 0x01)
#define TAS2781_REG_SWRESET_RESET BIT(0)
#define TASDEVICE_REG_SWRESET TASDEVICE_REG(0x0, 0X0, 0x01)
#define TASDEVICE_REG_SWRESET_RESET BIT(0)
/*I2C Checksum */
#define TASDEVICE_I2CChecksum TASDEVICE_REG(0x0, 0x0, 0x7E)
/* Volume control */
#define TAS2563_DVC_LVL TASDEVICE_REG(0x00, 0x02, 0x0C)
#define TAS2781_DVC_LVL TASDEVICE_REG(0x0, 0x0, 0x1A)
#define TAS2781_AMP_LEVEL TASDEVICE_REG(0x0, 0x0, 0x03)
#define TAS2781_AMP_LEVEL_MASK GENMASK(5, 1)
......@@ -108,6 +109,7 @@ struct tasdevice_priv {
unsigned char coef_binaryname[64];
unsigned char rca_binaryname[64];
unsigned char dev_name[32];
const char *name_prefix;
unsigned char ndev;
unsigned int magic_num;
unsigned int chip_id;
......@@ -139,7 +141,7 @@ struct tasdevice_priv {
void (*apply_calibration)(struct tasdevice_priv *tas_priv);
};
void tas2781_reset(struct tasdevice_priv *tas_dev);
void tasdevice_reset(struct tasdevice_priv *tas_dev);
int tascodec_init(struct tasdevice_priv *tas_priv, void *codec,
struct module *module,
void (*cont)(const struct firmware *fw, void *context));
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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