Skip to content

Commit 2023062

Browse files
committed
Merge branch 'asoc-5.5' into asoc-linus
2 parents def9d27 + 8ce1cbd commit 2023062

File tree

13 files changed

+144
-78
lines changed

13 files changed

+144
-78
lines changed

sound/soc/codecs/cs47l15.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
529529
SND_SOC_DAPM_OUTPUT("DSP Trigger Out"),
530530

531531
SND_SOC_DAPM_DEMUX("HPOUT1 Demux", SND_SOC_NOPM, 0, 0, &cs47l15_outdemux),
532+
SND_SOC_DAPM_MUX("HPOUT1 Mono Mux", SND_SOC_NOPM, 0, 0, &cs47l15_outdemux),
532533

533534
SND_SOC_DAPM_PGA("PWM1 Driver", MADERA_PWM_DRIVE_1, MADERA_PWM1_ENA_SHIFT,
534535
0, NULL, 0),
@@ -1084,6 +1085,9 @@ static const struct snd_soc_dapm_route cs47l15_dapm_routes[] = {
10841085
{ "AEC2 Loopback", "HPOUT1R", "OUT1R" },
10851086
{ "HPOUT1 Demux", NULL, "OUT1L" },
10861087
{ "HPOUT1 Demux", NULL, "OUT1R" },
1088+
1089+
{ "OUT1R", NULL, "HPOUT1 Mono Mux" },
1090+
10871091
{ "HPOUTL", "HPOUT", "HPOUT1 Demux" },
10881092
{ "HPOUTR", "HPOUT", "HPOUT1 Demux" },
10891093
{ "EPOUTP", "EPOUT", "HPOUT1 Demux" },
@@ -1261,6 +1265,11 @@ static irqreturn_t cs47l15_adsp2_irq(int irq, void *data)
12611265
return IRQ_HANDLED;
12621266
}
12631267

1268+
static const struct snd_soc_dapm_route cs47l15_mono_routes[] = {
1269+
{ "HPOUT1 Mono Mux", "HPOUT", "OUT1L" },
1270+
{ "HPOUT1 Mono Mux", "EPOUT", "OUT1L" },
1271+
};
1272+
12641273
static int cs47l15_component_probe(struct snd_soc_component *component)
12651274
{
12661275
struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component);
@@ -1277,7 +1286,9 @@ static int cs47l15_component_probe(struct snd_soc_component *component)
12771286
if (ret)
12781287
return ret;
12791288

1280-
ret = madera_init_outputs(component, CS47L15_MONO_OUTPUTS);
1289+
ret = madera_init_outputs(component, cs47l15_mono_routes,
1290+
ARRAY_SIZE(cs47l15_mono_routes),
1291+
CS47L15_MONO_OUTPUTS);
12811292
if (ret)
12821293
return ret;
12831294

sound/soc/codecs/cs47l35.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
631631
SND_SOC_DAPM_OUTPUT("DSP Trigger Out"),
632632

633633
SND_SOC_DAPM_DEMUX("HPOUT1 Demux", SND_SOC_NOPM, 0, 0, &cs47l35_outdemux),
634+
SND_SOC_DAPM_MUX("HPOUT1 Mono Mux", SND_SOC_NOPM, 0, 0, &cs47l35_outdemux),
634635

635636
SND_SOC_DAPM_PGA("PWM1 Driver", MADERA_PWM_DRIVE_1, MADERA_PWM1_ENA_SHIFT,
636637
0, NULL, 0),
@@ -1309,6 +1310,8 @@ static const struct snd_soc_dapm_route cs47l35_dapm_routes[] = {
13091310
{ "SPKOUTN", NULL, "OUT4L" },
13101311
{ "SPKOUTP", NULL, "OUT4L" },
13111312

1313+
{ "OUT1R", NULL, "HPOUT1 Mono Mux" },
1314+
13121315
{ "HPOUTL", "HPOUT", "HPOUT1 Demux" },
13131316
{ "HPOUTR", "HPOUT", "HPOUT1 Demux" },
13141317
{ "EPOUTP", "EPOUT", "HPOUT1 Demux" },
@@ -1552,6 +1555,11 @@ static irqreturn_t cs47l35_adsp2_irq(int irq, void *data)
15521555
return IRQ_HANDLED;
15531556
}
15541557

1558+
static const struct snd_soc_dapm_route cs47l35_mono_routes[] = {
1559+
{ "HPOUT1 Mono Mux", "HPOUT", "OUT1L" },
1560+
{ "HPOUT1 Mono Mux", "EPOUT", "OUT1L" },
1561+
};
1562+
15551563
static int cs47l35_component_probe(struct snd_soc_component *component)
15561564
{
15571565
struct cs47l35 *cs47l35 = snd_soc_component_get_drvdata(component);
@@ -1568,7 +1576,9 @@ static int cs47l35_component_probe(struct snd_soc_component *component)
15681576
if (ret)
15691577
return ret;
15701578

1571-
ret = madera_init_outputs(component, CS47L35_MONO_OUTPUTS);
1579+
ret = madera_init_outputs(component, cs47l35_mono_routes,
1580+
ARRAY_SIZE(cs47l35_mono_routes),
1581+
CS47L35_MONO_OUTPUTS);
15721582
if (ret)
15731583
return ret;
15741584

sound/soc/codecs/cs47l85.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2005,12 +2005,18 @@ static const struct snd_soc_dapm_route cs47l85_dapm_routes[] = {
20052005
{ "IN3R", NULL, "IN3R Mode" },
20062006

20072007
{ "IN4L", NULL, "DMICCLK4" },
2008+
{ "IN4L", NULL, "DMICDAT4" },
2009+
{ "IN4R", NULL, "DMICCLK4" },
20082010
{ "IN4R", NULL, "DMICDAT4" },
20092011

20102012
{ "IN5L", NULL, "DMICCLK5" },
2013+
{ "IN5L", NULL, "DMICDAT5" },
2014+
{ "IN5R", NULL, "DMICCLK5" },
20112015
{ "IN5R", NULL, "DMICDAT5" },
20122016

20132017
{ "IN6L", NULL, "DMICCLK6" },
2018+
{ "IN6L", NULL, "DMICDAT6" },
2019+
{ "IN6R", NULL, "DMICCLK6" },
20142020
{ "IN6R", NULL, "DMICDAT6" },
20152021

20162022
MADERA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
@@ -2507,7 +2513,8 @@ static int cs47l85_component_probe(struct snd_soc_component *component)
25072513
if (ret)
25082514
return ret;
25092515

2510-
ret = madera_init_outputs(component, CS47L85_MONO_OUTPUTS);
2516+
ret = madera_init_outputs(component, NULL, CS47L85_MONO_OUTPUTS,
2517+
CS47L85_MONO_OUTPUTS);
25112518
if (ret)
25122519
return ret;
25132520

sound/soc/codecs/cs47l90.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1935,12 +1935,18 @@ static const struct snd_soc_dapm_route cs47l90_dapm_routes[] = {
19351935
{ "IN2R", NULL, "IN2R Mode" },
19361936

19371937
{ "IN3L", NULL, "DMICCLK3" },
1938+
{ "IN3L", NULL, "DMICDAT3" },
1939+
{ "IN3R", NULL, "DMICCLK3" },
19381940
{ "IN3R", NULL, "DMICDAT3" },
19391941

19401942
{ "IN4L", NULL, "DMICCLK4" },
1943+
{ "IN4L", NULL, "DMICDAT4" },
1944+
{ "IN4R", NULL, "DMICCLK4" },
19411945
{ "IN4R", NULL, "DMICDAT4" },
19421946

19431947
{ "IN5L", NULL, "DMICCLK5" },
1948+
{ "IN5L", NULL, "DMICDAT5" },
1949+
{ "IN5R", NULL, "DMICCLK5" },
19441950
{ "IN5R", NULL, "DMICDAT5" },
19451951

19461952
MADERA_MIXER_ROUTES("OUT1L", "HPOUT1L"),
@@ -2418,7 +2424,8 @@ static int cs47l90_component_probe(struct snd_soc_component *component)
24182424
if (ret)
24192425
return ret;
24202426

2421-
ret = madera_init_outputs(component, CS47L90_MONO_OUTPUTS);
2427+
ret = madera_init_outputs(component, NULL, CS47L90_MONO_OUTPUTS,
2428+
CS47L90_MONO_OUTPUTS);
24222429
if (ret)
24232430
return ret;
24242431

sound/soc/codecs/cs47l92.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ SND_SOC_DAPM_MUX("IN2L Mode", SND_SOC_NOPM, 0, 0, &madera_inmode[1]),
730730
SND_SOC_DAPM_MUX("IN2R Mode", SND_SOC_NOPM, 0, 0, &madera_inmode[1]),
731731

732732
SND_SOC_DAPM_DEMUX("OUT3 Demux", SND_SOC_NOPM, 0, 0, &cs47l92_outdemux),
733+
SND_SOC_DAPM_MUX("OUT3 Mono Mux", SND_SOC_NOPM, 0, 0, &cs47l92_outdemux),
733734

734735
SND_SOC_DAPM_OUTPUT("DRC1 Signal Activity"),
735736
SND_SOC_DAPM_OUTPUT("DRC2 Signal Activity"),
@@ -1584,6 +1585,8 @@ static const struct snd_soc_dapm_route cs47l92_dapm_routes[] = {
15841585
{ "OUT3 Demux", NULL, "OUT3L" },
15851586
{ "OUT3 Demux", NULL, "OUT3R" },
15861587

1588+
{ "OUT3R", NULL, "OUT3 Mono Mux" },
1589+
15871590
{ "HPOUT3L", "HPOUT3", "OUT3 Demux" },
15881591
{ "HPOUT3R", "HPOUT3", "OUT3 Demux" },
15891592
{ "HPOUT4L", "HPOUT4", "OUT3 Demux" },
@@ -1817,6 +1820,13 @@ static irqreturn_t cs47l92_adsp2_irq(int irq, void *data)
18171820
return IRQ_HANDLED;
18181821
}
18191822

1823+
static const struct snd_soc_dapm_route cs47l92_mono_routes[] = {
1824+
{ "OUT1R", NULL, "OUT1L" },
1825+
{ "OUT2R", NULL, "OUT2L" },
1826+
{ "OUT3 Mono Mux", "HPOUT3", "OUT3L" },
1827+
{ "OUT3 Mono Mux", "HPOUT4", "OUT3L" },
1828+
};
1829+
18201830
static int cs47l92_component_probe(struct snd_soc_component *component)
18211831
{
18221832
struct cs47l92 *cs47l92 = snd_soc_component_get_drvdata(component);
@@ -1833,7 +1843,9 @@ static int cs47l92_component_probe(struct snd_soc_component *component)
18331843
if (ret)
18341844
return ret;
18351845

1836-
ret = madera_init_outputs(component, CS47L92_MONO_OUTPUTS);
1846+
ret = madera_init_outputs(component, cs47l92_mono_routes,
1847+
ARRAY_SIZE(cs47l92_mono_routes),
1848+
CS47L92_MONO_OUTPUTS);
18371849
if (ret)
18381850
return ret;
18391851

sound/soc/codecs/madera.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,9 @@ static const struct snd_soc_dapm_route madera_mono_routes[] = {
11621162
{ "OUT6R", NULL, "OUT6L" },
11631163
};
11641164

1165-
int madera_init_outputs(struct snd_soc_component *component, int n_mono_routes)
1165+
int madera_init_outputs(struct snd_soc_component *component,
1166+
const struct snd_soc_dapm_route *routes,
1167+
int n_mono_routes, int n_real)
11661168
{
11671169
struct snd_soc_dapm_context *dapm =
11681170
snd_soc_component_get_dapm(component);
@@ -1179,16 +1181,21 @@ int madera_init_outputs(struct snd_soc_component *component, int n_mono_routes)
11791181
n_mono_routes = MADERA_MAX_OUTPUT;
11801182
}
11811183

1184+
if (!routes)
1185+
routes = madera_mono_routes;
1186+
11821187
for (i = 0; i < n_mono_routes; i++) {
11831188
/* Default is 0 so noop with defaults */
11841189
if (pdata->out_mono[i]) {
11851190
val = MADERA_OUT1_MONO;
1186-
snd_soc_dapm_add_routes(dapm,
1187-
&madera_mono_routes[i], 1);
1191+
snd_soc_dapm_add_routes(dapm, &routes[i], 1);
11881192
} else {
11891193
val = 0;
11901194
}
11911195

1196+
if (i >= n_real)
1197+
continue;
1198+
11921199
regmap_update_bits(madera->regmap,
11931200
MADERA_OUTPUT_PATH_CONFIG_1L + (i * 8),
11941201
MADERA_OUT1_MONO, val);

sound/soc/codecs/madera.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,9 @@ int madera_core_free(struct madera_priv *priv);
421421
int madera_init_overheat(struct madera_priv *priv);
422422
int madera_free_overheat(struct madera_priv *priv);
423423
int madera_init_inputs(struct snd_soc_component *component);
424-
int madera_init_outputs(struct snd_soc_component *component, int n_mono_routes);
424+
int madera_init_outputs(struct snd_soc_component *component,
425+
const struct snd_soc_dapm_route *routes,
426+
int n_mono_routes, int n_real);
425427
int madera_init_bus_error_irq(struct madera_priv *priv, int dsp_num,
426428
irq_handler_t handler);
427429
void madera_free_bus_error_irq(struct madera_priv *priv, int dsp_num);

0 commit comments

Comments
 (0)