when I write data to CD/DVD/BD, is CRC done by writers firmware after receiving the data and before writing it to the disk? Is there any additional ECC used(Hamming ECC for example)?
AFAIK CRC is only performed and recorded for subchannels. Main channel has its own error correction: ECC/EDC for CD, PI/PO for DVD. Dunno for BD.
CRC is likeley to be calculated and added after the subchannel data have been calculated by the encoder. Dunno if the recording software itself or the drive firmware takes care of it. As it is possible to write data to a disc in several modes (user data only, image, raw, …) it seems that it’s up to the recording software. But that’s my assumption and not granted.
Hope this helps.