US rapper Afroman has defeated seven sheriff's deputies in a court case after they sued him for releasing songs and videos that mocked them and a raid they carried out on his home.