Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c512b19 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits)
  ALSA: hda - Fix jack-detection control of VT1708
  ALSA: hda - cut and paste typo in cs420x_models[]
  ALSA: hda/realtek - Minor cleanup
  ALSA: hda/realtek - Fix missing inits of item indices for auto-mic
  ALSA: hda - Fix invalid pin and GPIO for Apple laptops with CS codecs
  ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config()
  ALSA: hda - fail ELD reading early
  ALSA: lx6464es - fix device communication via command bus
  ALSA: lx6464es - command buffer API cleanup
  ALSA: hda - repoll ELD content for multiple times
  ALSA: hdspm - Fix PCI ID for PCIe RME MADI cards
  ASoC: Ensure WM8731 register cache is synced when resuming from disabled
  ALSA: cs5535 - Fix an endianness conversion
  ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls
  ASoC: wm_hubs: fix DB_RANGE size
  ASoC: wm9090: fix DB_RANGE size
  ASoC: wm8993: fix DB_RANGE size
  ASoC: wm8962: fix DB_RANGE size
  ASoC: sgtl5000: fix DB_RANGE size
  ASoC: rt5631: fix DB_RANGE size
  ...
parents c28800a9 f339240d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5667,7 +5667,6 @@ F: drivers/media/video/*7146*
F:	include/media/*7146*

SAMSUNG AUDIO (ASoC) DRIVERS
M:	Jassi Brar <jassisinghbrar@gmail.com>
M:	Sangbeom Kim <sbkim73@samsung.com>
L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
S:	Supported
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
		struct cs5535audio_dma_desc *desc =
			&((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i];
		desc->addr = cpu_to_le32(addr);
		desc->size = cpu_to_le32(period_bytes);
		desc->size = cpu_to_le16(period_bytes);
		desc->ctlreserved = cpu_to_le16(PRD_EOP);
		desc_addr += sizeof(struct cs5535audio_dma_desc);
		addr += period_bytes;
+3 −3
Original line number Diff line number Diff line
@@ -4046,9 +4046,9 @@ int snd_hda_check_board_codec_sid_config(struct hda_codec *codec,

	/* Search for codec ID */
	for (q = tbl; q->subvendor; q++) {
		unsigned long vendorid = (q->subdevice) | (q->subvendor << 16);

		if (vendorid == codec->subsystem_id)
		unsigned int mask = 0xffff0000 | q->subdevice_mask;
		unsigned int id = (q->subdevice | (q->subvendor << 16)) & mask;
		if ((codec->subsystem_id & mask) == id)
			break;
	}

+19 −9
Original line number Diff line number Diff line
@@ -347,18 +347,28 @@ int snd_hdmi_get_eld(struct hdmi_eld *eld,

	for (i = 0; i < size; i++) {
		unsigned int val = hdmi_get_eld_data(codec, nid, i);
		/*
		 * Graphics driver might be writing to ELD buffer right now.
		 * Just abort. The caller will repoll after a while.
		 */
		if (!(val & AC_ELDD_ELD_VALID)) {
			if (!i) {
			snd_printd(KERN_INFO
					   "HDMI: invalid ELD data\n");
				  "HDMI: invalid ELD data byte %d\n", i);
			ret = -EINVAL;
			goto error;
		}
			snd_printd(KERN_INFO
				  "HDMI: invalid ELD data byte %d\n", i);
			val = 0;
		} else
		val &= AC_ELDD_ELD_DATA;
		/*
		 * The first byte cannot be zero. This can happen on some DVI
		 * connections. Some Intel chips may also need some 250ms delay
		 * to return non-zero ELD data, even when the graphics driver
		 * correctly writes ELD content before setting ELD_valid bit.
		 */
		if (!val && !i) {
			snd_printdd(KERN_INFO "HDMI: 0 ELD data\n");
			ret = -EINVAL;
			goto error;
		}
		buf[i] = val;
	}

+23 −9
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ struct cs_spec {
	unsigned int gpio_mask;
	unsigned int gpio_dir;
	unsigned int gpio_data;
	unsigned int gpio_eapd_hp; /* EAPD GPIO bit for headphones */
	unsigned int gpio_eapd_speaker; /* EAPD GPIO bit for speakers */

	struct hda_pcm pcm_rec[2];	/* PCM information */

@@ -76,6 +78,7 @@ enum {
	CS420X_MBP53,
	CS420X_MBP55,
	CS420X_IMAC27,
	CS420X_APPLE,
	CS420X_AUTO,
	CS420X_MODELS
};
@@ -928,10 +931,9 @@ static void cs_automute(struct hda_codec *codec)
					spdif_present ? 0 : PIN_OUT);
		}
	}
	if (spec->board_config == CS420X_MBP53 ||
	    spec->board_config == CS420X_MBP55 ||
	    spec->board_config == CS420X_IMAC27) {
		unsigned int gpio = hp_present ? 0x02 : 0x08;
	if (spec->gpio_eapd_hp) {
		unsigned int gpio = hp_present ?
			spec->gpio_eapd_hp : spec->gpio_eapd_speaker;
		snd_hda_codec_write(codec, 0x01, 0,
				    AC_VERB_SET_GPIO_DATA, gpio);
	}
@@ -1276,6 +1278,7 @@ static const char * const cs420x_models[CS420X_MODELS] = {
	[CS420X_MBP53] = "mbp53",
	[CS420X_MBP55] = "mbp55",
	[CS420X_IMAC27] = "imac27",
	[CS420X_APPLE] = "apple",
	[CS420X_AUTO] = "auto",
};

@@ -1285,7 +1288,13 @@ static const struct snd_pci_quirk cs420x_cfg_tbl[] = {
	SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55),
	SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
	SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55),
	SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),
	/* this conflicts with too many other models */
	/*SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),*/
	{} /* terminator */
};

static const struct snd_pci_quirk cs420x_codec_cfg_tbl[] = {
	SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE),
	{} /* terminator */
};

@@ -1367,6 +1376,10 @@ static int patch_cs420x(struct hda_codec *codec)
	spec->board_config =
		snd_hda_check_board_config(codec, CS420X_MODELS,
					   cs420x_models, cs420x_cfg_tbl);
	if (spec->board_config < 0)
		spec->board_config =
			snd_hda_check_board_codec_sid_config(codec,
				CS420X_MODELS, NULL, cs420x_codec_cfg_tbl);
	if (spec->board_config >= 0)
		fix_pincfg(codec, spec->board_config, cs_pincfgs);

@@ -1374,10 +1387,11 @@ static int patch_cs420x(struct hda_codec *codec)
	case CS420X_IMAC27:
	case CS420X_MBP53:
	case CS420X_MBP55:
		/* GPIO1 = headphones */
		/* GPIO3 = speakers */
		spec->gpio_mask = 0x0a;
		spec->gpio_dir = 0x0a;
	case CS420X_APPLE:
		spec->gpio_eapd_hp = 2; /* GPIO1 = headphones */
		spec->gpio_eapd_speaker = 8; /* GPIO3 = speakers */
		spec->gpio_mask = spec->gpio_dir =
			spec->gpio_eapd_hp | spec->gpio_eapd_speaker;
		break;
	}

Loading