Bangladesh were all out for 234 on the fourth day in Chennai as hometown hero Ashwin took 10 wickets after his century.