Skip to contentSkip to conversation

sound fixes for 4.4-final

GIT PULL Takashi Iwai 1 participant 1 message Jan 8, 2016

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

Linus,

please pull sound fixes for v4.4-final from:

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

The topmost commit is 3f37b26f8d57756b591383a9d8ce1cd628bc773c

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

sound fixes for 4.4

A slightly higher volume than a new year's wish, but not too
worrisome: a large LOC is only for HD-audio device-specific quirks, so fairly safe to apply. The rest ASoC fixes are all trivial and small; a simple replacement of mutex call with nested lock version, a few Arizona and Realtek codec fixes, and a regression fix for Skylake firmware handling.

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

Bard Liao (1):
ASoC: rt5645: add sys clk detection

Charles Keepax (1):
ASoC: Use nested lock for snd_soc_dapm_mutex_lock

Hui Wang (1):
ALSA: hda - Add keycode map for alc input device

Kailang (1):
ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO

Nikesh Oswal (1):
ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz

Vinod Koul (2):
ASoC: Intel: Skylake: Revert previous broken fix memory leak fix
ASoC: Intel: Skylake: Fix the memory leak

---
 include/sound/soc.h                    |   2 +-
 sound/pci/hda/patch_realtek.c          | 101 ++++++++++++++++++++++++++++-----
 sound/soc/codecs/arizona.c             |   2 +-
 sound/soc/codecs/rt5645.c              |   4 ++
 sound/soc/codecs/rt5645.h              |   4 ++
 sound/soc/intel/skylake/skl-topology.c |   3 +-
 sound/soc/intel/skylake/skl.c          |   4 ++
 sound/soc/intel/skylake/skl.h          |   2 +
 8 files changed, 104 insertions(+), 18 deletions(-)
include/sound/soc.h +1 -1
index a8b4b9c8b1d2..fb955e69a78e 100644
@@ -1655,7 +1655,7 @@ extern const struct dev_pm_ops snd_soc_pm_ops;
 /* Helper functions */
 static inline void snd_soc_dapm_mutex_lock(struct snd_soc_dapm_context *dapm)
 {
-	mutex_lock(&dapm->card->dapm_mutex);
+	mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
 }
 
 static inline void snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
sound/pci/hda/patch_realtek.c +86 -15

154 lines not on this page · raw message

sound/soc/codecs/arizona.c +1 -1
index b3ea24d64c50..93b400800905 100644
@@ -1537,7 +1537,7 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
 	bool reconfig;
 	unsigned int aif_tx_state, aif_rx_state;
 
-	if (params_rate(params) % 8000)
+	if (params_rate(params) % 4000)
 		rates = &arizona_44k1_bclk_rates[0];
 	else
 		rates = &arizona_48k_bclk_rates[0];
sound/soc/codecs/rt5645.c +4 -0
index ef76940f9dcb..3e3c7f6be29d 100644
@@ -1667,9 +1667,13 @@ static int rt5645_spk_event(struct snd_soc_dapm_widget *w,
 			RT5645_PWR_CLS_D_L,
 			RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |
 			RT5645_PWR_CLS_D_L);
+		snd_soc_update_bits(codec, RT5645_GEN_CTRL3,
+			RT5645_DET_CLK_MASK, RT5645_DET_CLK_MODE1);
 		break;
 
 	case SND_SOC_DAPM_PRE_PMD:
+		snd_soc_update_bits(codec, RT5645_GEN_CTRL3,
+			RT5645_DET_CLK_MASK, RT5645_DET_CLK_DIS);
 		snd_soc_write(codec, RT5645_EQ_CTRL2, 0);
 		snd_soc_update_bits(codec, RT5645_PWR_DIG1,
 			RT5645_PWR_CLS_D | RT5645_PWR_CLS_D_R |
sound/soc/codecs/rt5645.h +4 -0
index 093e46d559fb..205e0715c99a 100644
@@ -2122,6 +2122,10 @@ enum {
 /* General Control3 (0xfc) */
 #define RT5645_JD_PSV_MODE			(0x1 << 12)
 #define RT5645_IRQ_CLK_GATE_CTRL		(0x1 << 11)
+#define RT5645_DET_CLK_MASK			(0x3 << 9)
+#define RT5645_DET_CLK_DIS			(0x0 << 9)
+#define RT5645_DET_CLK_MODE1			(0x1 << 9)
+#define RT5645_DET_CLK_MODE2			(0x2 << 9)
 #define RT5645_MICINDET_MANU			(0x1 << 7)
 #define RT5645_RING2_SLEEVE_GND			(0x1 << 5)
 
sound/soc/intel/skylake/skl-topology.c +2 -1
index ffea427aeca8..ad4d0f82603e 100644
@@ -1240,7 +1240,6 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
 	 */
 	ret = snd_soc_tplg_component_load(&platform->component,
 					&skl_tplg_ops, fw, 0);
-	release_firmware(fw);
 	if (ret < 0) {
 		dev_err(bus->dev, "tplg component load failed%d\n", ret);
 		return -EINVAL;
@@ -1249,5 +1248,7 @@ int skl_tplg_init(struct snd_soc_platform *platform, struct hdac_ext_bus *ebus)
 	skl->resource.max_mcps = SKL_MAX_MCPS;
 	skl->resource.max_mem = SKL_FW_MAX_MEM;
 
+	skl->tplg = fw;
+
 	return 0;
 }
sound/soc/intel/skylake/skl.c +4 -0
index 5319529aedf7..caa69c4598a6 100644
@@ -25,6 +25,7 @@
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <linux/platform_device.h>
+#include <linux/firmware.h>
 #include <sound/pcm.h>
 #include "skl.h"
 
@@ -520,6 +521,9 @@ static void skl_remove(struct pci_dev *pci)
 	struct hdac_ext_bus *ebus = pci_get_drvdata(pci);
 	struct skl *skl = ebus_to_skl(ebus);
 
+	if (skl->tplg)
+		release_firmware(skl->tplg);
+
 	if (pci_dev_run_wake(pci))
 		pm_runtime_get_noresume(&pci->dev);
 	pci_dev_put(pci);
sound/soc/intel/skylake/skl.h +2 -0
index dd2e79ae45a8..a0709e344d44 100644
@@ -68,6 +68,8 @@ struct skl {
 	struct skl_dsp_resource resource;
 	struct list_head ppl_list;
 	struct list_head dapm_path_list;
+
+	const struct firmware *tplg;
 };
 
 #define skl_to_ebus(s)	(&(s)->ebus)