Skip to contentSkip to conversation

ALSA fixes

GIT PULL Takashi Iwai 1 participant 1 message Nov 18, 2008 Sound

lore
Share & tools
lore
#0 lore raw

Linus,

please pull ALSA fixes for 2.6.28-rc6 from:

git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus

This contains several STAC/IDT HD-audio codec fixes (for recent Dell and HP laptops), and one trivial error-path fix in pcxhr driver.

Thanks!

Takashi

===

Julia Lawall (1):
ALSA: sound/pci/pcxhr/pcxhr.c: introduce missing kfree and pci_disable_device

Matthew Ranostay (1):
ALSA: hda: STAC_VREF_EVENT value change

Takashi Iwai (6):
ALSA: hda - Add digital beep playback switch for STAC/IDT codecs
ALSA: hda - Missing NULL check in hda_beep.c
ALSA: hda - Check model type instead of SSID in patch_92hd71bxx()
ALSA: hda - Fix GPIO initialization in patch_stac92hd71bxx()
ALSA: hda - Add quirks for HP Pavilion DV models
ALSA: hda - Fix resume of GPIO unsol event for STAC/IDT

---
 sound/pci/hda/hda_beep.c       |    8 +++
 sound/pci/hda/hda_beep.h       |    1 +
 sound/pci/hda/patch_sigmatel.c |   99 ++++++++++++++++++++++++++++++++-------
 sound/pci/pcxhr/pcxhr.c        |    5 ++-
 4 files changed, 94 insertions(+), 19 deletions(-)
sound/pci/hda/hda_beep.c +8 -0
index 9b77b3e..3ecd7e7 100644
@@ -37,6 +37,9 @@ 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);
@@ -85,6 +88,10 @@ 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";
@@ -115,6 +122,7 @@ 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);
sound/pci/hda/hda_beep.h +1 -0
index de4036e..b9679f0 100644
@@ -31,6 +31,7 @@ struct hda_beep {
 	char phys[32];
 	int tone;
 	int nid;
+	int enabled;
 	struct work_struct beep_work; /* scheduled task for beep event */
 };
 
sound/pci/hda/patch_sigmatel.c +81 -18

178 lines not on this page · raw message

sound/pci/pcxhr/pcxhr.c +4 -1
index 0e06c6c..73de6e9 100644
@@ -1229,8 +1229,11 @@ 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))
+	if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST)) {
+		kfree(mgr);
+		pci_disable_device(pci);
 		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;