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

Commit ec351832 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound fixes from Takashi Iwai:
 "Significant changes are:
   - A regression fix for the new HD-audio LPIB delay counting,
     VGA-switcheroo race fix
   - ASoC ams-delta fix for the broken driver loading

  Otherwise a collection of mostly small / trivial fixes."

* tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: emu10k1: add chip details for E-mu 1010 PCIe card
  ALSA: hda - Always check array bounds in alc_get_line_out_pfx
  ASoC: bells: Correct typo in sub speaker DAI name for WM5110
  ALSA: hda - Stop LPIB delay counting on broken hardware
  ALSA: hda - Fix registration race of VGA switcheroo
  ALSA: hda - Clean up superfluous position_fix list entries
  ALSA: ac97 - Fix missing NULL check in snd_ac97_cvol_new()
  ASoC: codecs: da9055: Minor improvement in ALC calibration process
  ASoC: dmaengine: Correct Makefile when sound is built as module
  ASoC: fsi: don't reschedule DMA from an atomic context
  ASoC: fix documentation in soc-jack
  ARM: pxa: Fix build error caused by sram.h rename
  ASoC: wm2200: Fix non-inverted OUT2 mute control
  ASoC: wm2200: Use rev A register patches on rev B
  ASoC: bells: Correct typo in sub speaker DAI name for WM5110
  ASoC: ams-delta: Convert to use snd_soc_register_card()
  ASoC: omap-mcpdm: Remove OMAP revision check
  ASoC: Fix wrong include for McPDM
  ASoC: omap-abe-twl6040: Fix typo of Vibrator
  ASoC: twl6040: Fix Stream DAPM mapping
parents 43c422ed 10f571d0
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = {
	.lclk_khz_max	= 1334,		/* results in 5fps CIF, 10fps QCIF */
};

static struct platform_device ams_delta_audio_device = {
	.name   = "ams-delta-audio",
	.id     = -1,
};

static struct platform_device cx20442_codec_device = {
	.name   = "cx20442-codec",
	.id     = -1,
};

static struct platform_device *ams_delta_devices[] __initdata = {
	&latch1_gpio_device,
	&latch2_gpio_device,
	&ams_delta_kp_device,
	&ams_delta_camera_device,
	&ams_delta_audio_device,
};

static struct platform_device *late_devices[] __initdata = {
	&ams_delta_nand_device,
	&ams_delta_lcd_device,
	&cx20442_codec_device,
};

static void __init ams_delta_init(void)
+2 −0
Original line number Diff line number Diff line
@@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigne
		tmp.index = ac97->num;
		kctl = snd_ctl_new1(&tmp, ac97);
	}
	if (!kctl)
		return -ENOMEM;
	if (reg >= AC97_PHONE && reg <= AC97_PCM)
		set_tlv_db_scale(kctl, db_scale_5bit_12db_max);
	else
+9 −0
Original line number Diff line number Diff line
@@ -1416,6 +1416,15 @@ static struct snd_emu_chip_details emu_chip_details[] = {
	 .ca0108_chip = 1,
	 .spk71 = 1,
	 .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */
	/* Tested by Maxim Kachur <mcdebugger@duganet.ru> 17th Oct 2012. */
	/* This is MAEM8986, 0202 is MAEM8980 */
	{.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102,
	 .driver = "Audigy2", .name = "E-mu 1010 PCIe [MAEM8986]",
	 .id = "EMU1010",
	 .emu10k2_chip = 1,
	 .ca0108_chip = 1,
	 .spk71 = 1,
	 .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 PCIe */
	/* Tested by James@superbug.co.uk 8th July 2005. */
	/* This is MAEM8810, 0202 is MAEM8820 */
	{.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102,
+26 −16
Original line number Diff line number Diff line
@@ -501,6 +501,7 @@ struct azx {

	/* VGA-switcheroo setup */
	unsigned int use_vga_switcheroo:1;
	unsigned int vga_switcheroo_registered:1;
	unsigned int init_failed:1; /* delayed init failed */
	unsigned int disabled:1; /* disabled by VGA-switcher */

@@ -2157,9 +2158,12 @@ static unsigned int azx_get_position(struct azx *chip,
		if (delay < 0)
			delay += azx_dev->bufsize;
		if (delay >= azx_dev->period_bytes) {
			snd_printdd("delay %d > period_bytes %d\n",
			snd_printk(KERN_WARNING SFX
				   "Unstable LPIB (%d >= %d); "
				   "disabling LPIB delay counting\n",
				   delay, azx_dev->period_bytes);
			delay = 0; /* something is wrong */
			delay = 0;
			chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY;
		}
		azx_dev->substream->runtime->delay =
			bytes_to_frames(azx_dev->substream->runtime, delay);
@@ -2640,7 +2644,9 @@ static void azx_vs_set_state(struct pci_dev *pci,
		if (disabled) {
			azx_suspend(&pci->dev);
			chip->disabled = true;
			snd_hda_lock_devices(chip->bus);
			if (snd_hda_lock_devices(chip->bus))
				snd_printk(KERN_WARNING SFX
					   "Cannot lock devices!\n");
		} else {
			snd_hda_unlock_devices(chip->bus);
			chip->disabled = false;
@@ -2683,14 +2689,20 @@ static const struct vga_switcheroo_client_ops azx_vs_ops = {

static int __devinit register_vga_switcheroo(struct azx *chip)
{
	int err;

	if (!chip->use_vga_switcheroo)
		return 0;
	/* FIXME: currently only handling DIS controller
	 * is there any machine with two switchable HDMI audio controllers?
	 */
	return vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops,
	err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops,
						    VGA_SWITCHEROO_DIS,
						    chip->bus != NULL);
	if (err < 0)
		return err;
	chip->vga_switcheroo_registered = 1;
	return 0;
}
#else
#define init_vga_switcheroo(chip)		/* NOP */
@@ -2712,6 +2724,7 @@ static int azx_free(struct azx *chip)
	if (use_vga_switcheroo(chip)) {
		if (chip->disabled && chip->bus)
			snd_hda_unlock_devices(chip->bus);
		if (chip->vga_switcheroo_registered)
			vga_switcheroo_unregister_client(chip->pci);
	}

@@ -2813,8 +2826,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = {
	SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
	SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB),
	SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB),
	SND_PCI_QUIRK(0x1043, 0x1ac3, "ASUS X53S", POS_FIX_POSBUF),
	SND_PCI_QUIRK(0x1043, 0x1b43, "ASUS K53E", POS_FIX_POSBUF),
	SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB),
	SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB),
	SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB),
@@ -3062,14 +3073,6 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
	}

 ok:
	err = register_vga_switcheroo(chip);
	if (err < 0) {
		snd_printk(KERN_ERR SFX
			   "Error registering VGA-switcheroo client\n");
		azx_free(chip);
		return err;
	}

	err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
	if (err < 0) {
		snd_printk(KERN_ERR SFX "Error creating device [card]!\n");
@@ -3340,6 +3343,13 @@ static int __devinit azx_probe(struct pci_dev *pci,
	if (pci_dev_run_wake(pci))
		pm_runtime_put_noidle(&pci->dev);

	err = register_vga_switcheroo(chip);
	if (err < 0) {
		snd_printk(KERN_ERR SFX
			   "Error registering VGA-switcheroo client\n");
		goto out_free;
	}

	dev++;
	return 0;

+3 −1
Original line number Diff line number Diff line
@@ -2598,8 +2598,10 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch,
			return "PCM";
		break;
	}
	if (snd_BUG_ON(ch >= ARRAY_SIZE(channel_name)))
	if (ch >= ARRAY_SIZE(channel_name)) {
		snd_BUG();
		return "PCM";
	}

	return channel_name[ch];
}
Loading