Re: [PATCH] ALSA: hda: hdmi - fix regression in connect list handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, 27 Nov 2019, Takashi Iwai wrote:

> On Wed, 27 Nov 2019 12:25:36 +0100, Kai Vehmanen wrote:
> > @@ -1312,10 +1316,19 @@ static int hdmi_read_pin_conn(struct hda_codec *codec, int pin_idx)
[...]
> > +	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?	

hmm, you are right, this should work. spec->cvt_nids and spec->num_cvts 
were reversed in the proto code :), but otherwise looks ok based on
a few tests. I'll send a v2 patch shortly. This simplifies the code as 
well.

Br, Kai
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux