All of lore.kernel.org
 help / color / mirror / Atom feed
* Problems with Hercules DJ Console and the usb-audio driver
@ 2005-09-12 18:27 Daniel Svensson
  2005-09-12 18:35 ` Lee Revell
  2005-09-13 11:15 ` Takashi Iwai
  0 siblings, 2 replies; 12+ messages in thread
From: Daniel Svensson @ 2005-09-12 18:27 UTC (permalink / raw)
  To: alsa-devel

Hi

I'm trying to add support for the Hercules DJ Console. It's a USB 5.1 
soundcard with a MIDI-interface and some MIDI controllers. From looking
inside the box I found the following components:

Asahi Kasei, AKM AK4529VQ. A high performance multi-channel audio codec.
http://www.akm.com/datasheets/ek4529.pdf

Texas Instruments, TUSB3200AC. A USB Streaming Controller.
http://focus.ti.com/docs/prod/folders/print/tusb3200.html

Cirrus Logic, CS8427. A stereo digital audio transceiver.
http://www.cirrus.com/en/products/pro/detail/P51.html

With ALSA 1.0.9 MIDI worked well. I could access both the MIDI
controllers on the device and the keyboard I connected to the device
aswell. There were more issues though, so I updated to latest cvs and
now MIDI doesn't work anylonger. When loading snd-usb-audio I get the
message:

ALSA /home/nano/devel/alsa/alsa-driver/usb/usbmidi.c:1600: invalid quirk
type 2
snd-usb-audio: probe of 1-1:1.3 failed with error -5

I've looked at the diffs but I haven't found out what change since 1.0.9
broke the MIDI support.

Output from MIDI in 1.0.9:
Client  64 : "Hercules DJ Console" [Kernel]
  Port   0 : "Hercules DJ Console MIDI 1" (RWeX)
  Port   1 : "Hercules DJ Console MIDI 2" (RWeX)


The rest of the device doesn't work either. The mixer fails because the
mixer element "Delay Control" cannot be read. 

lsusb:
        bmaControls( 0)      0x80
          Delay


When trying to load the mixer the driver fails at:
usb/usbmixer.c (linenumbers might have changed, but somewhere there)
666         if (get_ctl_value(cval, GET_MAX, (cval->control << 8) | minchn, &cval->max) < 0 ||
667             get_ctl_value(cval, GET_MIN, (cval->control << 8) |minchn, &cval->min) < 0) {
668             snd_printd(KERN_ERR "%d:%d: cannot get min/max values for control %d (id %d)\n",
669                    cval->id, cval->mixer->ctrlif, cval->control,cval->id);
670             return -EINVAL;
671         }

and (same file)

742         /* master channel */
743         err = get_cur_mix_value(cval, 0, &val);
744         if (err < 0) {
745             if (cval->mixer->ignore_ctl_error) {
746                 ucontrol->value.integer.value[0] = cval->min;
747                 return 0;
748             }
749             snd_printd(KERN_ERR "cannot get current value for control %d master ch: err = %d\n", cval->control, err);
750             return err;
751         }     

With the error message:
ALSA /home/.../usb/usbmixer.c:669: 2:0: cannot get min/max values for control 8 (id 2)
ALSA /home/.../usb/usbmixer.c:749: cannot get current value for control 8 master ch: err = -22
 
$ alsamixer 
 alsamixer: function snd_mixer_load failed: Invalid argument

$ amixer controls
 numid=1,iface=MIXER,name='PCM Playback Switch'
 numid=2,iface=MIXER,name='PCM Playback Volume'
 numid=3,iface=MIXER,name='Delay Control'

$ amixer cget numid=3
 numid=3,iface=MIXER,name='Delay Control'
 ; type=INTEGER,access=rw---,values=1,min=0,max=1,step=0
 amixer: Control default element read error: Invalid argument

When trying to feed audio data to the card the driver fails at:
usb/usbaudio.c:
802         if ((err = usb_submit_urb(subs->dataurb[i].urb, GFP_ATOMIC)) < 0) {
803             snd_printk(KERN_ERR "cannot submit datapipe for urb %d, err = %d \n", i, err);
804             goto __error;
805         }

With the error message:
ALSA /home/.../usb/usbaudio.c:803: cannot submit datapipe for urb 1, err = -28
ALSA /home/.../usb/usbaudio.c:803: cannot submit datapipe for urb 0, err = -22


What does work is that the proc dir gets populated and jack correctly
assumes the card to be a 5.1 card (6 connectable devices).

Here is the output of lsusb -v:

Bus 001 Device 003: ID 06f8:d002 Guillemot Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x06f8 Guillemot Corp.
  idProduct          0xd002 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          316
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
    MaxPower              300mA
    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                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           88
        bInCollection           2
        baInterfaceNr( 0)       1
        baInterfaceNr( 1)       2
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             5
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             6
        wChannelConfig     0x003f
          Left Front (L)
          Right Front (R)
          Center Front (C)
          Low Freqency Enhancement (LFE)
          Left Surround (LS)
          Right Surround (RS)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 6
        bSourceID               5
        bControlSize            1
        bmaControls( 0)      0x00
        bmaControls( 1)      0x03
          Mute
          Volume
        bmaControls( 2)      0x03
          Mute
          Volume
        bmaControls( 3)      0x03
          Mute
          Volume
        bmaControls( 4)      0x03
          Mute
          Volume
        bmaControls( 5)      0x03
          Mute
          Volume
        bmaControls( 6)      0x03
          Mute
          Volume
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             7
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               6
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0603 Line Connector
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 2
        bSourceID               1
        bControlSize            1
        bmaControls( 0)      0x80
          Delay
        bmaControls( 1)      0x00
        bmaControls( 2)      0x00
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      4 (MIXER_UNIT)
        bUnitID                 3
        bNrInPins               1
        baSourceID( 0)          2
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        bmControls         0x00
        iMixer                  0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               3
        iTerminal               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           5
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             6
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        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
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      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           4
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes           13
          Transfer Type            Isochronous
          Synch Type               Synchronous
          Usage Type               Data
        wMaxPacketSize     0x00c0  1x 192 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      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           97
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 2
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 0
        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                 8
        bNrInputPins            1
        baSourceID( 0)          1
        BaSourcePin( 0)         1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               2 External
        bJackID                 6
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 6
        bDescriptorType        36
        bDescriptorSubtype      2 (MIDI_IN_JACK)
        bJackType               1 Embedded
        bJackID                 1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               1 Embedded
        bJackID                 1
        bNrInputPins            1
        baSourceID( 0)          6
        BaSourcePin( 0)         1
        iJack                   0 
      MIDIStreaming Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (MIDI_OUT_JACK)
        bJackType               2 External
        bJackID                 8
        bNrInputPins            1
        baSourceID( 0)          1
        BaSourcePin( 0)         1
        iJack                   0 
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 6
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         2
          baAssocJackID( 0)       0
          baAssocJackID( 1)       1
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               0
        bRefresh                0
        bSynchAddress           0
        MIDIStreaming Endpoint Descriptor:
          bLength                 6
          bDescriptorType        37
          bDescriptorSubtype      1 (GENERAL)
          bNumEmbMIDIJack         2
          baAssocJackID( 0)       0
          baAssocJackID( 1)       1


So I ask for some help to put me in the right direction. What code to
read and any thoughts about what can be wrong at the moment. The MIDI
part seems like a good thing to start with as it recently worked.
If there is more information I need to provide please tell and I'll see
what I can do about it. 


-- 
Daniel Svensson <daniel@nittionio.nu>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [Alsa-devel] Problems with Hercules DJ Console and the usb-audio driver
@ 2005-09-15  3:00 Horms
  2005-09-15 12:13 ` Clemens Ladisch
  0 siblings, 1 reply; 12+ messages in thread
From: Horms @ 2005-09-15  3:00 UTC (permalink / raw)
  To: Daniel Svensson; +Cc: debian-kernel, Clemens Ladisch, Alsa-devel

On Wed, Sep 14, 2005 at 03:29:13PM +0200, Daniel Svensson wrote:
> Hi 
> 
> CONFIG_USB_BANDWIDTH is enabled by default in the debian kernel. Could
> this be changed? According to the alsa developer who helped me debug the
> problem with my usb soundcard CONFIG_USB_BANDWIDTH should be disabled.
> The original email is forwarded here:

That sounds fair enough to me, as long there are no objections
from the rest of the kernel-team.

Clemens, could you provide a little more information on 
the problems that CONFIG_USB_BANDWIDTH causes?

Thanks

-- 
Horms

> ----- Forwarded message from Clemens Ladisch <clemens@ladisch.de> -----
> 
> From: Clemens Ladisch <clemens@ladisch.de>
> To: Daniel Svensson <nano@nittionio.nu>
> Subject: Re: [Alsa-devel] Problems with Hercules DJ Console and the usb-audio
>  driver
> 
> Daniel Svensson wrote:
> > Here is the output of "amixer scontents":
> > ...
> > Which doesn't match alsamixer controls very well (in count and names).
> 
> What is the output of "amixer contents"?
> 
> > Ok, so some progress. The device accepts S16, 6 channels, 48kHz.
> > Still no output, fails with kernel message:
> >
> > ALSA /hom.../usbaudio.c:807: cannot submit datapipe for urb 5, err = -28
> 
> 28 = ENOSPC.  Please disable bandwidth checking in the kernel
> configuration.  (This is a bug of your distribution unless you
> compiled the kernel yourself.)
> 
> 
> HTH
> Clemens
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 
> 
> ----- End forwarded message -----
> 
> -- 
> Daniel Svensson <nano@nittionio.nu>
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

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

end of thread, other threads:[~2005-11-16 23:26 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-12 18:27 Problems with Hercules DJ Console and the usb-audio driver Daniel Svensson
2005-09-12 18:35 ` Lee Revell
2005-09-13 11:15 ` Takashi Iwai
2005-09-13 14:09   ` Daniel Svensson
2005-09-13 15:58     ` Clemens Ladisch
2005-09-14 13:23       ` Daniel Svensson
2005-09-14 16:15         ` Clemens Ladisch
2005-11-15 15:36           ` Daniel Svensson
2005-11-16 23:26             ` Eric Shattow
2005-09-15  2:48         ` Lee Revell
  -- strict thread matches above, loose matches on Subject: below --
2005-09-15  3:00 [Alsa-devel] " Horms
2005-09-15 12:13 ` Clemens Ladisch
2005-09-15 18:10   ` Lee Revell

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.