]> git.karo-electronics.de Git - linux-beck.git/blobdiff - sound/pci/hda/patch_hdmi.c
Merge branch 'for-linus' into for-next
[linux-beck.git] / sound / pci / hda / patch_hdmi.c
index e85959f72047b386cbcb14073fac1b9643c80798..85236da790469a9f9ebb9798d7dfb6399e97760a 100644 (file)
@@ -1103,8 +1103,12 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
        if (!static_hdmi_pcm && eld->eld_valid) {
                snd_hdmi_eld_update_pcm_info(eld, hinfo);
                if (hinfo->channels_min > hinfo->channels_max ||
-                   !hinfo->rates || !hinfo->formats)
+                   !hinfo->rates || !hinfo->formats) {
+                       per_cvt->assigned = 0;
+                       hinfo->nid = 0;
+                       snd_hda_spdif_ctls_unassign(codec, pin_idx);
                        return -ENODEV;
+               }
        }
 
        /* Store the updated parameters */