Commit 7d1b6e29 authored by David Henningsson's avatar David Henningsson Committed by Takashi Iwai

ALSA: hda - fix "num_steps = 0" error on ALC256

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/1446517Signed-off-by: default avatarDavid Henningsson <david.henningsson@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 6d1f2f60
...@@ -5664,6 +5664,7 @@ static int patch_alc269(struct hda_codec *codec) ...@@ -5664,6 +5664,7 @@ static int patch_alc269(struct hda_codec *codec)
break; break;
case 0x10ec0256: case 0x10ec0256:
spec->codec_variant = ALC269_TYPE_ALC256; spec->codec_variant = ALC269_TYPE_ALC256;
spec->gen.mixer_nid = 0; /* ALC256 does not have any loopback mixer path */
break; break;
} }
...@@ -5677,8 +5678,8 @@ static int patch_alc269(struct hda_codec *codec) ...@@ -5677,8 +5678,8 @@ static int patch_alc269(struct hda_codec *codec)
if (err < 0) if (err < 0)
goto error; goto error;
if (!spec->gen.no_analog && spec->gen.beep_nid) if (!spec->gen.no_analog && spec->gen.beep_nid && spec->gen.mixer_nid)
set_beep_amp(spec, 0x0b, 0x04, HDA_INPUT); set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
codec->patch_ops = alc_patch_ops; codec->patch_ops = alc_patch_ops;
codec->patch_ops.stream_pm = snd_hda_gen_stream_pm; codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment