Skip to content

Commit e0afd7d

Browse files
committed
ASoC: Merge up fixes
Merge the for-6.14 to resolve conflicts with simple-card-utils.c due to parallel delveopment.
2 parents f0066c8 + de74ec7 commit e0afd7d

File tree

7 files changed

+39
-14
lines changed

7 files changed

+39
-14
lines changed

include/sound/soc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,10 @@ void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
12231223

12241224
/* mixer control */
12251225
struct soc_mixer_control {
1226-
int min, max, platform_max;
1226+
/* Minimum and maximum specified as written to the hardware */
1227+
int min, max;
1228+
/* Limited maximum value specified as presented through the control */
1229+
int platform_max;
12271230
int reg, rreg;
12281231
unsigned int shift, rshift;
12291232
u32 num_channels;

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
248248
DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
249249
}
250250
},
251+
{
252+
.driver_data = &acp6x_card,
253+
.matches = {
254+
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
255+
DMI_MATCH(DMI_PRODUCT_NAME, "21M6"),
256+
}
257+
},
251258
{
252259
.driver_data = &acp6x_card,
253260
.matches = {

sound/soc/codecs/cs42l43.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ static const struct snd_kcontrol_new cs42l43_controls[] = {
11461146

11471147
SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L43_ADC_B_CTRL1, CS42L43_ADC_B_CTRL2,
11481148
CS42L43_ADC_PGA_GAIN_SHIFT,
1149-
0xF, 5, cs42l43_adc_tlv),
1149+
0xF, 4, cs42l43_adc_tlv),
11501150

11511151
SOC_DOUBLE("PDM1 Invert Switch", CS42L43_DMIC_PDM_CTRL,
11521152
CS42L43_PDM1L_INV_SHIFT, CS42L43_PDM1R_INV_SHIFT, 1, 0),

sound/soc/codecs/rt722-sdca-sdw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ static int rt722_sdca_mbq_size(struct device *dev, unsigned int reg)
104104
case 0x6100067:
105105
case 0x6100070 ... 0x610007c:
106106
case 0x6100080:
107+
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
108+
CH_01) ...
109+
SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
110+
CH_04):
107111
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,
108112
CH_01):
109113
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,

sound/soc/codecs/wm0010.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ static int wm0010_spi_probe(struct spi_device *spi)
920920
if (ret) {
921921
dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n",
922922
irq, ret);
923-
return ret;
923+
goto free_irq;
924924
}
925925

926926
if (spi->max_speed_hz)
@@ -932,9 +932,18 @@ static int wm0010_spi_probe(struct spi_device *spi)
932932
&soc_component_dev_wm0010, wm0010_dai,
933933
ARRAY_SIZE(wm0010_dai));
934934
if (ret < 0)
935-
return ret;
935+
goto disable_irq_wake;
936936

937937
return 0;
938+
939+
disable_irq_wake:
940+
irq_set_irq_wake(wm0010->irq, 0);
941+
942+
free_irq:
943+
if (wm0010->irq)
944+
free_irq(wm0010->irq, wm0010);
945+
946+
return ret;
938947
}
939948

940949
static void wm0010_spi_remove(struct spi_device *spi)

sound/soc/generic/simple-card-utils.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,14 +1103,15 @@ int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
11031103
struct snd_soc_dai_link_component *dlc, int *is_single_link)
11041104
{
11051105
struct device *dev = simple_priv_to_dev(priv);
1106+
struct device_node *node;
11061107
struct of_phandle_args args = {};
11071108
struct snd_soc_dai *dai;
11081109
int ret;
11091110

11101111
if (!ep)
11111112
return 0;
11121113

1113-
struct device_node *node __free(device_node) = of_graph_get_port_parent(ep);
1114+
node = of_graph_get_port_parent(ep);
11141115

11151116
/*
11161117
* Try to find from DAI node
@@ -1153,8 +1154,10 @@ int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
11531154
* if he unbinded CPU or Codec.
11541155
*/
11551156
ret = snd_soc_get_dlc(&args, dlc);
1156-
if (ret < 0)
1157+
if (ret < 0) {
1158+
of_node_put(node);
11571159
goto end;
1160+
}
11581161

11591162
parse_dai_end:
11601163
if (is_single_link)

sound/soc/soc-ops.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
325325
if (ucontrol->value.integer.value[0] < 0)
326326
return -EINVAL;
327327
val = ucontrol->value.integer.value[0];
328-
if (mc->platform_max && ((int)val + min) > mc->platform_max)
328+
if (mc->platform_max && val > mc->platform_max)
329329
return -EINVAL;
330330
if (val > max - min)
331331
return -EINVAL;
@@ -338,7 +338,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
338338
if (ucontrol->value.integer.value[1] < 0)
339339
return -EINVAL;
340340
val2 = ucontrol->value.integer.value[1];
341-
if (mc->platform_max && ((int)val2 + min) > mc->platform_max)
341+
if (mc->platform_max && val2 > mc->platform_max)
342342
return -EINVAL;
343343
if (val2 > max - min)
344344
return -EINVAL;
@@ -491,17 +491,16 @@ int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol,
491491
{
492492
struct soc_mixer_control *mc =
493493
(struct soc_mixer_control *)kcontrol->private_value;
494-
int platform_max;
495-
int min = mc->min;
494+
int max;
496495

497-
if (!mc->platform_max)
498-
mc->platform_max = mc->max;
499-
platform_max = mc->platform_max;
496+
max = mc->max - mc->min;
497+
if (mc->platform_max && mc->platform_max < max)
498+
max = mc->platform_max;
500499

501500
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
502501
uinfo->count = snd_soc_volsw_is_stereo(mc) ? 2 : 1;
503502
uinfo->value.integer.min = 0;
504-
uinfo->value.integer.max = platform_max - min;
503+
uinfo->value.integer.max = max;
505504

506505
return 0;
507506
}

0 commit comments

Comments
 (0)