Skip to content

Commit 78e1323

Browse files
authored
fix usb speaker discovery (#37)
1 parent e1b2069 commit 78e1323

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arduino/app_peripherals/speaker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def _list_usb_speakers() -> list:
153153
desc_str = desc[1] if isinstance(desc, tuple) else str(desc)
154154
if "usb" in card_name.lower() or "usb" in desc_str.lower():
155155
# Find all plughw devices for this card
156-
for dev in alsaaudio.pcms(alsaaudio.PCM_CAPTURE):
156+
for dev in alsaaudio.pcms(alsaaudio.PCM_PLAYBACK):
157157
if dev.startswith("plughw:CARD=") and f"CARD={card_name}" in dev:
158158
usb_devices.append(dev)
159159
except Exception as e:

0 commit comments

Comments
 (0)