Skip to content

Commit a3ae255

Browse files
committed
Merge tag 'asoc-v3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.20 More updates for v3.20: - Lots of refactoring from Lars-Peter Clausen, moving drivers to more data driven initialization and rationalizing a lot of DAPM usage. - Much improved handling of CDCLK clocks on Samsung I2S controllers. - Lots of driver specific cleanups and feature improvements. - CODEC support for TI PCM514x and TLV320AIC3104 devices. - Board support for Tegra systems with Realtek RT5677. Conflicts: sound/soc/intel/sst-mfld-platform-pcm.c
2 parents 3fe9cf3 + 16ca41c commit a3ae255

187 files changed

Lines changed: 5298 additions & 2085 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Bindings for I2S controller built into xtfpga Xtensa bitstreams.
2+
3+
Required properties:
4+
- compatible: shall be "cdns,xtfpga-i2s".
5+
- reg: memory region (address and length) with device registers.
6+
- interrupts: interrupt for the device.
7+
- clocks: phandle to the clk used as master clock. I2S bus clock
8+
is derived from it.
9+
10+
Examples:
11+
12+
i2s0: xtfpga-i2s@0d080000 {
13+
#sound-dai-cells = <0>;
14+
compatible = "cdns,xtfpga-i2s";
15+
reg = <0x0d080000 0x40>;
16+
interrupts = <2 1>;
17+
clocks = <&cdce706 4>;
18+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
DesignWare I2S controller
2+
3+
Required properties:
4+
- compatible : Must be "snps,designware-i2s"
5+
- reg : Must contain the I2S core's registers location and length
6+
- clocks : Pairs of phandle and specifier referencing the controller's
7+
clocks. The controller expects one clock: the clock used as the sampling
8+
rate reference clock sample.
9+
- clock-names : "i2sclk" for the sample rate reference clock.
10+
- dmas: Pairs of phandle and specifier for the DMA channels that are used by
11+
the core. The core expects one or two dma channels: one for transmit and
12+
one for receive.
13+
- dma-names : "tx" for the transmit channel, "rx" for the receive channel.
14+
15+
For more details on the 'dma', 'dma-names', 'clock' and 'clock-names'
16+
properties please check:
17+
* resource-names.txt
18+
* clock/clock-bindings.txt
19+
* dma/dma.txt
20+
21+
Example:
22+
23+
soc_i2s: i2s@7ff90000 {
24+
compatible = "snps,designware-i2s";
25+
reg = <0x0 0x7ff90000 0x0 0x1000>;
26+
clocks = <&scpi_i2sclk 0>;
27+
clock-names = "i2sclk";
28+
#sound-dai-cells = <0>;
29+
dmas = <&dma0 5>;
30+
dma-names = "tx";
31+
};
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
NVIDIA Tegra audio complex, with RT5677 CODEC
2+
3+
Required properties:
4+
- compatible : "nvidia,tegra-audio-rt5677"
5+
- clocks : Must contain an entry for each entry in clock-names.
6+
See ../clocks/clock-bindings.txt for details.
7+
- clock-names : Must include the following entries:
8+
- pll_a
9+
- pll_a_out0
10+
- mclk (The Tegra cdev1/extern1 clock, which feeds the CODEC's mclk)
11+
- nvidia,model : The user-visible name of this sound complex.
12+
- nvidia,audio-routing : A list of the connections between audio components.
13+
Each entry is a pair of strings, the first being the connection's sink,
14+
the second being the connection's source. Valid names for sources and
15+
sinks are the RT5677's pins (as documented in its binding), and the jacks
16+
on the board:
17+
18+
* Headphone
19+
* Speaker
20+
* Headset Mic
21+
* Internal Mic 1
22+
* Internal Mic 2
23+
24+
- nvidia,i2s-controller : The phandle of the Tegra I2S controller that's
25+
connected to the CODEC.
26+
- nvidia,audio-codec : The phandle of the RT5677 audio codec. This binding
27+
assumes that AIF1 on the CODEC is connected to Tegra.
28+
29+
Optional properties:
30+
- nvidia,hp-det-gpios : The GPIO that detects headphones are plugged in
31+
- nvidia,hp-en-gpios : The GPIO that enables headphone amplifier
32+
- nvidia,mic-present-gpios: The GPIO that mic jack is plugged in
33+
- nvidia,dmic-clk-en-gpios : The GPIO that gates DMIC clock signal
34+
35+
Example:
36+
37+
sound {
38+
compatible = "nvidia,tegra-audio-rt5677-ryu",
39+
"nvidia,tegra-audio-rt5677";
40+
nvidia,model = "NVIDIA Tegra Ryu";
41+
42+
nvidia,audio-routing =
43+
"Headphone", "LOUT2",
44+
"Headphone", "LOUT1",
45+
"Headset Mic", "MICBIAS1",
46+
"IN1P", "Headset Mic",
47+
"IN1N", "Headset Mic",
48+
"DMIC L1", "Internal Mic 1",
49+
"DMIC R1", "Internal Mic 1",
50+
"DMIC L2", "Internal Mic 2",
51+
"DMIC R2", "Internal Mic 2",
52+
"Speaker", "PDM1L",
53+
"Speaker", "PDM1R";
54+
55+
nvidia,i2s-controller = <&tegra_i2s1>;
56+
nvidia,audio-codec = <&rt5677>;
57+
58+
nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
59+
nvidia,mic-present-gpios = <&gpio TEGRA_GPIO(O, 5) GPIO_ACTIVE_LOW>;
60+
nvidia,hp-en-gpios = <&rt5677 1 GPIO_ACTIVE_HIGH>;
61+
nvidia,dmic-clk-en-gpios = <&rt5677 2 GPIO_ACTIVE_HIGH>;
62+
63+
clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
64+
<&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
65+
<&tegra_car TEGRA124_CLK_EXTERN1>;
66+
clock-names = "pll_a", "pll_a_out0", "mclk";
67+
};

‎Documentation/devicetree/bindings/sound/pcm512x.txt‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ Required properties:
1717
Optional properties:
1818

1919
- clocks : A clock specifier for the clock connected as SCLK. If this
20-
is absent the device will be configured to clock from BCLK.
20+
is absent the device will be configured to clock from BCLK. If pll-in
21+
and pll-out are specified in addition to a clock, the device is
22+
configured to accept clock input on a specified gpio pin.
2123

22-
Example:
24+
- pll-in, pll-out : gpio pins used to connect the pll using <1>
25+
through <6>. The device will be configured for clock input on the
26+
given pll-in pin and PLL output on the given pll-out pin. An
27+
external connection from the pll-out pin to the SCLK pin is assumed.
28+
29+
Examples:
2330

2431
pcm5122: pcm5122@4c {
2532
compatible = "ti,pcm5122";
@@ -29,3 +36,17 @@ Example:
2936
DVDD-supply = <&reg_1v8>;
3037
CPVDD-supply = <&reg_3v3>;
3138
};
39+
40+
41+
pcm5142: pcm5142@4c {
42+
compatible = "ti,pcm5142";
43+
reg = <0x4c>;
44+
45+
AVDD-supply = <&reg_3v3_analog>;
46+
DVDD-supply = <&reg_1v8>;
47+
CPVDD-supply = <&reg_3v3>;
48+
49+
clocks = <&sck>;
50+
pll-in = <3>;
51+
pll-out = <6>;
52+
};

‎Documentation/devicetree/bindings/sound/samsung-i2s.txt‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,25 @@ Required SoC Specific Properties:
3333
"iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root
3434
clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2
3535
doesn't have any such mux.
36+
- #clock-cells: should be 1, this property must be present if the I2S device
37+
is a clock provider in terms of the common clock bindings, described in
38+
../clock/clock-bindings.txt.
39+
- clock-output-names: from the common clock bindings, names of the CDCLK
40+
I2S output clocks, suggested values are "i2s_cdclk0", "i2s_cdclk1",
41+
"i2s_cdclk3" for the I2S0, I2S1, I2S2 devices recpectively.
42+
43+
There are following clocks available at the I2S device nodes:
44+
CLK_I2S_CDCLK - the CDCLK (CODECLKO) gate clock,
45+
CLK_I2S_RCLK_PSR - the RCLK prescaler divider clock (corresponding to the
46+
IISPSR register),
47+
CLK_I2S_RCLK_SRC - the RCLKSRC mux clock (corresponding to RCLKSRC bit in
48+
IISMOD register).
49+
50+
Refer to the SoC datasheet for availability of the above clocks.
51+
The CLK_I2S_RCLK_PSR and CLK_I2S_RCLK_SRC clocks are usually only available
52+
in the IIS Multi Audio Interface (I2S0).
53+
Note: Old DTs may not have the #clock-cells, clock-output-names properties
54+
and then not use the I2S node as a clock supplier.
3655

3756
Optional SoC Specific Properties:
3857

@@ -41,6 +60,7 @@ Optional SoC Specific Properties:
4160
- pinctrl-0: Should specify pin control groups used for this controller.
4261
- pinctrl-names: Should contain only one value - "default".
4362

63+
4464
Example:
4565

4666
i2s0: i2s@03830000 {
@@ -54,6 +74,8 @@ i2s0: i2s@03830000 {
5474
<&clock_audss EXYNOS_I2S_BUS>,
5575
<&clock_audss EXYNOS_SCLK_I2S>;
5676
clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
77+
#clock-cells;
78+
clock-output-names = "i2s_cdclk0";
5779
samsung,idma-addr = <0x03000000>;
5880
pinctrl-names = "default";
5981
pinctrl-0 = <&i2s0_bus>;

‎Documentation/devicetree/bindings/sound/simple-card.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ Optional CPU/CODEC subnodes properties:
7575
it can be specified via "clocks" if system has
7676
clock node (= common clock), or "system-clock-frequency"
7777
(if system doens't support common clock)
78+
If a clock is specified, it is
79+
enabled with clk_prepare_enable()
80+
in dai startup() and disabled with
81+
clk_disable_unprepare() in dai
82+
shutdown().
7883

7984
Example 1 - single DAI link:
8085

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
STA32X audio CODEC
2+
3+
The driver for this device only supports I2C.
4+
5+
Required properties:
6+
7+
- compatible: "st,sta32x"
8+
- reg: the I2C address of the device for I2C
9+
- reset-gpios: a GPIO spec for the reset pin. If specified, it will be
10+
deasserted before communication to the codec starts.
11+
12+
- power-down-gpios: a GPIO spec for the power down pin. If specified,
13+
it will be deasserted before communication to the codec
14+
starts.
15+
16+
- Vdda-supply: regulator spec, providing 3.3V
17+
- Vdd3-supply: regulator spec, providing 3.3V
18+
- Vcc-supply: regulator spec, providing 5V - 26V
19+
20+
Optional properties:
21+
22+
- st,output-conf: number, Selects the output configuration:
23+
0: 2-channel (full-bridge) power, 2-channel data-out
24+
1: 2 (half-bridge). 1 (full-bridge) on-board power
25+
2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
26+
3: 1 Channel Mono-Parallel
27+
If parameter is missing, mode 0 will be enabled.
28+
This property has to be specified as '/bits/ 8' value.
29+
30+
- st,ch1-output-mapping: Channel 1 output mapping
31+
- st,ch2-output-mapping: Channel 2 output mapping
32+
- st,ch3-output-mapping: Channel 3 output mapping
33+
0: Channel 1
34+
1: Channel 2
35+
2: Channel 3
36+
If parameter is missing, channel 1 is chosen.
37+
This properties have to be specified as '/bits/ 8' values.
38+
39+
- st,thermal-warning-recover:
40+
If present, thermal warning recovery is enabled.
41+
42+
- st,thermal-warning-adjustment:
43+
If present, thermal warning adjustment is enabled.
44+
45+
- st,fault-detect-recovery:
46+
If present, then fault recovery will be enabled.
47+
48+
- st,drop-compensation-ns: number
49+
Only required for "st,ffx-power-output-mode" ==
50+
"variable-drop-compensation".
51+
Specifies the drop compensation in nanoseconds.
52+
The value must be in the range of 0..300, and only
53+
multiples of 20 are allowed. Default is 140ns.
54+
55+
- st,max-power-use-mpcc:
56+
If present, then MPCC bits are used for MPC coefficients,
57+
otherwise standard MPC coefficients are used.
58+
59+
- st,max-power-corr:
60+
If present, power bridge correction for THD reduction near maximum
61+
power output is enabled.
62+
63+
- st,am-reduction-mode:
64+
If present, FFX mode runs in AM reduction mode, otherwise normal
65+
FFX mode is used.
66+
67+
- st,odd-pwm-speed-mode:
68+
If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
69+
channels. If not present, normal PWM spped mode (384 kHz) will be used.
70+
71+
- st,invalid-input-detect-mute:
72+
If present, automatic invalid input detect mute is enabled.
73+
74+
Example:
75+
76+
codec: sta32x@38 {
77+
compatible = "st,sta32x";
78+
reg = <0x1c>;
79+
reset-gpios = <&gpio1 19 0>;
80+
power-down-gpios = <&gpio1 16 0>;
81+
st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel
82+
// (full-bridge) power,
83+
// 2-channel data-out
84+
st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1
85+
st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1
86+
st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1
87+
st,max-power-correction; // enables power bridge
88+
// correction for THD reduction
89+
// near maximum power output
90+
st,invalid-input-detect-mute; // mute if no valid digital
91+
// audio signal is provided.
92+
};

‎Documentation/devicetree/bindings/sound/tlv320aic3x.txt‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Required properties:
99
"ti,tlv320aic33" - TLV320AIC33
1010
"ti,tlv320aic3007" - TLV320AIC3007
1111
"ti,tlv320aic3106" - TLV320AIC3106
12+
"ti,tlv320aic3104" - TLV320AIC3104
1213

1314

1415
- reg - <int> - I2C slave address
@@ -18,6 +19,7 @@ Optional properties:
1819

1920
- gpio-reset - gpio pin number used for codec reset
2021
- ai3x-gpio-func - <array of 2 int> - AIC3X_GPIO1 & AIC3X_GPIO2 Functionality
22+
- Not supported on tlv320aic3104
2123
- ai3x-micbias-vg - MicBias Voltage required.
2224
1 - MICBIAS output is powered to 2.0V,
2325
2 - MICBIAS output is powered to 2.5V,
@@ -36,7 +38,13 @@ CODEC output pins:
3638
* HPLCOM
3739
* HPRCOM
3840

39-
CODEC input pins:
41+
CODEC input pins for TLV320AIC3104:
42+
* MIC2L
43+
* MIC2R
44+
* LINE1L
45+
* LINE1R
46+
47+
CODEC input pins for other compatible codecs:
4048
* MIC3L
4149
* MIC3R
4250
* LINE1L

‎Documentation/devicetree/bindings/sound/ts3a227e.txt‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ Required properties:
1313
- interrupt-parent: The parent interrupt controller
1414
- interrupts: Interrupt number for /INT pin from the 227e
1515

16+
Optional properies:
17+
- ti,micbias: Intended MICBIAS voltage (datasheet section 9.6.7).
18+
Select 0/1/2/3/4/5/6/7 to specify MACBIAS voltage
19+
2.1V/2.2V/2.3V/2.4V/2.5V/2.6V/2.7V/2.8V
20+
Default value is "1" (2.2V).
1621

1722
Examples:
1823

‎Documentation/devicetree/bindings/sound/wm8904.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ WM8904 audio CODEC
33
This device supports I2C only.
44

55
Required properties:
6-
- compatible: "wlf,wm8904"
6+
- compatible: "wlf,wm8904" or "wlf,wm8912"
77
- reg: the I2C address of the device.
88
- clock-names: "mclk"
99
- clocks: reference to

0 commit comments

Comments
 (0)