Skip to content

Commit 84aa305

Browse files
committed
Merge tag 'asoc-fix-v6.2-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.2 There's quite a few fixes here, mostly board specific apart from the SOF power management ones. We also have some new quirks and Kconfig tweaks to enable existing code on new platforms, and a one liner which exposes the SOF firmware state in debugfs to aid with debugging. There's also a SPI fix that I mistakenly put in the wrong queue and did some merges on top of before I noticed, it seemed more trouble than it was worth to unpick things. A copy of the same patch is also in the spi tree.
2 parents ca88eeb + 242fc66 commit 84aa305

27 files changed

+389
-184
lines changed

Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ properties:
1616
compatible:
1717
enum:
1818
- mediatek,mt8186-mt6366-rt1019-rt5682s-sound
19+
- mediatek,mt8186-mt6366-rt5682s-max98360-sound
1920

2021
mediatek,platform:
2122
$ref: "/schemas/types.yaml#/definitions/phandle"

Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ properties:
3030
const: 0
3131

3232
clocks:
33-
maxItems: 5
33+
oneOf:
34+
- maxItems: 3
35+
- maxItems: 5
3436

3537
clock-names:
3638
oneOf:

Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ title: LPASS(Low Power Audio Subsystem) VA Macro audio codec
99
maintainers:
1010
- Srinivas Kandagatla <[email protected]>
1111

12-
allOf:
13-
- $ref: dai-common.yaml#
14-
1512
properties:
1613
compatible:
1714
enum:
@@ -30,15 +27,12 @@ properties:
3027
const: 0
3128

3229
clocks:
33-
maxItems: 5
30+
minItems: 5
31+
maxItems: 6
3432

3533
clock-names:
36-
items:
37-
- const: mclk
38-
- const: npl
39-
- const: macro
40-
- const: dcodec
41-
- const: fsgen
34+
minItems: 5
35+
maxItems: 6
4236

4337
clock-output-names:
4438
maxItems: 1
@@ -55,10 +49,51 @@ required:
5549
- reg
5650
- "#sound-dai-cells"
5751

52+
allOf:
53+
- $ref: dai-common.yaml#
54+
55+
- if:
56+
properties:
57+
compatible:
58+
enum:
59+
- qcom,sc7280-lpass-wsa-macro
60+
- qcom,sm8450-lpass-wsa-macro
61+
- qcom,sc8280xp-lpass-wsa-macro
62+
then:
63+
properties:
64+
clocks:
65+
maxItems: 5
66+
clock-names:
67+
items:
68+
- const: mclk
69+
- const: npl
70+
- const: macro
71+
- const: dcodec
72+
- const: fsgen
73+
74+
- if:
75+
properties:
76+
compatible:
77+
enum:
78+
- qcom,sm8250-lpass-wsa-macro
79+
then:
80+
properties:
81+
clocks:
82+
minItems: 6
83+
clock-names:
84+
items:
85+
- const: mclk
86+
- const: npl
87+
- const: macro
88+
- const: dcodec
89+
- const: va
90+
- const: fsgen
91+
5892
unevaluatedProperties: false
5993

6094
examples:
6195
- |
96+
#include <dt-bindings/clock/qcom,sm8250-lpass-aoncc.h>
6297
#include <dt-bindings/sound/qcom,q6afe.h>
6398
codec@3240000 {
6499
compatible = "qcom,sm8250-lpass-wsa-macro";
@@ -69,7 +104,8 @@ examples:
69104
<&audiocc 0>,
70105
<&q6afecc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
71106
<&q6afecc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>,
107+
<&aoncc LPASS_CDC_VA_MCLK>,
72108
<&vamacro>;
73-
clock-names = "mclk", "npl", "macro", "dcodec", "fsgen";
109+
clock-names = "mclk", "npl", "macro", "dcodec", "va", "fsgen";
74110
clock-output-names = "mclk";
75111
};

drivers/spi/spi-mt65xx.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,11 @@ static int mtk_spi_probe(struct platform_device *pdev)
12531253
dev_notice(dev, "SPI dma_set_mask(%d) failed, ret:%d\n",
12541254
addr_bits, ret);
12551255

1256+
ret = devm_request_irq(dev, irq, mtk_spi_interrupt,
1257+
IRQF_TRIGGER_NONE, dev_name(dev), master);
1258+
if (ret)
1259+
return dev_err_probe(dev, ret, "failed to register irq\n");
1260+
12561261
pm_runtime_enable(dev);
12571262

12581263
ret = devm_spi_register_master(dev, master);
@@ -1261,13 +1266,6 @@ static int mtk_spi_probe(struct platform_device *pdev)
12611266
return dev_err_probe(dev, ret, "failed to register master\n");
12621267
}
12631268

1264-
ret = devm_request_irq(dev, irq, mtk_spi_interrupt,
1265-
IRQF_TRIGGER_NONE, dev_name(dev), master);
1266-
if (ret) {
1267-
pm_runtime_disable(dev);
1268-
return dev_err_probe(dev, ret, "failed to register irq\n");
1269-
}
1270-
12711269
return 0;
12721270
}
12731271

sound/soc/amd/yc/acp6x-mach.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
206206
DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"),
207207
}
208208
},
209+
{
210+
.driver_data = &acp6x_card,
211+
.matches = {
212+
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
213+
DMI_MATCH(DMI_PRODUCT_NAME, "M5402RA"),
214+
}
215+
},
209216
{
210217
.driver_data = &acp6x_card,
211218
.matches = {
@@ -220,6 +227,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
220227
DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 14 2022"),
221228
}
222229
},
230+
{
231+
.driver_data = &acp6x_card,
232+
.matches = {
233+
DMI_MATCH(DMI_BOARD_VENDOR, "Razer"),
234+
DMI_MATCH(DMI_PRODUCT_NAME, "Blade 14 (2022) - RZ09-0427"),
235+
}
236+
},
223237
{}
224238
};
225239

sound/soc/codecs/rt9120.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,20 @@ static int rt9120_codec_probe(struct snd_soc_component *comp)
177177
return 0;
178178
}
179179

180+
static int rt9120_codec_suspend(struct snd_soc_component *comp)
181+
{
182+
return pm_runtime_force_suspend(comp->dev);
183+
}
184+
185+
static int rt9120_codec_resume(struct snd_soc_component *comp)
186+
{
187+
return pm_runtime_force_resume(comp->dev);
188+
}
189+
180190
static const struct snd_soc_component_driver rt9120_component_driver = {
181191
.probe = rt9120_codec_probe,
192+
.suspend = rt9120_codec_suspend,
193+
.resume = rt9120_codec_resume,
182194
.controls = rt9120_snd_controls,
183195
.num_controls = ARRAY_SIZE(rt9120_snd_controls),
184196
.dapm_widgets = rt9120_dapm_widgets,

sound/soc/codecs/wm8904.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
697697
int dcs_mask;
698698
int dcs_l, dcs_r;
699699
int dcs_l_reg, dcs_r_reg;
700+
int an_out_reg;
700701
int timeout;
701702
int pwr_reg;
702703

@@ -712,6 +713,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
712713
dcs_mask = WM8904_DCS_ENA_CHAN_0 | WM8904_DCS_ENA_CHAN_1;
713714
dcs_r_reg = WM8904_DC_SERVO_8;
714715
dcs_l_reg = WM8904_DC_SERVO_9;
716+
an_out_reg = WM8904_ANALOGUE_OUT1_LEFT;
715717
dcs_l = 0;
716718
dcs_r = 1;
717719
break;
@@ -720,6 +722,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
720722
dcs_mask = WM8904_DCS_ENA_CHAN_2 | WM8904_DCS_ENA_CHAN_3;
721723
dcs_r_reg = WM8904_DC_SERVO_6;
722724
dcs_l_reg = WM8904_DC_SERVO_7;
725+
an_out_reg = WM8904_ANALOGUE_OUT2_LEFT;
723726
dcs_l = 2;
724727
dcs_r = 3;
725728
break;
@@ -792,6 +795,10 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
792795
snd_soc_component_update_bits(component, reg,
793796
WM8904_HPL_ENA_OUTP | WM8904_HPR_ENA_OUTP,
794797
WM8904_HPL_ENA_OUTP | WM8904_HPR_ENA_OUTP);
798+
799+
/* Update volume, requires PGA to be powered */
800+
val = snd_soc_component_read(component, an_out_reg);
801+
snd_soc_component_write(component, an_out_reg, val);
795802
break;
796803

797804
case SND_SOC_DAPM_POST_PMU:

sound/soc/fsl/fsl-asoc-card.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ static const struct snd_soc_dapm_route audio_map[] = {
121121

122122
static const struct snd_soc_dapm_route audio_map_ac97[] = {
123123
/* 1st half -- Normal DAPM routes */
124-
{"Playback", NULL, "AC97 Playback"},
125-
{"AC97 Capture", NULL, "Capture"},
124+
{"AC97 Playback", NULL, "CPU AC97 Playback"},
125+
{"CPU AC97 Capture", NULL, "AC97 Capture"},
126126
/* 2nd half -- ASRC DAPM routes */
127-
{"AC97 Playback", NULL, "ASRC-Playback"},
128-
{"ASRC-Capture", NULL, "AC97 Capture"},
127+
{"CPU AC97 Playback", NULL, "ASRC-Playback"},
128+
{"ASRC-Capture", NULL, "CPU AC97 Capture"},
129129
};
130130

131131
static const struct snd_soc_dapm_route audio_map_tx[] = {

sound/soc/fsl/fsl_micfil.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,21 +315,21 @@ static int hwvad_detected(struct snd_kcontrol *kcontrol,
315315

316316
static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = {
317317
SOC_SINGLE_SX_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL,
318-
MICFIL_OUTGAIN_CHX_SHIFT(0), 0xF, 0x7, gain_tlv),
318+
MICFIL_OUTGAIN_CHX_SHIFT(0), 0x8, 0xF, gain_tlv),
319319
SOC_SINGLE_SX_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL,
320-
MICFIL_OUTGAIN_CHX_SHIFT(1), 0xF, 0x7, gain_tlv),
320+
MICFIL_OUTGAIN_CHX_SHIFT(1), 0x8, 0xF, gain_tlv),
321321
SOC_SINGLE_SX_TLV("CH2 Volume", REG_MICFIL_OUT_CTRL,
322-
MICFIL_OUTGAIN_CHX_SHIFT(2), 0xF, 0x7, gain_tlv),
322+
MICFIL_OUTGAIN_CHX_SHIFT(2), 0x8, 0xF, gain_tlv),
323323
SOC_SINGLE_SX_TLV("CH3 Volume", REG_MICFIL_OUT_CTRL,
324-
MICFIL_OUTGAIN_CHX_SHIFT(3), 0xF, 0x7, gain_tlv),
324+
MICFIL_OUTGAIN_CHX_SHIFT(3), 0x8, 0xF, gain_tlv),
325325
SOC_SINGLE_SX_TLV("CH4 Volume", REG_MICFIL_OUT_CTRL,
326-
MICFIL_OUTGAIN_CHX_SHIFT(4), 0xF, 0x7, gain_tlv),
326+
MICFIL_OUTGAIN_CHX_SHIFT(4), 0x8, 0xF, gain_tlv),
327327
SOC_SINGLE_SX_TLV("CH5 Volume", REG_MICFIL_OUT_CTRL,
328-
MICFIL_OUTGAIN_CHX_SHIFT(5), 0xF, 0x7, gain_tlv),
328+
MICFIL_OUTGAIN_CHX_SHIFT(5), 0x8, 0xF, gain_tlv),
329329
SOC_SINGLE_SX_TLV("CH6 Volume", REG_MICFIL_OUT_CTRL,
330-
MICFIL_OUTGAIN_CHX_SHIFT(6), 0xF, 0x7, gain_tlv),
330+
MICFIL_OUTGAIN_CHX_SHIFT(6), 0x8, 0xF, gain_tlv),
331331
SOC_SINGLE_SX_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL,
332-
MICFIL_OUTGAIN_CHX_SHIFT(7), 0xF, 0x7, gain_tlv),
332+
MICFIL_OUTGAIN_CHX_SHIFT(7), 0x8, 0xF, gain_tlv),
333333
SOC_ENUM_EXT("MICFIL Quality Select",
334334
fsl_micfil_quality_enum,
335335
micfil_quality_get, micfil_quality_set),

sound/soc/fsl/fsl_ssi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,14 +1189,14 @@ static struct snd_soc_dai_driver fsl_ssi_ac97_dai = {
11891189
.symmetric_channels = 1,
11901190
.probe = fsl_ssi_dai_probe,
11911191
.playback = {
1192-
.stream_name = "AC97 Playback",
1192+
.stream_name = "CPU AC97 Playback",
11931193
.channels_min = 2,
11941194
.channels_max = 2,
11951195
.rates = SNDRV_PCM_RATE_8000_48000,
11961196
.formats = SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_S20,
11971197
},
11981198
.capture = {
1199-
.stream_name = "AC97 Capture",
1199+
.stream_name = "CPU AC97 Capture",
12001200
.channels_min = 2,
12011201
.channels_max = 2,
12021202
.rates = SNDRV_PCM_RATE_48000,

0 commit comments

Comments
 (0)