Audinst HUD-mx2 covertly muting itself
Hey,
I have an Audinst HUD-mx2 external USB audio device:
Bus 007 Device 006: ID 040d:340f VIA Technologies, Inc.
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: HUDmx2 [Audinst HUD-mx2], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: HUDmx2 [Audinst HUD-mx2], device 1: USB Audio [USB Audio #1] Subdevices: 1/1 Subdevice #0: subdevice #0
While the device works right in principle, every time an app closes the device, it mutes itself (or crash, this may be a Hw problem). There is no indication of the broken state in the mixer displays of alsamixer or alsamixer-gui, and amixer output does not indicate any change, either (see below).
I am a bit stumped as to what to do next. The vendor does not officially support anything but Windows, so getting help from them is very unlikely.
amixer output in working/not working/working again condition:
~ $ amixer -c0 contents # working numid=1,iface=MIXER,name='PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=2,iface=MIXER,name='PCM Playback Switch',index=1
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=3,iface=MIXER,name='PCM Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=45,step=0 : values=45,45
| dBminmax-min=42949627.96dB,max=0.00dB
~ $ amixer -c0 contents # not working numid=1,iface=MIXER,name='PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=2,iface=MIXER,name='PCM Playback Switch',index=1
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=3,iface=MIXER,name='PCM Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=45,step=0 : values=45,45
| dBminmax-min=42949627.96dB,max=0.00dB
~ $ amixer -c0 contents # working again numid=1,iface=MIXER,name='PCM Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=2,iface=MIXER,name='PCM Playback Switch',index=1
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=3,iface=MIXER,name='PCM Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=45,step=0 : values=45,45
| dBminmax-min=42949627.96dB,max=0.00dB
Kernel version is 3.2.5 (Ubuntu).
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.24.
$ cat /proc/asound/cards
0 [HUDmx2 ]: USB-Audio - Audinst HUD-mx2
VIA Technologies Inc. Audinst HUD-mx2 at usb-0000:00:1d.1-2, full speed
$ cat /proc/asound/modules
0 snd_usb_audio
$ cat /proc/asound/devices
1: : sequencer
2: [ 0- 1]: digital audio playback
3: [ 0- 0]: digital audio playback
4: [ 0] : control
33: : timer
$ lsusb -v
[...]
Bus 007 Device 006: ID 040d:340f VIA Technologies, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x040d VIA Technologies, Inc.
idProduct 0x340f
bcdDevice 1.01
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 255
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 59
bInCollection 1
baInterfaceNr( 0) 1
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bNrChannels 2
wChannelConfig 0x0003
Left Front (L)
Right Front (R)
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 12
wTerminalType 0x0605 SPDIF interface
bAssocTerminal 0
bSourceID 11
iTerminal 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 11
bSourceID 1
bControlSize 1
bmaControls( 0) 0x01
Mute Control
bmaControls( 1) 0x00
bmaControls( 2) 0x00
iFeature 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0301 Speaker
bAssocTerminal 0
bSourceID 5
iTerminal 0
AudioControl Interface Descriptor:
bLength 10
bDescriptorType 36
bDescriptorSubtype 6 (FEATURE_UNIT)
bUnitID 5
bSourceID 1
bControlSize 1
bmaControls( 0) 0x01
Mute Control
bmaControls( 1) 0x02
Volume Control
bmaControls( 2) 0x02
Volume Control
iFeature 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bDelay 1 frames
wFormatTag 8193 IEC1937_AC-3
AudioStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 3 (FORMAT_TYPE_III)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 2 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x00c0 1x 192 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 1 Milliseconds
wLockDelay 1 Milliseconds
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 20
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 2
bBitResolution 16
bSamFreqType 4 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
tSamFreq[ 2] 88200
tSamFreq[ 3] 96000
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0180 1x 384 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 1 Milliseconds
wLockDelay 1 Milliseconds
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 1
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 20
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 2
bSubframeSize 3
bBitResolution 24
bSamFreqType 4 Discrete
tSamFreq[ 0] 44100
tSamFreq[ 1] 48000
tSamFreq[ 2] 88200
tSamFreq[ 3] 96000
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 9
Transfer Type Isochronous
Synch Type Adaptive
Usage Type Data
wMaxPacketSize 0x0240 1x 576 bytes
bInterval 1
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x01
Sampling Frequency
bLockDelayUnits 1 Milliseconds
wLockDelay 1 Milliseconds
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 61
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8f EP 15 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 16
[...]Any help is appreciated.
Regards,
Tobias
Signature · 1 line
Aussen Stop-Bits, innen gepackt!
Hi!
Quoted 9 lines · Tobias Klausmann
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: HUDmx2 [Audinst HUD-mx2], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: HUDmx2 [Audinst HUD-mx2], device 1: USB Audio [USB Audio #1] Subdevices: 1/1 Subdevice #0: subdevice #0
Quoted 5 lines
While the device works right in principle, every time an app closes the device, it mutes itself (or crash, this may be a Hw problem). There is no indication of the broken state in the mixer displays of alsamixer or alsamixer-gui, and amixer output does not indicate any change, either (see below).
Oh, and to fix it, I can just mute-unmute ("cycle") the device "PCM 1" (no levels, just a switch).
Regards,
Tobias
Signature · 1 line
Aussen Stop-Bits, innen gepackt!
Quoted 5 lines · Tobias Klausmann
While the device works right in principle, every time an app closes the device, it mutes itself (or crash, this may be a Hw problem). There is no indication of the broken state in the mixer displays of alsamixer or alsamixer-gui, and amixer output does not indicate any change, either (see below).
The USB Audio Specification defines a mechanism with which a device could notify the PC of changes in mixer controls. However, this device does not have such a mechanism, so this looks like a firmware bug.
Does this happen for both the analog and digital outputs?
Quoted 1 line
The vendor does not officially support anything but Windows
Does it work correctly in Windows without any vendor-supplied driver?
Regards,
Clemens
Hi!
Quoted 7 lines · Clemens Ladisch
Quoted 5 lines · Tobias Klausmann
While the device works right in principle, every time an app closes the device, it mutes itself (or crash, this may be a Hw problem). There is no indication of the broken state in the mixer displays of alsamixer or alsamixer-gui, and amixer output does not indicate any change, either (see below).
Quoted 5 lines
The USB Audio Specification defines a mechanism with which a device could notify the PC of changes in mixer controls. However, this device does not have such a mechanism, so this looks like a firmware bug.
Does this happen for both the analog and digital outputs?
The place the device is currently at doesn't have the Hw for me to test digital output. I will test this (and the one below) as after next week
Quoted 3 lines
Quoted 1 line
The vendor does not officially support anything but Windows
Does it work correctly in Windows without any vendor-supplied driver?
See above.
I have gotten a temporary workaround: use the secondary PCM device (hw:0,1) instead of the primary (hw:0,0), like this:
$ cat .asoundrc defaults.pcm.card 0 defaults.pcm.device 1 $
While this works, it's not eactly a discoverable way of doing it. Obviously, this should go into the system-wide asoundrc so all users benefit from it, but in this case, it works for me.
Maybe something along the lines of PCI device "quirks" would be the right thing to do? I.e. swapping the two PCM devices from ALSA's point of view.
Regards,
Tobias
Quoted 2 lines · Tobias Klausmann
I have gotten a temporary workaround: use the secondary PCM device (hw:0,1) instead of the primary (hw:0,0)
Oops, I didn't notice that there are two devices.
The first PCM device is only for Dolby-encoded data, so muting the analog output would be correct.
Quoted 3 lines
Maybe something along the lines of PCI device "quirks" would be the right thing to do? I.e. swapping the two PCM devices from ALSA's point of view.
The driver should never make the non-PCM device the first one.
Regards,
Clemens
Hi!
Quoted 6 lines · Clemens Ladisch
Quoted 2 lines · Tobias Klausmann
I have gotten a temporary workaround: use the secondary PCM device (hw:0,1) instead of the primary (hw:0,0)
Oops, I didn't notice that there are two devices.
Quoted 8 lines
The first PCM device is only for Dolby-encoded data, so muting the analog output would be correct.
Quoted 3 lines
Maybe something along the lines of PCI device "quirks" would be the right thing to do? I.e. swapping the two PCM devices from ALSA's point of view.
The driver should never make the non-PCM device the first one.
My concern is just that I have found at least 5 different forum, blog and mailing list posts where people were unable to diagnose this or fix it. There was exactly one thread that shed light:
http://comments.gmane.org/gmane.linux.alsa.devel/109855
The fix (using hw:0,1 as default) is not obvious to the average person and sort-of forcing them to dig around the internet and happen upon that thread strikes me as not exactly user friendly.
Don't get me wrong, I understand that the way things are has mostly to do with the myriad of ways in which USB audio devices are built. But making it easy/easier for user to get them working properly "out of the box" seems worthwile.
Regards,
Tobias