浏览代码

ALSA: hda - don't build digital output controls if not exist

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 16 年之前
父节点
当前提交
63b2413b2f
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      sound/pci/hda/patch_cirrus.c

+ 3 - 0
sound/pci/hda/patch_cirrus.c

@@ -779,6 +779,9 @@ static int build_digital_output(struct hda_codec *codec)
 	struct cs_spec *spec = codec->spec;
 	int err;
 
+	if (!spec->multiout.dig_out_nid)
+		return 0;
+
 	err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid);
 	if (err < 0)
 		return err;