Skip to content

MIDI-only USB controller misdetected as DAC, breaking default audio output (Launch Control XL 3) #891

Open

Description

@paiheulevrai

Summary

A MIDI-only USB controller is incorrectly detected as a USB DAC. NextUI shows the headphone icon and rewrites the default ALSA route to the controller's card, even though that card has no PCM playback device. Applications opening the default audio output then fail.

Environment

  • NextUI NextUI-20261013-0, commit 39a06de
  • TrimUI device using the tg5040 platform
  • Controller: Novation Launch Control XL 3, USB VID:PID 1235:0148, product string LCXL3 1
  • Application used to reproduce: ChooChooTracker (CCT)

Steps to reproduce

  1. Connect the Launch Control XL 3 to the console while in NextUI.
  2. The headphone icon appears, although this controller has no audio input/output.
  3. Launch CCT and try to start playback.
  4. Playback does not start; the default audio device fails to open.

If CCT is launched before connecting the controller, connecting it after application initialization works. The problem does not occur on Windows.

Expected behavior

MIDI-only USB devices should remain available for MIDI, but should not be selected as audio outputs or cause the USB DAC/headphone indicator to appear. The existing valid audio route should remain unchanged.

Hardware evidence collected over SSH

/proc/asound/cards:

 0 [audiocodec     ]: audiocodec - audiocodec
                      audiocodec
 1 [L1             ]: USB-Audio - LCXL3 1
                      Focusrite - Novation LCXL3 1 at usb-sunxi-ohci-1, full speed

/proc/asound/pcm lists only the internal codec:

00-00: SUNXI-CODEC sun50iw10codec-0 :  : playback 1 : capture 1

aplay -l also lists only card 0. Card 1 has /dev/snd/controlC1 and /dev/snd/midiC1D0, but no PCM playback or capture node. Its MIDI information lists 2 inputs and 4 outputs.

USB interfaces read from sysfs:

Interface Class Subclass Protocol Driver
0 01 Audio 01 AudioControl 00 snd-usb-audio
1 01 Audio 03 MIDIStreaming 00 snd-usb-audio
2 03 HID 01 Boot Interface 01 Keyboard usbhid

There is no AudioStreaming interface (Audio subclass 02). USB MIDI belongs to the USB Audio class, so an ALSA USB-Audio card name does not imply PCM audio capability.

With the controller connected, /mnt/SDCARD/.userdata/tg5040/.asoundrc contains:

pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw
    card 1
}

CCT's log reports:

Failed to open audio (Default): ALSA: Couldn't open audio device: No such file or directory

While CCT was open in the blocked state, the internal PCM playback status was closed, and the application had no PCM device open.

Likely root cause, verified against current main

In workspace/all/audiomon/audiomon.cpp, isUsbAudioDevice() accepts any sound subsystem USB device whose node contains controlC. The comment says that a control device indicates audio capability, but MIDI-only ALSA cards also expose such a control device.

handleUsbAudioConnected() then calls writeAudioFile() and SetAudioSink(AUDIO_SINK_USBDAC) without checking whether that card actually has a PCM playback device.

Please check PCM playback capability before treating a USB sound card as a DAC, both during startup scanning and hotplug handling. MIDI-only and capture-only devices should not replace the playback route. Playback-node creation timing during hotplug may need to be accounted for.

Related but distinct: #865 and #715 concern actual USB DACs and startup/card ordering; this controller has no audio playback endpoint at all. I found no existing MIDI-only-device report when searching open and closed issues for MIDI, Novation, and USB audio.

Investigation disclosure

This report was prepared with GitHub Copilot using read-only checks on the connected PC and console, and inspection of NextUI's public source. No console configuration was modified and no fix was tested.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions