usbaudio.sys + USB DAC / PCM 2704

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Tue Jan 26, 2010 15:20

From: Сергей
Date: 20100125

А где можно узнать какие устройства поддерживает usbaudio.sys
А то тут собрал USB DAC на PCM 2704 в Виндах все работает находит и ставит драйвера.
Пробовал в Ecomstation грузить данный драйвер толку не кого тишина. Я все ищу способы как Ecomstation звук вывести по цифре.
И вообще хотел узнать данный драйвер пишется или как его забросила IBM и так не чего с того времени не происходило. В Виндах данный драйвер я понимаю обновляется периодично.
Может какую фитюльку в нем нужно дописать или есть опыт кто такое уже запускал?
Кстати USB менеджер его видит и пишет вендоры.

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Tue Jan 26, 2010 15:26

На рынке сейчас много USB Audio-адаптеров, но eComStation их не поддерживает.

IBM USBAUDIO поддерживает:
* Labtec LCS-1040 (speaker only)
* Altec ADA-70 (speaker only)
* TELEX H-531 (microphone only)

* + Edirol UA-1A USB Audio Interface -- http://ecomstation.ru/hardware.php?action=item&id=446

Разработка USBAUDIO сейчас не ведется. Все силы брошены на UNIAUD (чтобы реализовать поддержку HDAudio)

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Fri Feb 05, 2010 13:38

Wim Brul, 2010/01/30

> As you know, many people have troubles with HDAudio adapters.. it's
> difficult to debug Uniaud.

I think it is either UNIAUD or MMOS2 for audio support. Both I don't know much about so I looked at the internet and the ddk on how to implement an audio device driver. It appears to be complicated.


> What do you think about USB audio adapters?

For MMOS2 there is the USBAUDIO.SYS driver. This one is supposed to support USB audio adapters. I think that the source code of the latest USBAUDIO.SYS is not available. I do however posess the 02-19-2002 source code of USBAUDIO.SYS for study but I cannot compile and link it.


> Are you going develop a driver for USB DAC based on PCM 2704 ?
> http://www.pavouk.org/hw/usbdacpcm2704/en_index.html

I might develop a driver but I don't know how to hook it into the system and give access to applications. There is a lot of study involved. There are 3 posibilities I think:

1. Interface to UNIAUD like UNIAUD16.SYS does. This looks like the most difficult one since I don't know anything about UNIAUD and it is ported software with a development environment that I don't have available. Personally I don't like to port software. Someone else might take the linux solution for usb audio and port it. Access to the usb audio device will be through LIBUSB and USBRESMG.SYS must be updated to support isochronous transfers.

2. Interface to MMOS2 like USBAUDIO.SYS does. This may be possible but the problem is that I have to understand MMOS2 first. The study of the source code of USBAUDIO.SYS has to be done anyway in order to know how to interface to USBD.SYS to access the usb audio device.

3. Interface to USBECD.SYS. Adding support for isochronous transfers seems to be the easiest solution although I don't know yet how to do that. There is a catch however. The usb audio device is only available to applications specifically written to that interface.


> + any user can assemble / buy such audio adapter and attach it to
> desktop or notebook and get sound in OS/2 !!

Sounds good. But which way to go?

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Fri Feb 05, 2010 13:49

Wim Brul:

I am now familiarizing myself with MMOS2 because I now think it must be an MMOS2 driver.

Does eCS recognize the device and can you send me the device descriptors from the USB audio DAC with PCM2704 so that I can compare these to the usb audio device specifications?

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Sat Feb 06, 2010 20:20

Code: Select all

<<< Device Description >>>
 Type            : 01
 USB Rev         : 110
 Class           : Reserved (0)
 Subclass        : Reserved (0)
 Protocol        : Reserved (0)
  Device Information is defined at interface Level
 Max. packetsize : 08
 Vendor  ID      : 08BB
 Product ID      : 2704
 Device Release# : 0100
 Strings:
  Manufacturer Name : Burr-Brown from TI             
  Product Name      : USB Audio DAC   
  Serial number     : Not implemented
 Number of Configurations : 1

 Configuration 0 :
  Lenght     : 190
  Name       : <NONE>
  Value      : 1
  Attributes : 0x80
  Power      : 100 mA
  Interfaces : 3


wimpie
Posts: 27
Joined: Sat Feb 06, 2010 21:57
Contact:

Re: usbaudio.sys + USB DAC / PCM 2704

Postby wimpie » Sat Feb 06, 2010 22:22

Can you put USBECD.SYS driver in config.sys?

DEVICE=C:\OS2\BOOT\USBECD.SYS /D:08BB:2704:0100 /N:PCM$

and run USBWRITE.CMD PCM$ and post the result?

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Sun Feb 07, 2010 02:53

* No sound
* run USBWRITE.CMD PCM$ and post the result? - attached
* Linux: http://www.vegalab.ru/forum/showthread. ... 252&page=9



Code: Select all

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  12  │ Descriptor Length                  │
 │     bDescriptorType │  01  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │              bcdUSB │ 0110 │ USB specification release number   │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │        bDeviceClass │  00  │ Device Class code                  │
 │     bDeviceSubClass │  00  │ Device Sub Class code              │
 │     bDeviceProtocol │  00  │ Device Protocol code               │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │     bMaxPacketSize0 │  08  │ Maximum Packet Size for endpoint 0 │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │            idVendor │ 08BB │ Vendor identification              │
 │           idProduct │ 2704 │ Product identification             │
 │           bcdDevice │ 0100 │ Device release number              │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │       iManufacturer │  01  │ Burr-Brown from TI                 │
 │            iProduct │  02  │ USB Audio DAC                      │
 │       iSerialNumber │  00  │ No String!                         │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │  bNumConfigurations │  01  │ Number of possible Configurations  │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Device Descriptor

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  02  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │        wTotalLength │ 00BE │ Total Length of data returned      │
 │      bNumInterfaces │  03  │ Number of Interfaces supported     │
 │ bConfigurationValue │  01  │ Set Configuration parameter Value  │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │      iConfiguration │  00  │ No String!                         │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │        bmAttributes │  80  │ Configuration characteristics      │
 │            MaxPower │  32  │ Maximum Power consumption          │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Configuration Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  04  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bInterfaceNumber │  00  │ Number of this Interface           │
 │   bAlternateSetting │  00  │ Set Interface parameter Value      │
 │       bNumEndpoints │  00  │ Number of Endpoints supported      │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │     bInterfaceClass │  01  │ Interface Class code               │
 │  bInterfaceSubClass │  01  │ Interface Sub Class code           │
 │  bInterfaceProtocol │  00  │ Interface Protocol code            │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │          iInterface │  00  │ No String!                         │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Interface Descriptor 1.0

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  0C  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  0A  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  04  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bInterfaceNumber │  01  │ Number of this Interface           │
 │   bAlternateSetting │  00  │ Set Interface parameter Value      │
 │       bNumEndpoints │  00  │ Number of Endpoints supported      │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │     bInterfaceClass │  01  │ Interface Class code               │
 │  bInterfaceSubClass │  02  │ Interface Sub Class code           │
 │  bInterfaceProtocol │  00  │ Interface Protocol code            │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │          iInterface │  00  │ No String!                         │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Interface Descriptor 1.1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  04  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bInterfaceNumber │  01  │ Number of this Interface           │
 │   bAlternateSetting │  01  │ Set Interface parameter Value      │
 │       bNumEndpoints │  01  │ Number of Endpoints supported      │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │     bInterfaceClass │  01  │ Interface Class code               │
 │  bInterfaceSubClass │  02  │ Interface Sub Class code           │
 │  bInterfaceProtocol │  00  │ Interface Protocol code            │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │          iInterface │  00  │ No String!                         │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Interface Descriptor 1.2

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  07  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  11  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  05  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bEndpointAddress │  02  │ Endpoint Address direction/number  │
 │        bmAttributes │  09  │ Endpoint Attributes transfer type  │
 │      wMaxPacketSize │ 00C0 │ Maximum Packet Size when selected  │
 │           bInterval │  01  │ Polling Interval data transfers    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Endpoint Descriptor 1.2.1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  07  │ Descriptor Length                  │
 │     bDescriptorType │  25  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  04  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bInterfaceNumber │  01  │ Number of this Interface           │
 │   bAlternateSetting │  02  │ Set Interface parameter Value      │
 │       bNumEndpoints │  01  │ Number of Endpoints supported      │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │     bInterfaceClass │  01  │ Interface Class code               │
 │  bInterfaceSubClass │  02  │ Interface Sub Class code           │
 │  bInterfaceProtocol │  00  │ Interface Protocol code            │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │          iInterface │  00  │ No String!                         │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Interface Descriptor 1.3

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  07  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  11  │ Descriptor Length                  │
 │     bDescriptorType │  24  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  05  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bEndpointAddress │  02  │ Endpoint Address direction/number  │
 │        bmAttributes │  09  │ Endpoint Attributes transfer type  │
 │      wMaxPacketSize │ 0060 │ Maximum Packet Size when selected  │
 │           bInterval │  01  │ Polling Interval data transfers    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Endpoint Descriptor 1.3.1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  07  │ Descriptor Length                  │
 │     bDescriptorType │  25  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  04  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bInterfaceNumber │  02  │ Number of this Interface           │
 │   bAlternateSetting │  00  │ Set Interface parameter Value      │
 │       bNumEndpoints │  01  │ Number of Endpoints supported      │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │     bInterfaceClass │  03  │ Interface Class code               │
 │  bInterfaceSubClass │  00  │ Interface Sub Class code           │
 │  bInterfaceProtocol │  00  │ Interface Protocol code            │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │          iInterface │  00  │ No String!                         │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Interface Descriptor 1.4

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  09  │ Descriptor Length                  │
 │     bDescriptorType │  21  │ Descriptor Type                    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Unknown Descriptor 1

 ┌─────────────────────┬──────┬────────────────────────────────────┐
 │             bLength │  07  │ Descriptor Length                  │
 │     bDescriptorType │  05  │ Descriptor Type                    │
 ├─────────────────────┼──────┼────────────────────────────────────┤
 │    bEndpointAddress │  85  │ Endpoint Address direction/number  │
 │        bmAttributes │  03  │ Endpoint Attributes transfer type  │
 │      wMaxPacketSize │ 0001 │ Maximum Packet Size when selected  │
 │           bInterval │  0A  │ Polling Interval data transfers    │
 └─────────────────────┴──────┴────────────────────────────────────┘
   Device Driver PCM$ - Endpoint Descriptor 1.4.1

wimpie
Posts: 27
Joined: Sat Feb 06, 2010 21:57
Contact:

Re: usbaudio.sys + USB DAC / PCM 2704

Postby wimpie » Sun Feb 07, 2010 17:22

Good to see that usbecd.sys can access the device. To obtain the full configuration descriptor please run the code below and post the result.

Code: Select all

/* test with the USBECD.SYS device driver */
rc=RxFuncAdd('SysGetMessage','RexxUtil','SysGetMessage')

ddName = 'PCM$' /* default device driver name */

/* ensure that the device driver statement exists in config.sys */
if stream(ddName,'command','query exists') \= '\DEV\' || ddName
then do
  say
  say 'Missing DEVICE=C:\OS2\BOOT\USBECD.SYS statement in CONFIG.SYS.'
  say
  exit
  end

/* acquire the device driver */
rc=stream(ddName,'command','open')
if rc \= 'READY:'
then do
  /* obtain and issue error message */
  parse value rc with sState ':' mNumber
  say SysGetMessage(mNumber,,ddName)
  exit
  end

/* get device descriptor */
oiBuffer = substr(x2c(80 06 00 01 00 00 18 00),1,32,x2c(EE))
oiHeader = "GetDescriptor: Device"
call IssueWriteFunction

/* get configuration descriptor */
oiBuffer = substr(x2c(80 06 00 02 00 00 BE 00),1,224,x2c(EE))
oiHeader = "GetDescriptor: Configuration"
call IssueWriteFunction

/* release the device driver */
rc=stream(ddName,"command","close")
exit

IssueWriteFunction:
/* usb control transfer */
say
say oiHeader
say c2x(oiBuffer) /* show supplied data */
rc=charout(ddName,oiBuffer) /* supply and obtain setup and data packet */
say c2x(oiBuffer) /* show obtained data */
say
CheckCompletionCode:
/* check completion code */
rc=stream(ddName,"description")
if rc \= "READY:"
then do
  /* obtain and issue error message */
  parse value rc with sState ':' mNumber
  say SysGetMessage(mNumber,,ddName)
  exit
  end
return

Sergey2
Posts: 17
Joined: Sun Feb 07, 2010 18:42

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Sergey2 » Sun Feb 07, 2010 18:49

Ok.

Code: Select all

GetDescriptor: Device
8006000100001800EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
80060001000012001201100100000008BB080427000101020001EEEEEEEEEEEE


GetDescriptor: Configuration
800600020000BE00EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
800600020000BE000902BE0003010080FA0904000000010100000924010001280001010C24020101010002030000000924030201030003000A240603010101020200090401000001020000090401010101020000072401010001001124020102021003007D0044AC0080BB0009050209C00001000007250100020002090401020101020000072401010001001124020101021003007D0044AC0080BB00090502096000010000072501000200020904020001030000000921000100012224000705850301000AEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE


wimpie
Posts: 27
Joined: Sat Feb 06, 2010 21:57
Contact:

Re: usbaudio.sys + USB DAC / PCM 2704

Postby wimpie » Sun Feb 07, 2010 21:59

I have reformatted the descriptors according to the usb audio specification.

Code: Select all

//Device Descriptor
0x12,0x01,0x0110,0x00,0x00,0x00,0x08,0x08BB,0x2704,0x0100,0x01,0x02,0x00,0x01

//Configuration Descriptor
0x09,0x02,0x00BE,0x03,0x01,0x00,0x80,0xFA
  //AudioControl Interface Descriptor
  0x09,0x04,0x00,0x00,0x00,0x01,0x01,0x00,0x00
    //Class-specific AudioControl Interface Descriptor
    0x09,0x24,0x01,0x0100,0x0028,0x01,0x01
    //Class-specific Input Terminal Descriptor
    0x0C,0x24,0x02,0x01,0x0101,0x00,0x02,0x0003,0x00,0x00
    //Class-specific Output Terminal Descriptor
    0x09,0x24,0x03,0x02,0x0301,0x00,0x03,0x00
    //Class-specific Feature Unit Descriptor
    0x0A,0x24,0x06,0x03,0x01,0x01,0x01,0x02,0x02,0x00
  //AudioStreaming Interface Descriptor
  0x09,0x04,0x01,0x00,0x00,0x01,0x02,0x00,0x00
  //AudioStreaming Interface Descriptor
  0x09,0x04,0x01,0x01,0x01,0x01,0x02,0x00,0x00
    //Class-specific AudioStreaming General Interface Descriptor
    0x07,0x24,0x01,0x01,0x00,0x0001
    //Class-specific AudioStreaming Type 1 Format Type Descriptor
    0x11,0x24,0x02,0x01,0x02,0x02,0x10,0x03,0x007D00,0x00AC44,0x00BB80
    //SerialStandard Endpoint Descriptor
    0x09,0x05,0x02,0x09,0x00C0,0x01,0x00,0x00
    //Class-specific Isochronous Audio Data Endpoint Descriptor
    0x07,0x25,0x01,0x00,0x02,0x2000
  //AudioStreaming Interface Descriptor
  0x09,0x04,0x01,0x02,0x01,0x01,0x02,0x00,0x00
    //Class-specific AudioStreaming General Interface Descriptor
    0x07,0x24,0x01,0x01,0x00,0x0001
    //Class-specific AudioStreaming Type 1 Format Type Descriptor
    0x11,0x24,0x02,0x01,0x02,0x02,0x10,0x03,0x007D00,0x00AC44,0x00BB80
    //SerialStandard Endpoint Descriptor
    0x09,0x05,0x02,0x09,0x0060,0x01,0x00,0x00
    //Class-specific Isochronous Audio Data Endpoint Descriptor
    0x07,0x25,0x01,0x00,0x02,0x2000
  //InputControl Interface Descriptor
  0x09,0x04,0x02,0x00,0x01,0x03,0x00,0x00,0x00
    //Class-specific Device Descriptor?
    0x09,0x21,0x00,0x01,0x00,0x01,0x22,0x24,0x00
    //Standard Endpoint Descriptor
    0x07,0x05,0x85,0x03,0x0001,0x0A



O.K. Eugene his device draws 100 mA, Sergey2 his device draws 500 mA. Is he the user without sound?
Tomorrow I will look into how to issue standard requests and class specific requests using usbecd.sys driver.

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Sun Feb 07, 2010 22:30

wait a moment..

There is one user - Sergey with this device.
I was posting his reports. Later he joined the forum.

So.. the same device shows 100 mA and 500 mA ???

wimpie
Posts: 27
Joined: Sat Feb 06, 2010 21:57
Contact:

Re: usbaudio.sys + USB DAC / PCM 2704

Postby wimpie » Mon Feb 08, 2010 14:05

Eugene Gorbunoff wrote:So.. the same device shows 100 mA and 500 mA ???


May be he has two devices. Besides the pcm2704 may report 100 mA and 500 mA for bus-powered operation (PSEL pin 4 is HIGH) and dependent upon the HOST pin 21 wiring (LOW is 100 mA and HIGH is 500 mA).

Please run the code below and post the result.

Note: I changed the code to use endpoint 85.

Code: Select all

/* standard usb requests with the USBECD.SYS device driver */
rc=RxFuncAdd('SysGetMessage','RexxUtil','SysGetMessage')

ddName = 'PCM$' /* default device driver name */

/* ensure that the device driver statement exists in config.sys */
if stream(ddName,'command','query exists') \= '\DEV\' || ddName
then do
  say
  say 'Missing DEVICE=C:\OS2\BOOT\USBECD.SYS statement in CONFIG.SYS.'
  say
  exit
  end

/* acquire the device driver */
rc=stream(ddName,'command','open')
if rc \= 'READY:'
then do
  /* obtain and issue error message */
  parse value rc with sState ':' mNumber
  say SysGetMessage(mNumber,,ddName)
  exit
  end

oiHeader = "GetStatus: Device"
oiBuffer = substr(x2c(80 00 00 00 00 00 04 00),1,12,x2c(EE))
call IssueWriteFunction

oiHeader = "GetConfiguration: Device"
oiBuffer = substr(x2c(80 08 00 00 00 00 04 00),1,12,x2c(EE))
call IssueWriteFunction

oiHeader = "GetInterface: Interface01"
oiBuffer = substr(x2c(81 0A 00 00 01 00 04 00),1,12,x2c(EE))
call IssueWriteFunction

oiHeader = "GetStatus: Interface01"
oiBuffer = substr(x2c(81 00 00 00 01 00 04 00),1,12,x2c(EE))
call IssueWriteFunction

oiHeader = "GetStatus: Endpoint00"
oiBuffer = substr(x2c(82 00 00 00 00 00 04 00),1,12,x2c(EE))
call IssueWriteFunction

oiHeader = "GetStatus: Endpoint02"
oiBuffer = substr(x2c(82 00 00 00 02 00 04 00),1,12,x2c(EE))
call IssueWriteFunction

oiHeader = "GetStatus: Endpoint85"
oiBuffer = substr(x2c(82 00 00 00 85 00 04 00),1,12,x2c(EE))
call IssueWriteFunction

/* release the device driver */
rc=stream(ddName,"command","close")
exit

IssueWriteFunction:
/* usb control transfer */
say
say oiHeader
say c2x(oiBuffer) /* show supplied data */
rc=charout(ddName,oiBuffer) /* supply and obtain setup and data packet */
say c2x(oiBuffer) /* show obtained data */
/* say */
CheckCompletionCode:
/* check completion code */
rc=stream(ddName,"description")
if rc \= "READY:"
then do
  /* obtain and issue error message */
  parse value rc with sState ':' mNumber
  say SysGetMessage(mNumber,,ddName)
  exit
  end
return
Last edited by wimpie on Tue Feb 09, 2010 12:56, edited 2 times in total.

Sergey2
Posts: 17
Joined: Sun Feb 07, 2010 18:42

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Sergey2 » Mon Feb 08, 2010 22:00

Code: Select all

GetStatus: Device
8000000000000400EEEEEEEE
80000000000002000000EEEE

GetConfiguration: Device
8008000000000400EEEEEEEE
800800000000010001EEEEEE

GetInterface: Interface1
810A000001000400EEEEEEEE
810A00000100010000EEEEEE

GetStatus: Interface1
8100000001000400EEEEEEEE
81000000010002000000EEEE

GetStatus: Endpoint0
8200000000000400EEEEEEEE
82000000000002000000EEEE

GetStatus: Endpoint2
8200000002000400EEEEEEEE
82000000020002000000EEEE

GetStatus: Endpoint5
8200000005000400EEEEEEEE
8200000005000000EEEEEEEE
SYS0029: OS/2 не может выполнить запись на заданное устройство.


Here that has turned out.

wimpie
Posts: 27
Joined: Sat Feb 06, 2010 21:57
Contact:

Re: usbaudio.sys + USB DAC / PCM 2704

Postby wimpie » Tue Feb 09, 2010 13:10

Sergey2 wrote:

Code: Select all

GetStatus: Endpoint5
8200000005000400EEEEEEEE
8200000005000000EEEEEEEE
SYS0029: OS/2 не может выполнить запись на заданное устройство.

Here that has turned out.


Endpoint 05 must be Endpoint 85. I updated the code in my previous post. Please rerun.

wimpie
Posts: 27
Joined: Sat Feb 06, 2010 21:57
Contact:

Re: usbaudio.sys + USB DAC / PCM 2704

Postby wimpie » Tue Feb 09, 2010 19:16

Please try these class-specific mute requests:

Code: Select all

/* master mute control with the USBECD.SYS device driver */
rc=RxFuncAdd('SysGetMessage','RexxUtil','SysGetMessage')

ddName = 'PCM$' /* default device driver name */

/* ensure that the device driver statement exists in config.sys */
if stream(ddName,'command','query exists') \= '\DEV\' || ddName
then do
  say
  say 'Missing DEVICE=C:\OS2\BOOT\USBECD.SYS statement in CONFIG.SYS.'
  say
  exit
  end

/* acquire the device driver */
rc=stream(ddName,'command','open')
if rc \= 'READY:'
then do
  /* obtain and issue error message */
  parse value rc with sState ':' mNumber
  say SysGetMessage(mNumber,,ddName)
  exit
  end

oiHeader = "GetFeatureUnit: CurMuteMaster"
oiBuffer = x2c(A1 81 00 01 00 03 01 00 EE)
call IssueWriteFunction

oiHeader = "SetFeatureUnit: CurMuteMaster"
oiBuffer = x2c(21 01 00 01 00 03 01 00 00)
call IssueWriteFunction

/* release the device driver */
rc=stream(ddName,"command","close")
exit

IssueWriteFunction:
/* usb control transfer */
say
say oiHeader
say c2x(oiBuffer) /* show supplied data */
rc=charout(ddName,oiBuffer) /* supply and obtain setup and data packet */
say c2x(oiBuffer) /* show obtained data */
/* say */
CheckCompletionCode:
/* check completion code */
rc=stream(ddName,"description")
if rc \= "READY:"
then do
  /* obtain and issue error message */
  parse value rc with sState ':' mNumber
  say SysGetMessage(mNumber,,ddName)
  exit
  end
return

Sergey2
Posts: 17
Joined: Sun Feb 07, 2010 18:42

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Sergey2 » Tue Feb 09, 2010 23:06

Code: Select all

[G:\1\USBECD10]/* master mute control with the USBECD.SYS device driver */

[G:\1\USBECD10]rc=RxFuncAdd('SysGetMessage','RexxUtil','SysGetMessage')
Operating System/2 Resource Compiler
Version 4.00.010 Apr 26 1999
(C) Copyright IBM Corporation 1988-1999
(C) Copyright Microsoft Corp. 1985-1999
All rights reserved.

RC: error - Unable to create file '=RxFuncAdd('SysGetMessage','RexxUtil','SysGetMessage').RES'.
RC:  RCPP -E -D RC_INVOKED -W4 -f =RxFuncAdd('SysGetMessage','RexxUtil','SysGetMessage').RC -ef C:\ECS\BIN\RCPP.ERR
RC: error - Unable to open file '=RxFuncAdd('SysGetMessage','RexxUtil','SysGetMessage').RC'.
[G:\1\USBECD10]

[G:\1\USBECD10]ddName = 'PCM$' /* default device driver name */
[G:\1\USBECD10]

[G:\1\USBECD10]/* ensure that the device driver statement exists in config.sys */

[G:\1\USBECD10]if stream(ddName,'command','query exists') \= '\DEV\' || ddName


User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Tue Feb 09, 2010 23:14

ааааа, Sergey2

1) нужно вырезать этот код и вставлять в testXXX.cmd REXX-файл,
затем запускать его, ловить вывод, вставлять в форум.


2) Wil попросил вывод от обновленного скрипта, под которым написано:
"Endpoint 05 must be Endpoint 85. I updated the code in my previous post. Please rerun."

Sergey2
Posts: 17
Joined: Sun Feb 07, 2010 18:42

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Sergey2 » Tue Feb 09, 2010 23:27

Евгений я так и сделал вот вывод, то что выше.

User avatar
Eugene Gorbunoff
Site Admin
Posts: 685
Joined: Sat Apr 09, 2005 11:18
Location: St.Petersburg, Russia

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Eugene Gorbunoff » Tue Feb 09, 2010 23:51

REXX-скрипт - это .cmd файл, первая строка которого содержит:

Code: Select all

/* ля-ля-ля */


а у тебя файл получился командным.

Sergey2
Posts: 17
Joined: Sun Feb 07, 2010 18:42

Re: usbaudio.sys + USB DAC / PCM 2704

Postby Sergey2 » Wed Feb 10, 2010 10:05

Евгений я сделал так:
Тот скрипт что он мне прислал в форуме я пометстил в cmd фаил то-есть получил фаил 4.cmd
Далее это фаил запустил из командной стороики в следующием виде 4.cmd=>4.txt
Получил фаил на выходе который называется 4.txt
Я правильно все сделал?
Или нужно еще что-то сделать?


Return to “Hardware support / Поддержка оборудования”

Who is online

Users browsing this forum: No registered users and 1 guest

cron