diff options
author | Mark Brown <broonie@kernel.org> | 2019-11-22 20:56:02 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-11-22 20:56:02 +0100 |
commit | 8c4d2a0bfbd27d030e4652b714cd5a1598f3559b (patch) | |
tree | d8ea72d906a690109d2f7aeeb2dc9ec529c0d5a6 /sound/pci/hda/patch_hdmi.c | |
parent | Merge branch 'asoc-5.4' into asoc-linus (diff) | |
parent | ASoC: DMI long name - avoid to add board name if matches with product name (diff) | |
download | linux-8c4d2a0bfbd27d030e4652b714cd5a1598f3559b.tar.xz linux-8c4d2a0bfbd27d030e4652b714cd5a1598f3559b.zip |
Merge branch 'asoc-5.5' into asoc-next
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 78bd2e3722c7..d24bd95c6e95 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2075,15 +2075,24 @@ static bool is_hdmi_pcm_attached(struct hdac_device *hdac, int pcm_idx) static int generic_hdmi_build_pcms(struct hda_codec *codec) { struct hdmi_spec *spec = codec->spec; - int idx; + int idx, pcm_num; /* * for non-mst mode, pcm number is the same as before - * for DP MST mode, pcm number is (nid number + dev_num - 1) - * dev_num is the device entry number in a pin - * + * for DP MST mode without extra PCM, pcm number is same + * for DP MST mode with extra PCMs, pcm number is + * (nid number + dev_num - 1) + * dev_num is the device entry number in a pin */ - for (idx = 0; idx < spec->num_nids + spec->dev_num - 1; idx++) { + + if (codec->mst_no_extra_pcms) + pcm_num = spec->num_nids; + else + pcm_num = spec->num_nids + spec->dev_num - 1; + + codec_dbg(codec, "hdmi: pcm_num set to %d\n", pcm_num); + + for (idx = 0; idx < pcm_num; idx++) { struct hda_pcm *info; struct hda_pcm_stream *pstr; |