Detect SSP port number from NHLT table - 2 #4524
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's second version of #4492
The difference is the NHLT comes from BIOS/coreboot so the change is much smaller.
We could use config type to determine if the capture endpoint is for smartamp or FW-generated echo reference, The nhlt_capture_mask will exclude endpoints of smartamp.
enum eIntcConfigType
{
eIntcConfigTypeGeneric = 0,
eIntcConfigTypeMicArray = 1,
eIntcConfigTypeRenderWithLoopback = 2, //not supported in Windows
eIntcConfigTypeRenderFeedback = 3, //in case of endpoint capture direction means feedback for render
}
[ 17.057319] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: ep=0 link_type=2, dev_type=0, dir=1, vbus_id=0
[ 17.057320] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: ep=1 link_type=3, dev_type=4, dir=0, vbus_id=0
[ 17.057321] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: ep=2 link_type=3, dev_type=4, dir=1, vbus_id=0
[ 17.057323] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: config_type=0
=> config type is 0, mostly for headset
[ 17.057324] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: ep=3 link_type=3, dev_type=4, dir=0, vbus_id=1
[ 17.057325] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: ep=4 link_type=3, dev_type=4, dir=1, vbus_id=1
[ 17.057326] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: config_type=3
=> config type is 3, it's render feedback endpoint which is for smartamp
[ 17.057327] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: ep=5 link_type=3, dev_type=0, dir=0, vbus_id=2
[ 17.057328] sof-audio-pci-intel-tgl 0000:00:1f.3: intel_nhlt_ssp_dir_mask: ep=6 link_type=3, dev_type=0, dir=1, vbus_id=2