-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Guides USB Audio Integration
Alex J Lennon edited this page Oct 7, 2025
·
1 revision
Full bidirectional USB audio communication is now integrated and production-ready for the imx8mm-jaguar-sentai embedded system.
- Target → Host: ✅ WORKING - 699KB audio files recorded by host
- Host → Target: ✅ WORKING - 1500Hz tones played successfully
-
Container Integration: ✅ WORKING -
loop_playback_farroutes audio to host - PulseAudio Compatibility: ✅ WORKING - Both directions via PulseAudio
-
GStreamer Pipeline Ready: ✅
loop_playback_farandloop_capture_near_recconfigured - USB Audio Mapping: ✅ Container audio routes through USB gadget correctly
- Audio Flow Verified: ✅ Host recorded 699KB from container audio output
- Production Ready: ✅ All audio paths functional for embedded applications
-
Synchronization Mode:
asyncwith feedback endpoint (EP 7 IN) - Audio Parameters: 48kHz, 16-bit, stereo, S16_LE format
- Buffer Configuration: Optimized for reliable parameter negotiation
- USB Descriptors: Compliant with UAC2 specification requirements
# Container to Host (Azure TTS, alerts, etc.)
pcm.loop_playback_far → usb_gadget_speaker → Host audio input
# Host to Container (microphone, audio commands)
pcm.loop_capture_near_rec ← usb_gadget_mic ← Host audio output-
Target:
card 3: UAC2Gadget [UAC2_Gadget], device 0 -
Host:
card 1: Device [Simple USB Audio Device], device 0 - PulseAudio: Full integration with automatic device management
- Sample Rate: 48000 Hz (both directions)
- Bit Depth: 16-bit signed little-endian
- Channels: 2 (stereo)
- Latency: Low-latency with feedback endpoint synchronization
- USB Enumeration: Consistent across Windows/Linux/macOS hosts
- Parameter Negotiation: Successful with optimized buffer sizes
- Error Handling: I/O errors cosmetic, audio transmission functional
- Container Integration: Seamless audio routing to GStreamer pipeline
- Bidirectional audio communication verified
- Container ALSA configuration integrated
- GStreamer pipeline audio paths configured
- USB gadget service with systemd integration
- Docker service dependencies configured
- Host compatibility across multiple operating systems
- USB composite gadget recipe integrated
- Kernel configuration with UAC2 support
- Systemd service auto-start configuration
- ALSA configuration deployment
- Docker container audio integration
# On target board
sudo systemctl start usb-composite-gadget.service
# Test container audio output (should appear on host)
docker exec sentaispeaker-SentaiSpeaker-1 speaker-test -D loop_playback_far -t sine -f 440
# On host computer
# Record from USB audio device
arecord -D hw:1,0 -f S16_LE -r 48000 -c 2 test.wav
# Play to USB audio device
speaker-test -D hw:1,0 -t sine -f 1000The GStreamer pipeline automatically uses:
-
loop_playback_farfor audio output to host (Azure TTS, alerts) -
loop_capture_near_recfor audio input from host (microphone, commands)
- Status: Cosmetic only - audio transmission functional
- Cause: Buffer underrun messages during audio operations
- Impact: None - verified by successful host audio recordings
- Resolution: Messages can be ignored, audio flow confirmed working
- Simultaneous Access: USB audio device exclusive access per direction
- PulseAudio Integration: Recommended for host-side audio management
- Container Access: Direct ALSA access working correctly
This release establishes complete bidirectional USB audio communication for embedded systems:
- USB Audio Class 2.0 compliance with feedback endpoint synchronization
- Cross-platform host compatibility (Windows/Linux/macOS)
- Container audio integration for GStreamer pipelines
- Production-ready systemd service with automatic startup
- Comprehensive ALSA configuration for embedded audio applications
The system provides reliable, low-latency audio communication between embedded targets and host computers via USB connection.
- Release: USB Audio Bidirectional Integration v1.0
- Target Board: imx8mm-jaguar-sentai
- Kernel Version: 6.6.52-lmp-standard
- Container Integration: sentaispeaker-SentaiSpeaker-1
- Date: September 30, 2025