]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.19.7/alsa-hda-fix-num_steps-0-error-on-alc256.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.7 / alsa-hda-fix-num_steps-0-error-on-alc256.patch
1 From 7d1b6e29327428993ba568bdd8c66734070f45e0 Mon Sep 17 00:00:00 2001
2 From: David Henningsson <david.henningsson@canonical.com>
3 Date: Tue, 21 Apr 2015 10:48:46 +0200
4 Subject: ALSA: hda - fix "num_steps = 0" error on ALC256
5
6 From: David Henningsson <david.henningsson@canonical.com>
7
8 commit 7d1b6e29327428993ba568bdd8c66734070f45e0 upstream.
9
10 The ALC256 does not have a mixer nid at 0x0b, and there's no
11 loopback path (the output pins are directly connected to the DACs).
12
13 This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)"
14 error (and as a result, problems with amixer/alsamixer).
15
16 If there's pcbeep functionality, it certainly isn't controlled by setting an
17 amp on 0x0b, so disable beep functionality (at least for now).
18
19 BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517
20 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
21 Signed-off-by: Takashi Iwai <tiwai@suse.de>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24 ---
25 sound/pci/hda/patch_realtek.c | 5 +++--
26 1 file changed, 3 insertions(+), 2 deletions(-)
27
28 --- a/sound/pci/hda/patch_realtek.c
29 +++ b/sound/pci/hda/patch_realtek.c
30 @@ -5454,6 +5454,7 @@ static int patch_alc269(struct hda_codec
31 break;
32 case 0x10ec0256:
33 spec->codec_variant = ALC269_TYPE_ALC256;
34 + spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
35 break;
36 }
37
38 @@ -5467,8 +5468,8 @@ static int patch_alc269(struct hda_codec
39 if (err < 0)
40 goto error;
41
42 - if (!spec->gen.no_analog && spec->gen.beep_nid)
43 - set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
44 + if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid)
45 + set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
46
47 codec->patch_ops = alc_patch_ops;
48 #ifdef CONFIG_PM