Skip to content

Commit

Permalink
Merge branch 'for-linus' into for-next
Browse files Browse the repository at this point in the history
Back-merge the 5.11 devel branch for further patching.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 2, 2021
2 parents 9119e56 + 4841b8e commit 5c953a2
Show file tree
Hide file tree
Showing 36 changed files with 261 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mediatek MT8192 with MT6359, RT1015 and RT5682 ASoC sound card driver

maintainers:
- Jiaxin Yu <[email protected]>
- Shane Chien <[email protected]>
- Jiaxin Yu <[email protected]>
- Shane Chien <[email protected]>

description:
This binding describes the MT8192 sound card.
Expand Down
12 changes: 10 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -14504,10 +14504,18 @@ S: Supported
F: drivers/crypto/qat/

QCOM AUDIO (ASoC) DRIVERS
M: Patrick Lai <plai@codeaurora.org>
M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
M: Banajit Goswami <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Supported
F: sound/soc/codecs/lpass-va-macro.c
F: sound/soc/codecs/lpass-wsa-macro.*
F: sound/soc/codecs/msm8916-wcd-analog.c
F: sound/soc/codecs/msm8916-wcd-digital.c
F: sound/soc/codecs/wcd9335.*
F: sound/soc/codecs/wcd934x.c
F: sound/soc/codecs/wcd-clsh-v2.*
F: sound/soc/codecs/wsa881x.c
F: sound/soc/qcom/

QCOM IPA DRIVER
Expand Down Expand Up @@ -16959,7 +16967,7 @@ M: Olivier Moysan <[email protected]>
M: Arnaud Pouliquen <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/sound/st,stm32-*.txt
F: Documentation/devicetree/bindings/iio/adc/st,stm32-*.yaml
F: sound/soc/stm/

STM32 TIMER/LPTIMER DRIVERS
Expand Down
7 changes: 3 additions & 4 deletions include/dt-bindings/sound/apq8016-lpass.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
#ifndef __DT_APQ8016_LPASS_H
#define __DT_APQ8016_LPASS_H

#define MI2S_PRIMARY 0
#define MI2S_SECONDARY 1
#define MI2S_TERTIARY 2
#define MI2S_QUATERNARY 3
#include <dt-bindings/sound/qcom,lpass.h>

/* NOTE: Use qcom,lpass.h to define any AIF ID's for LPASS */

#endif /* __DT_APQ8016_LPASS_H */
15 changes: 15 additions & 0 deletions include/dt-bindings/sound/qcom,lpass.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __DT_QCOM_LPASS_H
#define __DT_QCOM_LPASS_H

#define MI2S_PRIMARY 0
#define MI2S_SECONDARY 1
#define MI2S_TERTIARY 2
#define MI2S_QUATERNARY 3
#define MI2S_QUINARY 4

#define LPASS_DP_RX 5

#define LPASS_MCLK0 0

#endif /* __DT_QCOM_LPASS_H */
6 changes: 2 additions & 4 deletions include/dt-bindings/sound/sc7180-lpass.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
#ifndef __DT_SC7180_LPASS_H
#define __DT_SC7180_LPASS_H

#define MI2S_PRIMARY 0
#define MI2S_SECONDARY 1
#define LPASS_DP_RX 2
#include <dt-bindings/sound/qcom,lpass.h>

#define LPASS_MCLK0 0
/* NOTE: Use qcom,lpass.h to define any AIF ID's for LPASS */

#endif /* __DT_APQ8016_LPASS_H */
2 changes: 1 addition & 1 deletion include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ typedef int (*snd_pcm_hw_rule_func_t)(struct snd_pcm_hw_params *params,
struct snd_pcm_hw_rule {
unsigned int cond;
int var;
int deps[4];
int deps[5];

snd_pcm_hw_rule_func_t func;
void *private;
Expand Down
4 changes: 2 additions & 2 deletions sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ static int constrain_params_by_rules(struct snd_pcm_substream *substream,
continue;

/*
* The 'deps' array includes maximum three dependencies
* to SNDRV_PCM_HW_PARAM_XXXs for this rule. The fourth
* The 'deps' array includes maximum four dependencies
* to SNDRV_PCM_HW_PARAM_XXXs for this rule. The fifth
* member of this array is a sentinel and should be
* negative value.
*
Expand Down
4 changes: 4 additions & 0 deletions sound/hda/intel-dsp-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ static const struct config_entry config_table[] = {
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0xa0c8,
},
{
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC_OR_SOUNDWIRE,
.device = 0x43c8,
},
#endif

/* Elkhart Lake */
Expand Down
24 changes: 7 additions & 17 deletions sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2934,7 +2934,7 @@ static void hda_call_codec_resume(struct hda_codec *codec)
snd_hdac_leave_pm(&codec->core);
}

static int hda_codec_suspend(struct device *dev)
static int hda_codec_runtime_suspend(struct device *dev)
{
struct hda_codec *codec = dev_to_hda_codec(dev);
unsigned int state;
Expand All @@ -2953,7 +2953,7 @@ static int hda_codec_suspend(struct device *dev)
return 0;
}

static int hda_codec_resume(struct device *dev)
static int hda_codec_runtime_resume(struct device *dev)
{
struct hda_codec *codec = dev_to_hda_codec(dev);

Expand All @@ -2968,16 +2968,6 @@ static int hda_codec_resume(struct device *dev)
return 0;
}

static int hda_codec_runtime_suspend(struct device *dev)
{
return hda_codec_suspend(dev);
}

static int hda_codec_runtime_resume(struct device *dev)
{
return hda_codec_resume(dev);
}

#endif /* CONFIG_PM */

#ifdef CONFIG_PM_SLEEP
Expand All @@ -2998,31 +2988,31 @@ static void hda_codec_pm_complete(struct device *dev)
static int hda_codec_pm_suspend(struct device *dev)
{
dev->power.power_state = PMSG_SUSPEND;
return hda_codec_suspend(dev);
return pm_runtime_force_suspend(dev);
}

static int hda_codec_pm_resume(struct device *dev)
{
dev->power.power_state = PMSG_RESUME;
return hda_codec_resume(dev);
return pm_runtime_force_resume(dev);
}

static int hda_codec_pm_freeze(struct device *dev)
{
dev->power.power_state = PMSG_FREEZE;
return hda_codec_suspend(dev);
return pm_runtime_force_suspend(dev);
}

static int hda_codec_pm_thaw(struct device *dev)
{
dev->power.power_state = PMSG_THAW;
return hda_codec_resume(dev);
return pm_runtime_force_resume(dev);
}

static int hda_codec_pm_restore(struct device *dev)
{
dev->power.power_state = PMSG_RESTORE;
return hda_codec_resume(dev);
return pm_runtime_force_resume(dev);
}
#endif /* CONFIG_PM_SLEEP */

Expand Down
12 changes: 12 additions & 0 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,7 @@ enum {
ALC889_FIXUP_FRONT_HP_NO_PRESENCE,
ALC889_FIXUP_VAIO_TT,
ALC888_FIXUP_EEE1601,
ALC886_FIXUP_EAPD,
ALC882_FIXUP_EAPD,
ALC883_FIXUP_EAPD,
ALC883_FIXUP_ACER_EAPD,
Expand Down Expand Up @@ -2238,6 +2239,15 @@ static const struct hda_fixup alc882_fixups[] = {
{ }
}
},
[ALC886_FIXUP_EAPD] = {
.type = HDA_FIXUP_VERBS,
.v.verbs = (const struct hda_verb[]) {
/* change to EAPD mode */
{ 0x20, AC_VERB_SET_COEF_INDEX, 0x07 },
{ 0x20, AC_VERB_SET_PROC_COEF, 0x0068 },
{ }
}
},
[ALC882_FIXUP_EAPD] = {
.type = HDA_FIXUP_VERBS,
.v.verbs = (const struct hda_verb[]) {
Expand Down Expand Up @@ -2510,6 +2520,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
SND_PCI_QUIRK(0x106b, 0x4a00, "Macbook 5,2", ALC889_FIXUP_MBA11_VREF),

SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC882_FIXUP_EAPD),
SND_PCI_QUIRK(0x13fe, 0x1009, "Advantech MIT-W101", ALC886_FIXUP_EAPD),
SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte EP45-DS3/Z87X-UD3H", ALC889_FIXUP_FRONT_HP_NO_PRESENCE),
SND_PCI_QUIRK(0x1458, 0xa0b8, "Gigabyte AZ370-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
SND_PCI_QUIRK(0x1458, 0xa0cd, "Gigabyte X570 Aorus Master", ALC1220_FIXUP_CLEVO_P950),
Expand Down Expand Up @@ -8006,6 +8017,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x18f1, "Asus FX505DT", ALC256_FIXUP_ASUS_HEADSET_MIC),
SND_PCI_QUIRK(0x1043, 0x194e, "ASUS UX563FD", ALC294_FIXUP_ASUS_HPE),
SND_PCI_QUIRK(0x1043, 0x1982, "ASUS B1400CEPE", ALC256_FIXUP_ASUS_HPE),
SND_PCI_QUIRK(0x1043, 0x19ce, "ASUS B9450FA", ALC294_FIXUP_ASUS_HPE),
SND_PCI_QUIRK(0x1043, 0x19e1, "ASUS UX581LV", ALC295_FIXUP_ASUS_MIC_NO_PRESENCE),
SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ static const struct hda_fixup via_fixups[] = {
static const struct snd_pci_quirk vt2002p_fixups[] = {
SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75),
SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
SND_PCI_QUIRK(0x1558, 0x3501, "Clevo W35xSS_370SS", VIA_FIXUP_POWER_SAVE),
SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", VIA_FIXUP_POWER_SAVE),
{}
};

Expand Down
18 changes: 16 additions & 2 deletions sound/soc/amd/renoir/rn-pci-acp3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,24 @@ static int rn_acp_deinit(void __iomem *acp_base)

static const struct dmi_system_id rn_acp_quirk_table[] = {
{
/* Lenovo IdeaPad Flex 5 14ARE05, IdeaPad 5 15ARE05 */
/* Lenovo IdeaPad S340-14API */
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "LNVNB161216"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "81NB"),
}
},
{
/* Lenovo IdeaPad Flex 5 14ARE05 */
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "81X2"),
}
},
{
/* Lenovo IdeaPad 5 15ARE05 */
.matches = {
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "81YQ"),
}
},
{
Expand Down
22 changes: 7 additions & 15 deletions sound/soc/codecs/ak4458.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,18 +595,10 @@ static struct snd_soc_dai_driver ak4497_dai = {
.ops = &ak4458_dai_ops,
};

static void ak4458_power_off(struct ak4458_priv *ak4458)
static void ak4458_reset(struct ak4458_priv *ak4458, bool active)
{
if (ak4458->reset_gpiod) {
gpiod_set_value_cansleep(ak4458->reset_gpiod, 0);
usleep_range(1000, 2000);
}
}

static void ak4458_power_on(struct ak4458_priv *ak4458)
{
if (ak4458->reset_gpiod) {
gpiod_set_value_cansleep(ak4458->reset_gpiod, 1);
gpiod_set_value_cansleep(ak4458->reset_gpiod, active);
usleep_range(1000, 2000);
}
}
Expand All @@ -620,7 +612,7 @@ static int ak4458_init(struct snd_soc_component *component)
if (ak4458->mute_gpiod)
gpiod_set_value_cansleep(ak4458->mute_gpiod, 1);

ak4458_power_on(ak4458);
ak4458_reset(ak4458, false);

ret = snd_soc_component_update_bits(component, AK4458_00_CONTROL1,
0x80, 0x80); /* ACKS bit = 1; 10000000 */
Expand Down Expand Up @@ -650,7 +642,7 @@ static void ak4458_remove(struct snd_soc_component *component)
{
struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component);

ak4458_power_off(ak4458);
ak4458_reset(ak4458, true);
}

#ifdef CONFIG_PM
Expand All @@ -660,7 +652,7 @@ static int __maybe_unused ak4458_runtime_suspend(struct device *dev)

regcache_cache_only(ak4458->regmap, true);

ak4458_power_off(ak4458);
ak4458_reset(ak4458, true);

if (ak4458->mute_gpiod)
gpiod_set_value_cansleep(ak4458->mute_gpiod, 0);
Expand All @@ -685,8 +677,8 @@ static int __maybe_unused ak4458_runtime_resume(struct device *dev)
if (ak4458->mute_gpiod)
gpiod_set_value_cansleep(ak4458->mute_gpiod, 1);

ak4458_power_off(ak4458);
ak4458_power_on(ak4458);
ak4458_reset(ak4458, true);
ak4458_reset(ak4458, false);

regcache_cache_only(ak4458->regmap, false);
regcache_mark_dirty(ak4458->regmap);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/hdmi-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component,
void *data)
{
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
int ret = -EOPNOTSUPP;
int ret = -ENOTSUPP;

if (hcp->hcd.ops->hook_plugged_cb) {
hcp->jack = jack;
Expand Down
3 changes: 3 additions & 0 deletions sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2031,11 +2031,14 @@ static struct wm_coeff_ctl *wm_adsp_get_ctl(struct wm_adsp *dsp,
unsigned int alg)
{
struct wm_coeff_ctl *pos, *rslt = NULL;
const char *fw_txt = wm_adsp_fw_text[dsp->fw];

list_for_each_entry(pos, &dsp->ctl_list, list) {
if (!pos->subname)
continue;
if (strncmp(pos->subname, name, pos->subname_len) == 0 &&
strncmp(pos->fw_name, fw_txt,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == 0 &&
pos->alg_region.alg == alg &&
pos->alg_region.type == type) {
rslt = pos;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/fsl/imx-hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int imx_hdmi_init(struct snd_soc_pcm_runtime *rtd)
}

ret = snd_soc_component_set_jack(component, &data->hdmi_jack, NULL);
if (ret && ret != -EOPNOTSUPP) {
if (ret && ret != -ENOTSUPP) {
dev_err(card->dev, "Can't set HDMI Jack %d\n", ret);
return ret;
}
Expand Down
10 changes: 10 additions & 0 deletions sound/soc/intel/boards/sof_sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
.driver_data = (void *)(SOF_RT711_JD_SRC_JD2 |
SOF_RT715_DAI_ID_FIX),
},
{
.callback = sof_sdw_quirk_cb,
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"),
DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0A5E")
},
.driver_data = (void *)(SOF_RT711_JD_SRC_JD2 |
SOF_RT715_DAI_ID_FIX |
SOF_SDW_FOUR_SPK),
},
{
.callback = sof_sdw_quirk_cb,
.matches = {
Expand Down
15 changes: 8 additions & 7 deletions sound/soc/intel/skylake/skl-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -3619,19 +3619,20 @@ static void skl_tplg_complete(struct snd_soc_component *component)

list_for_each_entry(dobj, &component->dobj_list, list) {
struct snd_kcontrol *kcontrol = dobj->control.kcontrol;
struct soc_enum *se =
(struct soc_enum *)kcontrol->private_value;
char **texts = dobj->control.dtexts;
struct soc_enum *se;
char **texts;
char chan_text[4];

if (dobj->type != SND_SOC_DOBJ_ENUM ||
dobj->control.kcontrol->put !=
skl_tplg_multi_config_set_dmic)
if (dobj->type != SND_SOC_DOBJ_ENUM || !kcontrol ||
kcontrol->put != skl_tplg_multi_config_set_dmic)
continue;

se = (struct soc_enum *)kcontrol->private_value;
texts = dobj->control.dtexts;
sprintf(chan_text, "c%d", mach->mach_params.dmic_num);

for (i = 0; i < se->items; i++) {
struct snd_ctl_elem_value val;
struct snd_ctl_elem_value val = {};

if (strstr(texts[i], chan_text)) {
val.value.enumerated.item[0] = i;
Expand Down
Loading

0 comments on commit 5c953a2

Please sign in to comment.