Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287335
b: refs/heads/master
c: 1ecd3c7
h: refs/heads/master
i:
  287333: abb0ca7
  287331: 27df306
  287327: 6ec08d5
v: v3
  • Loading branch information
Xi Wang authored and Linus Torvalds committed Feb 9, 2012
1 parent feedcc9 commit 947e41e
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 77 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e862f2e4693f287669e84971c778bf071bd0526b
refs/heads/master: 1ecd3c7ea76488c63b4b0a2561fd7eaf96cc8028
2 changes: 2 additions & 0 deletions trunk/fs/nilfs2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,8 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
nsegs = argv[4].v_nmembs;
if (argv[4].v_size != argsz[4])
goto out;
if (nsegs > UINT_MAX / sizeof(__u64))
goto out;

/*
* argv[4] points to segment numbers this ioctl cleans. We
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/isa/sb/emu8000_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#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);
Expand Down
33 changes: 14 additions & 19 deletions trunk/sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,19 +728,18 @@ static int ca0132_hp_switch_put(struct snd_kcontrol *kcontrol,

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

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

spec->curr_hp_switch = *valp;

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

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

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

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

spec->curr_speaker_switch = *valp;

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

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

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

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

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

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

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

static int add_hp_switch(struct hda_codec *codec, hda_nid_t nid)
Expand Down Expand Up @@ -939,8 +936,6 @@ 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;
}
Expand Down
7 changes: 1 addition & 6 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1855,8 +1855,6 @@ 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,
};
Expand All @@ -1872,8 +1870,6 @@ 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,
};
Expand Down Expand Up @@ -2322,7 +2318,7 @@ static int alc_build_pcms(struct hda_codec *codec)
"%s Analog", codec->chip_name);
info->name = spec->stream_name_analog;

if (spec->multiout.num_dacs > 0) {
if (spec->multiout.dac_nids > 0) {
p = spec->stream_analog_playback;
if (!p)
p = &alc_pcm_analog_playback;
Expand Down Expand Up @@ -5627,7 +5623,6 @@ 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),
{}
Expand Down
25 changes: 11 additions & 14 deletions trunk/sound/pci/oxygen/oxygen_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,12 +618,9 @@ 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);
} else {
value->value.integer.value[0] = 31 - ((reg >> 8) & 0x1f);
value->value.integer.value[1] = 31 - (reg & 0x1f);
}
value->value.integer.value[0] = 31 - (reg & 0x1f);
if (stereo)
value->value.integer.value[1] = 31 - ((reg >> 8) & 0x1f);
return 0;
}

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

mutex_lock(&chip->mutex);
oldreg = oxygen_read_ac97(chip, codec, index);
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);
}
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);
change = newreg != oldreg;
if (change)
oxygen_write_ac97(chip, codec, index, newreg);
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/cs42l73.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_MCLK;
priv->config[id].spc &= MCK_SCLK_64FS;
} else {
/* CS42L73 Slave */
priv->config[id].spc &= 0xFC;
Expand Down
6 changes: 3 additions & 3 deletions trunk/sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -3159,13 +3159,13 @@ static int wm8962_hw_params(struct snd_pcm_substream *substream,
case SNDRV_PCM_FORMAT_S16_LE:
break;
case SNDRV_PCM_FORMAT_S20_3LE:
aif0 |= 0x4;
aif0 |= 0x40;
break;
case SNDRV_PCM_FORMAT_S24_LE:
aif0 |= 0x8;
aif0 |= 0x80;
break;
case SNDRV_PCM_FORMAT_S32_LE:
aif0 |= 0xc;
aif0 |= 0xc0;
break;
default:
return -EINVAL;
Expand Down
16 changes: 6 additions & 10 deletions trunk/sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,6 @@ static void vmid_reference(struct snd_soc_codec *codec)
{
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);

pm_runtime_get_sync(codec->dev);

wm8994->vmid_refcount++;

dev_dbg(codec->dev, "Referencing VMID, refcount is now %d\n",
Expand All @@ -785,12 +783,7 @@ static void vmid_reference(struct snd_soc_codec *codec)
WM8994_VMID_RAMP_MASK,
WM8994_STARTUP_BIAS_ENA |
WM8994_VMID_BUF_ENA |
(0x3 << WM8994_VMID_RAMP_SHIFT));

/* Remove discharge for line out */
snd_soc_update_bits(codec, WM8994_ANTIPOP_1,
WM8994_LINEOUT1_DISCH |
WM8994_LINEOUT2_DISCH, 0);
(0x11 << WM8994_VMID_RAMP_SHIFT));

/* Main bias enable, VMID=2x40k */
snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_1,
Expand Down Expand Up @@ -844,8 +837,6 @@ static void vmid_dereference(struct snd_soc_codec *codec)
WM8994_VMID_BUF_ENA |
WM8994_VMID_RAMP_MASK, 0);
}

pm_runtime_put(codec->dev);
}

static int vmid_event(struct snd_soc_dapm_widget *w,
Expand Down Expand Up @@ -2762,6 +2753,11 @@ static int wm8994_resume(struct snd_soc_codec *codec)
codec->cache_only = 0;
}

/* Restore the registers */
ret = snd_soc_cache_sync(codec);
if (ret != 0)
dev_err(codec->dev, "Failed to sync cache: %d\n", ret);

wm8994_set_bias_level(codec, SND_SOC_BIAS_STANDBY);

for (i = 0; i < ARRAY_SIZE(wm8994->fll); i++) {
Expand Down
8 changes: 4 additions & 4 deletions trunk/sound/soc/codecs/wm_hubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ SOC_DAPM_SINGLE("Left Output Switch", WM8993_LINE_MIXER1, 0, 1, 0),
};

static const struct snd_kcontrol_new line2_mix[] = {
SOC_DAPM_SINGLE("IN1L Switch", WM8993_LINE_MIXER2, 2, 1, 0),
SOC_DAPM_SINGLE("IN1R Switch", WM8993_LINE_MIXER2, 1, 1, 0),
SOC_DAPM_SINGLE("IN2R Switch", WM8993_LINE_MIXER2, 2, 1, 0),
SOC_DAPM_SINGLE("IN2L Switch", WM8993_LINE_MIXER2, 1, 1, 0),
SOC_DAPM_SINGLE("Output Switch", WM8993_LINE_MIXER2, 0, 1, 0),
};

Expand Down Expand Up @@ -848,8 +848,8 @@ static const struct snd_soc_dapm_route lineout1_se_routes[] = {
};

static const struct snd_soc_dapm_route lineout2_diff_routes[] = {
{ "LINEOUT2 Mixer", "IN1L Switch", "IN1L PGA" },
{ "LINEOUT2 Mixer", "IN1R Switch", "IN1R PGA" },
{ "LINEOUT2 Mixer", "IN2L Switch", "IN2L PGA" },
{ "LINEOUT2 Mixer", "IN2R Switch", "IN2R PGA" },
{ "LINEOUT2 Mixer", "Output Switch", "Right Output PGA" },

{ "LINEOUT2N Driver", NULL, "LINEOUT2 Mixer" },
Expand Down
11 changes: 0 additions & 11 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,17 +567,6 @@ int snd_soc_suspend(struct device *dev)
if (!codec->suspended && codec->driver->suspend) {
switch (codec->dapm.bias_level) {
case SND_SOC_BIAS_STANDBY:
/*
* If the CODEC is capable of idle
* bias off then being in STANDBY
* means it's doing something,
* otherwise fall through.
*/
if (codec->dapm.idle_bias_off) {
dev_dbg(codec->dev,
"idle_bias_off CODEC on over suspend\n");
break;
}
case SND_SOC_BIAS_OFF:
codec->driver->suspend(codec);
codec->suspended = 1;
Expand Down
8 changes: 0 additions & 8 deletions trunk/sound/usb/quirks-table.h
Original file line number Diff line number Diff line change
Expand Up @@ -1617,14 +1617,6 @@ YAMAHA_DEVICE(0x7010, "UB99"),
}
}
},
{
/* Edirol UM-3G */
USB_DEVICE_VENDOR_SPEC(0x0582, 0x0108),
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
.ifnum = 0,
.type = QUIRK_MIDI_STANDARD_INTERFACE
}
},
{
/* Boss JS-8 Jam Station */
USB_DEVICE(0x0582, 0x0109),
Expand Down

0 comments on commit 947e41e

Please sign in to comment.