]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch
linux-ti33x-psp 3.2: update to 3.2.5
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.2 / 0011-ALSA-ice1724-Check-for-ac97-to-avoid-kernel-oops.patch
1 From 37a4221e9e94eb1841d5367baba68e31b0c29d4b Mon Sep 17 00:00:00 2001
2 From: Pavel Hofman <pavel.hofman@ivitera.com>
3 Date: Thu, 5 Jan 2012 23:05:18 +0100
4 Subject: [PATCH 011/130] ALSA: ice1724 - Check for ac97 to avoid kernel oops
6 commit e7848163aa2a649d9065f230fadff80dc3519775 upstream.
8 Cards with identical PCI ids but no AC97 config in EEPROM do not have
9 the ac97 field initialized. We must check for this case to avoid kernel oops.
11 Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
12 Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 ---
15  sound/pci/ice1712/amp.c |    7 +++++--
16  1 files changed, 5 insertions(+), 2 deletions(-)
18 diff --git a/sound/pci/ice1712/amp.c b/sound/pci/ice1712/amp.c
19 index e328cfb..e525da2 100644
20 --- a/sound/pci/ice1712/amp.c
21 +++ b/sound/pci/ice1712/amp.c
22 @@ -68,8 +68,11 @@ static int __devinit snd_vt1724_amp_init(struct snd_ice1712 *ice)
23  
24  static int __devinit snd_vt1724_amp_add_controls(struct snd_ice1712 *ice)
25  {
26 -       /* we use pins 39 and 41 of the VT1616 for left and right read outputs */
27 -       snd_ac97_write_cache(ice->ac97, 0x5a, snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
28 +       if (ice->ac97)
29 +               /* we use pins 39 and 41 of the VT1616 for left and right
30 +               read outputs */
31 +               snd_ac97_write_cache(ice->ac97, 0x5a,
32 +                       snd_ac97_read(ice->ac97, 0x5a) & ~0x8000);
33         return 0;
34  }
35  
36 -- 
37 1.7.7.4