diff --git a/[refs] b/[refs] index 74f846fdc9a1..fd43ff5add27 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: af94ce063ce5e496f0da0434dc925dd9a665d24f +refs/heads/master: 6a0bfff44e4aa4ee1721b3daa004d2039576c70d diff --git a/trunk/arch/blackfin/kernel/traps.c b/trunk/arch/blackfin/kernel/traps.c index 1aa2c788e228..0003616d02a2 100644 --- a/trunk/arch/blackfin/kernel/traps.c +++ b/trunk/arch/blackfin/kernel/traps.c @@ -147,9 +147,12 @@ static void decode_address(char *buf, unsigned long address) char *name = p->comm; struct file *file = vma->vm_file; - if (file) - name = d_path(&file->f_path, _tmpbuf, + if (file) { + char *d_name = d_path(&file->f_path, _tmpbuf, sizeof(_tmpbuf)); + if (!IS_ERR(d_name)) + name = d_name; + } /* FLAT does not have its text aligned to the start of * the map while FDPIC ELF does ... diff --git a/trunk/sound/pci/hda/hda_beep.c b/trunk/sound/pci/hda/hda_beep.c index 3ecd7e797dee..9b77b3e0fa98 100644 --- a/trunk/sound/pci/hda/hda_beep.c +++ b/trunk/sound/pci/hda/hda_beep.c @@ -37,9 +37,6 @@ static void snd_hda_generate_beep(struct work_struct *work) container_of(work, struct hda_beep, beep_work); struct hda_codec *codec = beep->codec; - if (!beep->enabled) - return; - /* generate tone */ snd_hda_codec_write_cache(codec, beep->nid, 0, AC_VERB_SET_BEEP_CONTROL, beep->tone); @@ -88,10 +85,6 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) snprintf(beep->phys, sizeof(beep->phys), "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr); input_dev = input_allocate_device(); - if (!input_dev) { - kfree(beep); - return -ENOMEM; - } /* setup digital beep device */ input_dev->name = "HDA Digital PCBeep"; @@ -122,7 +115,6 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) beep->nid = nid; beep->dev = input_dev; beep->codec = codec; - beep->enabled = 1; codec->beep = beep; INIT_WORK(&beep->beep_work, &snd_hda_generate_beep); diff --git a/trunk/sound/pci/hda/hda_beep.h b/trunk/sound/pci/hda/hda_beep.h index b9679f081cae..de4036e6e710 100644 --- a/trunk/sound/pci/hda/hda_beep.h +++ b/trunk/sound/pci/hda/hda_beep.h @@ -31,7 +31,6 @@ struct hda_beep { char phys[32]; int tone; int nid; - int enabled; struct work_struct beep_work; /* scheduled task for beep event */ }; diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index 9563b5bbb272..4300a679cd86 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -36,11 +36,9 @@ #include "hda_beep.h" #define NUM_CONTROL_ALLOC 32 - -#define STAC_VREF_EVENT 0x00 -#define STAC_INSERT_EVENT 0x10 #define STAC_PWR_EVENT 0x20 #define STAC_HP_EVENT 0x30 +#define STAC_VREF_EVENT 0x40 enum { STAC_REF, @@ -1688,10 +1686,6 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { /* SigmaTel reference board */ SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, "DFI LanParty", STAC_92HD71BXX_REF), - SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2, - "HP dv5", STAC_HP_M4), - SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4, - "HP dv7", STAC_HP_M4), SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361a, "unknown HP", STAC_HP_M4), SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, @@ -2593,10 +2587,8 @@ static struct snd_kcontrol_new stac92xx_control_templates[] = { }; /* add dynamic controls */ -static int stac92xx_add_control_temp(struct sigmatel_spec *spec, - struct snd_kcontrol_new *ktemp, - int idx, const char *name, - unsigned long val) +static int stac92xx_add_control_idx(struct sigmatel_spec *spec, int type, + int idx, const char *name, unsigned long val) { struct snd_kcontrol_new *knew; @@ -2615,29 +2607,20 @@ static int stac92xx_add_control_temp(struct sigmatel_spec *spec, } knew = &spec->kctl_alloc[spec->num_kctl_used]; - *knew = *ktemp; + *knew = stac92xx_control_templates[type]; knew->index = idx; knew->name = kstrdup(name, GFP_KERNEL); - if (!knew->name) + if (! knew->name) return -ENOMEM; knew->private_value = val; spec->num_kctl_used++; return 0; } -static inline int stac92xx_add_control_idx(struct sigmatel_spec *spec, - int type, int idx, const char *name, - unsigned long val) -{ - return stac92xx_add_control_temp(spec, - &stac92xx_control_templates[type], - idx, name, val); -} - /* add dynamic controls */ -static inline int stac92xx_add_control(struct sigmatel_spec *spec, int type, - const char *name, unsigned long val) +static int stac92xx_add_control(struct sigmatel_spec *spec, int type, + const char *name, unsigned long val) { return stac92xx_add_control_idx(spec, type, 0, name, val); } @@ -3079,43 +3062,6 @@ static int stac92xx_auto_create_beep_ctls(struct hda_codec *codec, return 0; } -#ifdef CONFIG_SND_HDA_INPUT_BEEP -#define stac92xx_dig_beep_switch_info snd_ctl_boolean_mono_info - -static int stac92xx_dig_beep_switch_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct hda_codec *codec = snd_kcontrol_chip(kcontrol); - ucontrol->value.integer.value[0] = codec->beep->enabled; - return 0; -} - -static int stac92xx_dig_beep_switch_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct hda_codec *codec = snd_kcontrol_chip(kcontrol); - int enabled = !!ucontrol->value.integer.value[0]; - if (codec->beep->enabled != enabled) { - codec->beep->enabled = enabled; - return 1; - } - return 0; -} - -static struct snd_kcontrol_new stac92xx_dig_beep_ctrl = { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .info = stac92xx_dig_beep_switch_info, - .get = stac92xx_dig_beep_switch_get, - .put = stac92xx_dig_beep_switch_put, -}; - -static int stac92xx_beep_switch_ctl(struct hda_codec *codec) -{ - return stac92xx_add_control_temp(codec->spec, &stac92xx_dig_beep_ctrl, - 0, "PC Beep Playback Switch", 0); -} -#endif - static int stac92xx_auto_create_mux_input_ctls(struct hda_codec *codec) { struct sigmatel_spec *spec = codec->spec; @@ -3422,7 +3368,6 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out #ifdef CONFIG_SND_HDA_INPUT_BEEP if (spec->digbeep_nid > 0) { hda_nid_t nid = spec->digbeep_nid; - unsigned int caps; err = stac92xx_auto_create_beep_ctls(codec, nid); if (err < 0) @@ -3430,14 +3375,6 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out err = snd_hda_attach_beep_device(codec, nid); if (err < 0) return err; - /* if no beep switch is available, make its own one */ - caps = query_amp_caps(codec, nid, HDA_OUTPUT); - if (codec->beep && - !((caps & AC_AMPCAP_MUTE) >> AC_AMPCAP_MUTE_SHIFT)) { - err = stac92xx_beep_switch_ctl(codec); - if (err < 0) - return err; - } } #endif @@ -4482,13 +4419,6 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) stac92xx_set_config_regs(codec); } - if (spec->board_config > STAC_92HD71BXX_REF) { - /* GPIO0 = EAPD */ - spec->gpio_mask = 0x01; - spec->gpio_dir = 0x01; - spec->gpio_data = 0x01; - } - switch (codec->vendor_id) { case 0x111d76b6: /* 4 Port without Analog Mixer */ case 0x111d76b7: @@ -4499,10 +4429,10 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs; break; case 0x111d7608: /* 5 Port with Analog Mixer */ - switch (spec->board_config) { - case STAC_HP_M4: + switch (codec->subsystem_id) { + case 0x103c361a: /* Enable VREF power saving on GPIO1 detect */ - snd_hda_codec_write_cache(codec, codec->afg, 0, + snd_hda_codec_write(codec, codec->afg, 0, AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x02); snd_hda_codec_write_cache(codec, codec->afg, 0, AC_VERB_SET_UNSOLICITED_ENABLE, @@ -4548,6 +4478,13 @@ static int patch_stac92hd71bxx(struct hda_codec *codec) spec->aloopback_mask = 0x50; spec->aloopback_shift = 0; + if (spec->board_config > STAC_92HD71BXX_REF) { + /* GPIO0 = EAPD */ + spec->gpio_mask = 0x01; + spec->gpio_dir = 0x01; + spec->gpio_data = 0x01; + } + spec->powerdown_adcs = 1; spec->digbeep_nid = 0x26; spec->mux_nids = stac92hd71bxx_mux_nids; @@ -4895,7 +4832,7 @@ static int patch_stac9205(struct hda_codec *codec) stac92xx_set_config_reg(codec, 0x20, 0x1c410030); /* Enable unsol response for GPIO4/Dock HP connection */ - snd_hda_codec_write_cache(codec, codec->afg, 0, + snd_hda_codec_write(codec, codec->afg, 0, AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK, 0x10); snd_hda_codec_write_cache(codec, codec->afg, 0, AC_VERB_SET_UNSOLICITED_ENABLE, diff --git a/trunk/sound/pci/pcxhr/pcxhr.c b/trunk/sound/pci/pcxhr/pcxhr.c index 73de6e989b3d..0e06c6c9fcc0 100644 --- a/trunk/sound/pci/pcxhr/pcxhr.c +++ b/trunk/sound/pci/pcxhr/pcxhr.c @@ -1229,11 +1229,8 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id return -ENOMEM; } - if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST)) { - kfree(mgr); - pci_disable_device(pci); + if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST)) return -ENODEV; - } card_name = pcxhr_board_params[pci_id->driver_data].board_name; mgr->playback_chips = pcxhr_board_params[pci_id->driver_data].playback_chips; mgr->capture_chips = pcxhr_board_params[pci_id->driver_data].capture_chips;