On Wed, 27 Nov 2019 12:25:36 +0100, Kai Vehmanen wrote:
Fix regression in how intel_haswell_fixup_connect_list() results are used in hda_read_pin_conn(). Use of snd_hda_get_raw_connections() in hda_read_pin_conn() bypasses the cache and thus also bypasses the overridden pin connection list. On platforms that require the connection list fixup, mux list will be empty and HDMI playback will fail to -EBUSY at open.
Ah, thanks for catching this. This is an obvious overlook.
@@ -1312,10 +1316,19 @@ static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx)
snd_hda_set_dev_select(codec, pin_nid, dev_id);
- if (spec->intel_hsw_fixup) {
intel_haswell_fixup_connect_list(codec, pin_nid);
conns = snd_hda_get_connections(codec, pin_nid,
per_pin->mux_nids,
HDA_MAX_CONNECTIONS);
- } else {
conns = snd_hda_get_raw_connections(codec, pin_nid,
per_pin->mux_nids,
HDA_MAX_CONNECTIONS);
- }
Actually intel_haswell_fixup_connect_list() doesn't influence on the hardware setup but just updates the software cache. So, basically we can copy the values directly from spec->cvt_nids here without the override hack as we have now.
That is, something like
if (spec->intel_hsw_fixup) { conns = spec->cvt_nids; memcpy(per_pin->mux_nids, spec->num_cvts, sizeof(hda_nid_t) * conns); } else { snd_hda_set_dev_select(codec, pin_nid, dev_id); conns = snd_hda_get_raw_connections(codec, pin_nid, per_pin->mux_nids, HDA_MAX_CONNECTIONS); }
Could you check whether this works?
thanks,
Takashi