Skip to content

Commit bf78e00

Browse files
David Henningssonsashalevin
authored andcommitted
ALSA: hda - fix "num_steps = 0" error on ALC256
[ Upstream commit 7d1b6e2 ] The ALC256 does not have a mixer nid at 0x0b, and there's no loopback path (the output pins are directly connected to the DACs). This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)" error (and as a result, problems with amixer/alsamixer). If there's pcbeep functionality, it certainly isn't controlled by setting an amp on 0x0b, so disable beep functionality (at least for now). Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
1 parent 5f54521 commit bf78e00

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎sound/pci/hda/patch_realtek.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5414,6 +5414,7 @@ static int patch_alc269(struct hda_codec *codec)
54145414
break;
54155415
case 0x10ec0256:
54165416
spec->codec_variant = ALC269_TYPE_ALC256;
5417+
spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
54175418
break;
54185419
}
54195420

@@ -5427,8 +5428,8 @@ static int patch_alc269(struct hda_codec *codec)
54275428
if (err < 0)
54285429
goto error;
54295430

5430-
if (!spec->gen.no_analog && spec->gen.beep_nid)
5431-
set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT);
5431+
if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid)
5432+
set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
54325433

54335434
codec->patch_ops = alc_patch_ops;
54345435
#ifdef CONFIG_PM

0 commit comments

Comments
 (0)