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

Commit e862f2e4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
sound fixes #2 for 3.3-rc3

A collection of small fixes, mostly for regressions.
In addition, a few ASoC wm8994 updates are included, too.

* tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: wm8994: Disable line output discharge prior to ramping VMID
  ASoC: wm8994: Fix typo in VMID ramp setting
  ALSA: oxygen, virtuoso: fix exchanged L/R volumes of aux and CD inputs
  ALSA: usb-audio: add Edirol UM-3G support
  ALSA: hda - add support for Uniwill ECS M31EI notebook
  ALSA: hda - Fix error handling in patch_ca0132.c
  ASoC: wm8994: Enabling VMID should take a runtime PM reference
  ALSA: hda/realtek - Fix a wrong condition
  ALSA: emu8000: Remove duplicate linux/moduleparam.h include from emu8000_patch.c
  ALSA: hda/realtek - Add missing Bass and CLFE as vmaster slaves
  ASoC: wm_hubs: Correct line input to line output 2 paths
  ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
  ASoC: wm8962: Fix word length configuration
  ASoC: core: Better support for idle_bias_off suspend ignores
  ASoC: wm8994: Remove ASoC level register cache sync
  ASoC: wm_hubs: Fix routing of input PGAs to line output mixer
parents 98e96852 982d411c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include "emu8000_local.h"
#include <asm/uaccess.h>
#include <linux/moduleparam.h>
#include <linux/moduleparam.h>

static int emu8000_reset_addr;
module_param(emu8000_reset_addr, int, 0444);
+19 −14
Original line number Diff line number Diff line
@@ -728,18 +728,19 @@ static int ca0132_hp_switch_put(struct snd_kcontrol *kcontrol,

	err = chipio_read(codec, REG_CODEC_MUTE, &data);
	if (err < 0)
		return err;
		goto exit;

	/* *valp 0 is mute, 1 is unmute */
	data = (data & 0x7f) | (*valp ? 0 : 0x80);
	chipio_write(codec, REG_CODEC_MUTE, data);
	err = chipio_write(codec, REG_CODEC_MUTE, data);
	if (err < 0)
		return err;
		goto exit;

	spec->curr_hp_switch = *valp;

 exit:
	snd_hda_power_down(codec);
	return 1;
	return err < 0 ? err : 1;
}

static int ca0132_speaker_switch_get(struct snd_kcontrol *kcontrol,
@@ -770,18 +771,19 @@ static int ca0132_speaker_switch_put(struct snd_kcontrol *kcontrol,

	err = chipio_read(codec, REG_CODEC_MUTE, &data);
	if (err < 0)
		return err;
		goto exit;

	/* *valp 0 is mute, 1 is unmute */
	data = (data & 0xef) | (*valp ? 0 : 0x10);
	chipio_write(codec, REG_CODEC_MUTE, data);
	err = chipio_write(codec, REG_CODEC_MUTE, data);
	if (err < 0)
		return err;
		goto exit;

	spec->curr_speaker_switch = *valp;

 exit:
	snd_hda_power_down(codec);
	return 1;
	return err < 0 ? err : 1;
}

static int ca0132_hp_volume_get(struct snd_kcontrol *kcontrol,
@@ -819,25 +821,26 @@ static int ca0132_hp_volume_put(struct snd_kcontrol *kcontrol,

	err = chipio_read(codec, REG_CODEC_HP_VOL_L, &data);
	if (err < 0)
		return err;
		goto exit;

	val = 31 - left_vol;
	data = (data & 0xe0) | val;
	chipio_write(codec, REG_CODEC_HP_VOL_L, data);
	err = chipio_write(codec, REG_CODEC_HP_VOL_L, data);
	if (err < 0)
		return err;
		goto exit;

	val = 31 - right_vol;
	data = (data & 0xe0) | val;
	chipio_write(codec, REG_CODEC_HP_VOL_R, data);
	err = chipio_write(codec, REG_CODEC_HP_VOL_R, data);
	if (err < 0)
		return err;
		goto exit;

	spec->curr_hp_volume[0] = left_vol;
	spec->curr_hp_volume[1] = right_vol;

 exit:
	snd_hda_power_down(codec);
	return 1;
	return err < 0 ? err : 1;
}

static int add_hp_switch(struct hda_codec *codec, hda_nid_t nid)
@@ -936,6 +939,8 @@ static int ca0132_build_controls(struct hda_codec *codec)
		if (err < 0)
			return err;
		err = add_in_volume(codec, spec->dig_in, "IEC958");
		if (err < 0)
			return err;
	}
	return 0;
}
+6 −1
Original line number Diff line number Diff line
@@ -1855,6 +1855,8 @@ static const char * const alc_slave_vols[] = {
	"Speaker Playback Volume",
	"Mono Playback Volume",
	"Line-Out Playback Volume",
	"CLFE Playback Volume",
	"Bass Speaker Playback Volume",
	"PCM Playback Volume",
	NULL,
};
@@ -1870,6 +1872,8 @@ static const char * const alc_slave_sws[] = {
	"Mono Playback Switch",
	"IEC958 Playback Switch",
	"Line-Out Playback Switch",
	"CLFE Playback Switch",
	"Bass Speaker Playback Switch",
	"PCM Playback Switch",
	NULL,
};
@@ -2318,7 +2322,7 @@ static int alc_build_pcms(struct hda_codec *codec)
		 "%s Analog", codec->chip_name);
	info->name = spec->stream_name_analog;

	if (spec->multiout.dac_nids > 0) {
	if (spec->multiout.num_dacs > 0) {
		p = spec->stream_analog_playback;
		if (!p)
			p = &alc_pcm_analog_playback;
@@ -5623,6 +5627,7 @@ static const struct alc_fixup alc861_fixups[] = {

static const struct snd_pci_quirk alc861_fixup_tbl[] = {
	SND_PCI_QUIRK_VENDOR(0x1043, "ASUS laptop", PINFIX_ASUS_A6RP),
	SND_PCI_QUIRK(0x1584, 0x0000, "Uniwill ECS M31EI", PINFIX_ASUS_A6RP),	
	SND_PCI_QUIRK(0x1584, 0x2b01, "Haier W18", PINFIX_ASUS_A6RP),
	SND_PCI_QUIRK(0x1734, 0x10c7, "FSC Amilo Pi1505", PINFIX_FSC_AMILO_PI1505),
	{}
+14 −11
Original line number Diff line number Diff line
@@ -618,9 +618,12 @@ static int ac97_volume_get(struct snd_kcontrol *ctl,
	mutex_lock(&chip->mutex);
	reg = oxygen_read_ac97(chip, codec, index);
	mutex_unlock(&chip->mutex);
	if (!stereo) {
		value->value.integer.value[0] = 31 - (reg & 0x1f);
	if (stereo)
		value->value.integer.value[1] = 31 - ((reg >> 8) & 0x1f);
	} else {
		value->value.integer.value[0] = 31 - ((reg >> 8) & 0x1f);
		value->value.integer.value[1] = 31 - (reg & 0x1f);
	}
	return 0;
}

@@ -636,14 +639,14 @@ static int ac97_volume_put(struct snd_kcontrol *ctl,

	mutex_lock(&chip->mutex);
	oldreg = oxygen_read_ac97(chip, codec, index);
	newreg = oldreg;
	newreg = (newreg & ~0x1f) |
		(31 - (value->value.integer.value[0] & 0x1f));
	if (stereo)
		newreg = (newreg & ~0x1f00) |
			((31 - (value->value.integer.value[1] & 0x1f)) << 8);
	else
		newreg = (newreg & ~0x1f00) | ((newreg & 0x1f) << 8);
	if (!stereo) {
		newreg = oldreg & ~0x1f;
		newreg |= 31 - (value->value.integer.value[0] & 0x1f);
	} else {
		newreg = oldreg & ~0x1f1f;
		newreg |= (31 - (value->value.integer.value[0] & 0x1f)) << 8;
		newreg |= 31 - (value->value.integer.value[1] & 0x1f);
	}
	change = newreg != oldreg;
	if (change)
		oxygen_write_ac97(chip, codec, index, newreg);
+1 −1
Original line number Diff line number Diff line
@@ -1113,7 +1113,7 @@ static int cs42l73_pcm_hw_params(struct snd_pcm_substream *substream,
		priv->config[id].mmcc &= 0xC0;
		priv->config[id].mmcc |= cs42l73_mclk_coeffs[mclk_coeff].mmcc;
		priv->config[id].spc &= 0xFC;
		priv->config[id].spc &= MCK_SCLK_64FS;
		priv->config[id].spc |= MCK_SCLK_MCLK;
	} else {
		/* CS42L73 Slave */
		priv->config[id].spc &= 0xFC;
Loading