All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: USB asynchronous mode feedback format
@ 2010-10-14  8:47 lee188
  2010-10-14 10:27 ` Julian Scheel
  0 siblings, 1 reply; 46+ messages in thread
From: lee188 @ 2010-10-14  8:47 UTC (permalink / raw)
  To: Julian Scheel; +Cc: alsa-devel, Alex

--- Julian Scheel <julian@jusst.de> wrote:
 There may also be
> >a limitation in that the Same EP number cannot be used
> >for both IN and OUT.
> 
> Hm, I'm not sure about this. You think I should move the feedback
> pipe into it's own EP?
> I will recheck the At91SAM7 specs later, to see if I can find a note
> on such a limitation.

Hi Julian,

You might like to refer to this thread:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=88432&start=20

As I have found out, it is not necessary to have the same EP number for IN and OUT for rate feedback to work with a Linux or OSX host.  This may be a requirement for Vista/Win7 hosts though.  We are still doing testing.

Alex

^ permalink raw reply	[flat|nested] 46+ messages in thread
* USB asynchronous mode feedback format
@ 2010-10-13 15:50 Julian Scheel
  2010-10-14  1:28 ` Alex
  0 siblings, 1 reply; 46+ messages in thread
From: Julian Scheel @ 2010-10-13 15:50 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: Text/Plain, Size: 1129 bytes --]

Hi,

I am currently working on an USB-Audio device based on a AT91SAM7 processor. 
Actually I am currently trying to get the asynchronous mode working, to be 
able to use the AT91SAM7 as I2S transmitter in slave mode, utilizing and 
external clock.
So I added the endpoint descriptors for the Feedback pipe. I attached the 
lsusb output.
Alsa detects the card properly and reports it to be async in the /proc/asound 
interface. Now for a first tested I am trying to report back a constant rate 
through the feedback pipe. The stream is 48kHz with 16Bit.
Reading the USB Audio 1.0 spec I assume in theory for a 48kHz stream I would 
report a rate of 48 samples per frame to the host, compensated by the measured 
drift. As the data should be 10.14 encoded I currently send { 0x0c, 0x00, 0x00 
} on the feedback pipe whenever it is queried, which happens whenever I try to 
play some stream on this device.
But unfortunately the host won't send any data to the device. I am wondering 
what might be wrong and where to check that alsa received the feedback data 
properly?

I would be really thankful for any help!

Regards,
Julian

[-- Attachment #2: usbdesc.async --]
[-- Type: text/plain, Size: 5235 bytes --]


Bus 001 Device 100: ID 03eb:6128 Atmel Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x03eb Atmel Corp.
  idProduct          0x6128 
  bcdDevice            1.00
  iManufacturer           1 Atmel
  iProduct                2 Desktop speaker
  iSerial                 3 0123
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          119
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    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           40
        bInCollection           1
        baInterfaceNr( 0)       1
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             0
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          1
        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             1
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               2
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 2
        bSourceID               0
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x00
        bmaControls( 2)      0x00
        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           2
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           0
        bDelay                  0 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     0x04  EP 4 OUT
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress         132
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes           17
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Feedback
        wMaxPacketSize     0x0003  1x 3 bytes
        bInterval               1
        bRefresh                6
        bSynchAddress           0
Device Status:     0x0000
  (Bus Powered)

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2010-10-18 16:53 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14  8:47 USB asynchronous mode feedback format lee188
2010-10-14 10:27 ` Julian Scheel
2010-10-14 10:48   ` Daniel Mack
2010-10-14 11:01     ` Julian Scheel
2010-10-14 11:16       ` Daniel Mack
2010-10-14 11:32         ` Julian Scheel
2010-10-14 12:06           ` Daniel Mack
2010-10-14 12:30             ` Julian Scheel
2010-10-14 12:33               ` Daniel Mack
2010-10-14 12:56                 ` Julian Scheel
2010-10-14 15:10         ` Julian Scheel
2010-10-14 15:33           ` Alex Lee
2010-10-14 15:39           ` Daniel Mack
2010-10-14 15:54             ` Julian Scheel
2010-10-14 16:11               ` Daniel Mack
2010-10-14 20:14                 ` Julian Scheel
2010-10-15  8:59             ` Julian Scheel
2010-10-15  9:03               ` Daniel Mack
2010-10-18 16:53                 ` Julian Scheel
     [not found]     ` <3879AFD1-61E6-47FB-8ECB-8A7D7B233B3B@singnet.com.sg>
2010-10-14 11:44       ` Julian Scheel
2010-10-14 11:56         ` Daniel Mack
2010-10-14 11:58       ` Julian Scheel
2010-10-14 15:28         ` Alex Lee
2010-10-14 15:43           ` Julian Scheel
2010-10-15 12:08           ` Julian Scheel
2010-10-15 12:52             ` Alex Lee
2010-10-15 13:04               ` Julian Scheel
2010-10-15 13:31                 ` Alex Lee
2010-10-15 14:24                   ` Julian Scheel
2010-10-15 14:34                     ` Clemens Ladisch
2010-10-16 10:23                       ` Julian Scheel
2010-10-15 14:41                     ` Alex Lee
2010-10-15 17:16                       ` Julian Scheel
2010-10-15 17:19                         ` Julian Scheel
2010-10-16  1:52                           ` Alex Lee
2010-10-16 10:25                             ` Julian Scheel
2010-10-16 13:58                               ` Alex Lee
2010-10-16 16:30                                 ` Julian Scheel
2010-10-16 18:52                                   ` Julian Scheel
2010-10-17 10:53                                     ` Julian Scheel
2010-10-17 11:16                                       ` Alex Lee
  -- strict thread matches above, loose matches on Subject: below --
2010-10-13 15:50 Julian Scheel
2010-10-14  1:28 ` Alex
2010-10-14  5:57   ` Julian Scheel
2010-10-14  6:25     ` Alex
2010-10-14  8:46     ` lee188

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.