A federal civil rights lawsuit has been filed against a California police department as it faces accusations of racism and homophobia.