When used with e.g. SOF, the PCM entity is handled by ASoC and there is no direct link from the HDA codec to the snd_pcm_t object. Remaining configuration steps of hdmi_pcm_setup_pin() should still be done in this case. Signed-off-by: Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx> --- sound/pci/hda/patch_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 4372c87c48f0..65afb833c125 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1386,8 +1386,6 @@ static void hdmi_pcm_setup_pin(struct hdmi_spec *spec, pcm = get_pcm_rec(spec, per_pin->pcm_idx); else return; - if (!pcm->pcm) - return; if (!test_bit(per_pin->pcm_idx, &spec->pcm_in_use)) return; @@ -1408,8 +1406,10 @@ static void hdmi_pcm_setup_pin(struct hdmi_spec *spec, snd_hda_spdif_ctls_assign(codec, per_pin->pcm_idx, hinfo->nid); non_pcm = check_non_pcm_per_cvt(codec, hinfo->nid); - if (substream->runtime) - per_pin->channels = substream->runtime->channels; + if (pcm->pcm) { + if (substream->runtime) + per_pin->channels = substream->runtime->channels; + } per_pin->setup = true; per_pin->mux_idx = mux_idx; -- 2.17.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel