From 09a6071bfe0ecf41376ad6a143508c8b2f93f52b Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 26 Jun 2012 15:01:33 +0200
Subject: [PATCH] ALSA: hda - Initialize caches at codec reconfiguration
Git-commit: 09a6071bfe0ecf41376ad6a143508c8b2f93f52b
Patch-mainline: 3.5-rc7
References: FATE#313695

Better to clean up the caches for avoiding inconsistent codec state
after the reconfiguration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/hda_codec.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2322,6 +2322,8 @@ int snd_hda_codec_reset(struct hda_codec
 	/* free only driver_pins so that init_pins + user_pins are restored */
 	snd_array_free(&codec->driver_pins);
 	restore_pincfgs(codec);
+	snd_array_free(&codec->cvt_setups);
+	snd_array_free(&codec->spdif_out);
 	codec->num_pcms = 0;
 	codec->pcm_info = NULL;
 	codec->preset = NULL;
