Skip to content

Commit e7b6b3e

Browse files
committed
Merge tag 'asoc-fix-v5.7-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.7 Quite a lot of fixes here, a lot of driver specific ones but the biggest one is the revert of changes to the startup and shutdown sequence for DAIs that went in during the merge window - they broke some older x86 platforms and attempts to fix them didn't succeed so it's safer to just roll them back and try to make sure those platforms are handled properly in any future attempt. The rockchip S/PDIF DT stuff was IIRC for validation issues.
2 parents cf9fb7b + 1e060a4 commit e7b6b3e

32 files changed

+509
-263
lines changed

Documentation/devicetree/bindings/sound/rockchip-i2s.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ properties:
5656
- const: tx
5757
- const: rx
5858

59+
power-domains:
60+
maxItems: 1
61+
5962
rockchip,capture-channels:
6063
allOf:
6164
- $ref: /schemas/types.yaml#/definitions/uint32

Documentation/devicetree/bindings/sound/rockchip-spdif.txt

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/rockchip-spdif.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Rockchip SPDIF transceiver
8+
9+
description:
10+
The S/PDIF audio block is a stereo transceiver that allows the
11+
processor to receive and transmit digital audio via a coaxial or
12+
fibre cable.
13+
14+
maintainers:
15+
- Heiko Stuebner <[email protected]>
16+
17+
properties:
18+
compatible:
19+
oneOf:
20+
- const: rockchip,rk3066-spdif
21+
- const: rockchip,rk3228-spdif
22+
- const: rockchip,rk3328-spdif
23+
- const: rockchip,rk3366-spdif
24+
- const: rockchip,rk3368-spdif
25+
- const: rockchip,rk3399-spdif
26+
- items:
27+
- enum:
28+
- rockchip,rk3188-spdif
29+
- rockchip,rk3288-spdif
30+
- const: rockchip,rk3066-spdif
31+
32+
reg:
33+
maxItems: 1
34+
35+
interrupts:
36+
maxItems: 1
37+
38+
clocks:
39+
items:
40+
- description: clock for SPDIF bus
41+
- description: clock for SPDIF controller
42+
43+
clock-names:
44+
items:
45+
- const: mclk
46+
- const: hclk
47+
48+
dmas:
49+
maxItems: 1
50+
51+
dma-names:
52+
const: tx
53+
54+
power-domains:
55+
maxItems: 1
56+
57+
rockchip,grf:
58+
$ref: /schemas/types.yaml#/definitions/phandle
59+
description:
60+
The phandle of the syscon node for the GRF register.
61+
Required property on RK3288.
62+
63+
"#sound-dai-cells":
64+
const: 0
65+
66+
required:
67+
- compatible
68+
- reg
69+
- interrupts
70+
- clocks
71+
- clock-names
72+
- dmas
73+
- dma-names
74+
- "#sound-dai-cells"
75+
76+
if:
77+
properties:
78+
compatible:
79+
contains:
80+
const: rockchip,rk3288-spdif
81+
82+
then:
83+
required:
84+
- rockchip,grf
85+
86+
additionalProperties: false
87+
88+
examples:
89+
- |
90+
#include <dt-bindings/clock/rk3188-cru.h>
91+
#include <dt-bindings/interrupt-controller/arm-gic.h>
92+
spdif: spdif@1011e000 {
93+
compatible = "rockchip,rk3188-spdif", "rockchip,rk3066-spdif";
94+
reg = <0x1011e000 0x2000>;
95+
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
96+
clocks = <&cru SCLK_SPDIF>, <&cru HCLK_SPDIF>;
97+
clock-names = "mclk", "hclk";
98+
dmas = <&dmac1_s 8>;
99+
dma-names = "tx";
100+
#sound-dai-cells = <0>;
101+
};

include/sound/soc-dai.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ struct snd_soc_dai {
351351

352352
/* bit field */
353353
unsigned int probed:1;
354-
unsigned int started[SNDRV_PCM_STREAM_LAST + 1];
355354
};
356355

357356
static inline struct snd_soc_pcm_stream *

include/sound/soc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,9 @@ struct snd_soc_dai_link {
790790
const struct snd_soc_pcm_stream *params;
791791
unsigned int num_params;
792792

793+
struct snd_soc_dapm_widget *playback_widget;
794+
struct snd_soc_dapm_widget *capture_widget;
795+
793796
unsigned int dai_fmt; /* format to set on init */
794797

795798
enum snd_soc_dpcm_trigger trigger[2]; /* trigger type for DPCM */

sound/soc/amd/acp3x-rt5682-max9836.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ static int acp3x_5682_init(struct snd_soc_pcm_runtime *rtd)
8989
}
9090

9191
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
92-
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
93-
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
94-
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
92+
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
93+
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
94+
snd_jack_set_key(pco_jack.jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
9595

9696
ret = snd_soc_component_set_jack(component, &pco_jack, NULL);
9797
if (ret) {

sound/soc/codecs/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1525,6 +1525,7 @@ config SND_SOC_WM8804_SPI
15251525

15261526
config SND_SOC_WM8900
15271527
tristate
1528+
depends on SND_SOC_I2C_AND_SPI
15281529

15291530
config SND_SOC_WM8903
15301531
tristate "Wolfson Microelectronics WM8903 CODEC"
@@ -1576,6 +1577,7 @@ config SND_SOC_WM8985
15761577

15771578
config SND_SOC_WM8988
15781579
tristate
1580+
depends on SND_SOC_I2C_AND_SPI
15791581

15801582
config SND_SOC_WM8990
15811583
tristate
@@ -1594,6 +1596,7 @@ config SND_SOC_WM8994
15941596

15951597
config SND_SOC_WM8995
15961598
tristate
1599+
depends on SND_SOC_I2C_AND_SPI
15971600

15981601
config SND_SOC_WM8996
15991602
tristate

sound/soc/codecs/hdac_hdmi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ static struct hdac_hdmi_pcm *
142142
hdac_hdmi_get_pcm_from_cvt(struct hdac_hdmi_priv *hdmi,
143143
struct hdac_hdmi_cvt *cvt)
144144
{
145-
struct hdac_hdmi_pcm *pcm = NULL;
145+
struct hdac_hdmi_pcm *pcm;
146146

147147
list_for_each_entry(pcm, &hdmi->pcm_list, head) {
148148
if (pcm->cvt == cvt)
149-
break;
149+
return pcm;
150150
}
151151

152-
return pcm;
152+
return NULL;
153153
}
154154

155155
static void hdac_hdmi_jack_report(struct hdac_hdmi_pcm *pcm,

sound/soc/codecs/madera.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,6 @@ const struct soc_enum madera_isrc_fsh[] = {
19031903
MADERA_ISRC4_FSH_SHIFT, 0xf,
19041904
MADERA_RATE_ENUM_SIZE,
19051905
madera_rate_text, madera_rate_val),
1906-
19071906
};
19081907
EXPORT_SYMBOL_GPL(madera_isrc_fsh);
19091908

@@ -1924,7 +1923,6 @@ const struct soc_enum madera_isrc_fsl[] = {
19241923
MADERA_ISRC4_FSL_SHIFT, 0xf,
19251924
MADERA_RATE_ENUM_SIZE,
19261925
madera_rate_text, madera_rate_val),
1927-
19281926
};
19291927
EXPORT_SYMBOL_GPL(madera_isrc_fsl);
19301928

@@ -1938,7 +1936,6 @@ const struct soc_enum madera_asrc1_rate[] = {
19381936
MADERA_ASYNC_RATE_ENUM_SIZE,
19391937
madera_rate_text + MADERA_SYNC_RATE_ENUM_SIZE,
19401938
madera_rate_val + MADERA_SYNC_RATE_ENUM_SIZE),
1941-
19421939
};
19431940
EXPORT_SYMBOL_GPL(madera_asrc1_rate);
19441941

@@ -1964,7 +1961,6 @@ const struct soc_enum madera_asrc2_rate[] = {
19641961
MADERA_ASYNC_RATE_ENUM_SIZE,
19651962
madera_rate_text + MADERA_SYNC_RATE_ENUM_SIZE,
19661963
madera_rate_val + MADERA_SYNC_RATE_ENUM_SIZE),
1967-
19681964
};
19691965
EXPORT_SYMBOL_GPL(madera_asrc2_rate);
19701966

sound/soc/codecs/sgtl5000.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,6 +1653,40 @@ static int sgtl5000_i2c_probe(struct i2c_client *client,
16531653
dev_err(&client->dev,
16541654
"Error %d initializing CHIP_CLK_CTRL\n", ret);
16551655

1656+
/* Mute everything to avoid pop from the following power-up */
1657+
ret = regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_CTRL,
1658+
SGTL5000_CHIP_ANA_CTRL_DEFAULT);
1659+
if (ret) {
1660+
dev_err(&client->dev,
1661+
"Error %d muting outputs via CHIP_ANA_CTRL\n", ret);
1662+
goto disable_clk;
1663+
}
1664+
1665+
/*
1666+
* If VAG is powered-on (e.g. from previous boot), it would be disabled
1667+
* by the write to ANA_POWER in later steps of the probe code. This
1668+
* may create a loud pop even with all outputs muted. The proper way
1669+
* to circumvent this is disabling the bit first and waiting the proper
1670+
* cool-down time.
1671+
*/
1672+
ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, &value);
1673+
if (ret) {
1674+
dev_err(&client->dev, "Failed to read ANA_POWER: %d\n", ret);
1675+
goto disable_clk;
1676+
}
1677+
if (value & SGTL5000_VAG_POWERUP) {
1678+
ret = regmap_update_bits(sgtl5000->regmap,
1679+
SGTL5000_CHIP_ANA_POWER,
1680+
SGTL5000_VAG_POWERUP,
1681+
0);
1682+
if (ret) {
1683+
dev_err(&client->dev, "Error %d disabling VAG\n", ret);
1684+
goto disable_clk;
1685+
}
1686+
1687+
msleep(SGTL5000_VAG_POWERDOWN_DELAY);
1688+
}
1689+
16561690
/* Follow section 2.2.1.1 of AN3663 */
16571691
ana_pwr = SGTL5000_ANA_POWER_DEFAULT;
16581692
if (sgtl5000->num_supplies <= VDDD) {

0 commit comments

Comments
 (0)