sound updates for 5.9

This became wide and scattered updates all over the sound tree as
 diffstat shows: lots of (still ongoing) refactoring works in ASoC,
 fixes and cleanups caught by static analysis, inclusive term
 conversions as well as lots of new drivers.  Below are highlights:
 
 ASoC core:
 * API cleanups and conversions to the unified mute_stream() call
 * Simplify I/O helper functions
 * Use helper macros to retrieve RTD from substreams
 
 ASoC drivers:
 * Lots of fixes and cleanups in Intel ASoC drivers
 * Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S,
   Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards,
   nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries
   boards, TI J721e EVM
 
 ALSA core:
 * Minor code refacotring for SG-buffer handling
 
 HD-audio:
 * Generalization of mute-LED handling with LED classdev
 * Intel silent stream support for HDMI
 * Device-specific fixes: CA0132, Loongson-3
 
 Others:
 * Usual USB- and HD-audio quirks for various devices
 * Fixes for echoaudio DMA position handling
 * Various documents and trivial fixes for sparse warnings
 * Conversion to adapt inclusive terms
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAl8r2C4OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE892xAAg5LyExJUtC127P5zs5pX03FuHhZ/oftEcbO1
 LUDE6VyWoLrHo7dmIvKANF2ppfu2hooyuYhFbOD/Wk2BtzmQq/cvrkzM/fjokXiu
 G4jPbV6hhyV2bJ/zTAXPjr1rQNXbAAzvuyjKs+IufuWSGa3ktRd89xliqSHHVE/T
 L0us45WpvfsaiCWElUvWaM1Fyex6aOBeKV19WjQYzv213CcgFhQr/0HxI8uN4Uxc
 Fd89PRXFVJvPwb1L6hPw2X8Yj8BK+6xWqsHsQhqECkyprrh7o5m5XwqyEdK5NRms
 f5hrisze5h6jqbY8TlvRpZkrJ495Ek1W85FndvRgOM671Y1mMPtC/2qYb1YU/jBO
 yCFq26JNeM/X1W+KJqvCbMwQn5af33pIQ++P18fn0MF1agnOWNHxWa0vaEuFcFAy
 Du8BQ8ovOzHAxKSWwRCakq/pRKijiBdfizOZIDMgSP0g/4oBVWDfA9eGwgQQ35J9
 RlSx+1bm3v5RigPQa/y8B9/+4W50DSrA/q0eMkwE5bYh7Xh05Vapf7khh/vgEsEu
 m7/tKhC26D/RcdbnHxBRH2UARCBNIcbZdsOlIVveX+/6ObyegFZOOzHbDb4huAdD
 G2Q/sFmPuWM+R0J/C9RuMCjhKRQgPCuXDT0CJXrvgORV6BxpONcfcnXb89QbEWw5
 E+eW+/I=
 =sy7n
 -----END PGP SIGNATURE-----

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

Pull sound updates from Takashi Iwai:
 "This became wide and scattered updates all over the sound tree as
  diffstat shows: lots of (still ongoing) refactoring works in ASoC,
  fixes and cleanups caught by static analysis, inclusive term
  conversions as well as lots of new drivers. Below are highlights:

  ASoC core:
   - API cleanups and conversions to the unified mute_stream() call
   - Simplify I/O helper functions
   - Use helper macros to retrieve RTD from substreams

  ASoC drivers:
   - Lots of fixes and cleanups in Intel ASoC drivers
   - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S,
     Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards,
     nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries
     boards, TI J721e EVM

  ALSA core:
   - Minor code refacotring for SG-buffer handling

  HD-audio:
   - Generalization of mute-LED handling with LED classdev
   - Intel silent stream support for HDMI
   - Device-specific fixes: CA0132, Loongson-3

  Others:
   - Usual USB- and HD-audio quirks for various devices
   - Fixes for echoaudio DMA position handling
   - Various documents and trivial fixes for sparse warnings
   - Conversion to adopt inclusive terms"

* tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits)
  ALSA: pci: delete repeated words in comments
  ALSA: isa: delete repeated words in comments
  ALSA: hda/tegra: Add 100us dma stop delay
  ALSA: hda: Add dma stop delay variable
  ASoC: hda/tegra: Set buffer alignment to 128 bytes
  ALSA: seq: oss: Serialize ioctls
  ALSA: hda/hdmi: Add quirk to force connectivity
  ALSA: usb-audio: add startech usb audio dock name
  ALSA: usb-audio: Add support for Lenovo ThinkStation P620
  Revert "ALSA: hda: call runtime_allow() for all hda controllers"
  ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
  ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
  ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
  ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
  ALSA: docs: fix typo
  ALSA: doc: use correct config variable name
  ASoC: core: Two step component registration
  ASoC: core: Simplify snd_soc_component_initialize declaration
  ASoC: core: Relocate and expose snd_soc_component_initialize
  ASoC: sh: Replace 'select' DMADEVICES 'with depends on'
  ...
This commit is contained in:
Linus Torvalds 2020-08-06 14:27:31 -07:00
commit 3f9df56480
688 changed files with 17946 additions and 5778 deletions

View File

@ -1,9 +1,9 @@
Analog Devices ADAU1977/ADAU1978/ADAU1979
Datasheets:
http://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
http://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
http://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1977.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1978.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ADAU1979.pdf
This driver supports both the I2C and SPI bus.

View File

@ -1,27 +0,0 @@
AK4613 I2C transmitter
This device supports I2C mode only.
Required properties:
- compatible : "asahi-kasei,ak4613"
- reg : The chip select number on the I2C bus
Optional properties:
- asahi-kasei,in1-single-end : Boolean. Indicate input / output pins are single-ended.
- asahi-kasei,in2-single-end rather than differential.
- asahi-kasei,out1-single-end
- asahi-kasei,out2-single-end
- asahi-kasei,out3-single-end
- asahi-kasei,out4-single-end
- asahi-kasei,out5-single-end
- asahi-kasei,out6-single-end
Example:
&i2c {
ak4613: ak4613@10 {
compatible = "asahi-kasei,ak4613";
reg = <0x10>;
};
};

View File

@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4613.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4613 I2C transmitter Device Tree Bindings
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
properties:
compatible:
const: asahi-kasei,ak4613
reg:
maxItems: 1
clocks:
maxItems: 1
"#sound-dai-cells":
const: 0
patternProperties:
"^asahi-kasei,in[1-2]-single-end$":
description: Input Pin 1 - 2.
$ref: /schemas/types.yaml#/definitions/flag
"^asahi-kasei,out[1-6]-single-end$":
description: Output Pin 1 - 6.
$ref: /schemas/types.yaml#/definitions/flag
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
ak4613: codec@10 {
compatible = "asahi-kasei,ak4613";
reg = <0x10>;
};
};

View File

@ -1,37 +0,0 @@
AK4642 I2C transmitter
This device supports I2C mode only.
Required properties:
- compatible : "asahi-kasei,ak4642" or "asahi-kasei,ak4643" or "asahi-kasei,ak4648"
- reg : The chip select number on the I2C bus
Optional properties:
- #clock-cells : common clock binding; shall be set to 0
- clocks : common clock binding; MCKI clock
- clock-frequency : common clock binding; frequency of MCKO
- clock-output-names : common clock binding; MCKO clock name
Example 1:
&i2c {
ak4648: ak4648@12 {
compatible = "asahi-kasei,ak4642";
reg = <0x12>;
};
};
Example 2:
&i2c {
ak4643: codec@12 {
compatible = "asahi-kasei,ak4643";
reg = <0x12>;
#clock-cells = <0>;
clocks = <&audio_clock>;
clock-frequency = <12288000>;
clock-output-names = "ak4643_mcko";
};
};

View File

@ -0,0 +1,58 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ak4642.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: AK4642 I2C transmitter Device Tree Bindings
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
properties:
compatible:
enum:
- asahi-kasei,ak4642
- asahi-kasei,ak4643
- asahi-kasei,ak4648
reg:
maxItems: 1
"#clock-cells":
const: 0
"#sound-dai-cells":
const: 0
clocks:
maxItems: 1
clock-frequency:
description: common clock binding; frequency of MCKO
$ref: /schemas/types.yaml#/definitions/uint32
clock-output-names:
description: common clock name
$ref: /schemas/types.yaml#/definitions/string
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
ak4643: codec@12 {
compatible = "asahi-kasei,ak4643";
#sound-dai-cells = <0>;
reg = <0x12>;
#clock-cells = <0>;
clocks = <&audio_clock>;
clock-frequency = <12288000>;
clock-output-names = "ak4643_mcko";
};
};

View File

@ -1,23 +0,0 @@
Everest ES8316 audio CODEC
This device supports both I2C and SPI.
Required properties:
- compatible : should be "everest,es8316"
- reg : the I2C address of the device for I2C
Optional properties:
- clocks : a list of phandle, should contain entries for clock-names
- clock-names : should include as follows:
"mclk" : master clock (MCLK) of the device
Example:
es8316: codec@11 {
compatible = "everest,es8316";
reg = <0x11>;
clocks = <&clks 10>;
clock-names = "mclk";
};

View File

@ -0,0 +1,50 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/everest,es8316.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Everest ES8316 audio CODEC
maintainers:
- Daniel Drake <drake@endlessm.com>
- Katsuhiro Suzuki <katsuhiro@katsuster.net>
properties:
compatible:
const: everest,es8316
reg:
maxItems: 1
clocks:
items:
- description: clock for master clock (MCLK)
clock-names:
items:
- const: mclk
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
- "#sound-dai-cells"
additionalProperties: false
examples:
- |
i2c0 {
#address-cells = <1>;
#size-cells = <0>;
es8316: codec@11 {
compatible = "everest,es8316";
reg = <0x11>;
clocks = <&clks 10>;
clock-names = "mclk";
#sound-dai-cells = <0>;
};
};

View File

@ -6,7 +6,11 @@ a fibre cable.
Required properties:
- compatible : Compatible list, must contain "fsl,imx35-spdif".
- compatible : Compatible list, should contain one of the following
compatibles:
"fsl,imx35-spdif",
"fsl,vf610-spdif",
"fsl,imx6sx-spdif",
- reg : Offset and length of the register set for the device.

View File

@ -34,6 +34,10 @@ The compatible list for this generic sound card currently:
"fsl,imx-audio-wm8960"
"fsl,imx-audio-mqs"
"fsl,imx-audio-wm8524"
Required properties:
- compatible : Contains one of entries in the compatible list.
@ -44,6 +48,11 @@ Required properties:
- audio-codec : The phandle of an audio codec
Optional properties:
- audio-asrc : The phandle of ASRC. It can be absent if there's no
need to add ASRC support via DPCM.
- audio-routing : 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
@ -60,10 +69,13 @@ Required properties:
coexisting in order to support the old bindings
of wm8962 and sgtl5000.
Optional properties:
- audio-asrc : The phandle of ASRC. It can be absent if there's no
need to add ASRC support via DPCM.
- hp-det-gpio : The GPIO that detect headphones are plugged in
- mic-det-gpio : The GPIO that detect microphones are plugged in
- bitclock-master : Indicates dai-link bit clock master; for details see simple-card.yaml.
- frame-master : Indicates dai-link frame master; for details see simple-card.yaml.
- dai-format : audio format, for details see simple-card.yaml.
- frame-inversion : dai-link uses frame clock inversion, for details see simple-card.yaml.
- bitclock-inversion : dai-link uses bit clock inversion, for details see simple-card.yaml.
Optional unless SSI is selected as a CPU DAI:

View File

@ -0,0 +1,70 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2020 Intel Corporation
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/intel,keembay-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel KeemBay I2S Device Tree Bindings
maintainers:
- Sia, Jee Heng <jee.heng.sia@intel.com>
description: |
Intel KeemBay I2S
properties:
compatible:
enum:
- intel,keembay-i2s
"#sound-dai-cells":
const: 0
reg:
items:
- description: I2S registers
- description: I2S gen configuration
reg-names:
items:
- const: i2s-regs
- const: i2s_gen_cfg
interrupts:
maxItems: 1
clocks:
items:
- description: Bus Clock
- description: Module Clock
clock-names:
items:
- const: osc
- const: apb_clk
required:
- compatible
- "#sound-dai-cells"
- reg
- clocks
- clock-names
- interrupts
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#define KEEM_BAY_PSS_AUX_I2S3
#define KEEM_BAY_PSS_I2S3
i2s3: i2s@20140000 {
compatible = "intel,keembay-i2s";
#sound-dai-cells = <0>;
reg = <0x20140000 0x200>, /* I2S registers */
<0x202a00a4 0x4>; /* I2S gen configuration */
reg-names = "i2s-regs", "i2s_gen_cfg";
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "osc", "apb_clk";
clocks = <&scmi_clk KEEM_BAY_PSS_AUX_I2S3>, <&scmi_clk KEEM_BAY_PSS_I2S3>;
};

View File

@ -1,9 +1,10 @@
Maxim MAX98357A audio DAC
Maxim MAX98357A/MAX98360A audio DAC
This node models the Maxim MAX98357A DAC.
This node models the Maxim MAX98357A/MAX98360A DAC.
Required properties:
- compatible : "maxim,max98357a"
- compatible : "maxim,max98357a" for MAX98357A.
"maxim,max98360a" for MAX98360A.
Optional properties:
- sdmode-gpios : GPIO specifier for the chip's SD_MODE pin.
@ -20,3 +21,8 @@ max98357a {
compatible = "maxim,max98357a";
sdmode-gpios = <&qcom_pinmux 25 0>;
};
max98360a {
compatible = "maxim,max98360a";
sdmode-gpios = <&qcom_pinmux 25 0>;
};

View File

@ -0,0 +1,51 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/maxim,max98390.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Integrated MAX98390 Speaker Amplifier with Integrated Dynamic Speaker Management
maintainers:
- Steve Lee <steves.lee@maximintegrated.com>
properties:
compatible:
const: maxim,max98390
reg:
maxItems: 1
description: I2C address of the device.
maxim,temperature_calib:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
description: The calculated temperature data was measured while doing the calibration.
minimum: 0
maximum: 65535
maxim,r0_calib:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
description: This is r0 calibration data which was measured in factory mode.
minimum: 1
maximum: 8388607
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
max98390: amplifier@38 {
compatible = "maxim,max98390";
reg = <0x38>;
maxim,temperature_calib = <1024>;
maxim,r0_calib = <100232>;
};
};

View File

@ -10,9 +10,15 @@ Required properties:
- compatible : "mediatek,mt6358-sound".
- Avdd-supply : power source of AVDD
Optional properties:
- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
channels of PDM signal. 0 means two wires, 1 means one wire. Default
value is 0.
Example:
mt6358_snd {
compatible = "mediatek,mt6358-sound";
Avdd-supply = <&mt6358_vaud28_reg>;
mediatek,dmic-mode = <0>;
};

View File

@ -1,15 +1,20 @@
MT8183 with MT6358, DA7219 and MAX98357 CODECS
MT8183 with MT6358, DA7219, MAX98357, and RT1015 CODECS
Required properties:
- compatible : "mediatek,mt8183_da7219_max98357"
- compatible : "mediatek,mt8183_da7219_max98357" for MAX98357A codec
"mediatek,mt8183_da7219_rt1015" for RT1015 codec
- mediatek,headset-codec: the phandles of da7219 codecs
- mediatek,platform: the phandle of MT8183 ASoC platform
Optional properties:
- mediatek,hdmi-codec: the phandles of HDMI codec
Example:
sound {
compatible = "mediatek,mt8183_da7219_max98357";
mediatek,headset-codec = <&da7219>;
mediatek,hdmi-codec = <&it6505dptx>;
mediatek,platform = <&afe>;
};

View File

@ -1,13 +1,16 @@
MT8183 with MT6358, TS3A227 and MAX98357 CODECS
MT8183 with MT6358, TS3A227, MAX98357, and RT1015 CODECS
Required properties:
- compatible : "mediatek,mt8183_mt6358_ts3a227_max98357"
- compatible : "mediatek,mt8183_mt6358_ts3a227_max98357" for MAX98357A codec
"mediatek,mt8183_mt6358_ts3a227_max98357b" for MAX98357B codec
"mediatek,mt8183_mt6358_ts3a227_rt1015" for RT1015 codec
- mediatek,platform: the phandle of MT8183 ASoC platform
Optional properties:
- mediatek,headset-codec: the phandles of ts3a227 codecs
- mediatek,ec-codec: the phandle of EC codecs.
See google,cros-ec-codec.txt for more details.
- mediatek,hdmi-codec: the phandles of HDMI codec
Example:
@ -15,6 +18,7 @@ Example:
compatible = "mediatek,mt8183_mt6358_ts3a227_max98357";
mediatek,headset-codec = <&ts3a227>;
mediatek,ec-codec = <&ec_codec>;
mediatek,hdmi-codec = <&it6505dptx>;
mediatek,platform = <&afe>;
};

View File

@ -0,0 +1,83 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra186-dspk.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra186 DSPK Controller Device Tree Bindings
description: |
The Digital Speaker Controller (DSPK) can be viewed as a Pulse
Density Modulation (PDM) transmitter that up-samples the input to
the desired sampling rate by interpolation and then converts the
over sampled Pulse Code Modulation (PCM) input to the desired 1-bit
output via Delta Sigma Modulation (DSM).
maintainers:
- Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com>
properties:
$nodename:
pattern: "^dspk@[0-9a-f]*$"
compatible:
oneOf:
- const: nvidia,tegra186-dspk
- items:
- const: nvidia,tegra194-dspk
- const: nvidia,tegra186-dspk
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: dspk
assigned-clocks:
maxItems: 1
assigned-clock-parents:
maxItems: 1
assigned-clock-rates:
maxItems: 1
sound-name-prefix:
pattern: "^DSPK[1-9]$"
allOf:
- $ref: /schemas/types.yaml#/definitions/string
description:
Used as prefix for sink/source names of the component. Must be a
unique string among multiple instances of the same component.
The name can be "DSPK1" or "DSPKx", where x depends on the maximum
available instances on a Tegra SoC.
required:
- compatible
- reg
- clocks
- clock-names
- assigned-clocks
- assigned-clock-parents
- sound-name-prefix
examples:
- |
#include<dt-bindings/clock/tegra186-clock.h>
dspk@2905000 {
compatible = "nvidia,tegra186-dspk";
reg = <0x2905000 0x100>;
clocks = <&bpmp TEGRA186_CLK_DSPK1>;
clock-names = "dspk";
assigned-clocks = <&bpmp TEGRA186_CLK_DSPK1>;
assigned-clock-parents = <&bpmp TEGRA186_CLK_PLL_A_OUT0>;
assigned-clock-rates = <12288000>;
sound-name-prefix = "DSPK1";
};
...

View File

@ -0,0 +1,111 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-admaif.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra210 ADMAIF Device Tree Bindings
description: |
ADMAIF is the interface between ADMA and AHUB. Each ADMA channel
that sends/receives data to/from AHUB must interface through an
ADMAIF channel. ADMA channel sending data to AHUB pairs with ADMAIF
Tx channel and ADMA channel receiving data from AHUB pairs with
ADMAIF Rx channel.
maintainers:
- Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com>
properties:
$nodename:
pattern: "^admaif@[0-9a-f]*$"
compatible:
oneOf:
- enum:
- nvidia,tegra210-admaif
- nvidia,tegra186-admaif
- items:
- const: nvidia,tegra194-admaif
- const: nvidia,tegra186-admaif
reg:
maxItems: 1
dmas: true
dma-names: true
if:
properties:
compatible:
contains:
const: nvidia,tegra210-admaif
then:
properties:
dmas:
description:
DMA channel specifiers, equally divided for Tx and Rx.
minItems: 1
maxItems: 20
dma-names:
items:
pattern: "^[rt]x(10|[1-9])$"
description:
Should be "rx1", "rx2" ... "rx10" for DMA Rx channel
Should be "tx1", "tx2" ... "tx10" for DMA Tx channel
minItems: 1
maxItems: 20
else:
properties:
dmas:
description:
DMA channel specifiers, equally divided for Tx and Rx.
minItems: 1
maxItems: 40
dma-names:
items:
pattern: "^[rt]x(1[0-9]|[1-9]|20)$"
description:
Should be "rx1", "rx2" ... "rx20" for DMA Rx channel
Should be "tx1", "tx2" ... "tx20" for DMA Tx channel
minItems: 1
maxItems: 40
required:
- compatible
- reg
- dmas
- dma-names
examples:
- |
admaif@702d0000 {
compatible = "nvidia,tegra210-admaif";
reg = <0x702d0000 0x800>;
dmas = <&adma 1>, <&adma 1>,
<&adma 2>, <&adma 2>,
<&adma 3>, <&adma 3>,
<&adma 4>, <&adma 4>,
<&adma 5>, <&adma 5>,
<&adma 6>, <&adma 6>,
<&adma 7>, <&adma 7>,
<&adma 8>, <&adma 8>,
<&adma 9>, <&adma 9>,
<&adma 10>, <&adma 10>;
dma-names = "rx1", "tx1",
"rx2", "tx2",
"rx3", "tx3",
"rx4", "tx4",
"rx5", "tx5",
"rx6", "tx6",
"rx7", "tx7",
"rx8", "tx8",
"rx9", "tx9",
"rx10", "tx10";
};
...

View File

@ -0,0 +1,136 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-ahub.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra210 AHUB Device Tree Bindings
description: |
The Audio Hub (AHUB) comprises a collection of hardware accelerators
for audio pre-processing, post-processing and a programmable full
crossbar for routing audio data across these accelerators. It has
external interfaces such as I2S, DMIC, DSPK. It interfaces with ADMA
engine through ADMAIF.
maintainers:
- Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com>
properties:
$nodename:
pattern: "^ahub@[0-9a-f]*$"
compatible:
oneOf:
- enum:
- nvidia,tegra210-ahub
- nvidia,tegra186-ahub
- items:
- const: nvidia,tegra194-ahub
- const: nvidia,tegra186-ahub
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: ahub
assigned-clocks:
maxItems: 1
assigned-clock-parents:
maxItems: 1
assigned-clock-rates:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 1
ranges: true
required:
- compatible
- reg
- clocks
- clock-names
- assigned-clocks
- assigned-clock-parents
- "#address-cells"
- "#size-cells"
- ranges
examples:
- |
#include<dt-bindings/clock/tegra210-car.h>
ahub@702d0800 {
compatible = "nvidia,tegra210-ahub";
reg = <0x702d0800 0x800>;
clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
clock-names = "ahub";
assigned-clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>;
assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x702d0000 0x702d0000 0x0000e400>;
// All AHUB child nodes below
admaif@702d0000 {
compatible = "nvidia,tegra210-admaif";
reg = <0x702d0000 0x800>;
dmas = <&adma 1>, <&adma 1>,
<&adma 2>, <&adma 2>,
<&adma 3>, <&adma 3>,
<&adma 4>, <&adma 4>,
<&adma 5>, <&adma 5>,
<&adma 6>, <&adma 6>,
<&adma 7>, <&adma 7>,
<&adma 8>, <&adma 8>,
<&adma 9>, <&adma 9>,
<&adma 10>, <&adma 10>;
dma-names = "rx1", "tx1",
"rx2", "tx2",
"rx3", "tx3",
"rx4", "tx4",
"rx5", "tx5",
"rx6", "tx6",
"rx7", "tx7",
"rx8", "tx8",
"rx9", "tx9",
"rx10", "tx10";
};
i2s@702d1000 {
compatible = "nvidia,tegra210-i2s";
reg = <0x702d1000 0x100>;
clocks = <&tegra_car TEGRA210_CLK_I2S0>;
clock-names = "i2s";
assigned-clocks = <&tegra_car TEGRA210_CLK_I2S0>;
assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
assigned-clock-rates = <1536000>;
sound-name-prefix = "I2S1";
};
dmic@702d4000 {
compatible = "nvidia,tegra210-dmic";
reg = <0x702d4000 0x100>;
clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
clock-names = "dmic";
assigned-clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
assigned-clock-rates = <3072000>;
sound-name-prefix = "DMIC1";
};
// More child nodes to follow
};
...

View File

@ -0,0 +1,83 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-dmic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra210 DMIC Controller Device Tree Bindings
description: |
The Digital MIC (DMIC) Controller is used to interface with Pulse
Density Modulation (PDM) input devices. It converts PDM signals to
Pulse Coded Modulation (PCM) signals. DMIC can be viewed as a PDM
receiver.
maintainers:
- Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com>
properties:
$nodename:
pattern: "^dmic@[0-9a-f]*$"
compatible:
oneOf:
- const: nvidia,tegra210-dmic
- items:
- enum:
- nvidia,tegra194-dmic
- nvidia,tegra186-dmic
- const: nvidia,tegra210-dmic
reg:
maxItems: 1
clocks:
maxItems: 1
clock-names:
const: dmic
assigned-clocks:
maxItems: 1
assigned-clock-parents:
maxItems: 1
assigned-clock-rates:
maxItems: 1
sound-name-prefix:
pattern: "^DMIC[1-9]$"
allOf:
- $ref: /schemas/types.yaml#/definitions/string
description:
used as prefix for sink/source names of the component. Must be a
unique string among multiple instances of the same component.
The name can be "DMIC1" or "DMIC2" ... "DMICx", where x depends
on the maximum available instances on a Tegra SoC.
required:
- compatible
- reg
- clocks
- clock-names
- assigned-clocks
- assigned-clock-parents
examples:
- |
#include<dt-bindings/clock/tegra210-car.h>
dmic@702d4000 {
compatible = "nvidia,tegra210-dmic";
reg = <0x702d4000 0x100>;
clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
clock-names = "dmic";
assigned-clocks = <&tegra_car TEGRA210_CLK_DMIC1>;
assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
assigned-clock-rates = <3072000>;
sound-name-prefix = "DMIC1";
};
...

View File

@ -0,0 +1,101 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/nvidia,tegra210-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Tegra210 I2S Controller Device Tree Bindings
description: |
The Inter-IC Sound (I2S) controller implements full-duplex,
bi-directional and single direction point-to-point serial
interfaces. It can interface with I2S compatible devices.
I2S controller can operate both in master and slave mode.
maintainers:
- Jon Hunter <jonathanh@nvidia.com>
- Sameer Pujar <spujar@nvidia.com>
properties:
$nodename:
pattern: "^i2s@[0-9a-f]*$"
compatible:
oneOf:
- const: nvidia,tegra210-i2s
- items:
- enum:
- nvidia,tegra194-i2s
- nvidia,tegra186-i2s
- const: nvidia,tegra210-i2s
reg:
maxItems: 1
clocks:
minItems: 1
maxItems: 2
items:
- description: I2S bit clock
- description:
Sync input clock, which can act as clock source to other I/O
modules in AHUB. The Tegra I2S driver sets this clock rate as
per bit clock rate. I/O module which wants to use this clock
as source, can mention this clock as parent in the DT bindings.
This is an optional clock entry, since it is only required when
some other I/O wants to reference from a particular I2Sx
instance.
clock-names:
minItems: 1
maxItems: 2
items:
- const: i2s
- const: sync_input
assigned-clocks:
minItems: 1
maxItems: 2
assigned-clock-parents:
minItems: 1
maxItems: 2
assigned-clock-rates:
minItems: 1
maxItems: 2
sound-name-prefix:
pattern: "^I2S[1-9]$"
allOf:
- $ref: /schemas/types.yaml#/definitions/string
description:
Used as prefix for sink/source names of the component. Must be a
unique string among multiple instances of the same component.
The name can be "I2S1" or "I2S2" ... "I2Sx", where x depends
on the maximum available instances on a Tegra SoC.
required:
- compatible
- reg
- clocks
- clock-names
- assigned-clocks
- assigned-clock-parents
examples:
- |
#include<dt-bindings/clock/tegra210-car.h>
i2s@702d1000 {
compatible = "nvidia,tegra210-i2s";
reg = <0x702d1000 0x100>;
clocks = <&tegra_car TEGRA210_CLK_I2S0>;
clock-names = "i2s";
assigned-clocks = <&tegra_car TEGRA210_CLK_I2S0>;
assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>;
assigned-clock-rates = <1536000>;
sound-name-prefix = "I2S1";
};
...

View File

@ -39,9 +39,9 @@ configuration of each dai. Must contain the following properties.
Usage: Required for Compress offload dais
Value type: <u32>
Definition: Specifies the direction of the dai stream
0 for both tx and rx
1 for only tx (Capture/Encode)
2 for only rx (Playback/Decode)
Q6ASM_DAI_TX_RX (0) for both tx and rx
Q6ASM_DAI_TX (1) for only tx (Capture/Encode)
Q6ASM_DAI_RX (2) for only rx (Playback/Decode)
- is-compress-dai:
Usage: Required for Compress offload dais
@ -50,6 +50,7 @@ configuration of each dai. Must contain the following properties.
= EXAMPLE
#include <dt-bindings/sound/qcom,q6asm.h>
apr-service@7 {
compatible = "qcom,q6asm";
@ -62,7 +63,7 @@ apr-service@7 {
dai@0 {
reg = <0>;
direction = <2>;
direction = <Q6ASM_DAI_RX>;
is-compress-dai;
};
};

View File

@ -43,30 +43,19 @@ properties:
'#sound-dai-cells':
const: 1
fsia,spdif-connection:
patternProperties:
"^fsi(a|b),spdif-connection$":
$ref: /schemas/types.yaml#/definitions/flag
description: FSI is connected by S/PDIF
fsia,stream-mode-support:
"^fsi(a|b),stream-mode-support$":
$ref: /schemas/types.yaml#/definitions/flag
description: FSI supports 16bit stream mode
fsia,use-internal-clock:
"^fsi(a|b),use-internal-clock$":
$ref: /schemas/types.yaml#/definitions/flag
description: FSI uses internal clock when master mode
fsib,spdif-connection:
$ref: /schemas/types.yaml#/definitions/flag
description: same as fsia
fsib,stream-mode-support:
$ref: /schemas/types.yaml#/definitions/flag
description: same as fsia
fsib,use-internal-clock:
$ref: /schemas/types.yaml#/definitions/flag
description: same as fsia
required:
- compatible
- reg

View File

@ -271,6 +271,7 @@ Required properties:
- "renesas,rcar_sound-r8a774a1" (RZ/G2M)
- "renesas,rcar_sound-r8a774b1" (RZ/G2N)
- "renesas,rcar_sound-r8a774c0" (RZ/G2E)
- "renesas,rcar_sound-r8a774e1" (RZ/G2H)
- "renesas,rcar_sound-r8a7778" (R-Car M1A)
- "renesas,rcar_sound-r8a7779" (R-Car H1)
- "renesas,rcar_sound-r8a7790" (R-Car H2)

View File

@ -1,28 +0,0 @@
* Rockchip Rk3328 internal codec
Required properties:
- compatible: "rockchip,rk3328-codec"
- reg: physical base address of the controller and length of memory mapped
region.
- rockchip,grf: the phandle of the syscon node for GRF register.
- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
- clock-names: should be "pclk".
- spk-depop-time-ms: speak depop time msec.
Optional properties:
- mute-gpios: GPIO specifier for external line driver control (typically the
dedicated GPIO_MUTE pin)
Example for rk3328 internal codec:
codec: codec@ff410000 {
compatible = "rockchip,rk3328-codec";
reg = <0x0 0xff410000 0x0 0x1000>;
rockchip,grf = <&grf>;
clocks = <&cru PCLK_ACODEC>;
clock-names = "pclk";
mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
spk-depop-time-ms = 100;
};

View File

@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/rockchip,rk3328-codec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip rk3328 internal codec
maintainers:
- Heiko Stuebner <heiko@sntech.de>
properties:
compatible:
const: rockchip,rk3328-codec
reg:
maxItems: 1
clocks:
items:
- description: clock for audio codec
- description: clock for I2S master clock
clock-names:
items:
- const: pclk
- const: mclk
rockchip,grf:
$ref: /schemas/types.yaml#/definitions/phandle
description:
The phandle of the syscon node for the GRF register.
spk-depop-time-ms:
default: 200
description:
Speaker depop time in msec.
mute-gpios:
maxItems: 1
description:
GPIO specifier for external line driver control (typically the
dedicated GPIO_MUTE pin)
"#sound-dai-cells":
const: 0
required:
- compatible
- reg
- clocks
- clock-names
- rockchip,grf
- "#sound-dai-cells"
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/clock/rk3328-cru.h>
codec: codec@ff410000 {
compatible = "rockchip,rk3328-codec";
reg = <0xff410000 0x1000>;
clocks = <&cru PCLK_ACODECPHY>, <&cru SCLK_I2S1>;
clock-names = "pclk", "mclk";
rockchip,grf = <&grf>;
mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
spk-depop-time-ms = <100>;
#sound-dai-cells = <0>;
};

View File

@ -1,29 +0,0 @@
ROHM BD28623MUV Class D speaker amplifier for digital input
This codec does not have any control buses such as I2C, it detect format and
rate of I2S signal automatically. It has two signals that can be connected
to GPIOs: reset and mute.
Required properties:
- compatible : should be "rohm,bd28623"
- #sound-dai-cells: should be 0.
- VCCA-supply : regulator phandle for the VCCA supply
- VCCP1-supply : regulator phandle for the VCCP1 supply
- VCCP2-supply : regulator phandle for the VCCP2 supply
Optional properties:
- reset-gpios : GPIO specifier for the active low reset line
- mute-gpios : GPIO specifier for the active low mute line
Example:
codec {
compatible = "rohm,bd28623";
#sound-dai-cells = <0>;
VCCA-supply = <&vcc_reg>;
VCCP1-supply = <&vcc_reg>;
VCCP2-supply = <&vcc_reg>;
reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
mute-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};

View File

@ -0,0 +1,67 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/rohm,bd28623.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ROHM BD28623MUV Class D speaker amplifier for digital input
description:
This codec does not have any control buses such as I2C, it detect
format and rate of I2S signal automatically. It has two signals
that can be connected to GPIOs reset and mute.
maintainers:
- Katsuhiro Suzuki <katsuhiro@katsuster.net>
properties:
compatible:
const: rohm,bd28623
"#sound-dai-cells":
const: 0
VCCA-supply:
description:
regulator phandle for the VCCA (for analog) power supply
VCCP1-supply:
description:
regulator phandle for the VCCP1 (for ch1) power supply
VCCP2-supply:
description:
regulator phandle for the VCCP2 (for ch2) power supply
reset-gpios:
maxItems: 1
description:
GPIO specifier for the active low reset line
mute-gpios:
maxItems: 1
description:
GPIO specifier for the active low mute line
required:
- compatible
- VCCA-supply
- VCCP1-supply
- VCCP2-supply
- "#sound-dai-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
codec {
compatible = "rohm,bd28623";
#sound-dai-cells = <0>;
VCCA-supply = <&vcc_reg>;
VCCP1-supply = <&vcc_reg>;
VCCP2-supply = <&vcc_reg>;
reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
mute-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};

View File

@ -0,0 +1,147 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/samsung,aries-wm8994.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Aries audio complex with WM8994 codec
maintainers:
- Jonathan Bakker <xc-racer2@live.ca>
properties:
compatible:
oneOf:
- const: samsung,aries-wm8994
description: With FM radio and modem master
- const: samsung,fascinate4g-wm8994
description: Without FM radio and modem slave
model:
$ref: /schemas/types.yaml#/definitions/string
description: The user-visible name of this sound complex.
cpu:
type: object
properties:
sound-dai:
minItems: 2
maxItems: 2
$ref: /schemas/types.yaml#/definitions/phandle-array
description: |
phandles to the I2S controller and bluetooth codec,
in that order
codec:
type: object
properties:
sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: phandle to the WM8994 CODEC
samsung,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description: |
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 for sources and sinks are the WM8994's pins (as
documented in its binding), and the jacks on the board -
For samsung,aries-wm8994: HP, SPK, RCV, LINE, Main Mic, Headset Mic,
or FM In
For samsung,fascinate4g-wm8994: HP, SPK, RCV, LINE, Main Mic,
or HeadsetMic
extcon:
description: Extcon phandle for dock detection
main-micbias-supply:
description: Supply for the micbias on the main mic
headset-micbias-supply:
description: Supply for the micbias on the headset mic
earpath-sel-gpios:
description: GPIO for switching between tv-out and mic paths
headset-detect-gpios:
description: GPIO for detection of headset insertion
headset-key-gpios:
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
required:
- compatible
- model
- cpu
- codec
- samsung,audio-routing
- extcon
- main-micbias-supply
- headset-micbias-supply
- earpath-sel-gpios
- headset-detect-gpios
- headset-key-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
sound {
compatible = "samsung,fascinate4g-wm8994";
model = "Fascinate4G";
extcon = <&fsa9480>;
main-micbias-supply = <&main_micbias_reg>;
headset-micbias-supply = <&headset_micbias_reg>;
earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
io-channels = <&adc 3>;
io-channel-names = "headset-detect";
headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
samsung,audio-routing =
"HP", "HPOUT1L",
"HP", "HPOUT1R",
"SPK", "SPKOUTLN",
"SPK", "SPKOUTLP",
"RCV", "HPOUT2N",
"RCV", "HPOUT2P",
"LINE", "LINEOUT2N",
"LINE", "LINEOUT2P",
"IN1LP", "Main Mic",
"IN1LN", "Main Mic",
"IN1RP", "Headset Mic",
"IN1RN", "Headset Mic";
pinctrl-names = "default";
pinctrl-0 = <&headset_det &earpath_sel>;
cpu {
sound-dai = <&i2s0>, <&bt_codec>;
};
codec {
sound-dai = <&wm8994>;
};
};

View File

@ -0,0 +1,108 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Midas audio complex with WM1811 codec
maintainers:
- Sylwester Nawrocki <s.nawrocki@samsung.com>
properties:
compatible:
const: samsung,midas-audio
model:
$ref: /schemas/types.yaml#/definitions/string
description: The user-visible name of this sound complex.
cpu:
type: object
properties:
sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the I2S controller
required:
- sound-dai
codec:
type: object
properties:
sound-dai:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the WM1811 CODEC
required:
- sound-dai
samsung,audio-routing:
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
description: |
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 for sources and sinks are
the WM1811's pins (as documented in its binding), and the jacks
on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic.
mic-bias-supply:
description: Supply for the micbias on the Main microphone
submic-bias-supply:
description: Supply for the micbias on the Sub microphone
fm-sel-gpios:
description: GPIO pin for FM selection
lineout-sel-gpios:
description: GPIO pin for line out selection
required:
- compatible
- model
- cpu
- codec
- samsung,audio-routing
- mic-bias-supply
- submic-bias-supply
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
sound {
compatible = "samsung,midas-audio";
model = "Midas";
fm-sel-gpios = <&gpaa0 3 GPIO_ACTIVE_HIGH>;
mic-bias-supply = <&mic_bias_reg>;
submic-bias-supply = <&submic_bias_reg>;
samsung,audio-routing =
"HP", "HPOUT1L",
"HP", "HPOUT1R",
"SPK", "SPKOUTLN",
"SPK", "SPKOUTLP",
"SPK", "SPKOUTRN",
"SPK", "SPKOUTRP",
"RCV", "HPOUT2N",
"RCV", "HPOUT2P",
"IN1LP", "Main Mic",
"IN1LN", "Main Mic",
"IN1RP", "Sub Mic",
"IN1LP", "Sub Mic";
cpu {
sound-dai = <&i2s0>;
};
codec {
sound-dai = <&wm1811>;
};
};

View File

@ -1,60 +0,0 @@
* Freescale SGTL5000 Stereo Codec
Required properties:
- compatible : "fsl,sgtl5000".
- reg : the I2C address of the device
- #sound-dai-cells: must be equal to 0
- clocks : the clock provider of SYS_MCLK
- VDDA-supply : the regulator provider of VDDA
- VDDIO-supply: the regulator provider of VDDIO
Optional properties:
- VDDD-supply : the regulator provider of VDDD
- micbias-resistor-k-ohms : the bias resistor to be used in kOhms
The resistor can take values of 2k, 4k or 8k.
If set to 0 it will be off.
If this node is not mentioned or if the value is unknown, then
micbias resistor is set to 4K.
- micbias-voltage-m-volts : the bias voltage to be used in mVolts
The voltage can take values from 1.25V to 3V by 250mV steps
If this node is not mentioned or the value is unknown, then
the value is set to 1.25V.
- lrclk-strength: the LRCLK pad strength. Possible values are:
0, 1, 2 and 3 as per the table below:
VDDIO 1.8V 2.5V 3.3V
0 = Disable
1 = 1.66 mA 2.87 mA 4.02 mA
2 = 3.33 mA 5.74 mA 8.03 mA
3 = 4.99 mA 8.61 mA 12.05 mA
- sclk-strength: the SCLK pad strength. Possible values are:
0, 1, 2 and 3 as per the table below:
VDDIO 1.8V 2.5V 3.3V
0 = Disable
1 = 1.66 mA 2.87 mA 4.02 mA
2 = 3.33 mA 5.74 mA 8.03 mA
3 = 4.99 mA 8.61 mA 12.05 mA
Example:
sgtl5000: codec@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
#sound-dai-cells = <0>;
clocks = <&clks 150>;
micbias-resistor-k-ohms = <2>;
micbias-voltage-m-volts = <2250>;
VDDA-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
};

View File

@ -0,0 +1,103 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/sgtl5000.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale SGTL5000 Stereo Codec
maintainers:
- Fabio Estevam <festevam@gmail.com>
properties:
compatible:
const: fsl,sgtl5000
reg:
maxItems: 1
"#sound-dai-cells":
const: 0
clocks:
items:
- description: the clock provider of SYS_MCLK
VDDA-supply:
description: the regulator provider of VDDA
VDDIO-supply:
description: the regulator provider of VDDIO
VDDD-supply:
description: the regulator provider of VDDD
micbias-resistor-k-ohms:
description: The bias resistor to be used in kOhms. The resistor can take
values of 2k, 4k or 8k. If set to 0 it will be off. If this node is not
mentioned or if the value is unknown, then micbias resistor is set to
4k.
$ref: "/schemas/types.yaml#/definitions/uint32"
enum: [ 0, 2, 4, 8 ]
micbias-voltage-m-volts:
description: The bias voltage to be used in mVolts. The voltage can take
values from 1.25V to 3V by 250mV steps. If this node is not mentioned
or the value is unknown, then the value is set to 1.25V.
$ref: "/schemas/types.yaml#/definitions/uint32"
enum: [ 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000 ]
lrclk-strength:
description: |
The LRCLK pad strength. Possible values are: 0, 1, 2 and 3 as per the
table below:
VDDIO 1.8V 2.5V 3.3V
0 = Disable
1 = 1.66 mA 2.87 mA 4.02 mA
2 = 3.33 mA 5.74 mA 8.03 mA
3 = 4.99 mA 8.61 mA 12.05 mA
$ref: "/schemas/types.yaml#/definitions/uint32"
enum: [ 0, 1, 2, 3 ]
sclk-strength:
description: |
The SCLK pad strength. Possible values are: 0, 1, 2 and 3 as per the
table below:
VDDIO 1.8V 2.5V 3.3V
0 = Disable
1 = 1.66 mA 2.87 mA 4.02 mA
2 = 3.33 mA 5.74 mA 8.03 mA
3 = 4.99 mA 8.61 mA 12.05 mA
$ref: "/schemas/types.yaml#/definitions/uint32"
enum: [ 0, 1, 2, 3 ]
required:
- compatible
- reg
- "#sound-dai-cells"
- clocks
- VDDA-supply
- VDDIO-supply
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
codec@a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
#sound-dai-cells = <0>;
clocks = <&clks 150>;
micbias-resistor-k-ohms = <2>;
micbias-voltage-m-volts = <2250>;
VDDA-supply = <&reg_3p3v>;
VDDIO-supply = <&reg_3p3v>;
};
};
...

View File

@ -0,0 +1,81 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/socionext,uniphier-aio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: UniPhier AIO audio system
maintainers:
- <alsa-devel@alsa-project.org>
properties:
compatible:
enum:
- socionext,uniphier-ld11-aio
- socionext,uniphier-ld20-aio
- socionext,uniphier-pxs2-aio
reg:
maxItems: 1
interrupts:
maxItems: 1
clock-names:
const: aio
clocks:
maxItems: 1
reset-names:
const: aio
resets:
maxItems: 1
socionext,syscon:
description: |
Specifies a phandle to soc-glue, which is used for changing mode of S/PDIF
signal pin to output from Hi-Z. This property is optional if you use I2S
signal pins only.
$ref: "/schemas/types.yaml#/definitions/phandle"
"#sound-dai-cells":
const: 1
patternProperties:
"^port@[0-9]$":
type: object
properties:
endpoint: true
required:
- endpoint
additionalProperties: false
required:
- compatible
- reg
- interrupts
- clock-names
- clocks
- reset-names
- resets
- "#sound-dai-cells"
examples:
- |
audio@56000000 {
compatible = "socionext,uniphier-ld20-aio";
reg = <0x56000000 0x80000>;
interrupts = <0 144 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_aout>;
clock-names = "aio";
clocks = <&sys_clk 40>;
reset-names = "aio";
resets = <&sys_rst 40>;
#sound-dai-cells = <1>;
socionext,syscon = <&soc_glue>;
};

View File

@ -0,0 +1,70 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/socionext,uniphier-evea.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: UniPhier EVEA SoC-internal sound codec
maintainers:
- <alsa-devel@alsa-project.org>
properties:
compatible:
const: socionext,uniphier-evea
reg:
maxItems: 1
clock-names:
items:
- const: evea
- const: exiv
clocks:
minItems: 2
maxItems: 2
reset-names:
items:
- const: evea
- const: exiv
- const: adamv
resets:
minItems: 3
maxItems: 3
"#sound-dai-cells":
const: 1
patternProperties:
"^port@[0-9]$":
type: object
properties:
endpoint: true
required:
- endpoint
additionalProperties: false
required:
- compatible
- reg
- clock-names
- clocks
- reset-names
- resets
- "#sound-dai-cells"
examples:
- |
codec@57900000 {
compatible = "socionext,uniphier-evea";
reg = <0x57900000 0x1000>;
clock-names = "evea", "exiv";
clocks = <&sys_clk 41>, <&sys_clk 42>;
reset-names = "evea", "exiv", "adamv";
resets = <&sys_rst 41>, <&sys_rst 42>, <&adamv_rst 0>;
#sound-dai-cells = <1>;
};

View File

@ -33,4 +33,4 @@ tas2552: tas2552@41 {
};
For more product information please see the link below:
http://www.ti.com/product/TAS2552
https://www.ti.com/product/TAS2552

View File

@ -11,12 +11,14 @@ Required properties:
- compatible: - Should contain "ti,tas2562", "ti,tas2563".
- reg: - The i2c address. Should be 0x4c, 0x4d, 0x4e or 0x4f.
- ti,imon-slot-no:- TDM TX current sense time slot.
- ti,vmon-slot-no:- TDM TX voltage sense time slot. This slot must always be
greater then ti,imon-slot-no.
Optional properties:
- interrupt-parent: phandle to the interrupt controller which provides
the interrupt.
- interrupts: (GPIO) interrupt to which the chip is connected.
- shut-down: GPIO used to control the state of the device.
- shut-down-gpio: GPIO used to control the state of the device.
Examples:
tas2562@4c {
@ -28,7 +30,8 @@ tas2562@4c {
interrupt-parent = <&gpio1>;
interrupts = <14>;
shut-down = <&gpio1 15 0>;
shut-down-gpio = <&gpio1 15 0>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <1>;
};

View File

@ -0,0 +1,69 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2
---
$id: "http://devicetree.org/schemas/sound/tas2562.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: Texas Instruments TAS2562 Smart PA
maintainers:
- Dan Murphy <dmurphy@ti.com>
description: |
The TAS2562 is a mono, digital input Class-D audio amplifier optimized for
efficiently driving high peak power into small loudspeakers.
Integrated speaker voltage and current sense provides for
real time monitoring of loudspeaker behavior.
properties:
compatible:
enum:
- ti,tas2562
- ti,tas2563
reg:
maxItems: 1
description: |
I2C address of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
shut-down-gpios:
description: GPIO used to control the state of the device.
deprecated: true
shutdown-gpios:
description: GPIO used to control the state of the device.
interrupts:
maxItems: 1
ti,imon-slot-no:
$ref: /schemas/types.yaml#/definitions/uint32
description: TDM TX current sense time slot.
'#sound-dai-cells':
const: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
#address-cells = <1>;
#size-cells = <0>;
codec: codec@4c {
compatible = "ti,tas2562";
reg = <0x4c>;
#sound-dai-cells = <1>;
interrupt-parent = <&gpio1>;
interrupts = <14>;
shutdown-gpios = <&gpio1 15 0>;
ti,imon-slot-no = <0>;
};
};

View File

@ -1,37 +0,0 @@
Texas Instruments TAS2770 Smart PA
The TAS2770 is a mono, digital input Class-D audio amplifier optimized for
efficiently driving high peak power into small loudspeakers.
Integrated speaker voltage and current sense provides for
real time monitoring of loudspeaker behavior.
Required properties:
- compatible: - Should contain "ti,tas2770".
- reg: - The i2c address. Should contain <0x4c>, <0x4d>,<0x4e>, or <0x4f>.
- #address-cells - Should be <1>.
- #size-cells - Should be <0>.
- ti,asi-format: - Sets TDM RX capture edge. 0->Rising; 1->Falling.
- ti,imon-slot-no:- TDM TX current sense time slot.
- ti,vmon-slot-no:- TDM TX voltage sense time slot.
Optional properties:
- interrupt-parent: the phandle to the interrupt controller which provides
the interrupt.
- interrupts: interrupt specification for data-ready.
Examples:
tas2770@4c {
compatible = "ti,tas2770";
reg = <0x4c>;
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&msm_gpio>;
interrupts = <97 0>;
ti,asi-format = <0>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <2>;
};

View File

@ -0,0 +1,76 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2019-20 Texas Instruments Incorporated
%YAML 1.2
---
$id: "http://devicetree.org/schemas/sound/tas2770.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: Texas Instruments TAS2770 Smart PA
maintainers:
- Shi Fu <shifu0704@thundersoft.com>
description: |
The TAS2770 is a mono, digital input Class-D audio amplifier optimized for
efficiently driving high peak power into small loudspeakers.
Integrated speaker voltage and current sense provides for
real time monitoring of loudspeaker behavior.
properties:
compatible:
enum:
- ti,tas2770
reg:
maxItems: 1
description: |
I2C address of the device can be one of these 0x4c, 0x4d, 0x4e or 0x4f
reset-gpio:
description: GPIO used to reset the device.
interrupts:
maxItems: 1
ti,imon-slot-no:
$ref: /schemas/types.yaml#/definitions/uint32
description: TDM TX current sense time slot.
ti,vmon-slot-no:
$ref: /schemas/types.yaml#/definitions/uint32
description: TDM TX voltage sense time slot.
ti,asi-format:
$ref: /schemas/types.yaml#/definitions/uint32
description: Sets TDM RX capture edge.
enum:
- 0 # Rising edge
- 1 # Falling edge
'#sound-dai-cells':
const: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c0 {
#address-cells = <1>;
#size-cells = <0>;
codec: codec@4c {
compatible = "ti,tas2770";
reg = <0x4c>;
#sound-dai-cells = <1>;
interrupt-parent = <&gpio1>;
interrupts = <14>;
reset-gpio = <&gpio1 15 0>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <2>;
};
};

View File

@ -4,9 +4,9 @@ The TAS5720 serial control bus communicates through the I2C protocol only. The
serial bus is also used for periodic codec fault checking/reporting during
audio playback. For more product information please see the links below:
http://www.ti.com/product/TAS5720L
http://www.ti.com/product/TAS5720M
http://www.ti.com/product/TAS5722L
https://www.ti.com/product/TAS5720L
https://www.ti.com/product/TAS5720M
https://www.ti.com/product/TAS5722L
Required properties:

View File

@ -0,0 +1,95 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,j721e-cpb-audio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments J721e Common Processor Board Audio Support
maintainers:
- Peter Ujfalusi <peter.ujfalusi@ti.com>
description: |
The audio support on the board is using pcm3168a codec connected to McASP10
serializers in parallel setup.
The pcm3168a SCKI clock is sourced from j721e AUDIO_REFCLK2 pin.
In order to support 48KHz and 44.1KHz family of sampling rates the parent
clock for AUDIO_REFCLK2 needs to be changed between PLL4 (for 48KHz) and
PLL15 (for 44.1KHz). The same PLLs are used for McASP10's AUXCLK clock via
different HSDIVIDER.
Clocking setup for 48KHz family:
PLL4 ---> PLL4_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
|-> PLL4_HSDIV2 ---> AUDIO_REFCLK2 ---> pcm3168a.SCKI
Clocking setup for 44.1KHz family:
PLL15 ---> PLL15_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
|-> PLL15_HSDIV2 ---> AUDIO_REFCLK2 ---> pcm3168a.SCKI
properties:
compatible:
items:
- const: ti,j721e-cpb-audio
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
ti,cpb-mcasp:
description: phandle to McASP used on CPB
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
ti,cpb-codec:
description: phandle to the pcm3168a codec used on the CPB
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
clocks:
items:
- description: AUXCLK clock for McASP used by CPB audio
- description: Parent for CPB_McASP auxclk (for 48KHz)
- description: Parent for CPB_McASP auxclk (for 44.1KHz)
- description: SCKI clock for the pcm3168a codec on CPB
- description: Parent for CPB_SCKI clock (for 48KHz)
- description: Parent for CPB_SCKI clock (for 44.1KHz)
clock-names:
items:
- const: cpb-mcasp-auxclk
- const: cpb-mcasp-auxclk-48000
- const: cpb-mcasp-auxclk-44100
- const: cpb-codec-scki
- const: cpb-codec-scki-48000
- const: cpb-codec-scki-44100
required:
- compatible
- model
- ti,cpb-mcasp
- ti,cpb-codec
- clocks
- clock-names
additionalProperties: false
examples:
- |+
sound {
compatible = "ti,j721e-cpb-audio";
model = "j721e-cpb";
status = "okay";
ti,cpb-mcasp = <&mcasp10>;
ti,cpb-codec = <&pcm3168a_1>;
clocks = <&k3_clks 184 1>,
<&k3_clks 184 2>, <&k3_clks 184 4>,
<&k3_clks 157 371>,
<&k3_clks 157 400>, <&k3_clks 157 401>;
clock-names = "cpb-mcasp-auxclk",
"cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100",
"cpb-codec-scki",
"cpb-codec-scki-48000", "cpb-codec-scki-44100";
};

View File

@ -0,0 +1,150 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/ti,j721e-cpb-ivi-audio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Texas Instruments J721e Common Processor Board Audio Support
maintainers:
- Peter Ujfalusi <peter.ujfalusi@ti.com>
description: |
The Infotainment board plugs into the Common Processor Board, the support of the
extension board is extending the CPB audio support, decribed in:
sound/ti,j721e-cpb-audio.txt
The audio support on the Infotainment Expansion Board consists of McASP0
connected to two pcm3168a codecs with dedicated set of serializers to each.
The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin.
In order to support 48KHz and 44.1KHz family of sampling rates the parent clock
for AUDIO_REFCLK0 needs to be changed between PLL4 (for 48KHz) and PLL15 (for
44.1KHz). The same PLLs are used for McASP0's AUXCLK clock via different
HSDIVIDER.
Note: the same PLL4 and PLL15 is used by the audio support on the CPB!
Clocking setup for 48KHz family:
PLL4 ---> PLL4_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
| |-> MCASP0_AUXCLK ---> McASP0.auxclk
|
|-> PLL4_HSDIV2 ---> AUDIO_REFCLK2 ---> pcm3168a.SCKI
|-> AUDIO_REFCLK0 ---> pcm3168a_a/b.SCKI
Clocking setup for 44.1KHz family:
PLL15 ---> PLL15_HSDIV0 ---> MCASP10_AUXCLK ---> McASP10.auxclk
| |-> MCASP0_AUXCLK ---> McASP0.auxclk
|
|-> PLL15_HSDIV2 ---> AUDIO_REFCLK2 ---> pcm3168a.SCKI
|-> AUDIO_REFCLK0 ---> pcm3168a_a/b.SCKI
properties:
compatible:
items:
- const: ti,j721e-cpb-ivi-audio
model:
$ref: /schemas/types.yaml#/definitions/string
description: User specified audio sound card name
ti,cpb-mcasp:
description: phandle to McASP used on CPB
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
ti,cpb-codec:
description: phandle to the pcm3168a codec used on the CPB
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
ti,ivi-mcasp:
description: phandle to McASP used on IVI
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
ti,ivi-codec-a:
description: phandle to the pcm3168a-A codec on the expansion board
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
ti,ivi-codec-b:
description: phandle to the pcm3168a-B codec on the expansion board
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
clocks:
items:
- description: AUXCLK clock for McASP used by CPB audio
- description: Parent for CPB_McASP auxclk (for 48KHz)
- description: Parent for CPB_McASP auxclk (for 44.1KHz)
- description: SCKI clock for the pcm3168a codec on CPB
- description: Parent for CPB_SCKI clock (for 48KHz)
- description: Parent for CPB_SCKI clock (for 44.1KHz)
- description: AUXCLK clock for McASP used by IVI audio
- description: Parent for IVI_McASP auxclk (for 48KHz)
- description: Parent for IVI_McASP auxclk (for 44.1KHz)
- description: SCKI clock for the pcm3168a codec on IVI
- description: Parent for IVI_SCKI clock (for 48KHz)
- description: Parent for IVI_SCKI clock (for 44.1KHz)
clock-names:
items:
- const: cpb-mcasp-auxclk
- const: cpb-mcasp-auxclk-48000
- const: cpb-mcasp-auxclk-44100
- const: cpb-codec-scki
- const: cpb-codec-scki-48000
- const: cpb-codec-scki-44100
- const: ivi-mcasp-auxclk
- const: ivi-mcasp-auxclk-48000
- const: ivi-mcasp-auxclk-44100
- const: ivi-codec-scki
- const: ivi-codec-scki-48000
- const: ivi-codec-scki-44100
required:
- compatible
- model
- ti,cpb-mcasp
- ti,cpb-codec
- ti,ivi-mcasp
- ti,ivi-codec-a
- ti,ivi-codec-b
- clocks
- clock-names
additionalProperties: false
examples:
- |+
sound {
compatible = "ti,j721e-cpb-ivi-audio";
model = "j721e-cpb-ivi";
status = "okay";
ti,cpb-mcasp = <&mcasp10>;
ti,cpb-codec = <&pcm3168a_1>;
ti,ivi-mcasp = <&mcasp0>;
ti,ivi-codec-a = <&pcm3168a_a>;
ti,ivi-codec-b = <&pcm3168a_b>;
clocks = <&k3_clks 184 1>,
<&k3_clks 184 2>, <&k3_clks 184 4>,
<&k3_clks 157 371>,
<&k3_clks 157 400>, <&k3_clks 157 401>,
<&k3_clks 174 1>,
<&k3_clks 174 2>, <&k3_clks 174 4>,
<&k3_clks 157 301>,
<&k3_clks 157 330>, <&k3_clks 157 331>;
clock-names = "cpb-mcasp-auxclk",
"cpb-mcasp-auxclk-48000", "cpb-mcasp-auxclk-44100",
"cpb-codec-scki",
"cpb-codec-scki-48000", "cpb-codec-scki-44100",
"ivi-mcasp-auxclk",
"ivi-mcasp-auxclk-48000", "ivi-mcasp-auxclk-44100",
"ivi-codec-scki",
"ivi-codec-scki-48000", "ivi-codec-scki-44100";
};

View File

@ -19,4 +19,4 @@ tas6424: tas6424@6a {
};
For more product information please see the link below:
http://www.ti.com/product/TAS6424-Q1
https://www.ti.com/product/TAS6424-Q1

View File

@ -18,9 +18,9 @@ description: |
microphone bias or supply voltage generation.
Specifications can be found at:
http://www.ti.com/lit/ds/symlink/tlv320adc3140.pdf
http://www.ti.com/lit/ds/symlink/tlv320adc5140.pdf
http://www.ti.com/lit/ds/symlink/tlv320adc6140.pdf
https://www.ti.com/lit/ds/symlink/tlv320adc3140.pdf
https://www.ti.com/lit/ds/symlink/tlv320adc5140.pdf
https://www.ti.com/lit/ds/symlink/tlv320adc6140.pdf
properties:
compatible:
@ -108,6 +108,32 @@ properties:
maximum: 7
default: [0, 0, 0, 0]
patternProperties:
'^ti,gpo-config-[1-4]$':
$ref: /schemas/types.yaml#/definitions/uint32-array
description: |
Defines the configuration and output driver for the general purpose
output pins (GPO). These values are pairs, the first value is for the
configuration type and the second value is for the output drive type.
The array is defined as <GPO_CFG GPO_DRV>
GPO output configuration can be one of the following:
0 - (default) disabled
1 - GPOX is configured as a general-purpose output (GPO)
2 - GPOX is configured as a device interrupt output (IRQ)
3 - GPOX is configured as a secondary ASI output (SDOUT2)
4 - GPOX is configured as a PDM clock output (PDMCLK)
GPO output drive configuration for the GPO pins can be one of the following:
0d - (default) Hi-Z output
1d - Drive active low and active high
2d - Drive active low and weak high
3d - Drive active low and Hi-Z
4d - Drive weak low and active high
5d - Drive Hi-Z and active high
required:
- compatible
- reg
@ -124,6 +150,8 @@ examples:
ti,mic-bias-source = <6>;
ti,pdm-edge-select = <0 1 0 1>;
ti,gpi-config = <4 5 6 7>;
ti,gpo-config-1 = <0 0>;
ti,gpo-config-2 = <0 0>;
reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
};
};

View File

@ -1,45 +0,0 @@
Socionext UniPhier SoC audio driver
The Socionext UniPhier audio subsystem consists of I2S and S/PDIF blocks in
the same register space.
Required properties:
- compatible : should be one of the following:
"socionext,uniphier-ld11-aio"
"socionext,uniphier-ld20-aio"
"socionext,uniphier-pxs2-aio"
- reg : offset and length of the register set for the device.
- interrupts : should contain I2S or S/PDIF interrupt.
- pinctrl-names : should be "default".
- pinctrl-0 : defined I2S signal pins for an external codec chip.
- clock-names : should include following entries:
"aio"
- clocks : a list of phandle, should contain an entry for each
entry in clock-names.
- reset-names : should include following entries:
"aio"
- resets : a list of phandle, should contain an entry for each
entry in reset-names.
- #sound-dai-cells: should be 1.
Optional properties:
- socionext,syscon: a phandle, should contain soc-glue.
The soc-glue is used for changing mode of S/PDIF signal pin
to Output from Hi-Z. This property is optional if you use
I2S signal pins only.
Example:
audio {
compatible = "socionext,uniphier-ld20-aio";
reg = <0x56000000 0x80000>;
interrupts = <0 144 4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_aout>;
clock-names = "aio";
clocks = <&sys_clk 40>;
reset-names = "aio";
resets = <&sys_rst 40>;
#sound-dai-cells = <1>;
socionext,syscon = <&sg>;
};

View File

@ -1,26 +0,0 @@
Socionext EVEA - UniPhier SoC internal codec driver
Required properties:
- compatible : should be "socionext,uniphier-evea".
- reg : offset and length of the register set for the device.
- clock-names : should include following entries:
"evea", "exiv"
- clocks : a list of phandle, should contain an entry for each
entries in clock-names.
- reset-names : should include following entries:
"evea", "exiv", "adamv"
- resets : a list of phandle, should contain reset entries of
reset-names.
- #sound-dai-cells: should be 1.
Example:
codec {
compatible = "socionext,uniphier-evea";
reg = <0x57900000 0x1000>;
clock-names = "evea", "exiv";
clocks = <&sys_clk 41>, <&sys_clk 42>;
reset-names = "evea", "exiv", "adamv";
resets = <&sys_rst 41>, <&sys_rst 42>, <&adamv_rst 0>;
#sound-dai-cells = <1>;
};

View File

@ -21,6 +21,17 @@ Optional properties:
enabled and disabled together with HP_L and HP_R pins in response to jack
detect events.
- wlf,hp-cfg: A list of headphone jack detect configuration register values.
The list must be 3 entries long.
hp-cfg[0]: HPSEL[1:0] of R48 (Additional Control 4).
hp-cfg[1]: {HPSWEN:HPSWPOL} of R24 (Additional Control 2).
hp-cfg[2]: {TOCLKSEL:TOEN} of R23 (Additional Control 1).
- wlf,gpio-cfg: A list of GPIO configuration register values.
The list must be 2 entries long.
gpio-cfg[0]: ALRCGPIO of R9 (Audio interface)
gpio-cfg[1]: {GPIOPOL:GPIOSEL[2:0]} of R48 (Additional Control 4).
Example:
wm8960: codec@1a {

View File

@ -68,6 +68,29 @@ Optional properties:
- wlf,csnaddr-pd : If present enable the internal pull-down resistor on
the CS/ADDR pin.
Pins on the device (for linking into audio routes):
* IN1LN
* IN1LP
* IN2LN
* IN2LP:VXRN
* IN1RN
* IN1RP
* IN2RN
* IN2RP:VXRP
* SPKOUTLP
* SPKOUTLN
* SPKOUTRP
* SPKOUTRN
* HPOUT1L
* HPOUT1R
* HPOUT2P
* HPOUT2N
* LINEOUT1P
* LINEOUT1N
* LINEOUT2P
* LINEOUT2N
Example:
wm8994: codec@1a {

View File

@ -80,8 +80,6 @@ properties:
- fsl,mpl3115
# MPR121: Proximity Capacitive Touch Sensor Controller
- fsl,mpr121
# SGTL5000: Ultra Low-Power Audio Codec
- fsl,sgtl5000
# G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire Interface
- gmt,g751
# Infineon IR38064 Voltage Regulator

View File

@ -20,7 +20,7 @@ patternProperties:
"^(keypad|m25p|max8952|max8997|max8998|mpmc),.*": true
"^(pinctrl-single|#pinctrl-single|PowerPC),.*": true
"^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true
"^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*": true
"^(simple-audio-card|st-plgpio|st-spics|ts),.*": true
# Keep list in alphabetical order.
"^70mai,.*":

View File

@ -309,7 +309,7 @@ pcifix
This module supports all ADB PCM channels, ac97 mixer, SPDIF, hardware
EQ, mpu401, gameport. A3D and wavetable support are still in development.
Development and reverse engineering work is being coordinated at
http://savannah.nongnu.org/projects/openvortex/
https://savannah.nongnu.org/projects/openvortex/
SPDIF output has a copy of the AC97 codec output, unless you use the
``spdif`` pcm device, which allows raw data passthru.
The hardware EQ hardware and SPDIF is only present in the Vortex2 and
@ -1575,7 +1575,7 @@ See Documentation/sound/cards/multisound.sh for important information
about this driver. Note that it has been discontinued, but the
Voyetra Turtle Beach knowledge base entry for it is still available
at
http://www.turtlebeach.com
https://www.turtlebeach.com
Module snd-msnd-pinnacle
------------------------
@ -2703,4 +2703,4 @@ Kernel Bugzilla
ALSA Developers ML
mailto:alsa-devel@alsa-project.org
alsa-info.sh script
http://www.alsa-project.org/alsa-info.sh
https://www.alsa-project.org/alsa-info.sh

View File

@ -331,7 +331,7 @@ WO 9901953 (A1)
Execution and Audio Data Sequencing (Jan. 14, 1999)
US Patents (http://www.uspto.gov/)
US Patents (https://www.uspto.gov/)
----------------------------------
US 5925841

View File

@ -336,7 +336,7 @@ WO 9901953 (A1)
Execution and Audio Data Sequencing (Jan. 14, 1999)
US Patents (http://www.uspto.gov/)
US Patents (https://www.uspto.gov/)
----------------------------------
US 5925841

View File

@ -151,6 +151,57 @@ Modifications include:
- Addition of encoding options when required (derived from OpenMAX IL)
- Addition of rateControlSupported (missing in OpenMAX AL)
State Machine
=============
The compressed audio stream state machine is described below ::
+----------+
| |
| OPEN |
| |
+----------+
|
|
| compr_set_params()
|
v
compr_free() +----------+
+------------------------------------| |
| | SETUP |
| +-------------------------| |<-------------------------+
| | compr_write() +----------+ |
| | ^ |
| | | compr_drain_notify() |
| | | or |
| | | compr_stop() |
| | | |
| | +----------+ |
| | | | |
| | | DRAIN | |
| | | | |
| | +----------+ |
| | ^ |
| | | |
| | | compr_drain() |
| | | |
| v | |
| +----------+ +----------+ |
| | | compr_start() | | compr_stop() |
| | PREPARE |------------------->| RUNNING |--------------------------+
| | | | | |
| +----------+ +----------+ |
| | | ^ |
| |compr_free() | | |
| | compr_pause() | | compr_resume() |
| | | | |
| v v | |
| +----------+ +----------+ |
| | | | | compr_stop() |
+--->| FREE | | PAUSE |---------------------------+
| | | |
+----------+ +----------+
Gapless Playback
================
@ -199,6 +250,38 @@ Sequence flow for gapless would be:
(note: order for partial_drain and write for next track can be reversed as well)
Gapless Playback SM
===================
For Gapless, we move from running state to partial drain and back, along
with setting of meta_data and signalling for next track ::
+----------+
compr_drain_notify() | |
+------------------------>| RUNNING |
| | |
| +----------+
| |
| |
| | compr_next_track()
| |
| V
| +----------+
| | |
| |NEXT_TRACK|
| | |
| +----------+
| |
| |
| | compr_partial_drain()
| |
| V
| +----------+
| | |
+------------------------ | PARTIAL_ |
| DRAIN |
+----------+
Not supported
=============

View File

@ -91,7 +91,7 @@ PCM Proc Files
``card*/pcm*/xrun_debug``
This file appears when ``CONFIG_SND_DEBUG=y`` and
``CONFIG_PCM_XRUN_DEBUG=y``.
``CONFIG_SND_PCM_XRUN_DEBUG=y``.
This shows the status of xrun (= buffer overrun/xrun) and
invalid PCM position debug/check of ALSA PCM middle layer.
It takes an integer value, can be changed by writing to this

View File

@ -42,7 +42,7 @@ If you are interested in the deep debugging of HD-audio, read the
HD-audio specification at first. The specification is found on
Intel's web page, for example:
* http://www.intel.com/standards/hdaudio/
* https://www.intel.com/standards/hdaudio/
HD-Audio Controller
@ -728,7 +728,7 @@ version can be found on git repository:
The script can be fetched directly from the following URL, too:
* http://www.alsa-project.org/alsa-info.sh
* https://www.alsa-project.org/alsa-info.sh
Run this script as root, and it will gather the important information
such as the module lists, module parameters, proc file contents
@ -818,7 +818,7 @@ proc-compatible output.
The hda-analyzer:
* http://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
* https://git.alsa-project.org/?p=alsa.git;a=tree;f=hda-analyzer
is a part of alsa.git repository in alsa-project.org:

View File

@ -99,7 +99,7 @@ ASoC Core API
.. kernel-doc:: include/sound/soc.h
.. kernel-doc:: sound/soc/soc-core.c
.. kernel-doc:: sound/soc/soc-devres.c
.. kernel-doc:: sound/soc/soc-io.c
.. kernel-doc:: sound/soc/soc-component.c
.. kernel-doc:: sound/soc/soc-pcm.c
.. kernel-doc:: sound/soc/soc-ops.c
.. kernel-doc:: sound/soc/soc-compress.c

View File

@ -3579,7 +3579,7 @@ dependent on the bus. For normal devices, pass the device pointer
``SNDRV_DMA_TYPE_DEV`` type. For the continuous buffer unrelated to the
bus can be pre-allocated with ``SNDRV_DMA_TYPE_CONTINUOUS`` type.
You can pass NULL to the device pointer in that case, which is the
default mode implying to allocate with ``GFP_KRENEL`` flag.
default mode implying to allocate with ``GFP_KERNEL`` flag.
If you need a different GFP flag, you can pass it by encoding the flag
into the device pointer via a special macro
:c:func:`snd_dma_continuous_data()`.

View File

@ -17,7 +17,7 @@ frame (FRAME) (usually 48kHz) is always driven by the controller. Each AC97
frame is 21uS long and is divided into 13 time slots.
The AC97 specification can be found at :
http://www.intel.com/p/en_US/business/design
https://www.intel.com/p/en_US/business/design
I2S

View File

@ -140,13 +140,13 @@
compatible = "audio-graph-card";
label = "Droid 4 Audio";
simple-graph-card,widgets =
widgets =
"Speaker", "Earpiece",
"Speaker", "Loudspeaker",
"Headphone", "Headphone Jack",
"Microphone", "Internal Mic";
simple-graph-card,routing =
routing =
"Earpiece", "EP",
"Loudspeaker", "SPKR",
"Headphone Jack", "HSL",

View File

@ -672,8 +672,8 @@ static void sii902x_audio_shutdown(struct device *dev, void *data)
clk_disable_unprepare(sii902x->audio.mclk);
}
static int sii902x_audio_digital_mute(struct device *dev,
void *data, bool enable)
static int sii902x_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct sii902x *sii902x = dev_get_drvdata(dev);
@ -724,9 +724,10 @@ static int sii902x_audio_get_dai_id(struct snd_soc_component *component,
static const struct hdmi_codec_ops sii902x_audio_codec_ops = {
.hw_params = sii902x_audio_hw_params,
.audio_shutdown = sii902x_audio_shutdown,
.digital_mute = sii902x_audio_digital_mute,
.mute_stream = sii902x_audio_mute,
.get_eld = sii902x_audio_get_eld,
.get_dai_id = sii902x_audio_get_dai_id,
.no_capture_mute = 1,
};
static int sii902x_audio_codec_init(struct sii902x *sii902x,

View File

@ -1605,7 +1605,8 @@ static int hdmi_audio_hw_params(struct device *dev, void *data,
return 0;
}
static int hdmi_audio_digital_mute(struct device *dev, void *data, bool mute)
static int hdmi_audio_mute(struct device *dev, void *data,
bool mute, int direction)
{
struct hdmi_context *hdata = dev_get_drvdata(dev);
@ -1635,8 +1636,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = hdmi_audio_hw_params,
.audio_shutdown = hdmi_audio_shutdown,
.digital_mute = hdmi_audio_digital_mute,
.mute_stream = hdmi_audio_mute,
.get_eld = hdmi_audio_get_eld,
.no_capture_mute = 1,
};
static int hdmi_register_audio_device(struct hdmi_context *hdata)

View File

@ -1133,8 +1133,8 @@ static void tda998x_audio_shutdown(struct device *dev, void *data)
mutex_unlock(&priv->audio_mutex);
}
static int tda998x_audio_digital_mute(struct device *dev, void *data,
bool enable)
static int tda998x_audio_mute_stream(struct device *dev, void *data,
bool enable, int direction)
{
struct tda998x_priv *priv = dev_get_drvdata(dev);
@ -1162,8 +1162,9 @@ static int tda998x_audio_get_eld(struct device *dev, void *data,
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = tda998x_audio_hw_params,
.audio_shutdown = tda998x_audio_shutdown,
.digital_mute = tda998x_audio_digital_mute,
.mute_stream = tda998x_audio_mute_stream,
.get_eld = tda998x_audio_get_eld,
.no_capture_mute = 1,
};
static int tda998x_audio_codec_init(struct tda998x_priv *priv,

View File

@ -1643,7 +1643,8 @@ static void mtk_hdmi_audio_shutdown(struct device *dev, void *data)
}
static int
mtk_hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
mtk_hdmi_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
@ -1684,9 +1685,10 @@ static const struct hdmi_codec_ops mtk_hdmi_audio_codec_ops = {
.hw_params = mtk_hdmi_audio_hw_params,
.audio_startup = mtk_hdmi_audio_startup,
.audio_shutdown = mtk_hdmi_audio_shutdown,
.digital_mute = mtk_hdmi_audio_digital_mute,
.mute_stream = mtk_hdmi_audio_mute,
.get_eld = mtk_hdmi_audio_get_eld,
.hook_plugged_cb = mtk_hdmi_audio_hook_plugged_cb,
.no_capture_mute = 1,
};
static int mtk_hdmi_register_audio_driver(struct device *dev)

View File

@ -817,8 +817,8 @@ out:
mutex_unlock(&dp->lock);
}
static int cdn_dp_audio_digital_mute(struct device *dev, void *data,
bool enable)
static int cdn_dp_audio_mute_stream(struct device *dev, void *data,
bool enable, int direction)
{
struct cdn_dp_device *dp = dev_get_drvdata(dev);
int ret;
@ -849,8 +849,9 @@ static int cdn_dp_audio_get_eld(struct device *dev, void *data,
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = cdn_dp_audio_hw_params,
.audio_shutdown = cdn_dp_audio_shutdown,
.digital_mute = cdn_dp_audio_digital_mute,
.mute_stream = cdn_dp_audio_mute_stream,
.get_eld = cdn_dp_audio_get_eld,
.no_capture_mute = 1,
};
static int cdn_dp_audio_codec_init(struct cdn_dp_device *dp,

View File

@ -1191,7 +1191,8 @@ static int hdmi_audio_hw_params(struct device *dev,
return 0;
}
static int hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
static int hdmi_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct sti_hdmi *hdmi = dev_get_drvdata(dev);
@ -1219,8 +1220,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf, size
static const struct hdmi_codec_ops audio_codec_ops = {
.hw_params = hdmi_audio_hw_params,
.audio_shutdown = hdmi_audio_shutdown,
.digital_mute = hdmi_audio_digital_mute,
.mute_stream = hdmi_audio_mute,
.get_eld = hdmi_audio_get_eld,
.no_capture_mute = 1,
};
static int sti_hdmi_register_audio_driver(struct device *dev,

View File

@ -439,8 +439,8 @@ static int zx_hdmi_audio_hw_params(struct device *dev,
return zx_hdmi_infoframe_trans(hdmi, &frame, FSEL_AUDIO);
}
static int zx_hdmi_audio_digital_mute(struct device *dev, void *data,
bool enable)
static int zx_hdmi_audio_mute(struct device *dev, void *data,
bool enable, int direction)
{
struct zx_hdmi *hdmi = dev_get_drvdata(dev);
@ -468,8 +468,9 @@ static const struct hdmi_codec_ops zx_hdmi_codec_ops = {
.audio_startup = zx_hdmi_audio_startup,
.hw_params = zx_hdmi_audio_hw_params,
.audio_shutdown = zx_hdmi_audio_shutdown,
.digital_mute = zx_hdmi_audio_digital_mute,
.mute_stream = zx_hdmi_audio_mute,
.get_eld = zx_hdmi_audio_get_eld,
.no_capture_mute = 1,
};
static struct hdmi_codec_pdata zx_hdmi_codec_pdata = {

View File

@ -986,7 +986,7 @@ static int lantiq_ssc_probe(struct platform_device *pdev)
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 8) |
SPI_BPW_MASK(16) | SPI_BPW_MASK(32);
spi->wq = alloc_ordered_workqueue(dev_name(dev), 0);
spi->wq = alloc_ordered_workqueue(dev_name(dev), WQ_MEM_RECLAIM);
if (!spi->wq) {
err = -ENOMEM;
goto err_clk_put;

View File

@ -19,4 +19,8 @@
#define MSM_FRONTEND_DAI_MULTIMEDIA15 14
#define MSM_FRONTEND_DAI_MULTIMEDIA16 15
#define Q6ASM_DAI_TX_RX 0
#define Q6ASM_DAI_TX 1
#define Q6ASM_DAI_RX 2
#endif /* __DT_BINDINGS_Q6_ASM_H__ */

View File

@ -188,20 +188,21 @@ int snd_ctl_enum_info(struct snd_ctl_elem_info *info, unsigned int channels,
*/
struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
const unsigned int *tlv);
int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
unsigned int flags);
/* optional flags for slave */
#define SND_CTL_SLAVE_NEED_UPDATE (1 << 0)
int _snd_ctl_add_follower(struct snd_kcontrol *master,
struct snd_kcontrol *follower,
unsigned int flags);
/* optional flags for follower */
#define SND_CTL_FOLLOWER_NEED_UPDATE (1 << 0)
/**
* snd_ctl_add_slave - Add a virtual slave control
* snd_ctl_add_follower - Add a virtual follower control
* @master: vmaster element
* @slave: slave element to add
* @follower: follower element to add
*
* Add a virtual slave control to the given master element created via
* Add a virtual follower control to the given master element created via
* snd_ctl_create_virtual_master() beforehand.
*
* All slaves must be the same type (returning the same information
* All followers must be the same type (returning the same information
* via info callback). The function doesn't check it, so it's your
* responsibility.
*
@ -213,18 +214,18 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
* Return: Zero if successful or a negative error code.
*/
static inline int
snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
snd_ctl_add_follower(struct snd_kcontrol *master, struct snd_kcontrol *follower)
{
return _snd_ctl_add_slave(master, slave, 0);
return _snd_ctl_add_follower(master, follower, 0);
}
/**
* snd_ctl_add_slave_uncached - Add a virtual slave control
* snd_ctl_add_follower_uncached - Add a virtual follower control
* @master: vmaster element
* @slave: slave element to add
* @follower: follower element to add
*
* Add a virtual slave control to the given master.
* Unlike snd_ctl_add_slave(), the element added via this function
* Add a virtual follower control to the given master.
* Unlike snd_ctl_add_follower(), the element added via this function
* is supposed to have volatile values, and get callback is called
* at each time queried from the master.
*
@ -235,10 +236,10 @@ snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
* Return: Zero if successful or a negative error code.
*/
static inline int
snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
struct snd_kcontrol *slave)
snd_ctl_add_follower_uncached(struct snd_kcontrol *master,
struct snd_kcontrol *follower)
{
return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE);
return _snd_ctl_add_follower(master, follower, SND_CTL_FOLLOWER_NEED_UPDATE);
}
int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl,
@ -246,11 +247,11 @@ int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kctl,
void *private_data);
void snd_ctl_sync_vmaster(struct snd_kcontrol *kctl, bool hook_only);
#define snd_ctl_sync_vmaster_hook(kctl) snd_ctl_sync_vmaster(kctl, true)
int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl,
int (*func)(struct snd_kcontrol *vslave,
struct snd_kcontrol *slave,
void *arg),
void *arg);
int snd_ctl_apply_vmaster_followers(struct snd_kcontrol *kctl,
int (*func)(struct snd_kcontrol *vfollower,
struct snd_kcontrol *follower,
void *arg),
void *arg);
/*
* Helper functions for jack-detection controls

View File

@ -613,4 +613,8 @@ int snd_gus_dram_write(struct snd_gus_card *gus, char __user *ptr,
int snd_gus_dram_read(struct snd_gus_card *gus, char __user *ptr,
unsigned int addr, unsigned int size, int rom);
/* gus_timer.c */
void snd_gf1_timers_init(struct snd_gus_card *gus);
void snd_gf1_timers_done(struct snd_gus_card *gus);
#endif /* __SOUND_GUS_H */

View File

@ -208,7 +208,7 @@ struct hda_codec {
struct mutex control_mutex;
struct snd_array spdif_out;
unsigned int spdif_in_enable; /* SPDIF input enable? */
const hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
const hda_nid_t *follower_dig_outs; /* optional digital out follower widgets */
struct snd_array init_pins; /* initial (BIOS) pin configurations */
struct snd_array driver_pins; /* pin configs set by codec parser */
struct snd_array cvt_setups; /* audio convert setups */
@ -415,6 +415,8 @@ __printf(2, 3)
struct hda_pcm *snd_hda_codec_pcm_new(struct hda_codec *codec,
const char *fmt, ...);
void snd_hda_codec_cleanup_for_unbind(struct hda_codec *codec);
static inline void snd_hda_codec_pcm_get(struct hda_pcm *pcm)
{
kref_get(&pcm->kref);

View File

@ -347,6 +347,9 @@ struct hdac_bus {
int bdl_pos_adj; /* BDL position adjustment */
/* delay time in us for dma stop */
unsigned int dma_stop_delay;
/* locks */
spinlock_t reg_lock;
struct mutex cmd_mutex;

View File

@ -2,7 +2,7 @@
/*
* hdmi-codec.h - HDMI Codec driver API
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
* Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
*
* Author: Jyri Sarha <jsarha@ti.com>
*/
@ -76,7 +76,8 @@ struct hdmi_codec_ops {
* Mute/unmute HDMI audio stream.
* Optional
*/
int (*digital_mute)(struct device *dev, void *data, bool enable);
int (*mute_stream)(struct device *dev, void *data,
bool enable, int direction);
/*
* Provides EDID-Like-Data from connected HDMI device.
@ -99,6 +100,9 @@ struct hdmi_codec_ops {
int (*hook_plugged_cb)(struct device *dev, void *data,
hdmi_codec_plugged_cb fn,
struct device *codec_dev);
/* bit field */
unsigned int no_capture_mute:1;
};
/* HDMI codec initalization data */

View File

@ -94,7 +94,11 @@ static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab,
size_t offset)
{
struct snd_sg_buf *sgbuf = dmab->private_data;
dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr;
dma_addr_t addr;
if (!sgbuf)
return dmab->addr + offset;
addr = sgbuf->table[offset >> PAGE_SHIFT].addr;
addr &= ~((dma_addr_t)PAGE_SIZE - 1);
return addr + offset % PAGE_SIZE;
}
@ -106,6 +110,9 @@ static inline void *snd_sgbuf_get_ptr(struct snd_dma_buffer *dmab,
size_t offset)
{
struct snd_sg_buf *sgbuf = dmab->private_data;
if (!sgbuf)
return dmab->area + offset;
return sgbuf->table[offset >> PAGE_SHIFT].buf + offset % PAGE_SIZE;
}

View File

@ -2,7 +2,7 @@
/*
* hdmi-audio.c -- OMAP4+ DSS HDMI audio support library
*
* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com
* Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com
*
* Author: Jyri Sarha <jsarha@ti.com>
*/

View File

@ -1,26 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* linux/sound/rt5670.h -- Platform data for RT5670
*
* Copyright 2014 Realtek Microelectronics
*/
#ifndef __LINUX_SND_RT5670_H
#define __LINUX_SND_RT5670_H
struct rt5670_platform_data {
int jd_mode;
bool in2_diff;
bool dev_gpio;
bool gpio1_is_ext_spk_en;
bool dmic_en;
unsigned int dmic1_data_pin;
/* 0 = GPIO6; 1 = IN2P; 3 = GPIO7*/
unsigned int dmic2_data_pin;
/* 0 = GPIO8; 1 = IN3N; */
unsigned int dmic3_data_pin;
/* 0 = GPIO9; 1 = GPIO10; 2 = GPIO5*/
};
#endif

View File

@ -12,9 +12,9 @@
#include <sound/soc.h>
#define asoc_simple_init_hp(card, sjack, prefix) \
asoc_simple_init_jack(card, sjack, 1, prefix)
asoc_simple_init_jack(card, sjack, 1, prefix, NULL)
#define asoc_simple_init_mic(card, sjack, prefix) \
asoc_simple_init_jack(card, sjack, 0, prefix)
asoc_simple_init_jack(card, sjack, 0, prefix, NULL)
struct asoc_simple_dai {
const char *name;
@ -131,7 +131,7 @@ int asoc_simple_parse_pin_switches(struct snd_soc_card *card,
int asoc_simple_init_jack(struct snd_soc_card *card,
struct asoc_simple_jack *sjack,
int is_hp, char *prefix);
int is_hp, char *prefix, char *pin);
int asoc_simple_init_priv(struct asoc_simple_priv *priv,
struct link_info *li);

View File

@ -2,7 +2,8 @@
*
* soc-component.h
*
* Copyright (c) 2019 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
* Copyright (C) 2019 Renesas Electronics Corp.
* Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
*/
#ifndef __SOC_COMPONENT_H
#define __SOC_COMPONENT_H
@ -324,10 +325,12 @@ static inline int snd_soc_component_cache_sync(
return regcache_sync(component->regmap);
}
void snd_soc_component_set_aux(struct snd_soc_component *component,
struct snd_soc_aux_dev *aux);
int snd_soc_component_init(struct snd_soc_component *component);
/* component IO */
int snd_soc_component_read(struct snd_soc_component *component,
unsigned int reg, unsigned int *val);
unsigned int snd_soc_component_read32(struct snd_soc_component *component,
unsigned int snd_soc_component_read(struct snd_soc_component *component,
unsigned int reg);
int snd_soc_component_write(struct snd_soc_component *component,
unsigned int reg, unsigned int val);
@ -359,6 +362,7 @@ int snd_soc_component_stream_event(struct snd_soc_component *component,
int snd_soc_component_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level);
void snd_soc_component_setup_regmap(struct snd_soc_component *component);
#ifdef CONFIG_REGMAP
void snd_soc_component_init_regmap(struct snd_soc_component *component,
struct regmap *regmap);
@ -421,16 +425,6 @@ int snd_soc_component_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream);
int snd_soc_component_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream);
int snd_soc_component_prepare(struct snd_soc_component *component,
struct snd_pcm_substream *substream);
int snd_soc_component_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
int snd_soc_component_hw_free(struct snd_soc_component *component,
struct snd_pcm_substream *substream);
int snd_soc_component_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
int cmd);
void snd_soc_component_suspend(struct snd_soc_component *component);
void snd_soc_component_resume(struct snd_soc_component *component);
int snd_soc_component_is_suspended(struct snd_soc_component *component);
@ -455,5 +449,13 @@ int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream,
struct vm_area_struct *vma);
int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd);
void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd);
int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream);
int snd_soc_pcm_component_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_component **last);
void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_component *last);
int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream,
int cmd);
#endif /* __SOC_COMPONENT_H */

View File

@ -39,7 +39,7 @@ struct snd_compr_stream;
/*
* DAI Clock gating.
*
* DAI bit clocks can be be gated (disabled) when the DAI is not
* DAI bit clocks can be gated (disabled) when the DAI is not
* sending or receiving PCM data in a frame. This can be used to save power.
*/
#define SND_SOC_DAIFMT_CONT (1 << 4) /* continuous clock */
@ -76,12 +76,12 @@ struct snd_compr_stream;
*
* This is wrt the codec, the inverse is true for the interface
* i.e. if the codec is clk and FRM master then the interface is
* clk and frame slave.
* clk and frame secondary.
*/
#define SND_SOC_DAIFMT_CBM_CFM (1 << 12) /* codec clk & FRM master */
#define SND_SOC_DAIFMT_CBS_CFM (2 << 12) /* codec clk slave & FRM master */
#define SND_SOC_DAIFMT_CBM_CFS (3 << 12) /* codec clk master & frame slave */
#define SND_SOC_DAIFMT_CBS_CFS (4 << 12) /* codec clk & FRM slave */
#define SND_SOC_DAIFMT_CBS_CFM (2 << 12) /* codec clk secondary & FRM master */
#define SND_SOC_DAIFMT_CBM_CFS (3 << 12) /* codec clk master & frame secondary */
#define SND_SOC_DAIFMT_CBS_CFS (4 << 12) /* codec clk & FRM secondary */
#define SND_SOC_DAIFMT_FORMAT_MASK 0x000f
#define SND_SOC_DAIFMT_CLOCK_MASK 0x00f0
@ -247,7 +247,6 @@ struct snd_soc_dai_ops {
* DAI digital mute - optional.
* Called by soc-core to minimise any pops.
*/
int (*digital_mute)(struct snd_soc_dai *dai, int mute);
int (*mute_stream)(struct snd_soc_dai *dai, int mute, int stream);
/*
@ -281,6 +280,9 @@ struct snd_soc_dai_ops {
*/
snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *,
struct snd_soc_dai *);
/* bit field */
unsigned int no_capture_mute:1;
};
struct snd_soc_cdai_ops {

View File

@ -16,6 +16,8 @@
#include <sound/asoc.h>
struct device;
struct snd_soc_pcm_runtime;
struct soc_enum;
/* widget has no PM register bit */
#define SND_SOC_NOPM -1
@ -376,6 +378,24 @@ struct snd_soc_dapm_widget_list;
struct snd_soc_dapm_update;
enum snd_soc_dapm_direction;
/*
* Bias levels
*
* @ON: Bias is fully on for audio playback and capture operations.
* @PREPARE: Prepare for audio operations. Called before DAPM switching for
* stream start and stop operations.
* @STANDBY: Low power standby state when no playback/capture operations are
* in progress. NOTE: The transition time between STANDBY and ON
* should be as fast as possible and no longer than 10ms.
* @OFF: Power Off. No restrictions on transition times.
*/
enum snd_soc_bias_level {
SND_SOC_BIAS_OFF = 0,
SND_SOC_BIAS_STANDBY = 1,
SND_SOC_BIAS_PREPARE = 2,
SND_SOC_BIAS_ON = 3,
};
int dapm_regulator_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event);
int dapm_clock_event(struct snd_soc_dapm_widget *w,

View File

@ -9,6 +9,7 @@
#define __SOC_LINK_H
int snd_soc_link_init(struct snd_soc_pcm_runtime *rtd);
void snd_soc_link_exit(struct snd_soc_pcm_runtime *rtd);
int snd_soc_link_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);

View File

@ -368,24 +368,6 @@
#define SOC_ENUM_SINGLE_VIRT_DECL(name, xtexts) \
const struct soc_enum name = SOC_ENUM_SINGLE_VIRT(ARRAY_SIZE(xtexts), xtexts)
/*
* Bias levels
*
* @ON: Bias is fully on for audio playback and capture operations.
* @PREPARE: Prepare for audio operations. Called before DAPM switching for
* stream start and stop operations.
* @STANDBY: Low power standby state when no playback/capture operations are
* in progress. NOTE: The transition time between STANDBY and ON
* should be as fast as possible and no longer than 10ms.
* @OFF: Power Off. No restrictions on transition times.
*/
enum snd_soc_bias_level {
SND_SOC_BIAS_OFF = 0,
SND_SOC_BIAS_STANDBY = 1,
SND_SOC_BIAS_PREPARE = 2,
SND_SOC_BIAS_ON = 3,
};
struct device_node;
struct snd_jack;
struct snd_soc_card;
@ -432,11 +414,12 @@ static inline int snd_soc_resume(struct device *dev)
}
#endif
int snd_soc_poweroff(struct device *dev);
int snd_soc_add_component(struct device *dev,
struct snd_soc_component *component,
const struct snd_soc_component_driver *component_driver,
struct snd_soc_dai_driver *dai_drv,
int num_dai);
int snd_soc_component_initialize(struct snd_soc_component *component,
const struct snd_soc_component_driver *driver,
struct device *dev);
int snd_soc_add_component(struct snd_soc_component *component,
struct snd_soc_dai_driver *dai_drv,
int num_dai);
int snd_soc_register_component(struct device *dev,
const struct snd_soc_component_driver *component_driver,
struct snd_soc_dai_driver *dai_drv, int num_dai);
@ -801,6 +784,9 @@ struct snd_soc_dai_link {
/* codec/machine specific init - e.g. add machine controls */
int (*init)(struct snd_soc_pcm_runtime *rtd);
/* codec/machine specific exit - dual of init() */
void (*exit)(struct snd_soc_pcm_runtime *rtd);
/* optional hw_params re-writing for BE and FE sync */
int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
@ -1183,6 +1169,8 @@ struct snd_soc_pcm_runtime {
/* see soc_new_pcm_runtime() */
#define asoc_rtd_to_cpu(rtd, n) (rtd)->dais[n]
#define asoc_rtd_to_codec(rtd, n) (rtd)->dais[n + (rtd)->num_cpus]
#define asoc_substream_to_rtd(substream) \
(struct snd_soc_pcm_runtime *)snd_pcm_substream_chip(substream)
#define for_each_rtd_components(rtd, i, component) \
for ((i) = 0, component = NULL; \

View File

@ -16,6 +16,23 @@ struct wm8960_data {
bool capless; /* Headphone outputs configured in capless mode */
bool shared_lrclk; /* DAC and ADC LRCLKs are wired together */
/*
* Setup for headphone detection
*
* hp_cfg[0]: HPSEL[1:0] of R48 (Additional Control 4)
* hp_cfg[1]: {HPSWEN:HPSWPOL} of R24 (Additional Control 2).
* hp_cfg[2]: {TOCLKSEL:TOEN} of R23 (Additional Control 1).
*/
u32 hp_cfg[3];
/*
* Setup for gpio configuration
*
* gpio_cfg[0]: ALRCGPIO of R9 (Audio interface)
* gpio_cfg[1]: {GPIOPOL:GPIOSEL[2:0]} of R48 (Additional Control 4).
*/
u32 gpio_cfg[2];
};
#endif

View File

@ -219,7 +219,7 @@ static int atmel_ac97c_playback_prepare(struct snd_pcm_substream *substream)
switch (runtime->format) {
case SNDRV_PCM_FORMAT_S16_LE:
break;
case SNDRV_PCM_FORMAT_S16_BE: /* fall through */
case SNDRV_PCM_FORMAT_S16_BE:
word &= ~(AC97C_CMR_CEM_LITTLE);
break;
default:
@ -301,7 +301,7 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream)
switch (runtime->format) {
case SNDRV_PCM_FORMAT_S16_LE:
break;
case SNDRV_PCM_FORMAT_S16_BE: /* fall through */
case SNDRV_PCM_FORMAT_S16_BE:
word &= ~(AC97C_CMR_CEM_LITTLE);
break;
default:
@ -356,14 +356,14 @@ atmel_ac97c_playback_trigger(struct snd_pcm_substream *substream, int cmd)
camr = ac97c_readl(chip, CAMR);
switch (cmd) {
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: /* fall through */
case SNDRV_PCM_TRIGGER_RESUME: /* fall through */
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_START:
ptcr = ATMEL_PDC_TXTEN;
camr |= AC97C_CMR_CENA | AC97C_CSR_ENDTX;
break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */
case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_STOP:
ptcr |= ATMEL_PDC_TXTDIS;
if (chip->opened <= 1)
@ -388,14 +388,14 @@ atmel_ac97c_capture_trigger(struct snd_pcm_substream *substream, int cmd)
ptcr = readl(chip->regs + ATMEL_PDC_PTSR);
switch (cmd) {
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: /* fall through */
case SNDRV_PCM_TRIGGER_RESUME: /* fall through */
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_START:
ptcr = ATMEL_PDC_RXTEN;
camr |= AC97C_CMR_CENA | AC97C_CSR_ENDRX;
break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */
case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_STOP:
ptcr |= ATMEL_PDC_RXTDIS;
if (chip->opened <= 1)

View File

@ -203,7 +203,10 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
mutex_unlock(&snd_card_mutex);
card->dev = parent;
card->number = idx;
#ifdef MODULE
WARN_ON(!module);
card->module = module;
#endif
INIT_LIST_HEAD(&card->devices);
init_rwsem(&card->controls_rwsem);
rwlock_init(&card->ctl_files_rwlock);

View File

@ -135,16 +135,17 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,
dmab->dev.type = type;
dmab->dev.dev = device;
dmab->bytes = 0;
dmab->area = NULL;
dmab->addr = 0;
dmab->private_data = NULL;
switch (type) {
case SNDRV_DMA_TYPE_CONTINUOUS:
gfp = snd_mem_get_gfp_flags(device, GFP_KERNEL);
dmab->area = alloc_pages_exact(size, gfp);
dmab->addr = 0;
break;
case SNDRV_DMA_TYPE_VMALLOC:
gfp = snd_mem_get_gfp_flags(device, GFP_KERNEL | __GFP_HIGHMEM);
dmab->area = __vmalloc(size, gfp);
dmab->addr = 0;
break;
#ifdef CONFIG_HAS_DMA
#ifdef CONFIG_GENERIC_ALLOCATOR
@ -157,7 +158,7 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,
*/
dmab->dev.type = SNDRV_DMA_TYPE_DEV;
#endif /* CONFIG_GENERIC_ALLOCATOR */
/* fall through */
fallthrough;
case SNDRV_DMA_TYPE_DEV:
case SNDRV_DMA_TYPE_DEV_UC:
snd_malloc_dev_pages(dmab, size);
@ -171,8 +172,6 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size,
#endif
default:
pr_err("snd-malloc: invalid device type %d\n", type);
dmab->area = NULL;
dmab->addr = 0;
return -ENXIO;
}
if (! dmab->area)

View File

@ -2851,7 +2851,7 @@ static int snd_pcm_oss_mmap(struct file *file, struct vm_area_struct *area)
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK];
if (substream)
break;
/* Fall through */
fallthrough;
case VM_READ:
substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE];
break;

View File

@ -357,7 +357,7 @@ snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format,
if (snd_mask_test(format_mask, (__force int)format1))
return format1;
}
/* fall through */
fallthrough;
default:
return (__force snd_pcm_format_t)-EINVAL;
}

View File

@ -103,7 +103,7 @@ EXPORT_SYMBOL(snd_pcm_create_iec958_consumer);
/**
* snd_pcm_create_iec958_consumer_hw_params - create IEC958 channel status
* @hw_params: the hw_params instance for extracting rate and sample format
* @params: the hw_params instance for extracting rate and sample format
* @cs: channel status buffer, at least four bytes
* @len: length of channel status buffer
*

View File

@ -39,6 +39,7 @@ static int do_alloc_pages(struct snd_card *card, int type, struct device *dev,
if (max_alloc_per_card &&
card->total_pcm_alloc_bytes + size > max_alloc_per_card)
return -ENOMEM;
err = snd_dma_alloc_pages(type, dev, size, dmab);
if (!err) {
mutex_lock(&card->memory_mutex);

View File

@ -1903,7 +1903,7 @@ static int snd_pcm_prepare(struct snd_pcm_substream *substream,
switch (substream->runtime->status->state) {
case SNDRV_PCM_STATE_PAUSED:
snd_pcm_pause(substream, false);
/* fallthru */
fallthrough;
case SNDRV_PCM_STATE_SUSPENDED:
snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP);
break;
@ -2811,7 +2811,7 @@ static int do_pcm_hwsync(struct snd_pcm_substream *substream)
case SNDRV_PCM_STATE_DRAINING:
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
return -EBADFD;
/* Fall through */
fallthrough;
case SNDRV_PCM_STATE_RUNNING:
return snd_pcm_update_hw_ptr(substream);
case SNDRV_PCM_STATE_PREPARED:
@ -3713,7 +3713,6 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
area->vm_end - area->vm_start, area->vm_page_prot);
}
#endif /* CONFIG_GENERIC_ALLOCATOR */
#ifndef CONFIG_X86 /* for avoiding warnings arch/x86/mm/pat.c */
if (IS_ENABLED(CONFIG_HAS_DMA) && !substream->ops->page &&
(substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV ||
substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV_UC))
@ -3722,7 +3721,6 @@ int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
substream->runtime->dma_area,
substream->runtime->dma_addr,
substream->runtime->dma_bytes);
#endif /* CONFIG_X86 */
/* mmap with fault handler */
area->vm_ops = &snd_pcm_vm_ops_data_fault;
return 0;
@ -3816,7 +3814,7 @@ static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
case SNDRV_PCM_MMAP_OFFSET_STATUS_OLD:
if (pcm_file->no_compat_mmap || !IS_ENABLED(CONFIG_64BIT))
return -ENXIO;
/* fallthrough */
fallthrough;
case SNDRV_PCM_MMAP_OFFSET_STATUS_NEW:
if (!pcm_status_mmap_allowed(pcm_file))
return -ENXIO;
@ -3824,7 +3822,7 @@ static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
case SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD:
if (pcm_file->no_compat_mmap || !IS_ENABLED(CONFIG_64BIT))
return -ENXIO;
/* fallthrough */
fallthrough;
case SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW:
if (!pcm_control_mmap_allowed(pcm_file))
return -ENXIO;

View File

@ -168,10 +168,16 @@ static long
odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct seq_oss_devinfo *dp;
long rc;
dp = file->private_data;
if (snd_BUG_ON(!dp))
return -ENXIO;
return snd_seq_oss_ioctl(dp, cmd, arg);
mutex_lock(&register_mutex);
rc = snd_seq_oss_ioctl(dp, cmd, arg);
mutex_unlock(&register_mutex);
return rc;
}
#ifdef CONFIG_COMPAT

View File

@ -79,7 +79,7 @@ snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *ev)
case TMR_WAIT_REL:
parm += rec->cur_tick;
rec->realtime = 0;
/* fall through */
fallthrough;
case TMR_WAIT_ABS:
if (parm == 0) {
rec->realtime = 1;

View File

@ -309,7 +309,7 @@ do_control(const struct snd_midi_op *ops, void *drv,
break;
case MIDI_CTL_MSB_DATA_ENTRY:
chan->control[MIDI_CTL_LSB_DATA_ENTRY] = 0;
/* fall through */
fallthrough;
case MIDI_CTL_LSB_DATA_ENTRY:
if (chan->param_type == SNDRV_MIDI_PARAM_TYPE_REGISTERED)
rpn(ops, drv, chan, chset);

View File

@ -142,6 +142,9 @@ unsigned int snd_sgbuf_get_chunk_size(struct snd_dma_buffer *dmab,
struct snd_sg_buf *sg = dmab->private_data;
unsigned int start, end, pg;
if (!sg)
return size;
start = ofs >> PAGE_SHIFT;
end = (ofs + size - 1) >> PAGE_SHIFT;
/* check page continuity */

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Virtual master and slave controls
* Virtual master and follower controls
*
* Copyright (c) 2008 by Takashi Iwai <tiwai@suse.de>
*/
@ -21,15 +21,15 @@ struct link_ctl_info {
};
/*
* link master - this contains a list of slave controls that are
* link master - this contains a list of follower controls that are
* identical types, i.e. info returns the same value type and value
* ranges, but may have different number of counts.
*
* The master control is so far only mono volume/switch for simplicity.
* The same value will be applied to all slaves.
* The same value will be applied to all followers.
*/
struct link_master {
struct list_head slaves;
struct list_head followers;
struct link_ctl_info info;
int val; /* the master value */
unsigned int tlv[4];
@ -38,23 +38,23 @@ struct link_master {
};
/*
* link slave - this contains a slave control element
* link follower - this contains a follower control element
*
* It fakes the control callbacsk with additional attenuation by the
* master control. A slave may have either one or two channels.
* It fakes the control callbacks with additional attenuation by the
* master control. A follower may have either one or two channels.
*/
struct link_slave {
struct link_follower {
struct list_head list;
struct link_master *master;
struct link_ctl_info info;
int vals[2]; /* current values */
unsigned int flags;
struct snd_kcontrol *kctl; /* original kcontrol pointer */
struct snd_kcontrol slave; /* the copy of original control entry */
struct snd_kcontrol follower; /* the copy of original control entry */
};
static int slave_update(struct link_slave *slave)
static int follower_update(struct link_follower *follower)
{
struct snd_ctl_elem_value *uctl;
int err, ch;
@ -62,68 +62,68 @@ static int slave_update(struct link_slave *slave)
uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
if (!uctl)
return -ENOMEM;
uctl->id = slave->slave.id;
err = slave->slave.get(&slave->slave, uctl);
uctl->id = follower->follower.id;
err = follower->follower.get(&follower->follower, uctl);
if (err < 0)
goto error;
for (ch = 0; ch < slave->info.count; ch++)
slave->vals[ch] = uctl->value.integer.value[ch];
for (ch = 0; ch < follower->info.count; ch++)
follower->vals[ch] = uctl->value.integer.value[ch];
error:
kfree(uctl);
return err < 0 ? err : 0;
}
/* get the slave ctl info and save the initial values */
static int slave_init(struct link_slave *slave)
/* get the follower ctl info and save the initial values */
static int follower_init(struct link_follower *follower)
{
struct snd_ctl_elem_info *uinfo;
int err;
if (slave->info.count) {
if (follower->info.count) {
/* already initialized */
if (slave->flags & SND_CTL_SLAVE_NEED_UPDATE)
return slave_update(slave);
if (follower->flags & SND_CTL_FOLLOWER_NEED_UPDATE)
return follower_update(follower);
return 0;
}
uinfo = kmalloc(sizeof(*uinfo), GFP_KERNEL);
if (!uinfo)
return -ENOMEM;
uinfo->id = slave->slave.id;
err = slave->slave.info(&slave->slave, uinfo);
uinfo->id = follower->follower.id;
err = follower->follower.info(&follower->follower, uinfo);
if (err < 0) {
kfree(uinfo);
return err;
}
slave->info.type = uinfo->type;
slave->info.count = uinfo->count;
if (slave->info.count > 2 ||
(slave->info.type != SNDRV_CTL_ELEM_TYPE_INTEGER &&
slave->info.type != SNDRV_CTL_ELEM_TYPE_BOOLEAN)) {
pr_err("ALSA: vmaster: invalid slave element\n");
follower->info.type = uinfo->type;
follower->info.count = uinfo->count;
if (follower->info.count > 2 ||
(follower->info.type != SNDRV_CTL_ELEM_TYPE_INTEGER &&
follower->info.type != SNDRV_CTL_ELEM_TYPE_BOOLEAN)) {
pr_err("ALSA: vmaster: invalid follower element\n");
kfree(uinfo);
return -EINVAL;
}
slave->info.min_val = uinfo->value.integer.min;
slave->info.max_val = uinfo->value.integer.max;
follower->info.min_val = uinfo->value.integer.min;
follower->info.max_val = uinfo->value.integer.max;
kfree(uinfo);
return slave_update(slave);
return follower_update(follower);
}
/* initialize master volume */
static int master_init(struct link_master *master)
{
struct link_slave *slave;
struct link_follower *follower;
if (master->info.count)
return 0; /* already initialized */
list_for_each_entry(slave, &master->slaves, list) {
int err = slave_init(slave);
list_for_each_entry(follower, &master->followers, list) {
int err = follower_init(follower);
if (err < 0)
return err;
master->info = slave->info;
master->info = follower->info;
master->info.count = 1; /* always mono */
/* set full volume as default (= no attenuation) */
master->val = master->info.max_val;
@ -134,113 +134,113 @@ static int master_init(struct link_master *master)
return -ENOENT;
}
static int slave_get_val(struct link_slave *slave,
struct snd_ctl_elem_value *ucontrol)
static int follower_get_val(struct link_follower *follower,
struct snd_ctl_elem_value *ucontrol)
{
int err, ch;
err = slave_init(slave);
err = follower_init(follower);
if (err < 0)
return err;
for (ch = 0; ch < slave->info.count; ch++)
ucontrol->value.integer.value[ch] = slave->vals[ch];
for (ch = 0; ch < follower->info.count; ch++)
ucontrol->value.integer.value[ch] = follower->vals[ch];
return 0;
}
static int slave_put_val(struct link_slave *slave,
struct snd_ctl_elem_value *ucontrol)
static int follower_put_val(struct link_follower *follower,
struct snd_ctl_elem_value *ucontrol)
{
int err, ch, vol;
err = master_init(slave->master);
err = master_init(follower->master);
if (err < 0)
return err;
switch (slave->info.type) {
switch (follower->info.type) {
case SNDRV_CTL_ELEM_TYPE_BOOLEAN:
for (ch = 0; ch < slave->info.count; ch++)
for (ch = 0; ch < follower->info.count; ch++)
ucontrol->value.integer.value[ch] &=
!!slave->master->val;
!!follower->master->val;
break;
case SNDRV_CTL_ELEM_TYPE_INTEGER:
for (ch = 0; ch < slave->info.count; ch++) {
for (ch = 0; ch < follower->info.count; ch++) {
/* max master volume is supposed to be 0 dB */
vol = ucontrol->value.integer.value[ch];
vol += slave->master->val - slave->master->info.max_val;
if (vol < slave->info.min_val)
vol = slave->info.min_val;
else if (vol > slave->info.max_val)
vol = slave->info.max_val;
vol += follower->master->val - follower->master->info.max_val;
if (vol < follower->info.min_val)
vol = follower->info.min_val;
else if (vol > follower->info.max_val)
vol = follower->info.max_val;
ucontrol->value.integer.value[ch] = vol;
}
break;
}
return slave->slave.put(&slave->slave, ucontrol);
return follower->follower.put(&follower->follower, ucontrol);
}
/*
* ctl callbacks for slaves
* ctl callbacks for followers
*/
static int slave_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
static int follower_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
struct link_slave *slave = snd_kcontrol_chip(kcontrol);
return slave->slave.info(&slave->slave, uinfo);
struct link_follower *follower = snd_kcontrol_chip(kcontrol);
return follower->follower.info(&follower->follower, uinfo);
}
static int slave_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
static int follower_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct link_slave *slave = snd_kcontrol_chip(kcontrol);
return slave_get_val(slave, ucontrol);
struct link_follower *follower = snd_kcontrol_chip(kcontrol);
return follower_get_val(follower, ucontrol);
}
static int slave_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
static int follower_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct link_slave *slave = snd_kcontrol_chip(kcontrol);
struct link_follower *follower = snd_kcontrol_chip(kcontrol);
int err, ch, changed = 0;
err = slave_init(slave);
err = follower_init(follower);
if (err < 0)
return err;
for (ch = 0; ch < slave->info.count; ch++) {
if (slave->vals[ch] != ucontrol->value.integer.value[ch]) {
for (ch = 0; ch < follower->info.count; ch++) {
if (follower->vals[ch] != ucontrol->value.integer.value[ch]) {
changed = 1;
slave->vals[ch] = ucontrol->value.integer.value[ch];
follower->vals[ch] = ucontrol->value.integer.value[ch];
}
}
if (!changed)
return 0;
err = slave_put_val(slave, ucontrol);
err = follower_put_val(follower, ucontrol);
if (err < 0)
return err;
return 1;
}
static int slave_tlv_cmd(struct snd_kcontrol *kcontrol,
int op_flag, unsigned int size,
unsigned int __user *tlv)
static int follower_tlv_cmd(struct snd_kcontrol *kcontrol,
int op_flag, unsigned int size,
unsigned int __user *tlv)
{
struct link_slave *slave = snd_kcontrol_chip(kcontrol);
struct link_follower *follower = snd_kcontrol_chip(kcontrol);
/* FIXME: this assumes that the max volume is 0 dB */
return slave->slave.tlv.c(&slave->slave, op_flag, size, tlv);
return follower->follower.tlv.c(&follower->follower, op_flag, size, tlv);
}
static void slave_free(struct snd_kcontrol *kcontrol)
static void follower_free(struct snd_kcontrol *kcontrol)
{
struct link_slave *slave = snd_kcontrol_chip(kcontrol);
if (slave->slave.private_free)
slave->slave.private_free(&slave->slave);
if (slave->master)
list_del(&slave->list);
kfree(slave);
struct link_follower *follower = snd_kcontrol_chip(kcontrol);
if (follower->follower.private_free)
follower->follower.private_free(&follower->follower);
if (follower->master)
list_del(&follower->list);
kfree(follower);
}
/*
* Add a slave control to the group with the given master control
* Add a follower control to the group with the given master control
*
* All slaves must be the same type (returning the same information
* All followers must be the same type (returning the same information
* via info callback). The function doesn't check it, so it's your
* responsibility.
*
@ -249,35 +249,36 @@ static void slave_free(struct snd_kcontrol *kcontrol)
* - logarithmic volume control (dB level), no linear volume
* - master can only attenuate the volume, no gain
*/
int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
unsigned int flags)
int _snd_ctl_add_follower(struct snd_kcontrol *master,
struct snd_kcontrol *follower,
unsigned int flags)
{
struct link_master *master_link = snd_kcontrol_chip(master);
struct link_slave *srec;
struct link_follower *srec;
srec = kzalloc(struct_size(srec, slave.vd, slave->count),
srec = kzalloc(struct_size(srec, follower.vd, follower->count),
GFP_KERNEL);
if (!srec)
return -ENOMEM;
srec->kctl = slave;
srec->slave = *slave;
memcpy(srec->slave.vd, slave->vd, slave->count * sizeof(*slave->vd));
srec->kctl = follower;
srec->follower = *follower;
memcpy(srec->follower.vd, follower->vd, follower->count * sizeof(*follower->vd));
srec->master = master_link;
srec->flags = flags;
/* override callbacks */
slave->info = slave_info;
slave->get = slave_get;
slave->put = slave_put;
if (slave->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)
slave->tlv.c = slave_tlv_cmd;
slave->private_data = srec;
slave->private_free = slave_free;
follower->info = follower_info;
follower->get = follower_get;
follower->put = follower_put;
if (follower->vd[0].access & SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK)
follower->tlv.c = follower_tlv_cmd;
follower->private_data = srec;
follower->private_free = follower_free;
list_add_tail(&srec->list, &master_link->slaves);
list_add_tail(&srec->list, &master_link->followers);
return 0;
}
EXPORT_SYMBOL(_snd_ctl_add_slave);
EXPORT_SYMBOL(_snd_ctl_add_follower);
/*
* ctl callbacks for master controls
@ -309,20 +310,20 @@ static int master_get(struct snd_kcontrol *kcontrol,
return 0;
}
static int sync_slaves(struct link_master *master, int old_val, int new_val)
static int sync_followers(struct link_master *master, int old_val, int new_val)
{
struct link_slave *slave;
struct link_follower *follower;
struct snd_ctl_elem_value *uval;
uval = kmalloc(sizeof(*uval), GFP_KERNEL);
if (!uval)
return -ENOMEM;
list_for_each_entry(slave, &master->slaves, list) {
list_for_each_entry(follower, &master->followers, list) {
master->val = old_val;
uval->id = slave->slave.id;
slave_get_val(slave, uval);
uval->id = follower->follower.id;
follower_get_val(follower, uval);
master->val = new_val;
slave_put_val(slave, uval);
follower_put_val(follower, uval);
}
kfree(uval);
return 0;
@ -344,7 +345,7 @@ static int master_put(struct snd_kcontrol *kcontrol,
if (new_val == old_val)
return 0;
err = sync_slaves(master, old_val, new_val);
err = sync_followers(master, old_val, new_val);
if (err < 0)
return err;
if (master->hook && !first_init)
@ -355,17 +356,17 @@ static int master_put(struct snd_kcontrol *kcontrol,
static void master_free(struct snd_kcontrol *kcontrol)
{
struct link_master *master = snd_kcontrol_chip(kcontrol);
struct link_slave *slave, *n;
struct link_follower *follower, *n;
/* free all slave links and retore the original slave kctls */
list_for_each_entry_safe(slave, n, &master->slaves, list) {
struct snd_kcontrol *sctl = slave->kctl;
/* free all follower links and retore the original follower kctls */
list_for_each_entry_safe(follower, n, &master->followers, list) {
struct snd_kcontrol *sctl = follower->kctl;
struct list_head olist = sctl->list;
memcpy(sctl, &slave->slave, sizeof(*sctl));
memcpy(sctl->vd, slave->slave.vd,
memcpy(sctl, &follower->follower, sizeof(*sctl));
memcpy(sctl->vd, follower->follower.vd,
sctl->count * sizeof(*sctl->vd));
sctl->list = olist; /* keep the current linked-list */
kfree(slave);
kfree(follower);
}
kfree(master);
}
@ -378,8 +379,8 @@ static void master_free(struct snd_kcontrol *kcontrol)
*
* Creates a virtual master control with the given name string.
*
* After creating a vmaster element, you can add the slave controls
* via snd_ctl_add_slave() or snd_ctl_add_slave_uncached().
* After creating a vmaster element, you can add the follower controls
* via snd_ctl_add_follower() or snd_ctl_add_follower_uncached().
*
* The optional argument @tlv can be used to specify the TLV information
* for dB scale of the master control. It should be a single element
@ -403,7 +404,7 @@ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
master = kzalloc(sizeof(*master), GFP_KERNEL);
if (!master)
return NULL;
INIT_LIST_HEAD(&master->slaves);
INIT_LIST_HEAD(&master->followers);
kctl = snd_ctl_new1(&knew, master);
if (!kctl) {
@ -455,11 +456,11 @@ int snd_ctl_add_vmaster_hook(struct snd_kcontrol *kcontrol,
EXPORT_SYMBOL_GPL(snd_ctl_add_vmaster_hook);
/**
* snd_ctl_sync_vmaster - Sync the vmaster slaves and hook
* snd_ctl_sync_vmaster - Sync the vmaster followers and hook
* @kcontrol: vmaster kctl element
* @hook_only: sync only the hook
*
* Forcibly call the put callback of each slave and call the hook function
* Forcibly call the put callback of each follower and call the hook function
* to synchronize with the current value of the given vmaster element.
* NOP when NULL is passed to @kcontrol.
*/
@ -476,7 +477,7 @@ void snd_ctl_sync_vmaster(struct snd_kcontrol *kcontrol, bool hook_only)
if (err < 0)
return;
first_init = err;
err = sync_slaves(master, master->val, master->val);
err = sync_followers(master, master->val, master->val);
if (err < 0)
return;
}
@ -487,34 +488,34 @@ void snd_ctl_sync_vmaster(struct snd_kcontrol *kcontrol, bool hook_only)
EXPORT_SYMBOL_GPL(snd_ctl_sync_vmaster);
/**
* snd_ctl_apply_vmaster_slaves - Apply function to each vmaster slave
* snd_ctl_apply_vmaster_followers - Apply function to each vmaster follower
* @kctl: vmaster kctl element
* @func: function to apply
* @arg: optional function argument
*
* Apply the function @func to each slave kctl of the given vmaster kctl.
* Apply the function @func to each follower kctl of the given vmaster kctl.
* Returns 0 if successful, or a negative error code.
*/
int snd_ctl_apply_vmaster_slaves(struct snd_kcontrol *kctl,
int (*func)(struct snd_kcontrol *vslave,
struct snd_kcontrol *slave,
void *arg),
void *arg)
int snd_ctl_apply_vmaster_followers(struct snd_kcontrol *kctl,
int (*func)(struct snd_kcontrol *vfollower,
struct snd_kcontrol *follower,
void *arg),
void *arg)
{
struct link_master *master;
struct link_slave *slave;
struct link_follower *follower;
int err;
master = snd_kcontrol_chip(kctl);
err = master_init(master);
if (err < 0)
return err;
list_for_each_entry(slave, &master->slaves, list) {
err = func(slave->kctl, &slave->slave, arg);
list_for_each_entry(follower, &master->followers, list) {
err = func(follower->kctl, &follower->follower, arg);
if (err < 0)
return err;
}
return 0;
}
EXPORT_SYMBOL_GPL(snd_ctl_apply_vmaster_slaves);
EXPORT_SYMBOL_GPL(snd_ctl_apply_vmaster_followers);

View File

@ -354,7 +354,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
instr_4op = 1;
break;
}
/* fall through */
fallthrough;
default:
spin_unlock_irqrestore(&opl3->voice_lock, flags);
return;
@ -443,7 +443,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
switch (connection) {
case 0x03:
snd_opl3_calc_volume(&vol_op[2], vel, chan);
/* fallthru */
fallthrough;
case 0x02:
snd_opl3_calc_volume(&vol_op[0], vel, chan);
break;

View File

@ -511,8 +511,9 @@ irqreturn_t snd_vx_threaded_irq_handler(int irq, void *dev)
/* The start on time code conditions are filled (ie the time code
* received by the board is equal to one of those given to it).
*/
if (events & TIME_CODE_EVENT_PENDING)
if (events & TIME_CODE_EVENT_PENDING) {
; /* so far, nothing to do yet */
}
/* The frequency has changed on the board (UER mode). */
if (events & FREQUENCY_CHANGE_EVENT_PENDING)

View File

@ -293,7 +293,6 @@ static int pcr_set_check(struct cmp_connection *c, __be32 pcr)
/**
* cmp_connection_establish - establish a connection to the target
* @c: the connection manager
* @max_payload_bytes: the amount of data (including CIP headers) per packet
*
* This function establishes a point-to-point connection from the local
* computer to the target by allocating isochronous resources (channel and

View File

@ -24,6 +24,9 @@
#define V3_NO_ADAT_OPT_OUT_IFACE_A 0x00040000
#define V3_NO_ADAT_OPT_OUT_IFACE_B 0x00400000
#define V3_MSG_FLAG_CLK_CHANGED 0x00000002
#define V3_CLK_WAIT_MSEC 4000
int snd_motu_protocol_v3_get_clock_rate(struct snd_motu *motu,
unsigned int *rate)
{
@ -79,9 +82,16 @@ int snd_motu_protocol_v3_set_clock_rate(struct snd_motu *motu,
return err;
if (need_to_wait) {
/* Cost expensive. */
if (msleep_interruptible(4000) > 0)
return -EINTR;
int result;
motu->msg = 0;
result = wait_event_interruptible_timeout(motu->hwdep_wait,
motu->msg & V3_MSG_FLAG_CLK_CHANGED,
msecs_to_jiffies(V3_CLK_WAIT_MSEC));
if (result < 0)
return result;
if (result == 0)
return -ETIMEDOUT;
}
return 0;

Some files were not shown because too many files have changed in this diff Show More