- BUG-01: Fix MIDI output packet format - header 0xE0 must be at index 0
per spec, not index 8. Shift payload to indices 1-8.
- BUG-02: Skip header byte (index 0) when parsing incoming MIDI packets
so ALSA does not receive spurious Active Sensing events.
- BUG-03: Check return values of submit_urbs in playback trigger;
report -EIO to ALSA if URB submission fails.
- BUG-04: Cache runtime->dma_area and buffer size under spinlock before
releasing it, eliminating race condition on concurrent close/hw_params.
Critical fixes:
- Add error_free_urbs cleanup path in tascam_alloc_urbs() to prevent memory leaks on partial URB allocation failure
- Fix tascam_create_midi() with individual cleanup for each failed allocation step
High fixes:
- Check usb_set_interface() return values in probe and resume, log errors with dev_warn()
- Validate handshake_result after retry loop exhaustion; return -EIO if all retries fail
- Stop capture_substream in tascam_stop_pcm_work_handler() to prevent use-after-free during disconnect
- Re-prepare URB descriptors on ghost-to-real takeover to ensure correct sizes
- Add NULL checks before usb_free_coherent() calls in tascam_free_urbs()
Medium fixes:
- Move us144mkii_maybe_start_stream() call after successful URB submission in tascam_midi_open() to prevent stream_refs race condition
- Add cancel_work_sync() calls in probe error path (free_card label)
- Add clarifying comments for error handling flow and ghost-to-real takeover mechanism
- Increment stream_refs only after successful URB submission in maybe_start_stream()
Low fixes:
- Add NULL checks for urb->transfer_buffer in playback_urb_complete() and feedback_urb_complete()
- Add USB_PID_TASCAM_US200 (0x8034) product ID constant
- Introduce MODE_VAL_STREAM_START_US200 (0x0032) for device-specific stream mode
- Parameterize us144mkii_configure_device_for_rate() to accept stream_mode value
- Extend model naming logic to display "US-200" for US-200 devices
- Add US-200 to USB device ID table for automatic recognition
Fixed all coding style issues reported by checkpatch.pl.
This includes:
- Trailing statements on new lines.
- Added missing blank lines after declarations.
- Corrected indentation of switch/case statements and labels.
- Added comments for memory barriers.
- Removed unnecessary braces.
Added Kdocs to all public functions and data structures to
improve code documentation.
This commit includes:
- Reverted audio stream decoupling to restore original behavior.
- Implemented SysEx state machine and error retry for MIDI handling.
- Performed memory leak audit and confirmed no obvious leaks.
- Optimized playback and capture data copying for efficiency.
- Reordered `tascam_card` structure for improved cache locality.
- Fixed `active_urbs` counter management to prevent "URBs still active" errors.