summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2025-01-20 02:16:55 +0200
committerMaxim Devaev <[email protected]>2025-01-20 02:16:55 +0200
commit00ed5197b061de0278c177e11ac0a3ef2408bcb1 (patch)
tree6cb6c84610fa58762c9e1af000ebc0b2b5e145b9
parentb2c5305564770ddd2a543848b2d95f549768a971 (diff)
add some otg info
-rw-r--r--kvmd/apps/otg/__init__.py8
-rw-r--r--kvmd/apps/otgconf/__init__.py1
2 files changed, 5 insertions, 4 deletions
diff --git a/kvmd/apps/otg/__init__.py b/kvmd/apps/otg/__init__.py
index c50626c0..e1e886cb 100644
--- a/kvmd/apps/otg/__init__.py
+++ b/kvmd/apps/otg/__init__.py
@@ -112,7 +112,7 @@ class _GadgetConfig:
self.__msd_instance = 0
_mkdir(meta_path)
- def add_audio_capture(self, start: bool) -> None:
+ def add_audio_mic(self, start: bool) -> None:
eps = 2
func = "uac2.usb0"
func_path = self.__create_function(func)
@@ -122,7 +122,7 @@ class _GadgetConfig:
_write(join(func_path, "p_ssize"), 2)
if start:
self.__start_function(func, eps)
- self.__create_meta(func, "Audio Capture", eps)
+ self.__create_meta(func, "Microphone", eps)
def add_serial(self, start: bool) -> None:
eps = 3
@@ -308,8 +308,8 @@ def _cmd_start(config: Section) -> None: # pylint: disable=too-many-statements,
gc.add_serial(cod.serial.start)
if cod.audio.enabled:
- logger.info("===== Audio Capture =====")
- gc.add_audio_capture(cod.audio.start)
+ logger.info("===== Microphone =====")
+ gc.add_audio_mic(cod.audio.start)
logger.info("===== Preparing complete =====")
diff --git a/kvmd/apps/otgconf/__init__.py b/kvmd/apps/otgconf/__init__.py
index e1f4d66c..b57f0df1 100644
--- a/kvmd/apps/otgconf/__init__.py
+++ b/kvmd/apps/otgconf/__init__.py
@@ -134,6 +134,7 @@ class _GadgetControl:
funcs = list(self.__read_metas())
eps_used = sum(func.eps for func in funcs if func.enabled)
print(f"# Endpoints used: {eps_used} of {self.__eps}")
+ print(f"# Endpoints free: {self.__eps - eps_used}")
for func in funcs:
print(f"{'+' if func.enabled else '-'} {func.name} # [{func.eps}] {func.desc}")