summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-10-10 08:41:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-21 09:32:38 -0700
commitad505f023d46dd51a3c5344e395b703ede9cd0a4 (patch)
treead251be4524296cb8d884f7f068f315fbb24db67 /sound
parentc347faa6f02f368679661b4fe475625c58a077d7 (diff)
ALSA: hda - Add missing hda_gen_spec to struct via_spec
commit 7819d1c70eb6a57e43554d86e10b39d1e106ed65 upstream. The commit [4b527b65 ALSA: hda - limit internal mic boost for Asus X202E] introduced the use of auto-parser code, but it forgot to add struct hda_gen_spec at the head of codec->spec which the auto-parser assumes silently. Without this record, it may result in memory corruption. This patch adds the missing piece. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_via.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 4b4072fcec51..4c404a0c6440 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -118,6 +118,8 @@ enum {
};
struct via_spec {
+ struct hda_gen_spec gen;
+
/* codec parameterization */
const struct snd_kcontrol_new *mixers[6];
unsigned int num_mixers;
@@ -246,6 +248,7 @@ static struct via_spec * via_new_spec(struct hda_codec *codec)
/* VT1708BCE & VT1708S are almost same */
if (spec->codec_type == VT1708BCE)
spec->codec_type = VT1708S;
+ snd_hda_gen_init(&spec->gen);
return spec;
}
@@ -1628,6 +1631,7 @@ static void via_free(struct hda_codec *codec)
vt1708_stop_hp_work(spec);
kfree(spec->bind_cap_vol);
kfree(spec->bind_cap_sw);
+ snd_hda_gen_free(&spec->gen);
kfree(spec);
}