forked from auracaster/bumble_mirror
feat(intel): clarify firmware/DDC flow and preserve driver metadata
- Add explanatory comments across intel driver to clarify metadata parsing. - Ensure driver selection preserves runtime options (e.g. "intel/ddc_override:AABB") so driver-specific metadata is passed through to the host and available to drivers via host.hci_metadata. - Ensure transport parsing regex and metadata extraction so transport/source metadata is populated and visible to drivers. - Example usage: passing [driver=intel/ddc_override:AABB] will be preserved and can be consumed by the Intel driver to apply a DDC override blob.
This commit is contained in:
@@ -84,7 +84,12 @@ async def open_transport(name: str) -> Transport:
|
||||
scheme, *tail = name.split(':', 1)
|
||||
spec = tail[0] if tail else None
|
||||
metadata = None
|
||||
if spec and (m := re.search(r'\[(\w+=\w+(?:,\w+=\w+)*,?)\]', spec)):
|
||||
# If a spec is provided, check for a metadata section in square brackets.
|
||||
# The regex captures a comma-separated list of key=value pairs (allowing an
|
||||
# optional trailing comma). The key is matched by \w+ and the value by [^,\]]+,
|
||||
# meaning the value may contain any character except a comma or a closing
|
||||
# bracket (']').
|
||||
if spec and (m := re.search(r'\[(\w+=[^,\]]+(?:,\w+=[^,\]]+)*,?)\]', spec)):
|
||||
metadata_str = m.group(1)
|
||||
if m.start() == 0:
|
||||
# <metadata><spec>
|
||||
|
||||
Reference in New Issue
Block a user