diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/control.c | 7 | ||||
-rw-r--r-- | sound/pci/hda/hda_codec.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 29 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 4 | ||||
-rw-r--r-- | sound/pci/intel8x0.c | 1 |
6 files changed, 39 insertions, 4 deletions
diff --git a/sound/core/control.c b/sound/core/control.c index 6d71f9a7ccbb..b0bf42691047 100644 --- a/sound/core/control.c +++ b/sound/core/control.c | |||
@@ -225,8 +225,13 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, | |||
225 | kctl.id.iface = ncontrol->iface; | 225 | kctl.id.iface = ncontrol->iface; |
226 | kctl.id.device = ncontrol->device; | 226 | kctl.id.device = ncontrol->device; |
227 | kctl.id.subdevice = ncontrol->subdevice; | 227 | kctl.id.subdevice = ncontrol->subdevice; |
228 | if (ncontrol->name) | 228 | if (ncontrol->name) { |
229 | strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); | 229 | strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name)); |
230 | if (strcmp(ncontrol->name, kctl.id.name) != 0) | ||
231 | snd_printk(KERN_WARNING | ||
232 | "Control name '%s' truncated to '%s'\n", | ||
233 | ncontrol->name, kctl.id.name); | ||
234 | } | ||
230 | kctl.id.index = ncontrol->index; | 235 | kctl.id.index = ncontrol->index; |
231 | kctl.count = ncontrol->count ? ncontrol->count : 1; | 236 | kctl.count = ncontrol->count ? ncontrol->count : 1; |
232 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : | 237 | access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE : |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 6447754ae56e..ba1ab737b55f 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -64,6 +64,7 @@ static struct hda_vendor_id hda_vendor_ids[] = { | |||
64 | { 0x14f1, "Conexant" }, | 64 | { 0x14f1, "Conexant" }, |
65 | { 0x17e8, "Chrontel" }, | 65 | { 0x17e8, "Chrontel" }, |
66 | { 0x1854, "LG" }, | 66 | { 0x1854, "LG" }, |
67 | { 0x1aec, "Wolfson Microelectronics" }, | ||
67 | { 0x434d, "C-Media" }, | 68 | { 0x434d, "C-Media" }, |
68 | { 0x8384, "SigmaTel" }, | 69 | { 0x8384, "SigmaTel" }, |
69 | {} /* terminator */ | 70 | {} /* terminator */ |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index f080f8ce0ecb..35722ec920cb 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/slab.h> | 45 | #include <linux/slab.h> |
46 | #include <linux/pci.h> | 46 | #include <linux/pci.h> |
47 | #include <linux/mutex.h> | 47 | #include <linux/mutex.h> |
48 | #include <linux/reboot.h> | ||
48 | #include <sound/core.h> | 49 | #include <sound/core.h> |
49 | #include <sound/initval.h> | 50 | #include <sound/initval.h> |
50 | #include "hda_codec.h" | 51 | #include "hda_codec.h" |
@@ -397,6 +398,9 @@ struct azx { | |||
397 | 398 | ||
398 | /* for pending irqs */ | 399 | /* for pending irqs */ |
399 | struct work_struct irq_pending_work; | 400 | struct work_struct irq_pending_work; |
401 | |||
402 | /* reboot notifier (for mysterious hangup problem at power-down) */ | ||
403 | struct notifier_block reboot_notifier; | ||
400 | }; | 404 | }; |
401 | 405 | ||
402 | /* driver types */ | 406 | /* driver types */ |
@@ -1979,12 +1983,36 @@ static int azx_resume(struct pci_dev *pci) | |||
1979 | 1983 | ||
1980 | 1984 | ||
1981 | /* | 1985 | /* |
1986 | * reboot notifier for hang-up problem at power-down | ||
1987 | */ | ||
1988 | static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf) | ||
1989 | { | ||
1990 | struct azx *chip = container_of(nb, struct azx, reboot_notifier); | ||
1991 | azx_stop_chip(chip); | ||
1992 | return NOTIFY_OK; | ||
1993 | } | ||
1994 | |||
1995 | static void azx_notifier_register(struct azx *chip) | ||
1996 | { | ||
1997 | chip->reboot_notifier.notifier_call = azx_halt; | ||
1998 | register_reboot_notifier(&chip->reboot_notifier); | ||
1999 | } | ||
2000 | |||
2001 | static void azx_notifier_unregister(struct azx *chip) | ||
2002 | { | ||
2003 | if (chip->reboot_notifier.notifier_call) | ||
2004 | unregister_reboot_notifier(&chip->reboot_notifier); | ||
2005 | } | ||
2006 | |||
2007 | /* | ||
1982 | * destructor | 2008 | * destructor |
1983 | */ | 2009 | */ |
1984 | static int azx_free(struct azx *chip) | 2010 | static int azx_free(struct azx *chip) |
1985 | { | 2011 | { |
1986 | int i; | 2012 | int i; |
1987 | 2013 | ||
2014 | azx_notifier_unregister(chip); | ||
2015 | |||
1988 | if (chip->initialized) { | 2016 | if (chip->initialized) { |
1989 | azx_clear_irq_pending(chip); | 2017 | azx_clear_irq_pending(chip); |
1990 | for (i = 0; i < chip->num_streams; i++) | 2018 | for (i = 0; i < chip->num_streams; i++) |
@@ -2348,6 +2376,7 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
2348 | pci_set_drvdata(pci, card); | 2376 | pci_set_drvdata(pci, card); |
2349 | chip->running = 1; | 2377 | chip->running = 1; |
2350 | power_down_all_codecs(chip); | 2378 | power_down_all_codecs(chip); |
2379 | azx_notifier_register(chip); | ||
2351 | 2380 | ||
2352 | dev++; | 2381 | dev++; |
2353 | return err; | 2382 | return err; |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 2b00c4afdf97..d3fd432cb3ea 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -3860,6 +3860,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = { | |||
3860 | 3860 | ||
3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { | 3861 | static struct snd_pci_quirk ad1884a_cfg_tbl[] = { |
3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), | 3862 | SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE), |
3863 | SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE), | ||
3863 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), | 3864 | SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD), |
3864 | {} | 3865 | {} |
3865 | }; | 3866 | }; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 788fdc6f3264..df9b0bc7f878 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -566,10 +566,8 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol, | |||
566 | nid = codec->slave_dig_outs[smux_idx - 1]; | 566 | nid = codec->slave_dig_outs[smux_idx - 1]; |
567 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) | 567 | if (spec->cur_smux[smux_idx] == smux->num_items - 1) |
568 | val = AMP_OUT_MUTE; | 568 | val = AMP_OUT_MUTE; |
569 | if (smux_idx == 0) | ||
570 | nid = spec->multiout.dig_out_nid; | ||
571 | else | 569 | else |
572 | nid = codec->slave_dig_outs[smux_idx - 1]; | 570 | val = AMP_OUT_UNMUTE; |
573 | /* un/mute SPDIF out */ | 571 | /* un/mute SPDIF out */ |
574 | snd_hda_codec_write_cache(codec, nid, 0, | 572 | snd_hda_codec_write_cache(codec, nid, 0, |
575 | AC_VERB_SET_AMP_GAIN_MUTE, val); | 573 | AC_VERB_SET_AMP_GAIN_MUTE, val); |
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index c88d1eace1c4..19d3391e229f 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -2702,6 +2702,7 @@ static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = { | |||
2702 | SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), | 2702 | SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), |
2703 | SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), | 2703 | SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), |
2704 | SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), | 2704 | SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000), |
2705 | SND_PCI_QUIRK(0x1028, 0x01ad, "AD1981B", 48000), | ||
2705 | SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), | 2706 | SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), |
2706 | { } /* terminator */ | 2707 | { } /* terminator */ |
2707 | }; | 2708 | }; |