California law requires not only knowledge of the recording device, but also consent from all parties (Pen Code. 631, 632). I think that should answer the first part of your question.
There is an exception to this which arises when the recording is being made of a bribery or violent felony. This will prevent the State from prosecuting the recorder in those circumstances.
I agree with the other answer, however, you could argue that if the other party was warned, even though they did not expressly consent to being recorded, but went ahead talking anyway knowing that they were recorded, the may have impliedly consented, or waived any argument that you did not consent.