AD9912.set_att()
should eventually call CPLD.set_att_mu()
.
a = self.att_reg & ~(0xff << (channel * 8)) # erase the corresponding channel attenuation record on the kernel
a |= att << (channel * 8) # update the corresponding channel only
self.set_all_att_mu(a) # set attenuation of all channels according to the updated record
This should already allow different attenuation on different channels.