All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: Lynx HiLo USB DAC issues
       [not found] <CAAmECqTLRKu8uEpX9YHY3=W5bB0ydys2oQ2pAgHs2WjsjCqUFQ@mail.gmail.com>
@ 2013-09-12  0:01 ` Radoslaw Szkodzinski
  2013-09-12  0:12   ` Radoslaw Szkodzinski
  0 siblings, 1 reply; 6+ messages in thread
From: Radoslaw Szkodzinski @ 2013-09-12  0:01 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]

Hello,
I'm now an owner of a Lynx Hilo USB DAC/ADC.
It is supposedly USB Audio Class 2 compatible, but it does require an
advanced driver on both Windows and Mac OS X.
The device has a complex UAC2 mixer and extra features.

It enumerates fine, but there's some problem with the clock selector
and sink parameters.
I've attached lsusb -vvv and dmesg output.

Apparently bNrInPins is invalid for the clock selector for some reason.
After adding an extra log of that variable, I get:
[49574.136478] __uac_clock_find_source(): selector reported illegal
value, id 40, ret 6, pins 1

This can actually be correct if the current clock source is not
supported via USB.
HiLo has a separate clock source variant for USB.

I think that in this case, the clock shouldn't be rejected as invalid,
instead switched to the available source if possible.
During initialization, there can be any kind of garbage present in the selector.

Thanks for any help,
--
Radosław Szkodziński

[-- Attachment #2: hilo-dmesg.txt --]
[-- Type: text/plain, Size: 905 bytes --]

[46123.000324] usb 2-1.6: new high-speed USB device number 9 using ehci-pci
[46123.486121] usb 2-1.6: New USB device found, idVendor=247f, idProduct=3231
[46123.486125] usb 2-1.6: New USB device strings: Mfr=28, Product=27, SerialNumber=1
[46123.486127] usb 2-1.6: Product: Lynx Hilo
[46123.486128] usb 2-1.6: Manufacturer: Lynx
[46123.486129] usb 2-1.6: SerialNumber: 3212132243
[46123.486739] __uac_clock_find_source(): selector reported illegal value, id 40, ret 6
[46123.486741] parse_audio_format_rates_v2(): unable to find clock source (clock -22)
[46123.487002] __uac_clock_find_source(): selector reported illegal value, id 40, ret 6
[46123.487242] __uac_clock_find_source(): selector reported illegal value, id 40, ret 6
[46123.487244] parse_audio_format_rates_v2(): unable to find clock source (clock -22)
[46123.541625] __uac_clock_find_source(): selector reported illegal value, id 40, ret 6


[-- Attachment #3: hilo-usb.txt --]
[-- Type: text/plain, Size: 27919 bytes --]

Bus 002 Device 006: ID 247f:3231  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x247f 
  idProduct          0x3231 
  bcdDevice           10.00
  iManufacturer          28 Lynx
  iProduct               27 Lynx Hilo
  iSerial                 1 3212132243
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          341
    bNumInterfaces          6
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower                0mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio
      bFunctionSubClass       0 
      bFunctionProtocol      32 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol     32 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               2.00
        bCategory               8
        wTotalLength           83
        bmControl            0x00
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               47
        bmAttributes         0x03 Internal programmable Clock 
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            2 Hilo Clock Source
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     11 (CLOCK_SELECTOR)
        bUnitID                40
        bNrInPins               1
        baCSourceID( 0)        47
        bmControls           0x01
          Clock Selector Control (read-only)
        iClockSelector          9 Clock Selector
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels             8
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          11 Hilo USB Play 1
        iTerminal              27 Lynx Hilo
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            20
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               2
        bCSourceID             40
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels             8
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          19 Hilo USB Record 1
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            22
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               1
        bCSourceID             40
        bmControls         0x0000
        iTerminal              27 Lynx Hilo
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels             8
        bmChannelConfig   0x00000000
        iChannelNames          11 Hilo USB Play 1
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels             8
        bmChannelConfig   0x00000000
        iChannelNames          19 Hilo USB Record 1
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      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            9
        bInCollection           1
        baInterfaceNr( 0)       1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      3 MIDI Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      MIDIStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           65
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 2
        iJack                  30 Hilo Virtual MIDI In
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 3
        bNrInputPins            1
        baSourceID( 0)          2
        BaSourcePin( 0)         1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               2 External
        bJackID                 4
        bNrInputPins            1
        baSourceID( 0)          1
        BaSourcePin( 0)         1
        iJack                  29 Hilo Virtual MIDI Out
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       1
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       3
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        5
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      0 
      iInterface             10 DFU
      Device Firmware Upgrade Interface Descriptor:
        bLength                             7
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                    250 milliseconds
        wTransferSize                      64 bytes
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          341
    bNumInterfaces          6
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower                0mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio
      bFunctionSubClass       0 
      bFunctionProtocol      32 
      iFunction               0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol     32 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               2.00
        bCategory               8
        wTotalLength           83
        bmControl            0x00
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     10 (CLOCK_SOURCE)
        bClockID               47
        bmAttributes         0x03 Internal programmable Clock 
        bmControls           0x07
          Clock Frequency Control (read/write)
          Clock Validity Control (read-only)
        bAssocTerminal          0
        iClockSource            2 Hilo Clock Source
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype     11 (CLOCK_SELECTOR)
        bUnitID                40
        bNrInPins               1
        baCSourceID( 0)        47
        bmControls           0x01
          Clock Selector Control (read-only)
        iClockSelector          9 Clock Selector
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels             8
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          11 Hilo USB Play 1
        iTerminal              27 Lynx Hilo
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            20
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               2
        bCSourceID             40
        bmControls         0x0000
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                17
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bCSourceID             40
        bNrChannels             8
        bmChannelConfig   0x00000000
        bmControls    0x0000
        iChannelNames          19 Hilo USB Record 1
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            22
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               1
        bCSourceID             40
        bmControls         0x0000
        iTerminal              27 Lynx Hilo
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0006  1x 6 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels             8
        bmChannelConfig   0x00000000
        iChannelNames          11 Hilo USB Play 1
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol     32 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                16
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink          22
        bmControls           0x00
        bFormatType             1
        bmFormats         0x00000001
          PCM
        bNrChannels             8
        bmChannelConfig   0x00000000
        iChannelNames          19 Hilo USB Record 1
      AudioStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bSubslotSize            4
        bBitResolution         24
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               1
        AudioControl Endpoint Descriptor:
          bLength                 8
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bmControls           0x00
          bLockDelayUnits         2 Decoded PCM samples
          wLockDelay              8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      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            9
        bInCollection           1
        baInterfaceNr( 0)       1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      3 MIDI Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      MIDIStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           65
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 2
        iJack                  30 Hilo Virtual MIDI In
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 3
        bNrInputPins            1
        baSourceID( 0)          2
        BaSourcePin( 0)         1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               2 External
        bJackID                 4
        bNrInputPins            1
        baSourceID( 0)          1
        BaSourcePin( 0)         1
        iJack                  29 Hilo Virtual MIDI Out
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       1
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 5
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         1
          baAssocJackID( 0)       3
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        5
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      0 
      iInterface             10 DFU
      Device Firmware Upgrade Interface Descriptor:
        bLength                             7
        bDescriptorType                    33
        bmAttributes                        7
          Will Not Detach
          Manifestation Tolerant
          Upload Supported
          Download Supported
        wDetachTimeout                    250 milliseconds
        wTransferSize                      64 bytes
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

[-- Attachment #4: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Lynx HiLo USB DAC issues
  2013-09-12  0:01 ` Fwd: Lynx HiLo USB DAC issues Radoslaw Szkodzinski
@ 2013-09-12  0:12   ` Radoslaw Szkodzinski
  2013-09-12  0:43     ` Radoslaw Szkodzinski
  0 siblings, 1 reply; 6+ messages in thread
From: Radoslaw Szkodzinski @ 2013-09-12  0:12 UTC (permalink / raw)
  To: alsa-devel

In fact, there's nothing linking bNrInPins with bClockID at all in the standard.
From what I could read, baCSourceID(I) contains the actual ClockID
that should be set, while the code does:

                for (i = 1; i <= selector->bNrInPins; i++) {
...
                        err = uac_clock_selector_set_val(chip, entity_id, i);


Setting it to the pin number instead of the clock ID.

-- 
Radosław Szkodziński
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Lynx HiLo USB DAC issues
  2013-09-12  0:12   ` Radoslaw Szkodzinski
@ 2013-09-12  0:43     ` Radoslaw Szkodzinski
  2013-09-12 16:41       ` Daniel Mack
  0 siblings, 1 reply; 6+ messages in thread
From: Radoslaw Szkodzinski @ 2013-09-12  0:43 UTC (permalink / raw)
  To: alsa-devel

Never mind, I see the issue now. (It is late here.)
The CLOCK_SELECTOR is read-only according to lsusb output.

Apparently uac_clock_selector_get_val fails to work, returning invalid
pin number.
That should not happen, but it shouldn't be called either in this
case, as the selector is irrelevant.

-- 
Radosław Szkodziński
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Lynx HiLo USB DAC issues
  2013-09-12  0:43     ` Radoslaw Szkodzinski
@ 2013-09-12 16:41       ` Daniel Mack
  2013-09-12 17:00         ` Radoslaw Szkodzinski
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Mack @ 2013-09-12 16:41 UTC (permalink / raw)
  To: Radoslaw Szkodzinski; +Cc: alsa-devel

Hi Radoslaw,

On 12.09.2013 02:43, Radoslaw Szkodzinski wrote:
> Never mind, I see the issue now. (It is late here.)
> The CLOCK_SELECTOR is read-only according to lsusb output.
> 
> Apparently uac_clock_selector_get_val fails to work, returning invalid
> pin number.
> That should not happen, but it shouldn't be called either in this
> case, as the selector is irrelevant.

Sorry, I don't follow. Given that you successfully dug into the driver
sources already, can you share a patch that makes things work for you?

The problem with the clocking framework in UAC2 is that it's quite
powerful (there are multipliers, dividers, switches etc), but I haven't
yet seen a system that actually makes uses it in more complex
applications. Hence it's not exactly easy to come up with a generic
approach of how to handle all the possible cases correctly, and how to
react on clock validity loss for instance.

Help from someone who has access to a more complex device is hence more
than welcome :)


Thanks,
Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Lynx HiLo USB DAC issues
  2013-09-12 16:41       ` Daniel Mack
@ 2013-09-12 17:00         ` Radoslaw Szkodzinski
  2013-09-12 17:07           ` Daniel Mack
  0 siblings, 1 reply; 6+ messages in thread
From: Radoslaw Szkodzinski @ 2013-09-12 17:00 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel

On Thu, Sep 12, 2013 at 6:41 PM, Daniel Mack <zonque@gmail.com> wrote:
> Hi Radoslaw,
>
> On 12.09.2013 02:43, Radoslaw Szkodzinski wrote:
>> Never mind, I see the issue now. (It is late here.)
>> The CLOCK_SELECTOR is read-only according to lsusb output.
>>
>> Apparently uac_clock_selector_get_val fails to work, returning invalid
>> pin number.
>> That should not happen, but it shouldn't be called either in this
>> case, as the selector is irrelevant.
>
> Sorry, I don't follow. Given that you successfully dug into the driver
> sources already, can you share a patch that makes things work for you?

The patch is not complete yet; I've done the selector fix, but it
uncovered an issue where the device doesn't report any sample rates
(CUR 0, RANGE 0) and ALSA is unable to handle this.
I'll add some probing - this, unlike the broken selector, is
technically allowed by UAC2 but a bit silly.
(The device can handle anything 1 Hz to 384kHz. And DSD.)

> The problem with the clocking framework in UAC2 is that it's quite
> powerful (there are multipliers, dividers, switches etc), but I haven't
> yet seen a system that actually makes uses it in more complex
> applications. Hence it's not exactly easy to come up with a generic
> approach of how to handle all the possible cases correctly, and how to
> react on clock validity loss for instance.

I've decided in that case (readonly invalid selector) to count the
valid sources and if there's only one valid, use that.

> Help from someone who has access to a more complex device is hence more
> than welcome :)

-- 
Radosław Szkodziński
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Lynx HiLo USB DAC issues
  2013-09-12 17:00         ` Radoslaw Szkodzinski
@ 2013-09-12 17:07           ` Daniel Mack
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Mack @ 2013-09-12 17:07 UTC (permalink / raw)
  To: Radoslaw Szkodzinski; +Cc: alsa-devel

On 12.09.2013 19:00, Radoslaw Szkodzinski wrote:
> On Thu, Sep 12, 2013 at 6:41 PM, Daniel Mack <zonque@gmail.com> wrote:
>> On 12.09.2013 02:43, Radoslaw Szkodzinski wrote:
>>> Never mind, I see the issue now. (It is late here.)
>>> The CLOCK_SELECTOR is read-only according to lsusb output.
>>>
>>> Apparently uac_clock_selector_get_val fails to work, returning invalid
>>> pin number.
>>> That should not happen, but it shouldn't be called either in this
>>> case, as the selector is irrelevant.
>>
>> Sorry, I don't follow. Given that you successfully dug into the driver
>> sources already, can you share a patch that makes things work for you?
> 
> The patch is not complete yet; I've done the selector fix, but it
> uncovered an issue where the device doesn't report any sample rates
> (CUR 0, RANGE 0) and ALSA is unable to handle this.
> I'll add some probing - this, unlike the broken selector, is
> technically allowed by UAC2 but a bit silly.
> (The device can handle anything 1 Hz to 384kHz. And DSD.)

We have SNDRV_PCM_RATE_CONTINUOUS which should be used in such cases,
but how should the driver get to know about this feature if the device
doesn't report it in any way?

>> The problem with the clocking framework in UAC2 is that it's quite
>> powerful (there are multipliers, dividers, switches etc), but I haven't
>> yet seen a system that actually makes uses it in more complex
>> applications. Hence it's not exactly easy to come up with a generic
>> approach of how to handle all the possible cases correctly, and how to
>> react on clock validity loss for instance.
> 
> I've decided in that case (readonly invalid selector) to count the
> valid sources and if there's only one valid, use that.

Yep, that certainly makes sense. I'm looking forward to your patches.


Thanks for your help,
Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-12 17:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAAmECqTLRKu8uEpX9YHY3=W5bB0ydys2oQ2pAgHs2WjsjCqUFQ@mail.gmail.com>
2013-09-12  0:01 ` Fwd: Lynx HiLo USB DAC issues Radoslaw Szkodzinski
2013-09-12  0:12   ` Radoslaw Szkodzinski
2013-09-12  0:43     ` Radoslaw Szkodzinski
2013-09-12 16:41       ` Daniel Mack
2013-09-12 17:00         ` Radoslaw Szkodzinski
2013-09-12 17:07           ` Daniel Mack

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.