Hello all,

On 15-May-00 Thomas Sailer wrote:
> "Nemosoft Unv." wrote:
> 
>> Can you be more specific on what's wrong with find_format? Maybe I
>> overlooked, but it seems the only place to insert the samplerate.
> 
> Why should it be taking into account the samplerate? Does
> your device really have multiple entries with the same format
> but different sampling rate ranges? if so then your device descriptor
> looks cruelly wrong.

Yes. What's wrong with that? The cams have a number of alternate interfaces
with the low rate and high rate being equal, so you have a set of fixed
samplerates, not a range. I suppose this Dallas chip has only a few
alternate interfaces with a few different formats, and a large range for the 
samplerate?

> Also, some apps ask for sampling rates the device cannot do.
> The device driver is expected to round this to the nearest supported
> rate. Your patch badly breaks this (making the driver report failure).

Well, I had it the other way around: it would ask for a samplerate, and get
back something it didn't ask for at all :(

Nevertheless, rounding to the nearest value sounds OK.

> Also, you may choose mono, even though the device can do stereo
> and the app asked for stereo. Listening to MP3 in mono just isn't fun.

That's probably just a programming error on my part. Should be fixable.

>> No, it makes the Philips cams work :(
> 
> Yeah, just how common is the stupid philips cam compared to the
> philips and Dallas DAC's?

Excuse me? I've been programming my ass off for weeks to get these things
working, and when it comes to obscure hardware support, Linux has a far
better reputation than most other OSes. So yeah, just scorch me for posting
a patch to linux-usb@, which has been sitting in the 2.3.* kernels since the
end of March, that allow these "stupid", "obscure" webcams to work, but
unfortunately breaks something and forces you to listen to your MP3's in
mono. Gosh, shall I call your mommy to give you a hug?

[Note: the above paragraph should obviously be read with a bit of
 tongue-in-cheek sarcasm... I know I'm not infallable; I make mistakes,
 with programming and otherwise. Telling me that is OK. But don't yell at 
 me for making a mistake, and certainly don't tell me you consider 
 the device I've spent a lot of time on, inferior to your own and therefor
 not worth supporting/bugfixing.
]

> Please send me the decriptors of your devices with lsusb,
> the attached descriptor dumps are quite useless...

Unfortunately lsusb isn't much help either: it says it can't read the
descriptor with 'an unkown error 515'. This is with usbutils 0.5 on a 2.3.51
kernel. It uses ioctl() calls that the current USB layer doesn't have at
all, it seems. 

So the dumps (which I painfully expanded and interpreted myself) are the
best I can offer at the moment.

>> Stop! You _have_ to take sampling rate into account. Matching only on the
>> samplesize (8 vs. 16) bit and stereo/mono will not work; the routine as
>> it
>> was would simply take the first alternate interface that would match
>> these 2
>> parameters, and disregard samplerate altogether.
> 
> Yes, and that's intended and correct, unless some device has really
> badly broken device descriptors.

Then  again I ask: how do you set the samplerate? I may have overlooked, but
other than matching the bits and channels, there wasn't much related to
samplerate. I think it's just how you interpret the USB spec; the
descriptors are valid IMO.

Anyway, I saw your patch appearing on the list, I'll have a look and see
if it works. Attached are a dump of proc/bus/usb/devices and lsusb.

 - Nemosoft

-----------------------------------------------------------------------------
Try SorceryNet!   One of the best IRC-networks around!   irc.sorcery.net:9000
URL: never        IRC: nemosoft      IscaBBS (bbs.isca.uiowa.edu): Nemosoft
                        >> Never mind the daylight << 
Bus 001 Device 001: ID 0000:0000  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0000 
  idProduct          0x0000 
  bcdDevice            0.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Language IDs: none (cannot get string descriptor)
Bus 001 Device 002: ID 058f:9215 Alcor Micro, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x058f Alcor Micro, Inc.
  idProduct          0x9215 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Language IDs: none (cannot get string descriptor)
Bus 001 Device 005: ID 0471:0308 Philips 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 Interface
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0471 Philips
  idProduct          0x0308 
  bcdDevice            0.05
  iManufacturer           0 
  iProduct                0 
  iSerial                 1 
  bNumConfigurations      1
  Language IDs: none (cannot get string descriptor)
Bus 001 Device 003: ID 0553:0002 VLSI Vision Ltd. CPiA Camera
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 Interface
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0553 VLSI Vision Ltd.
  idProduct          0x0002 CPiA Camera
  bcdDevice            1.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Language IDs: none (cannot get string descriptor)
Bus 001 Device 004: ID 0471:0302 Philips 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 Interface
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0471 Philips
  idProduct          0x0302 
  bcdDevice            0.05
  iManufacturer           0 
  iProduct                0 
  iSerial                 1 
  bNumConfigurations      1
  Language IDs: none (cannot get string descriptor)
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc= 28/900 us ( 3%), #Int=  2, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 4
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=058f ProdID=9215 Rev= 1.00
S:  Manufacturer=ALCOR MICRO INC
S:  Product=AU9814                 
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms
T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0471 ProdID=0308 Rev= 0.05
S:  SerialNumber=020F020F00000478
C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS=   0 Ivl=  1ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 196 Ivl=  1ms
I:  If#= 0 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 292 Ivl=  1ms
I:  If#= 0 Alt= 3 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 448 Ivl=  1ms
I:  If#= 0 Alt= 4 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 592 Ivl=  1ms
I:  If#= 0 Alt= 5 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 704 Ivl=  1ms
I:  If#= 0 Alt= 6 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 776 Ivl=  1ms
I:  If#= 0 Alt= 7 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 840 Ivl=  1ms
I:  If#= 0 Alt= 8 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 896 Ivl=  1ms
I:  If#= 0 Alt= 9 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=100ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 960 Ivl=  1ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=audio
I:  If#= 2 Alt= 0 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=   0 Ivl=  1ms
I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  90 Ivl=  1ms
I:  If#= 2 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  46 Ivl=  1ms
I:  If#= 2 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  25 Ivl=  1ms
I:  If#= 2 Alt= 4 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  16 Ivl=  1ms
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0553 ProdID=0002 Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=400mA
I:  If#= 1 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=cpia
E:  Ad=81(I) Atr=01(Isoc) MxPS=   0 Ivl=  1ms
I:  If#= 1 Alt= 1 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=cpia
E:  Ad=81(I) Atr=01(Isoc) MxPS= 448 Ivl=  1ms
I:  If#= 1 Alt= 2 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=cpia
E:  Ad=81(I) Atr=01(Isoc) MxPS= 704 Ivl=  1ms
I:  If#= 1 Alt= 3 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=cpia
E:  Ad=81(I) Atr=01(Isoc) MxPS= 960 Ivl=  1ms
T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0471 ProdID=0302 Rev= 0.05
S:  SerialNumber=000A0000
C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS=   0 Ivl=  1ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 942 Ivl=  1ms
I:  If#= 0 Alt= 2 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 800 Ivl=  1ms
I:  If#= 0 Alt= 3 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 700 Ivl=  1ms
I:  If#= 0 Alt= 4 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 600 Ivl=  1ms
I:  If#= 0 Alt= 5 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 500 Ivl=  1ms
I:  If#= 0 Alt= 6 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 400 Ivl=  1ms
I:  If#= 0 Alt= 7 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 300 Ivl=  1ms
I:  If#= 0 Alt= 8 #EPs= 2 Cls=0a(data ) Sub=ff Prot=00 Driver=Philips webcam
E:  Ad=82(I) Atr=03(Int.) MxPS=   1 Ivl=  1ms
E:  Ad=84(I) Atr=01(Isoc) MxPS= 200 Ivl=  1ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=audio
I:  If#= 2 Alt= 0 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=   0 Ivl=  1ms
I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  50 Ivl=  1ms
I:  If#= 2 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  98 Ivl=  1ms
I:  If#= 2 Alt= 3 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS= 144 Ivl=  1ms
I:  If#= 2 Alt= 4 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  47 Ivl=  1ms
I:  If#= 2 Alt= 5 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  90 Ivl=  1ms
I:  If#= 2 Alt= 6 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS= 134 Ivl=  1ms
I:  If#= 2 Alt= 7 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  34 Ivl=  1ms
I:  If#= 2 Alt= 8 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  66 Ivl=  1ms
I:  If#= 2 Alt= 9 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  98 Ivl=  1ms
I:  If#= 2 Alt=10 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  26 Ivl=  1ms
I:  If#= 2 Alt=11 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  50 Ivl=  1ms
I:  If#= 2 Alt=12 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  74 Ivl=  1ms
I:  If#= 2 Alt=13 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  24 Ivl=  1ms
I:  If#= 2 Alt=14 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  46 Ivl=  1ms
I:  If#= 2 Alt=15 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  68 Ivl=  1ms
I:  If#= 2 Alt=16 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  18 Ivl=  1ms
I:  If#= 2 Alt=17 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  34 Ivl=  1ms
I:  If#= 2 Alt=18 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=audio
E:  Ad=85(I) Atr=05(Isoc) MxPS=  50 Ivl=  1ms
(truncated)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to