Suggested bounty: Isochronous USB driver for NEC ?PD72010
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    The Mac-mini is dying to be a media centre. Unfortunately, it's native sound output is limited to 2-channel analogue output.

    The only upgrade option is via the addition of USB hardware, however USB audio hardware requires isochronous transfer mode, which is currently unsupported by our driver.

    This bounty is for the writing of a USB host controller driver to support isochronous transfers, such as to allow correct functioning of USB audio hardware when attached to a USB port of the ?PD720101 EHCI host controller under MorphOS. The driver should also support all currently supported modes of the existing ?PD720101 driver for MorphOS.

    This NEC chip is also used on cheap PCI expansion cards, and in some later MDD Powermac models, so the driver would not be limited in scope to the mac-mini.

    PS - I'm not sure the best 'bounty system' to use - if anyone has a preference, or good/bad experiences, please suggest.

    I'll start off by committing $50 to the (so-far hypothetical) pot.

    [ Edited by boot_wb on 2010/8/3 16:55 ]
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »02.08.10 - 09:31
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 778 from 2007/10/23
    From: Gelsenkirchen,...
    Agree, also useful for webcams...
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »02.08.10 - 10:17
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12058 from 2003/5/22
    From: Germany
    > This NEC chip is also used on cheap PCI expansion cards, and in
    > some later MDD Powermac models, so the driver would not be limited
    > in scope to the mac-mini.

    Is it really chip specific? I was under the impression that the EHCI protocol abstracts from the actual USB host controller chip internals so once that requested feature is implemented it would (or at least should) work with every EHCI compliant USB host controller.
  • »02.08.10 - 10:51
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    @Andreas
    Quote:

    Andreas wrote:
    Is it really chip specific? I was under the impression that the EHCI protocol abstracts from the actual USB host controller chip internals so once that requested feature is implemented it would (or at least should) work with every EHCI compliant USB host controller.


    To be quite honest Andreas, I have no idea. I have, however, found a couple of patches from NEC for the generic Linux EHCI driver which implement isochronous- and bulk- transfers respectively for this particular chip.

    I don't know if just the control- and interrupt- transfer modes are the only generic part of the driver, or if these are workarounds for 'features' which are particular to this chip (ie bugs, or non-conformancies with the EHCI spec).

    [ Edited by boot_wb on 2010/8/3 16:55 ]
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »02.08.10 - 13:33
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    @Andreas_Wolf:

    I'm still unable to find a conclusive answer, however Chris Hodges' answer to a related question strongly suggests that it is work on the drivers that remains to be done (here - final post):
    Quote:

    Quote:

    Can you explain why only Deneb supports this [isochronous transfer mode]? I missed this information somehow.

    One of the unique selling propositions of the Deneb is the cheap access and use of USB soundcards on Amiga Classic Machines, where the users would have to spend >100 EUR for a Zorro or clockport soundcard instead. On Pegasos you have onboard sound, hence there is not much of commercial sense to put a lot of work and effort into implementing iso transfers for the lowlevel driver that would only be necessary for this special use case of USB audio on the Peg. There is no technical limitation that would inhibit the implementation for pciusb.device

    If this transfer mode were hardware agnostic, then I would expect implementation of isochronous transfers in Poseidon under OS3.x on the Deneb to have been a read-over into MorphOS (in fact I believe Deneb worked fine under MorphOS for PowerUp, although am unaware if audio hardware remained working).

    The chip-specific linux patches I referred to are here, however it's unclear (to me at least) whether these are to enable full-speed isochronous/bulk modes, or simply to improve error handling/correct problems in these modes under certain conditions.

    Either way, I suppose I'm suggesting the same bounty: to encourage the work required to implement USB isochronous transfer modes under MorphOS (as a minimum on the mac-mini if it does transpire that the work required is chip-specific).

    [ Edited by boot_wb on 2010/8/3 16:56 ]
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »02.08.10 - 23:37
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    boot_wb wrote:

    I'm suggesting the same bounty: to encourage the work required to implement USB isochronous transfer modes under MorphOS


    Excellent research boot_wb. By the way, your signature tells you have the beefiest Amiga 4000 I've seen in ages...
  • »03.08.10 - 07:02
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    Quote:


    jcmarcos wrote:
    Excellent research boot_wb.


    Just the beginning: I'm afraid I'm barely scratching the surface here.
    Given that I know nothing about driver development (and next to nothing about USB outside userland until yesterday), I take it as a compliment on my ability to structure sentences to inspire confidence in what is said. (Translation: sounds good even if I don't know what the hell I'm talking about! :-) )
    Quote:


    By the way, your signature tells you have the beefiest Amiga 4000 I've seen in ages...

    Thanks! It took many years to put together, and now stands proudly in the back of my wardrobe, taking up approximately 50x the volume of my mac-mini :-)
    I've been meaning to re-house it at some point to put in a 90 degree zorro adapter, and connect the Prometheus in the last zorro slot (thus allowing access to the PCI slots without reducing the number of zorro slots available), but it's at the bottom of a (very, very) long list of hardware projects.

    Back to the matter in hand:

    This introduction to USB differentiates between the HCD layer driver and the USBD layer.
    Although I haven't got the foggiest idea how Poseidon has been developed, I'd expect the two layers are implemented seperately, with USBD layer being identical (for these purposes) between OS3.x and MorphOS.

    Consequently it seems likely that the HCD layer is that which requires more work. This fits with Chris Hodges description above ("Low-level driver work"), fits with the existence of host-controller specific software/patches, and would explain why only Deneb has isochronous transfers implemented (different host controller).

    If I may ask, who in the devteam has taken ownership of the USB stack since Chris Hodges left? I'm sure I've asked before at some point, but cannot remember where/when...

    [ Edited by boot_wb on 2010/8/3 16:38 ]
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »03.08.10 - 14:37
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1030 from 2004/9/23
    ISO-Transfer is just a separate mode of data transfer like Bulk and Interupt transfers are.

    Beside the other three protocols ISO transfer doesn't care about data loss. This means if data gets corupted or lost during transfer, no resend takes place to get acurate data. Its just gone. Thats why its used for video/audio transfer, where you simply get a frame drop, which nobody cares about.

    The ISO transfer is controller specific, but all controlers use UHCI, OHCI and EHCI, so it would require to add the protocol to all three types of controllers to have full iso support for all devices on all systems.

    AFAIR the daneb is using some embedded chip for usb, so it has nothing to do with the drivers MorphOS/Poseidon would need. AROS would be a source for proper drivers, too.

    I have no clue about the current drivers, but I know I skipped the iso back at the times of AmithlonUSB as there were no stable application for testing the protocol.

    Geit

    [ Edited by geit on 2010/8/3 18:37 ]
  • »03.08.10 - 15:34
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    boot_wb
    Posts: 874 from 2007/4/9
    From: Kingston upon ...
    @Geit

    Thanks for the info, and the confirmation.

    If the documentation is available, and it's just a matter of man-hours, I'd be happy to put the work in myself. Having not written device drivers previously it would be somewhat challenging, however if no-one is currently working on this I could not possibly be any slower than that :-) (besides, I learn best when I 'need' to, not when I simply 'want' to)

    Also, I currently have mucho time on my hands....
    www.hullchimneyservices.co.uk

    UI: Powerbook 5,6 (1.67GHz, 128MB VRam): OS3.1, OSX 10.5.8
    HTPC: Mac Mini G4 (1,5GHz, 64MB VRam): OS3.1 (ZVNC)
    Audiophile: Efika 5200b (SB Audigy): OS3.1 (VNC + Virtual Monitor)

    Windows free since 2011!
  • »03.08.10 - 16:57
    Profile Visit Website