summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch
new file mode 100644
index 00000000..5ffcdc7d
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0013-ALSA-hda-Fix-redundant-jack-creations-for-cx5051.patch
@@ -0,0 +1,68 @@
1From 2a8e5e8a2df18812c60720fa0534c29c9f1c17b6 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Wed, 22 Feb 2012 17:02:38 +0100
4Subject: [PATCH 13/73] ALSA: hda - Fix redundant jack creations for cx5051
5
6[Note that since the patch isn't applicable (and unnecessary) to
73.3-rc, there is no corresponding upstream fix.]
8
9The cx5051 parser calls snd_hda_input_jack_add() in the init callback
10to create and initialize the jack detection instances. Since the init
11callback is called at each time when the device gets woken up after
12suspend or power-saving mode, the duplicated instances are accumulated
13at each call. This ends up with the kernel warnings with the too
14large array size.
15
16The fix is simply to move the calls of snd_hda_input_jack_add() into
17the parser section instead of the init callback.
18
19The fix is needed only up to 3.2 kernel, since the HD-audio jack layer
20was redesigned in the 3.3 kernel.
21
22Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
23Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
24Signed-off-by: Takashi Iwai <tiwai@suse.de>
25Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26---
27 sound/pci/hda/patch_conexant.c | 11 ++++++++++-
28 1 files changed, 10 insertions(+), 1 deletions(-)
29
30diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
31index 7072251..08bad5b 100644
32--- a/sound/pci/hda/patch_conexant.c
33+++ b/sound/pci/hda/patch_conexant.c
34@@ -1899,6 +1899,10 @@ static void cxt5051_init_mic_port(struct hda_codec *codec, hda_nid_t nid,
35 snd_hda_codec_write(codec, nid, 0,
36 AC_VERB_SET_UNSOLICITED_ENABLE,
37 AC_USRSP_EN | event);
38+}
39+
40+static void cxt5051_init_mic_jack(struct hda_codec *codec, hda_nid_t nid)
41+{
42 snd_hda_input_jack_add(codec, nid, SND_JACK_MICROPHONE, NULL);
43 snd_hda_input_jack_report(codec, nid);
44 }
45@@ -1916,7 +1920,6 @@ static int cxt5051_init(struct hda_codec *codec)
46 struct conexant_spec *spec = codec->spec;
47
48 conexant_init(codec);
49- conexant_init_jacks(codec);
50
51 if (spec->auto_mic & AUTO_MIC_PORTB)
52 cxt5051_init_mic_port(codec, 0x17, CXT5051_PORTB_EVENT);
53@@ -2037,6 +2040,12 @@ static int patch_cxt5051(struct hda_codec *codec)
54 if (spec->beep_amp)
55 snd_hda_attach_beep_device(codec, spec->beep_amp);
56
57+ conexant_init_jacks(codec);
58+ if (spec->auto_mic & AUTO_MIC_PORTB)
59+ cxt5051_init_mic_jack(codec, 0x17);
60+ if (spec->auto_mic & AUTO_MIC_PORTC)
61+ cxt5051_init_mic_jack(codec, 0x18);
62+
63 return 0;
64 }
65
66--
671.7.7.4
68