For UCSB, it looks like you need a 2.5 college GPA in math courses to enter the math major, but entering the CS major is highly competitive. http://www.math.ucsb.edu/undergrad/requirements and http://cs.ucsb.edu/education/undergrad/admissions
For SJSU, you are in the CS major, but changing the math major looks like you just need a 2.0 college GPA and C grades. http://www.sjsu.edu/math/advising/majoringinmath/index.html
Assuming that your preference is really math, you should investigate which math department’s offerings are better suited for your future goals. UCs generally tend to have a greater emphasis on research and pre-PhD preparation, while CSUs tend to have a greater emphasis on immediately going into the work force. But you may want to investigate specifically for their math departments.
Also, how does net price compare?