Dan Dennedy wrote:
> On Mon, 2003-12-22 at 11:48, Damien Douxchamps wrote:
>=20
>> Hi Kristian,
>>=20
>> On Mon, 2003-12-22 at 16:57, Kristian H=F8gsberg wrote:
>>=20
>>> The BANDWIDTH_AVAILABLE register isn't updated automatically; it=20
>>> is a requirement that applications allocate necessary bandwidth=20
>>> prior to initiating isochronous traffic.
>=20
> [...]
>=20
>>> When all streaming applications obey this protocol, the=20
>>> BANDWIDTH_AVAILABLE will reflect the remaining bandwidth on the=20
>>> bus at any time.
>>=20
>> OK, well that's something we'll have to add to libdc1394...
>=20
>=20
> hold on now! Note, Kristian's very important words "When all=20
> streaming applications obey this protocol." Usually, as Kristian=20
> alluded to in another message, the transmitter allocates bandwidth.
Actually, I was a bit vague on that point. It depends on the
application/protocol who is responsible for allocating isochronous
resources. The only requirement in the IEEE1394 standard is that
somebody has to do it before transmission starts. For example, there is
an AV/C command, INPUT_SELECT, that asks a sink device to create a
connection, in which case the sink device is responsible for allocating
and later freeing the resources.
> When I was working on dv1394d, I tried to check and set this register
> because my application is a transmitter (or at least performing IEC=20
> 61883-1 Connection Management Procedures), and we were dealing with=20
> multiple channels of iso comms. DV devices are typically both=20
> receivers and transmitters. However, I noticed some devices=20
> allocating bandwidth when not actively transmitting. We can set the=20
> transmit vs receive mode of the device with some FCP async=20
> transactions, but even though they were set to receive, some still=20
> did not relinquish bandwidth. Therefore, is it the role of libdc1394
> to allocate bandwidth when it tells a camera to transmit?
That's a yes: we're talking about IIDC compliant cameras - I'm not very
familiar with those, but I just browsed through the specification.
Section 3.1 says pretty clearly that it is the responsibility of the
controller, i.e. the PC to allocate isochronous resources, and then
program the channel number and transmission speed into the camera. Only
then should it ask the camera to start isochronous transmission.
> What if, despite the experience on your camera, a different model
> camera does allocate bandwidth? I do not think there is a reliable
> way to determine this. Therefore, if libdc1394 allocates bandwidth,
> then more bandwidth is allocated than actually in use. Or does IIDC
> spec dictate that camera implementors not allocate bandwidth with
> IRM?
As I said, I haven't worked much with IIDC cameras, but the standard=20
says pretty clearly that the camera is a passive device that should not=20
initiate transactions on its own - including bandwidth alloction.
Kristian
|