ASoC: Fixes for v5.18
A larger collection of fixes than I'd like, mainly because mixer-test is making it's way into the CI systems and turning up issues on a wider range of systems. The most substantial thing though is a revert and an alternative fix for a dmaengine issue where the fix caused disruption for some other configurations, the core fix is backed out an a driver specific thing done instead. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmJqduYACgkQJNaLcl1U h9BpLQf+Il8MGBeIsS5j4WVqOeoQLaptRQKWSTtLm7HJIs0Npbc8eulArMea7OrH gYB0EGhIPowkVWy2SdPv6QVH8U9DlokF22Y3W/DVjaZzYqAN4mWHcWEeGdGVDH4i gvjny3lXaoSKHyDUGNyomo1JbF1g7hBCT9Ph30Kcq6h62BVjcZzOmcu2xSN4RCEi OmA0XF7jfubXqCZqoXuxrCcltSpFhz2zmqq7ieR1Kog5YWgNWWGUjns+U4dpkdVI iGtmOO5v/umGWTc/zXsNBLBiG3mQV8G7+OI7SkgaylFhuNcUoiu6bAt0m+meFroM d8Wj9wwizxHuzuF16hwJYPacR4KTvg== =FTRS -----END PGP SIGNATURE----- Merge tag 'asoc-fix-v5.18-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.18 A larger collection of fixes than I'd like, mainly because mixer-test is making it's way into the CI systems and turning up issues on a wider range of systems. The most substantial thing though is a revert and an alternative fix for a dmaengine issue where the fix caused disruption for some other configurations, the core fix is backed out an a driver specific thing done instead.
This commit is contained in:
Коммит
ac02e3cd5a
|
@ -966,6 +966,7 @@ static int mchp_pdmc_process(struct snd_pcm_substream *substream,
|
|||
|
||||
static struct snd_dmaengine_pcm_config mchp_pdmc_config = {
|
||||
.process = mchp_pdmc_process,
|
||||
.prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config,
|
||||
};
|
||||
|
||||
static int mchp_pdmc_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -446,7 +446,7 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
|
|||
struct soc_mixer_control *mixer_ctrl =
|
||||
(struct soc_mixer_control *) kcontrol->private_value;
|
||||
unsigned int reg = mixer_ctrl->reg;
|
||||
__le16 val;
|
||||
__le16 val_new, val_old;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
|
@ -454,13 +454,19 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol,
|
|||
* Therefore we need to convert to little endian here to align with
|
||||
* HW registers.
|
||||
*/
|
||||
val = cpu_to_le16(ucontrol->value.integer.value[0]);
|
||||
val_new = cpu_to_le16(ucontrol->value.integer.value[0]);
|
||||
|
||||
mutex_lock(&da7219->ctrl_lock);
|
||||
ret = regmap_raw_write(da7219->regmap, reg, &val, sizeof(val));
|
||||
ret = regmap_raw_read(da7219->regmap, reg, &val_old, sizeof(val_old));
|
||||
if (ret == 0 && (val_old != val_new))
|
||||
ret = regmap_raw_write(da7219->regmap, reg,
|
||||
&val_new, sizeof(val_new));
|
||||
mutex_unlock(&da7219->ctrl_lock);
|
||||
|
||||
return ret;
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return val_old != val_new;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -413,6 +413,9 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
|
|||
|
||||
val = (val >> mc->shift) & mask;
|
||||
|
||||
if (sel < 0 || sel > mc->max)
|
||||
return -EINVAL;
|
||||
|
||||
*select = sel;
|
||||
|
||||
/* Setting a volume is only valid if it is already On */
|
||||
|
@ -427,7 +430,7 @@ static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
|
|||
mask << mc->shift,
|
||||
sel << mc->shift);
|
||||
|
||||
return 0;
|
||||
return *select != val;
|
||||
}
|
||||
|
||||
static const char *max98090_perf_pwr_text[] =
|
||||
|
|
|
@ -341,7 +341,6 @@ static int rt9120_get_reg_size(unsigned int reg)
|
|||
{
|
||||
switch (reg) {
|
||||
case 0x00:
|
||||
case 0x09:
|
||||
case 0x20 ... 0x27:
|
||||
return 2;
|
||||
case 0x30 ... 0x3D:
|
||||
|
|
|
@ -530,7 +530,7 @@ static int wm8958_mbc_put(struct snd_kcontrol *kcontrol,
|
|||
|
||||
wm8958_dsp_apply(component, mbc, wm8994->mbc_ena[mbc]);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define WM8958_MBC_SWITCH(xname, xval) {\
|
||||
|
@ -656,7 +656,7 @@ static int wm8958_vss_put(struct snd_kcontrol *kcontrol,
|
|||
|
||||
wm8958_dsp_apply(component, vss, wm8994->vss_ena[vss]);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -730,7 +730,7 @@ static int wm8958_hpf_put(struct snd_kcontrol *kcontrol,
|
|||
|
||||
wm8958_dsp_apply(component, hpf % 3, ucontrol->value.integer.value[0]);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define WM8958_HPF_SWITCH(xname, xval) {\
|
||||
|
@ -824,7 +824,7 @@ static int wm8958_enh_eq_put(struct snd_kcontrol *kcontrol,
|
|||
|
||||
wm8958_dsp_apply(component, eq, ucontrol->value.integer.value[0]);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define WM8958_ENH_EQ_SWITCH(xname, xval) {\
|
||||
|
|
|
@ -322,7 +322,7 @@ void asoc_simple_shutdown(struct snd_pcm_substream *substream)
|
|||
|
||||
if (props->mclk_fs && !dai->clk_fixed && !snd_soc_dai_active(cpu_dai))
|
||||
snd_soc_dai_set_sysclk(cpu_dai,
|
||||
0, 0, SND_SOC_CLOCK_IN);
|
||||
0, 0, SND_SOC_CLOCK_OUT);
|
||||
|
||||
asoc_simple_clk_disable(dai);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ static int aiu_acodec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
|
|||
|
||||
snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static SOC_ENUM_SINGLE_DECL(aiu_acodec_ctrl_mux_enum, AIU_ACODEC_CTRL,
|
||||
|
|
|
@ -57,7 +57,7 @@ static int aiu_codec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol,
|
|||
|
||||
snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static SOC_ENUM_SINGLE_DECL(aiu_hdmi_ctrl_mux_enum, AIU_HDMI_CLK_DATA_CTRL,
|
||||
|
|
|
@ -320,7 +320,6 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np,
|
|||
|
||||
dai_link->cpus = cpu;
|
||||
dai_link->num_cpus = 1;
|
||||
dai_link->nonatomic = true;
|
||||
|
||||
ret = meson_card_parse_dai(card, np, &dai_link->cpus->of_node,
|
||||
&dai_link->cpus->dai_name);
|
||||
|
|
|
@ -351,29 +351,13 @@ static int axg_tdm_iface_hw_free(struct snd_pcm_substream *substream,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int axg_tdm_iface_trigger(struct snd_pcm_substream *substream,
|
||||
int cmd,
|
||||
static int axg_tdm_iface_prepare(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *dai)
|
||||
{
|
||||
struct axg_tdm_stream *ts =
|
||||
snd_soc_dai_get_dma_data(dai, substream);
|
||||
struct axg_tdm_stream *ts = snd_soc_dai_get_dma_data(dai, substream);
|
||||
|
||||
switch (cmd) {
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
case SNDRV_PCM_TRIGGER_RESUME:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
axg_tdm_stream_start(ts);
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
axg_tdm_stream_stop(ts);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
/* Force all attached formatters to update */
|
||||
return axg_tdm_stream_reset(ts);
|
||||
}
|
||||
|
||||
static int axg_tdm_iface_remove_dai(struct snd_soc_dai *dai)
|
||||
|
@ -413,8 +397,8 @@ static const struct snd_soc_dai_ops axg_tdm_iface_ops = {
|
|||
.set_fmt = axg_tdm_iface_set_fmt,
|
||||
.startup = axg_tdm_iface_startup,
|
||||
.hw_params = axg_tdm_iface_hw_params,
|
||||
.prepare = axg_tdm_iface_prepare,
|
||||
.hw_free = axg_tdm_iface_hw_free,
|
||||
.trigger = axg_tdm_iface_trigger,
|
||||
};
|
||||
|
||||
/* TDM Backend DAIs */
|
||||
|
|
|
@ -67,7 +67,7 @@ static int g12a_tohdmitx_i2s_mux_put_enum(struct snd_kcontrol *kcontrol,
|
|||
|
||||
snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static SOC_ENUM_SINGLE_DECL(g12a_tohdmitx_i2s_mux_enum, TOHDMITX_CTRL0,
|
||||
|
|
|
@ -86,10 +86,10 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component,
|
|||
|
||||
memset(&slave_config, 0, sizeof(slave_config));
|
||||
|
||||
if (pcm->config && pcm->config->prepare_slave_config)
|
||||
prepare_slave_config = pcm->config->prepare_slave_config;
|
||||
else
|
||||
if (!pcm->config)
|
||||
prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config;
|
||||
else
|
||||
prepare_slave_config = pcm->config->prepare_slave_config;
|
||||
|
||||
if (prepare_slave_config) {
|
||||
int ret = prepare_slave_config(substream, params, &slave_config);
|
||||
|
|
|
@ -461,7 +461,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
|
|||
ret = err;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_put_volsw_sx);
|
||||
|
||||
|
@ -519,7 +519,15 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
|
|||
unsigned int mask = (1 << fls(max)) - 1;
|
||||
unsigned int invert = mc->invert;
|
||||
unsigned int val, val_mask;
|
||||
int err, ret;
|
||||
int err, ret, tmp;
|
||||
|
||||
tmp = ucontrol->value.integer.value[0];
|
||||
if (tmp < 0)
|
||||
return -EINVAL;
|
||||
if (mc->platform_max && tmp > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (tmp > mc->max - mc->min + 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (invert)
|
||||
val = (max - ucontrol->value.integer.value[0]) & mask;
|
||||
|
@ -534,6 +542,14 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,
|
|||
ret = err;
|
||||
|
||||
if (snd_soc_volsw_is_stereo(mc)) {
|
||||
tmp = ucontrol->value.integer.value[1];
|
||||
if (tmp < 0)
|
||||
return -EINVAL;
|
||||
if (mc->platform_max && tmp > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (tmp > mc->max - mc->min + 1)
|
||||
return -EINVAL;
|
||||
|
||||
if (invert)
|
||||
val = (max - ucontrol->value.integer.value[1]) & mask;
|
||||
else
|
||||
|
|
|
@ -153,6 +153,11 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
|
|||
|
||||
dev_dbg(&pci->dev, "PCI DSP detected");
|
||||
|
||||
if (!desc) {
|
||||
dev_err(dev, "error: no matching PCI descriptor\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (!desc->ops) {
|
||||
dev_err(dev, "error: no matching PCI descriptor ops\n");
|
||||
return -ENODEV;
|
||||
|
|
Загрузка…
Ссылка в новой задаче