mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
ASoC: Merge up fixes
Merge the for-6.14 to resolve conflicts with simple-card-utils.c due to parallel delveopment.
This commit is contained in:
commit
e0afd7d370
|
|
@ -1223,7 +1223,10 @@ void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
|
|||
|
||||
/* mixer control */
|
||||
struct soc_mixer_control {
|
||||
int min, max, platform_max;
|
||||
/* Minimum and maximum specified as written to the hardware */
|
||||
int min, max;
|
||||
/* Limited maximum value specified as presented through the control */
|
||||
int platform_max;
|
||||
int reg, rreg;
|
||||
unsigned int shift, rshift;
|
||||
u32 num_channels;
|
||||
|
|
|
|||
|
|
@ -248,6 +248,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21M6"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
|
|
|
|||
|
|
@ -1146,7 +1146,7 @@ static const struct snd_kcontrol_new cs42l43_controls[] = {
|
|||
|
||||
SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L43_ADC_B_CTRL1, CS42L43_ADC_B_CTRL2,
|
||||
CS42L43_ADC_PGA_GAIN_SHIFT,
|
||||
0xF, 5, cs42l43_adc_tlv),
|
||||
0xF, 4, cs42l43_adc_tlv),
|
||||
|
||||
SOC_DOUBLE("PDM1 Invert Switch", CS42L43_DMIC_PDM_CTRL,
|
||||
CS42L43_PDM1L_INV_SHIFT, CS42L43_PDM1R_INV_SHIFT, 1, 0),
|
||||
|
|
|
|||
|
|
@ -104,6 +104,10 @@ static int rt722_sdca_mbq_size(struct device *dev, unsigned int reg)
|
|||
case 0x6100067:
|
||||
case 0x6100070 ... 0x610007c:
|
||||
case 0x6100080:
|
||||
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
|
||||
CH_01) ...
|
||||
SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
|
||||
CH_04):
|
||||
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,
|
||||
CH_01):
|
||||
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ static int wm0010_spi_probe(struct spi_device *spi)
|
|||
if (ret) {
|
||||
dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n",
|
||||
irq, ret);
|
||||
return ret;
|
||||
goto free_irq;
|
||||
}
|
||||
|
||||
if (spi->max_speed_hz)
|
||||
|
|
@ -932,9 +932,18 @@ static int wm0010_spi_probe(struct spi_device *spi)
|
|||
&soc_component_dev_wm0010, wm0010_dai,
|
||||
ARRAY_SIZE(wm0010_dai));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto disable_irq_wake;
|
||||
|
||||
return 0;
|
||||
|
||||
disable_irq_wake:
|
||||
irq_set_irq_wake(wm0010->irq, 0);
|
||||
|
||||
free_irq:
|
||||
if (wm0010->irq)
|
||||
free_irq(wm0010->irq, wm0010);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void wm0010_spi_remove(struct spi_device *spi)
|
||||
|
|
|
|||
|
|
@ -1103,6 +1103,7 @@ int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
|
|||
struct snd_soc_dai_link_component *dlc, int *is_single_link)
|
||||
{
|
||||
struct device *dev = simple_priv_to_dev(priv);
|
||||
struct device_node *node;
|
||||
struct of_phandle_args args = {};
|
||||
struct snd_soc_dai *dai;
|
||||
int ret;
|
||||
|
|
@ -1110,7 +1111,7 @@ int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
|
|||
if (!ep)
|
||||
return 0;
|
||||
|
||||
struct device_node *node __free(device_node) = of_graph_get_port_parent(ep);
|
||||
node = of_graph_get_port_parent(ep);
|
||||
|
||||
/*
|
||||
* Try to find from DAI node
|
||||
|
|
@ -1153,8 +1154,10 @@ int graph_util_parse_dai(struct simple_util_priv *priv, struct device_node *ep,
|
|||
* if he unbinded CPU or Codec.
|
||||
*/
|
||||
ret = snd_soc_get_dlc(&args, dlc);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
of_node_put(node);
|
||||
goto end;
|
||||
}
|
||||
|
||||
parse_dai_end:
|
||||
if (is_single_link)
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
|
|||
if (ucontrol->value.integer.value[0] < 0)
|
||||
return -EINVAL;
|
||||
val = ucontrol->value.integer.value[0];
|
||||
if (mc->platform_max && ((int)val + min) > mc->platform_max)
|
||||
if (mc->platform_max && val > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (val > max - min)
|
||||
return -EINVAL;
|
||||
|
|
@ -338,7 +338,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
|
|||
if (ucontrol->value.integer.value[1] < 0)
|
||||
return -EINVAL;
|
||||
val2 = ucontrol->value.integer.value[1];
|
||||
if (mc->platform_max && ((int)val2 + min) > mc->platform_max)
|
||||
if (mc->platform_max && val2 > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (val2 > max - min)
|
||||
return -EINVAL;
|
||||
|
|
@ -491,17 +491,16 @@ int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol,
|
|||
{
|
||||
struct soc_mixer_control *mc =
|
||||
(struct soc_mixer_control *)kcontrol->private_value;
|
||||
int platform_max;
|
||||
int min = mc->min;
|
||||
int max;
|
||||
|
||||
if (!mc->platform_max)
|
||||
mc->platform_max = mc->max;
|
||||
platform_max = mc->platform_max;
|
||||
max = mc->max - mc->min;
|
||||
if (mc->platform_max && mc->platform_max < max)
|
||||
max = mc->platform_max;
|
||||
|
||||
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
|
||||
uinfo->count = snd_soc_volsw_is_stereo(mc) ? 2 : 1;
|
||||
uinfo->value.integer.min = 0;
|
||||
uinfo->value.integer.max = platform_max - min;
|
||||
uinfo->value.integer.max = max;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user