The sound works well, but when I plug the headphone jack the sound still come out from the built-in speakers. Well, I can still hear the sound from the headphone, but the sound from the speakers just annoying. The speakers should be muted when I plug the headphone jack, right?

It would be great if sound configuration were this simple. Unfortunately (even when the same chipset is used...), manufacturers don't always connect all features that azalia(4) makes available. Parameter tweaking, for better or worse is frequently required.

For context, you would be advised to study what Jacob Meuser says in the misc@ archives. In particular, you may found the following useful:

The controls of an audio device may be labeled differently. For instance, there might not be an outputs.master as above, but there is an outputs.outputs which does the same thing. Usually the controls have a meaningful label, but sometimes one must simply try different settings to see what effect each control has.