Skip to content

Commit 25fca8c

Browse files
committed
Merge tag 'asoc-fix-v5.15-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.15 A collection of fixes that came in during the merge window, nothing too remarkable but a reasonably large number of fixes.
2 parents c5433f0 + fcb958e commit 25fca8c

File tree

9 files changed

+47
-39
lines changed

9 files changed

+47
-39
lines changed

Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ properties:
2121
- fsl,imx8mn-rpmsg-audio
2222
- fsl,imx8mm-rpmsg-audio
2323
- fsl,imx8mp-rpmsg-audio
24+
- fsl,imx8ulp-rpmsg-audio
2425

2526
model:
2627
$ref: /schemas/types.yaml#/definitions/string

Documentation/devicetree/bindings/sound/mt8195-afe-pcm.yaml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -130,36 +130,34 @@ additionalProperties: false
130130

131131
examples:
132132
- |
133-
#include <dt-bindings/clock/mt8195-clk.h>
134133
#include <dt-bindings/interrupt-controller/arm-gic.h>
135134
#include <dt-bindings/interrupt-controller/irq.h>
136-
#include <dt-bindings/power/mt8195-power.h>
137135
138136
afe: mt8195-afe-pcm@10890000 {
139137
compatible = "mediatek,mt8195-audio";
140138
reg = <0x10890000 0x10000>;
141139
interrupts = <GIC_SPI 822 IRQ_TYPE_LEVEL_HIGH 0>;
142140
mediatek,topckgen = <&topckgen>;
143-
power-domains = <&spm MT8195_POWER_DOMAIN_AUDIO>;
141+
power-domains = <&spm 7>; //MT8195_POWER_DOMAIN_AUDIO
144142
clocks = <&clk26m>,
145-
<&topckgen CLK_TOP_APLL1>,
146-
<&topckgen CLK_TOP_APLL2>,
147-
<&topckgen CLK_TOP_APLL12_DIV0>,
148-
<&topckgen CLK_TOP_APLL12_DIV1>,
149-
<&topckgen CLK_TOP_APLL12_DIV2>,
150-
<&topckgen CLK_TOP_APLL12_DIV3>,
151-
<&topckgen CLK_TOP_APLL12_DIV9>,
152-
<&topckgen CLK_TOP_A1SYS_HP_SEL>,
153-
<&topckgen CLK_TOP_AUD_INTBUS_SEL>,
154-
<&topckgen CLK_TOP_AUDIO_H_SEL>,
155-
<&topckgen CLK_TOP_AUDIO_LOCAL_BUS_SEL>,
156-
<&topckgen CLK_TOP_DPTX_M_SEL>,
157-
<&topckgen CLK_TOP_I2SO1_M_SEL>,
158-
<&topckgen CLK_TOP_I2SO2_M_SEL>,
159-
<&topckgen CLK_TOP_I2SI1_M_SEL>,
160-
<&topckgen CLK_TOP_I2SI2_M_SEL>,
161-
<&infracfg_ao CLK_INFRA_AO_AUDIO_26M_B>,
162-
<&scp_adsp CLK_SCP_ADSP_AUDIODSP>;
143+
<&topckgen 163>, //CLK_TOP_APLL1
144+
<&topckgen 166>, //CLK_TOP_APLL2
145+
<&topckgen 233>, //CLK_TOP_APLL12_DIV0
146+
<&topckgen 234>, //CLK_TOP_APLL12_DIV1
147+
<&topckgen 235>, //CLK_TOP_APLL12_DIV2
148+
<&topckgen 236>, //CLK_TOP_APLL12_DIV3
149+
<&topckgen 238>, //CLK_TOP_APLL12_DIV9
150+
<&topckgen 100>, //CLK_TOP_A1SYS_HP_SEL
151+
<&topckgen 33>, //CLK_TOP_AUD_INTBUS_SEL
152+
<&topckgen 34>, //CLK_TOP_AUDIO_H_SEL
153+
<&topckgen 107>, //CLK_TOP_AUDIO_LOCAL_BUS_SEL
154+
<&topckgen 98>, //CLK_TOP_DPTX_M_SEL
155+
<&topckgen 94>, //CLK_TOP_I2SO1_M_SEL
156+
<&topckgen 95>, //CLK_TOP_I2SO2_M_SEL
157+
<&topckgen 96>, //CLK_TOP_I2SI1_M_SEL
158+
<&topckgen 97>, //CLK_TOP_I2SI2_M_SEL
159+
<&infracfg_ao 50>, //CLK_INFRA_AO_AUDIO_26M_B
160+
<&scp_adsp 0>; //CLK_SCP_ADSP_AUDIODSP
163161
clock-names = "clk26m",
164162
"apll1_ck",
165163
"apll2_ck",

sound/soc/codecs/rt5682.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,9 +2942,6 @@ static int rt5682_suspend(struct snd_soc_component *component)
29422942
break;
29432943
}
29442944

2945-
snd_soc_component_update_bits(component, RT5682_PWR_ANLG_3,
2946-
RT5682_PWR_CBJ, 0);
2947-
29482945
/* enter SAR ADC power saving mode */
29492946
snd_soc_component_update_bits(component, RT5682_SAR_IL_CMD_1,
29502947
RT5682_SAR_BUTT_DET_MASK | RT5682_SAR_BUTDET_MODE_MASK |

sound/soc/generic/audio-graph-card.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
285285
if (li->cpu) {
286286
struct snd_soc_card *card = simple_priv_to_card(priv);
287287
struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0);
288+
struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0);
288289
int is_single_links = 0;
289290

290291
/* Codec is dummy */
@@ -313,6 +314,7 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
313314
dai_link->no_pcm = 1;
314315

315316
asoc_simple_canonicalize_cpu(cpus, is_single_links);
317+
asoc_simple_canonicalize_platform(platforms, cpus);
316318
} else {
317319
struct snd_soc_codec_conf *cconf = simple_props_to_codec_conf(dai_props, 0);
318320
struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0);
@@ -366,6 +368,7 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv,
366368
struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
367369
struct snd_soc_dai_link_component *cpus = asoc_link_to_cpu(dai_link, 0);
368370
struct snd_soc_dai_link_component *codecs = asoc_link_to_codec(dai_link, 0);
371+
struct snd_soc_dai_link_component *platforms = asoc_link_to_platform(dai_link, 0);
369372
char dai_name[64];
370373
int ret, is_single_links = 0;
371374

@@ -383,6 +386,7 @@ static int graph_dai_link_of(struct asoc_simple_priv *priv,
383386
"%s-%s", cpus->dai_name, codecs->dai_name);
384387

385388
asoc_simple_canonicalize_cpu(cpus, is_single_links);
389+
asoc_simple_canonicalize_platform(platforms, cpus);
386390

387391
ret = graph_link_init(priv, cpu_ep, codec_ep, li, dai_name);
388392
if (ret < 0)
@@ -608,6 +612,7 @@ static int graph_count_noml(struct asoc_simple_priv *priv,
608612

609613
li->num[li->link].cpus = 1;
610614
li->num[li->link].codecs = 1;
615+
li->num[li->link].platforms = 1;
611616

612617
li->link += 1; /* 1xCPU-Codec */
613618

@@ -630,6 +635,7 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv,
630635

631636
if (li->cpu) {
632637
li->num[li->link].cpus = 1;
638+
li->num[li->link].platforms = 1;
633639

634640
li->link++; /* 1xCPU-dummy */
635641
} else {

sound/soc/intel/boards/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
602602
select SND_SOC_DMIC
603603
select SND_SOC_INTEL_HDA_DSP_COMMON
604604
select SND_SOC_INTEL_SOF_MAXIM_COMMON
605-
select SND_SOC_SDW_MOCKUP
605+
imply SND_SOC_SDW_MOCKUP
606606
help
607607
Add support for Intel SoundWire-based platforms connected to
608608
MAX98373, RT700, RT711, RT1308 and RT715

sound/soc/mediatek/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ config SND_SOC_MT8192_MT6359_RT1015_RT5682
187187

188188
config SND_SOC_MT8195
189189
tristate "ASoC support for Mediatek MT8195 chip"
190+
depends on ARCH_MEDIATEK || COMPILE_TEST
190191
select SND_SOC_MEDIATEK
191192
help
192193
This adds ASoC platform driver support for Mediatek MT8195 chip
@@ -197,7 +198,7 @@ config SND_SOC_MT8195
197198
config SND_SOC_MT8195_MT6359_RT1019_RT5682
198199
tristate "ASoC Audio driver for MT8195 with MT6359 RT1019 RT5682 codec"
199200
depends on I2C
200-
depends on SND_SOC_MT8195
201+
depends on SND_SOC_MT8195 && MTK_PMIC_WRAP
201202
select SND_SOC_MT6359
202203
select SND_SOC_RT1015P
203204
select SND_SOC_RT5682_I2C

sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,27 +1018,25 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
10181018
of_parse_phandle(pdev->dev.of_node,
10191019
"mediatek,dptx-codec", 0);
10201020
if (!dai_link->codecs->of_node) {
1021-
dev_err(&pdev->dev, "Property 'dptx-codec' missing or invalid\n");
1022-
return -EINVAL;
1021+
dev_dbg(&pdev->dev, "No property 'dptx-codec'\n");
1022+
} else {
1023+
dai_link->codecs->name = NULL;
1024+
dai_link->codecs->dai_name = "i2s-hifi";
1025+
dai_link->init = mt8195_dptx_codec_init;
10231026
}
1024-
1025-
dai_link->codecs->name = NULL;
1026-
dai_link->codecs->dai_name = "i2s-hifi";
1027-
dai_link->init = mt8195_dptx_codec_init;
10281027
}
10291028

10301029
if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) {
10311030
dai_link->codecs->of_node =
10321031
of_parse_phandle(pdev->dev.of_node,
10331032
"mediatek,hdmi-codec", 0);
10341033
if (!dai_link->codecs->of_node) {
1035-
dev_err(&pdev->dev, "Property 'hdmi-codec' missing or invalid\n");
1036-
return -EINVAL;
1034+
dev_dbg(&pdev->dev, "No property 'hdmi-codec'\n");
1035+
} else {
1036+
dai_link->codecs->name = NULL;
1037+
dai_link->codecs->dai_name = "i2s-hifi";
1038+
dai_link->init = mt8195_hdmi_codec_init;
10371039
}
1038-
1039-
dai_link->codecs->name = NULL;
1040-
dai_link->codecs->dai_name = "i2s-hifi";
1041-
dai_link->init = mt8195_hdmi_codec_init;
10421040
}
10431041
}
10441042

sound/soc/rockchip/rockchip_i2s.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/clk.h>
1616
#include <linux/pm_runtime.h>
1717
#include <linux/regmap.h>
18+
#include <linux/spinlock.h>
1819
#include <sound/pcm_params.h>
1920
#include <sound/dmaengine_pcm.h>
2021

@@ -53,6 +54,7 @@ struct rk_i2s_dev {
5354
bool is_master_mode;
5455
const struct rk_i2s_pins *pins;
5556
unsigned int bclk_ratio;
57+
spinlock_t lock; /* tx/rx lock */
5658
};
5759

5860
static int i2s_runtime_suspend(struct device *dev)
@@ -96,6 +98,7 @@ static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
9698
unsigned int val = 0;
9799
int retry = 10;
98100

101+
spin_lock(&i2s->lock);
99102
if (on) {
100103
regmap_update_bits(i2s->regmap, I2S_DMACR,
101104
I2S_DMACR_TDE_ENABLE, I2S_DMACR_TDE_ENABLE);
@@ -136,13 +139,15 @@ static void rockchip_snd_txctrl(struct rk_i2s_dev *i2s, int on)
136139
}
137140
}
138141
}
142+
spin_unlock(&i2s->lock);
139143
}
140144

141145
static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
142146
{
143147
unsigned int val = 0;
144148
int retry = 10;
145149

150+
spin_lock(&i2s->lock);
146151
if (on) {
147152
regmap_update_bits(i2s->regmap, I2S_DMACR,
148153
I2S_DMACR_RDE_ENABLE, I2S_DMACR_RDE_ENABLE);
@@ -183,6 +188,7 @@ static void rockchip_snd_rxctrl(struct rk_i2s_dev *i2s, int on)
183188
}
184189
}
185190
}
191+
spin_unlock(&i2s->lock);
186192
}
187193

188194
static int rockchip_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
@@ -684,6 +690,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
684690
if (!i2s)
685691
return -ENOMEM;
686692

693+
spin_lock_init(&i2s->lock);
687694
i2s->dev = &pdev->dev;
688695

689696
i2s->grf = syscon_regmap_lookup_by_phandle(node, "rockchip,grf");

sound/soc/samsung/s3c24xx_simtec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ int simtec_audio_core_probe(struct platform_device *pdev,
327327

328328
snd_dev = platform_device_alloc("soc-audio", -1);
329329
if (!snd_dev) {
330-
dev_err(&pdev->dev, "failed to alloc soc-audio devicec\n");
330+
dev_err(&pdev->dev, "failed to alloc soc-audio device\n");
331331
ret = -ENOMEM;
332332
goto err_gpio;
333333
}

0 commit comments

Comments
 (0)