Re: [PATCH 1/8] soundwire: intel: filter SoundWire controller device search

From: Pierre-Louis Bossart
Date: Wed May 08 2019 - 12:26:19 EST



+ /*
+ * On some Intel platforms, multiple children of the HDAS
+ * device can be found, but only one of them is the SoundWire
+ * controller. The SNDW device is always exposed with
+ * Name(_ADR, 0x40000000) so filter accordingly
+ */
+ if (adr != 0x40000000)

I do not recall if 4 corresponds to the links you have or soundwire
device type, is this number documented somewhere is HDA specs?

I thought it was a magic number, but I did check and for once it's
documented and the values match the spec :-)
I see in the ACPI docs bits 31..28 set to 4 indicate a SoundWire Link Type
and bits 3..0 indicate the SoundWire controller instance, the rest is
reserved to zero.

So in that case we should mask with bits 31..28 and match, who knows you
may have multiple controller instances in future

yes, I was planning on only using the link type.

I had a vague recollection that this was documented in the spec, glad
that in turned out to be the case.

Btw was the update to HDA spec made public?

Not that I know of. The previous NHLT public doc has actually disappeared from the Intel site and I can't find it any longer, so currently the amount of public documentation is trending to zero :-(


Also it might good to create a define for this

I will respin this one to add the documentation above, and only filter on
the 4 ms-bits. Thanks for forcing me to RTFM :-)