BUG-09: Buffer partial 64-byte frame remainders across URB completions
to prevent silent data loss when USB bulk transfers return incomplete
chunks. Adds remainder and combined buffers to tascam_card struct.
BUG-10: Distinguish transient USB errors (-EOVERFLOW, -ENOENT, -EPIPE)
from fatal ones in capture completion. Resubmit URB on transient errors
instead of dropping it, preventing capture stream death on transient
USB bandwidth contention or controller glitches.
BUG-11: Return playback_frames_consumed from pointer callback during
ghost playback instead of always returning 0, providing correct
semantics when the callback is queried indirectly.
BUG-12: Unanchor MIDI output URB before returning on error path in
tascam_midi_out_complete to prevent the URB from remaining stuck in
the anchor's pending list.
- BUG-05: Abort probe with -EIO if device rate initialization fails
instead of registering a non-functional card.
- BUG-06: Remove SNDRV_PCM_INFO_PAUSE and SNDRV_PCM_INFO_RESUME from
both capture and playback hw info since true pause is not implemented.
- BUG-07: Change MODULE_LICENSE to 'GPL v2' to match SPDX identifier.
- BUG-08: Hold tascam->lock when reading substream pointers in
stop_pcm_work_handler to prevent use-after-free on concurrent close.
- 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 100ms delay before device initialization to allow USB power stabilization
- Implement retry logic (3 attempts) for initial handshake with 50ms between retries
- Warn on each failed handshake attempt
This addresses enumeration failures during system boot where the US-200
needs additional time to become ready after USB bus power-up.
The unaligned access functions (get_unaligned_le64, put_unaligned_le32)
are now in asm-generic/unaligned.h and must be included via <asm/unaligned.h>
in newer kernel versions.
- Add US-200 to supported devices list alongside US-144MKII
- Update project title and descriptions to mention US-200
- Clarify installation instructions for both device types
- 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
Refactor the TASCAM US-144MKII driver to improve performance and
stability for low-latency audio applications.
The key changes include:
- Improved stream and URB management for more reliable audio streaming.
- Reworked synchronization logic to prevent race conditions.
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.