USB Audio Input??? - page 3 - Feature Requests - CHDK Forum  

USB Audio Input???

  • 46 Replies
  • 28243 Views
Re: USB Audio Input???
« Reply #20 on: 21 / April / 2008, 17:29:44 »
Advertisements
Deleted
« Last Edit: 22 / April / 2008, 16:04:46 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

Re: USB Audio Input???
« Reply #21 on: 21 / April / 2008, 20:36:28 »
jeff666,


Quote
All host-vs-device-related discussions I followed suggested that all handshaking and low level data exchange is done by hardware.

How can we find out more about this handshaking? Does the camera's CPU look at hardware registers directly or are there buffers that hold the data until it is polled? Can we access those registers and force a condition which allows a data stream, such as that from a USB Mixer to be accepted? If we can use all the pre-existing routines to throughput the data and write it to the SD card, life gets much easier.
~~~~~~~~~~~~~~~~~~~~~

<")%%%><<

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: USB Audio Input???
« Reply #22 on: 22 / April / 2008, 14:52:35 »
AFAIK, we don't know how much of the USB work the ARM CPU does and how much is done in a peripheral block. We  know the CPU is well aware of the USB voltage and that the CPU has a register bit which apparently toggles the 1k5 USB full speed detect pullup resistor on D+. It's quite likely that the firmware is responsible of initiating a handshake, checking that it went ok and then monitoring for input. I think it's likely that all USB data goes thru the CPU, but that the firmware doesn't worry about the low level protocol. Note that I'm guessing, I'm not too familiar with neither CHDK nor powershot internals.

I suppose the key would be to find exactly what the firmware does when USB power appears and what it does when it receives a command and what it does when it transfers etc. It will very likely be configuring some stuff in some registers, maybe configuring interrupts etc. If we're lucky there are functions that can be called for all necessary phases.

It would of course help to find out extensive documentation to the CPU and it's USB peripherals. I'm guessing the only way we could get there would if these portions of the Digic processors were exact copies of some standalone processor out on the market that they've bought as an IP block and we'd be able to identify it. Even then we'd need to disable some things the firmware does now but I guess the USB remote already blocks something?

I must say I'm not overly familiar with USB; the only USB devices I've designed to date have used monolithic transceiver chips which only need some simple configuring and provide a serial port to the processor... this is/has been a simple way to go when you don't have much time, don't need all the speed and aren't going for large volumes.


Re: USB Audio Input???
« Reply #23 on: 23 / April / 2008, 06:35:22 »
Redirected question:
Hello.
First of all: can you post what you know about USB in canon? As I read in the forum, no consistent USB knoladge isn't yet gathered.
Yeah I've just spent all day looking up about this. No idea what the go is. If the processor is a TMS320DM355 like mentioned in another thread then it should have an onboard usb host controller. Just like my Palm Tungsten E2 (with ARM based cpu) which I have several pieces of software for it to emulate a USB card reader (and it's processor block has built-in USB host), then this should be possible. But whether CHDK can do so without modifying Canon firmware is another thing. I don't see why not but don't have the knowledge. How does Digicanon's firmware uploader work anyway?


Re: USB Audio Input???
« Reply #24 on: 23 / April / 2008, 09:34:03 »
If the processor is a TMS320DM355 like mentioned in another thread then it should have an onboard usb host controller. Just like my Palm Tungsten E2 (with ARM based cpu) which I have several pieces of software for it to emulate a USB card reader (and it's processor block has built-in USB host), then this should be possible.

I'm working now on 400d firmware. Any hints on where to search usb control?
Any addreses where to search for usb control you mentioned? IRQ? ROM places?

Re: USB Audio Input???
« Reply #25 on: 23 / April / 2008, 10:26:25 »
Perhaps a search for "USB" in your IDA file might reveal something. I'll look through what I have for the TX-1 tonight and see what I can come up with.
~~~~~~~~~~~~~~~~~~~~~

<")%%%><<

Re: USB Audio Input???
« Reply #26 on: 23 / April / 2008, 11:42:09 »
I'm just "shotgunning" here to see if there is any validity to the concepts, so please take this in that vein.

First we find out if Zoombrowser EZ software comes with everyones' camera.

If so, then we can be generalists and create something that will work for everybody who wants/needs it.

There are USB "sniffers" that will look at a USB data stream and write it to a hard drive on a computer where it can be examined.

When a camera is plugged into a computer, there is a host-device handshaking that initiates certain actions. In my case, the portion of Zoombrowser that allows me to download/upload data from the camera starts up and is obviously in communication with the camera.

From this,  if we use a "sniffer," we can learn the sequence of events involved when the camera is connected to the computer. This would enable us to build a simple stand alone hardware host - a black box - that can simply handshake with and open up the USB port on the camera, establish communications and prepare it for upload on the data lines, pins 2 & 3.

The box would have to have batteries to supply power to the camera as power is supplied by the host on pins 1 & 4.

That is assuming that there is no inbuilt host controller already in the camera as mentioned above as a possibility. If there is, that could make most of this much simpler.

This black box will also communicate with the USB Mixer setting it up to download/communicate and coordinate sending blocks of data and also providing power.

This data will be simply passed through our black box host to the camera. Our black box is little more than a traffic cop starting up both devices and acting as a conduit for the data.

Once the appropriate registers or memory locations are determined in the camera firmware, we should be able to use CHDK to write the incoming data stream from the USB Mixer directly to the SD card.

Again, let me clearly state that this is nothing more than conceptual brainstorming. I honestly don't know if any part of the above would work or not, just some ideas that might prove useful. 
~~~~~~~~~~~~~~~~~~~~~

<")%%%><<

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: USB Audio Input???
« Reply #27 on: 23 / April / 2008, 11:50:10 »
I think using one of canons sdks  (as mentioned before) will make this easier than with just the zoombrowser.if only i could get my hands on one of those (being european,i've been denied getting the sdk by canon usa.by canon europe i didnt even get such reply-denial mail.darn.


Re: USB Audio Input???
« Reply #28 on: 23 / April / 2008, 11:51:16 »
This question was raised by owerlord as a new topic. I moved it to here as PhyrephoX suggested, but might not have done it as a proper quote, however, all of the following is from owerlord:


Hello.

First of all: can you post what you know about USB in canon? As I read in the forum, no consistent USB knoladge isn't yet gathered.

Secondly: What we know about host-mode-USB in the camera?

As for PictBridge:

"... The PictBridge standard, enables the DSC to connect to a Printer directly via a USB cable. The DSC then operates as a USB Device and the Printer works as a USB Host ..." (on the net)

So, PictBridge not implies host mode in camera. But don't lose faith! Propablly canon printers are on the same ARM system - so host mode - here we come!
~~~~~~~~~~~~~~~~~~~~~

<")%%%><<

Re: USB Audio Input???
« Reply #29 on: 23 / April / 2008, 12:37:24 »
Perhaps a search for "USB" in your IDA file might reveal something. I'll look through what I have for the TX-1 tonight and see what I can come up with.

Oooh. "USB" is everywhere :-). There are whole function names, setting strings, and so. I quite sure that USB is fully menaged by ARM - but that didn't help me much. The question is: what controler? IRQ? And so.

I'm searching it - but I have problem with the construction of the firmware for 400d.

One more question. I'm almost sure that the firmware can log msg - a lot. But I can't yet force him to :-) Any ideas?

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal