From 947e41ef1a10c64dcba7d1f77d425a5aa0779fec Mon Sep 17 00:00:00 2001 From: Xi Wang Date: Wed, 8 Feb 2012 17:13:37 -0800 Subject: [PATCH] --- yaml --- r: 287335 b: refs/heads/master c: 1ecd3c7ea76488c63b4b0a2561fd7eaf96cc8028 h: refs/heads/master i: 287333: abb0ca7db466fc1cd7c914af4b507d4c41bd0e82 287331: 27df306e4de0c4f815a0845f93885fe3f2581f1f 287327: 6ec08d51a8a6aa31b6110075a7e3dd08c2cdd1c3 v: v3 --- [refs] | 2 +- trunk/fs/nilfs2/ioctl.c | 2 ++ trunk/sound/isa/sb/emu8000_patch.c | 1 + trunk/sound/pci/hda/patch_ca0132.c | 33 ++++++++++++--------------- trunk/sound/pci/hda/patch_realtek.c | 7 +----- trunk/sound/pci/oxygen/oxygen_mixer.c | 25 +++++++++----------- trunk/sound/soc/codecs/cs42l73.c | 2 +- trunk/sound/soc/codecs/wm8962.c | 6 ++--- trunk/sound/soc/codecs/wm8994.c | 16 +++++-------- trunk/sound/soc/codecs/wm_hubs.c | 8 +++---- trunk/sound/soc/soc-core.c | 11 --------- trunk/sound/usb/quirks-table.h | 8 ------- 12 files changed, 44 insertions(+), 77 deletions(-) diff --git a/[refs] b/[refs] index 578276289ee1..ed28fc7a6ce1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e862f2e4693f287669e84971c778bf071bd0526b +refs/heads/master: 1ecd3c7ea76488c63b4b0a2561fd7eaf96cc8028 diff --git a/trunk/fs/nilfs2/ioctl.c b/trunk/fs/nilfs2/ioctl.c index 886649627c3d..2a70fce70c65 100644 --- a/trunk/fs/nilfs2/ioctl.c +++ b/trunk/fs/nilfs2/ioctl.c @@ -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 diff --git a/trunk/sound/isa/sb/emu8000_patch.c b/trunk/sound/isa/sb/emu8000_patch.c index c99c6078be33..e09f144177f5 100644 --- a/trunk/sound/isa/sb/emu8000_patch.c +++ b/trunk/sound/isa/sb/emu8000_patch.c @@ -22,6 +22,7 @@ #include "emu8000_local.h" #include #include +#include static int emu8000_reset_addr; module_param(emu8000_reset_addr, int, 0444); diff --git a/trunk/sound/pci/hda/patch_ca0132.c b/trunk/sound/pci/hda/patch_ca0132.c index 21d91d580da8..35abe3c62908 100644 --- a/trunk/sound/pci/hda/patch_ca0132.c +++ b/trunk/sound/pci/hda/patch_ca0132.c @@ -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, @@ -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, @@ -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) @@ -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; } diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index 9350f3c3bdf8..a8e82be3d2fc 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -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, }; @@ -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, }; @@ -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; @@ -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), {} diff --git a/trunk/sound/pci/oxygen/oxygen_mixer.c b/trunk/sound/pci/oxygen/oxygen_mixer.c index c0dbb52d45be..26c7e8bcb229 100644 --- a/trunk/sound/pci/oxygen/oxygen_mixer.c +++ b/trunk/sound/pci/oxygen/oxygen_mixer.c @@ -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; } @@ -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); diff --git a/trunk/sound/soc/codecs/cs42l73.c b/trunk/sound/soc/codecs/cs42l73.c index 78979b3e0e95..9d38db8f1919 100644 --- a/trunk/sound/soc/codecs/cs42l73.c +++ b/trunk/sound/soc/codecs/cs42l73.c @@ -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; diff --git a/trunk/sound/soc/codecs/wm8962.c b/trunk/sound/soc/codecs/wm8962.c index 29c4b02c4790..bda3da887d7e 100644 --- a/trunk/sound/soc/codecs/wm8962.c +++ b/trunk/sound/soc/codecs/wm8962.c @@ -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; diff --git a/trunk/sound/soc/codecs/wm8994.c b/trunk/sound/soc/codecs/wm8994.c index ec69a6c152fe..93d27b660257 100644 --- a/trunk/sound/soc/codecs/wm8994.c +++ b/trunk/sound/soc/codecs/wm8994.c @@ -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", @@ -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, @@ -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, @@ -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++) { diff --git a/trunk/sound/soc/codecs/wm_hubs.c b/trunk/sound/soc/codecs/wm_hubs.c index 8a68cea4a3ee..ea2672455d07 100644 --- a/trunk/sound/soc/codecs/wm_hubs.c +++ b/trunk/sound/soc/codecs/wm_hubs.c @@ -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), }; @@ -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" }, diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 92cee24ed2dc..b5ecf6d23214 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -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; diff --git a/trunk/sound/usb/quirks-table.h b/trunk/sound/usb/quirks-table.h index d89ab4c7d44b..8edc5035fc8f 100644 --- a/trunk/sound/usb/quirks-table.h +++ b/trunk/sound/usb/quirks-table.h @@ -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),