Skip to contentSkip to conversation

sound fixes for 5.10-rc7

GIT PULL Merged Takashi Iwai 2 participants 2 messages Dec 2, 2020

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

Linus,

please pull sound fixes for v5.10-rc7 from:

git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-5.10-rc7

The topmost commit is aeedad2504997be262c98f6e3228173225a8d868

----------------------------------------------------------------

sound fixes for 5.10-rc7

Here are the pending sound fixes for 5.10: all small device-specific fixes, and nothing particular stands out, so far.

----------------------------------------------------------------

Hans de Goede (1):
ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks

Hector Martin (1):
ALSA: usb-audio: US16x08: fix value count for level meters

Jian-Hong Pan (1):
ALSA: hda/realtek: Enable headset of ASUS UX482EG & B9400CEA with ALC294

Kailang Yang (2):
ALSA: hda/realtek - Fixed Dell AIO wrong sound tone
ALSA: hda/realtek - Add new codec supported for ALC897

Luo Meng (1):
ASoC: wm_adsp: fix error return code in wm_adsp_load()

Shuming Fan (1):
ASoC: rt5682: change SAR voltage threshold

Srinivasa Rao Mandadapu (1):
ASoC: qcom: Fix enabling BCLK and LRCLK in LPAIF invalid state

Takashi Iwai (3):
ALSA: hda/generic: Add option to enforce preferred_dacs pairs
ALSA: hda/realtek: Fix bass speaker DAC assignment on Asus Zephyrus G14
ALSA: hda/realtek: Add mute LED quirk to yet another HP x360 model

---
 sound/pci/hda/hda_generic.c           | 12 ++++--
 sound/pci/hda/hda_generic.h           |  1 +
 sound/pci/hda/patch_realtek.c         | 72 ++++++++++++++++++++++++++++++++---
 sound/soc/codecs/rt5682.c             |  1 +
 sound/soc/codecs/wm_adsp.c            |  1 +
 sound/soc/intel/boards/bytcr_rt5640.c | 17 +++++++--
 sound/soc/qcom/lpass-cpu.c            | 62 +++++++++++++++---------------
 sound/soc/qcom/lpass-lpaif-reg.h      |  7 ++++
 sound/soc/qcom/lpass-platform.c       | 20 +++++++++-
 sound/soc/qcom/lpass.h                |  1 +
 sound/usb/mixer_us16x08.c             |  2 +-
 11 files changed, 149 insertions(+), 47 deletions(-)
sound/pci/hda/hda_generic.c +8 -4
index bbb17481159e..8060cc86dfea 100644
@@ -1364,16 +1364,20 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs,
 		struct nid_path *path;
 		hda_nid_t pin = pins[i];
 
-		path = snd_hda_get_path_from_idx(codec, path_idx[i]);
-		if (path) {
-			badness += assign_out_path_ctls(codec, path);
-			continue;
+		if (!spec->obey_preferred_dacs) {
+			path = snd_hda_get_path_from_idx(codec, path_idx[i]);
+			if (path) {
+				badness += assign_out_path_ctls(codec, path);
+				continue;
+			}
 		}
 
 		dacs[i] = get_preferred_dac(codec, pin);
 		if (dacs[i]) {
 			if (is_dac_already_used(codec, dacs[i]))
 				badness += bad->shared_primary;
+		} else if (spec->obey_preferred_dacs) {
+			badness += BAD_NO_PRIMARY_DAC;
 		}
 
 		if (!dacs[i])
sound/pci/hda/hda_generic.h +1 -0
index a43f0bb77dae..0886bc81f40b 100644
@@ -237,6 +237,7 @@ struct hda_gen_spec {
 	unsigned int power_down_unused:1; /* power down unused widgets */
 	unsigned int dac_min_mute:1; /* minimal = mute for DACs */
 	unsigned int suppress_vmaster:1; /* don't create vmaster kctls */
+	unsigned int obey_preferred_dacs:1; /* obey preferred_dacs assignment */
 
 	/* other internal flags */
 	unsigned int no_analog:1; /* digital I/O only */
sound/pci/hda/patch_realtek.c +66 -6

168 lines not on this page · raw message

sound/soc/codecs/rt5682.c +1 -0
index a9acce7b6cca..d9878173ff89 100644
@@ -43,6 +43,7 @@ static const struct reg_sequence patch_list[] = {
 	{RT5682_DAC_ADC_DIG_VOL1, 0xa020},
 	{RT5682_I2C_CTRL, 0x000f},
 	{RT5682_PLL2_INTERNAL, 0x8266},
+	{RT5682_SAR_IL_CMD_3, 0x8365},
 };
 
 void rt5682_apply_patch_list(struct rt5682_priv *rt5682, struct device *dev)
sound/soc/codecs/wm_adsp.c +1 -0
index bcf18bf15a02..e61d00486c65 100644
@@ -1937,6 +1937,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)
 			mem = wm_adsp_find_region(dsp, type);
 			if (!mem) {
 				adsp_err(dsp, "No region of type: %x\n", type);
+				ret = -EINVAL;
 				goto out_fw;
 			}
 
sound/soc/intel/boards/bytcr_rt5640.c +14 -3
index 9dadf6561444..f790514a147d 100644
@@ -520,10 +520,10 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 		.driver_data = (void *)(BYT_RT5640_IN1_MAP |
 					BYT_RT5640_MCLK_EN),
 	},
-	{	/* HP Pavilion x2 10-n000nd */
+	{	/* HP Pavilion x2 10-k0XX, 10-n0XX */
 		.matches = {
-			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-			DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"),
+			DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"),
 		},
 		.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
 					BYT_RT5640_JD_SRC_JD2_IN4N |
@@ -532,6 +532,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
 					BYT_RT5640_SSP0_AIF1 |
 					BYT_RT5640_MCLK_EN),
 	},
+	{	/* HP Pavilion x2 10-p0XX */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "HP x2 Detachable 10-p0XX"),
+		},
+		.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+					BYT_RT5640_JD_SRC_JD1_IN4P |
+					BYT_RT5640_OVCD_TH_1500UA |
+					BYT_RT5640_OVCD_SF_0P75 |
+					BYT_RT5640_MCLK_EN),
+	},
 	{	/* HP Stream 7 */
 		.matches = {
 			DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
sound/soc/qcom/lpass-cpu.c +31 -31

112 lines not on this page · raw message

sound/soc/qcom/lpass-lpaif-reg.h +7 -0
index 08f3fe508b85..405542832e99 100644
@@ -60,6 +60,13 @@
 #define LPAIF_I2SCTL_BITWIDTH_24	1
 #define LPAIF_I2SCTL_BITWIDTH_32	2
 
+#define LPAIF_BIT_CLK_DISABLE		0
+#define LPAIF_BIT_CLK_ENABLE		1
+
+#define LPAIF_I2SCTL_RESET_STATE	0x003C0004
+#define LPAIF_DMACTL_RESET_STATE	0x00200000
+
+
 /* LPAIF IRQ */
 #define LPAIF_IRQ_REG_ADDR(v, addr, port) \
 	(v->irq_reg_base + (addr) + v->irq_reg_stride * (port))
sound/soc/qcom/lpass-platform.c +18 -2
index 7a3fdf89968a..80b09dede5f9 100644
@@ -110,6 +110,7 @@ static int lpass_platform_pcmops_open(struct snd_soc_component *component,
 	struct regmap *map;
 	unsigned int dai_id = cpu_dai->driver->id;
 
+	component->id = dai_id;
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
 	if (!data)
 		return -ENOMEM;
@@ -451,19 +452,34 @@ static int lpass_platform_pcmops_trigger(struct snd_soc_component *component,
 	unsigned int reg_irqclr = 0, val_irqclr = 0;
 	unsigned int  reg_irqen = 0, val_irqen = 0, val_mask = 0;
 	unsigned int dai_id = cpu_dai->driver->id;
+	unsigned int dma_ctrl_reg = 0;
 
 	ch = pcm_data->dma_ch;
 	if (dir ==  SNDRV_PCM_STREAM_PLAYBACK) {
 		id = pcm_data->dma_ch;
-		if (dai_id == LPASS_DP_RX)
+		if (dai_id == LPASS_DP_RX) {
 			dmactl = drvdata->hdmi_rd_dmactl;
-		else
+			map = drvdata->hdmiif_map;
+		} else {
 			dmactl = drvdata->rd_dmactl;
+			map = drvdata->lpaif_map;
+		}
 	} else {
 		dmactl = drvdata->wr_dmactl;
 		id = pcm_data->dma_ch - v->wrdma_channel_start;
+		map = drvdata->lpaif_map;
+	}
+	ret = regmap_read(map, LPAIF_DMACTL_REG(v, ch, dir, dai_id), &dma_ctrl_reg);
+	if (ret) {
+		dev_err(soc_runtime->dev, "error reading from rdmactl reg: %d\n", ret);
+		return ret;
 	}
 
+	if (dma_ctrl_reg == LPAIF_DMACTL_RESET_STATE ||
+		dma_ctrl_reg == LPAIF_DMACTL_RESET_STATE + 1) {
+		dev_err(soc_runtime->dev, "error in rdmactl register state\n");
+		return -ENOTRECOVERABLE;
+	}
 	switch (cmd) {
 	case SNDRV_PCM_TRIGGER_START:
 	case SNDRV_PCM_TRIGGER_RESUME:
sound/soc/qcom/lpass.h +1 -0
index b4830f353796..bccd1a05d771 100644
@@ -68,6 +68,7 @@ struct lpass_data {
 	unsigned int mi2s_playback_sd_mode[LPASS_MAX_MI2S_PORTS];
 	unsigned int mi2s_capture_sd_mode[LPASS_MAX_MI2S_PORTS];
 	int hdmi_port_enable;
+	int bit_clk_state[LPASS_MAX_MI2S_PORTS];
 
 	/* low-power audio interface (LPAIF) registers */
 	void __iomem *lpaif;
sound/usb/mixer_us16x08.c +1 -1
index 92b1a6d9c931..bd63a9ce6a70 100644
@@ -607,7 +607,7 @@ static int snd_us16x08_eq_put(struct snd_kcontrol *kcontrol,
 static int snd_us16x08_meter_info(struct snd_kcontrol *kcontrol,
 	struct snd_ctl_elem_info *uinfo)
 {
-	uinfo->count = 1;
+	uinfo->count = 34;
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
 	uinfo->value.integer.max = 0x7FFF;
 	uinfo->value.integer.min = 0;
merge bot Merged
#1 lore raw
The pull request you sent on Wed, 02 Dec 2020 10:07:14 +0100:

The pull request you sent on Wed, 02 Dec 2020 10:07:14 +0100:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-5.10-rc7

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/bb95d60783f1ac85883c7ae33cafa85236b6179e

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html