what is the difference between 802.1p and 802.1q
.1p is used in the Cisco world i.e. on the switches with the configuration commands of 'switchport voice vlan dot1p'.
.1Q refers to the IEEE L2 Frame tagging protocol.
The difference is that with respect to Voice traffic .1p is used by Cisco to inform the IP Phone to use the .1Q tag framing protocol between itself and the switch but use the ID value of 0. The allowed values are 1-4094 so 0 seems odd but means that the switch tags all voice and data frames (with ID = 0) and marks the voice as CoS 5 (leaving the data as-is).
The switchport appears as an access port but receives frames that appear as trunked i.e. with the .1Q tag.