12 Jun
2019
12 Jun
'19
3:20 p.m.
Hi,
On Wed, 12 Jun 2019, Takashi Iwai wrote:
On Wed, 12 Jun 2019 13:55:09 +0200, Kai Vehmanen wrote:
curr = snd_hdac_codec_read(hdev, port->pin->nid,0, AC_VERB_GET_CONNECT_SEL,0);if (curr != cvt_idx) {snd_hdac_codec_write(hdev,port->pin->nid, 0,AC_VERB_SET_CONNECT_SEL,cvt_idx);dev_dbg(&hdev->dev,"%s: %s set connect %d -> %d\n",__func__, cvt->name, port->pin->nid,cvt_idx);You can simply restore all pins without reading. The read costs much more time than writes.
aa, thanks, you are probably right. I actually had just the write in my first version of the patch, but I ended up adding the read just be on the safe side. But true, write with same connection should not have any side-effects. I'll change this in v2.
Br, Kai