diff options
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 53f9311370de..2b64fabd5faa 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2126,7 +2126,7 @@ static int generic_hdmi_build_jack(struct hda_codec *codec, int pcm_idx) static int generic_hdmi_build_controls(struct hda_codec *codec) { struct hdmi_spec *spec = codec->spec; - int err; + int dev, err; int pin_idx, pcm_idx; @@ -2154,11 +2154,13 @@ static int generic_hdmi_build_controls(struct hda_codec *codec) return err; snd_hda_spdif_ctls_unassign(codec, pcm_idx); - /* add control for ELD Bytes */ - err = hdmi_create_eld_ctl(codec, pcm_idx, - get_pcm_rec(spec, pcm_idx)->device); - if (err < 0) - return err; + dev = get_pcm_rec(spec, pcm_idx)->device; + if (dev != SNDRV_PCM_INVALID_DEVICE) { + /* add control for ELD Bytes */ + err = hdmi_create_eld_ctl(codec, pcm_idx, dev); + if (err < 0) + return err; + } } for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { |