Commit c4bfe94a authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix WARNING from HDMI/DP parser

The recent fix to converter detaching timing in patch_hdmi.c
leads to a kernel WARNING due to a sanity check when the debug
option is set.  Add a workaround by setting a dummy hinfo->nid.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f2ad24fa
...@@ -877,6 +877,8 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, ...@@ -877,6 +877,8 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
struct hdmi_eld *eld; struct hdmi_eld *eld;
struct hdmi_spec_per_cvt *per_cvt = NULL; struct hdmi_spec_per_cvt *per_cvt = NULL;
hinfo->nid = 0; /* clear the leftover value */
/* Validate hinfo */ /* Validate hinfo */
pin_idx = hinfo_to_pin_index(spec, hinfo); pin_idx = hinfo_to_pin_index(spec, hinfo);
if (snd_BUG_ON(pin_idx < 0)) if (snd_BUG_ON(pin_idx < 0))
...@@ -1218,6 +1220,7 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec) ...@@ -1218,6 +1220,7 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec)
pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK]; pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK];
pstr->substreams = 1; pstr->substreams = 1;
pstr->ops = generic_ops; pstr->ops = generic_ops;
pstr->nid = 1; /* FIXME: just for avoiding a debug WARNING */
/* other pstr fields are set in open */ /* other pstr fields are set in open */
} }
......
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