The MMC defines 4 recording methods:
- TAO (Track-At-Once)
- SAO (Session-At-Once)
Also affecting the TOC are definitions:
- Multi-session Field Definition
- Data Block Type Codes
For more info do a search in MMC on "write parameters mode page".
This is just a rough answer for CD recording:
TAO records only a track at a time, so it is clear what the toc entry would be and is generated by the drive.
SAO needs a cuesheet to be sent before recording, and that is effectively the TOC, so the drive simply decodes that to generate raw Q.
Raw with data block type codes 1, 2, 3, nothing is generated, the burning software needs to send data for whole of TOC leadin, leadout, and EDC/ECC.
For EDC/ECC being generated, that depends on the "Data Block Type Codes". Values 0, 1, 2, 3 are codes that the drive won't generate EDC/ECC, but it seems only raw recording mode is compatible with those. For all other values the EDC/ECC is generated by the drive.
PMA (Program Memory Area) is always managed by the drive.
I'm not 100% on PMA, but isn't that only used for multi-session or packet/incremental recordings?
If so, then it would only be used when "Multi-session Field Definition" is set to multisession or recording mode is packet/incremental. Also in raw recording mode PMA would never be used because that field is ignored and it is DAO (Disc-At-Once) recording.
For DVD recording:
Burning is only allowed 2048 bytes per sector, so ECC is always generated by the drive. The leadin stuff is also managed by the drive.