Computer, controller, and devices are broad and fuzzy concepts. This explains why you have so many different explanations.
What's a hardware controller?
A controller can mean different things. For example:
- it can be a dedicated chip (or a more complex chipset) on the motherboard, specialized in controlling communication that passes over an interface port. Typical examples are a USB host controller or integrated controllers, or on older machines a UART controller or a keyboard controller. These controllers are either connected to a bus, or to an external connector.
- it can be a more complex board connected to a PCI slot, for example a network card or a RAID disk controller. Some people see such complex things as a device on its own (because of its complexity), while some just see this as another controller connected to the internal bus.
- it can be a microcontroller (i.e. a kind of simplified CPU) that can be integrated in a device to perform some processing tasks and organize the communication with what is on the other side of the cable. Most people explaining controllers from the computer point of view just omit this from their explanation, because that's irrelevant device internals. However a device need its own brain: even for simple things like an older PC keyboard, how can the controller on the motherboard know about the 102 keys' state, when there are only 5 to 6 pins/wires that connects it to the remote keyboard? Well, there's a simple controller inside the keyboard as well.
So as a rule of thumb, if you have some cables between a computer and a device, you can bet that there's at least one controller on each side of the cable.
Is the controller on the computer?
This depends on the boundaries that you set for the computer:
- do you mean the core or your computer (i.e. CPU, memory, and clock)? In this case the answer will be no.
- do you mean the motherboard? In this case, as you saw the answer could be yes or no, depending on the kind of controller you're thinking of.
- do you mean the box, i.e. the physical boundaries with the outside world? Then yes: whenever a connector on the box, then there's a controller in the box as well.
But the fact that a controller is on the computer side, does not exclude that there's a (hidden) controller on the device's side.
Now to the DMA!
In some cases a controller could be plugged directly on the bus (see our previous example of a raid controller) or the controller is on the motherboard and connected to the bus.
To do I/O via the bus, the processor would need to address the device, byte by byte or word by word and copy it to the memory. This is very inefficient, because this simple copying task would keep the CPU busy.
Therefore you have the DMA: the processor instructs a DMA controller to do the job, and the DMA controller would then address the device and copy the obtained bytes into memory, leaving the CPU free to do more interesting tasks.