This appears to be an inclusion/exclusion problem. My first step was to find the total permutations with no restrictions, using $\frac{8!}{2!2!2!2!} = 2520$.
What would be the permutation formulas for all adjacent A's, B's, C's, and D's? Furthermore, how do I know what is added and subtracted?