An electronic device comprising: a housing; an opening formed in one side of the housing; a hole communicating with the opening; a receptacle, placed inside the hole, for receiving one of first, second and third external connectors (385, 386, 388; 900; 1000; 1100); the receptacle comprising a connector length detecting module; and a circuit electrically connected to the connector length detecting module, wherein each of the first and second connectors comprises a first number of contacts, the first connector being shorter than the second connector; the third external connector comprises a second number of contacts less than the first number of contacts; and the circuit is configured to: identify which one of the first, second and third external connectors is inserted into the receptacle; provide, when the first external connector is inserted into the receptacle, an audio output signal to the first external connector in a first manner; provide, when the second external connector is inserted into the receptacle, an audio output signal to the second external connector in a second manner which differs from the first manner; and provide, when the third external connector is inserted into the receptacle, an audio output signal to the third external connector in a third manner which differs from the first and second manners, wherein the circuit determines whether an external connector with a first number of contacts which is inserted into the receptacle is a short connector via the connector length detecting module, and identifies a first connector or a second connector based on the determination. a housing; an opening formed in one side of the housing; a hole communicating with the opening; a receptacle, placed inside the hole, for receiving one of first, second and third external connectors (385, 386, 388; 900; 1000; 1100); the receptacle comprising a connector length detecting module; and a circuit electrically connected to the connector length detecting module, wherein each of the first and second connectors comprises a first number of contacts, the first connector being shorter than the second connector; the third external connector comprises a second number of contacts less than the first number of contacts; and the circuit is configured to: identify which one of the first, second and third external connectors is inserted into the receptacle; provide, when the first external connector is inserted into the receptacle, an audio output signal to the first external connector in a first manner; provide, when the second external connector is inserted into the receptacle, an audio output signal to the second external connector in a second manner which differs from the first manner; and provide, when the third external connector is inserted into the receptacle, an audio output signal to the third external connector in a third manner which differs from the first and second manners, wherein the circuit determines whether an external connector with a first number of contacts which is inserted into the receptacle is a short connector via the connector length detecting module, and identifies a first connector or a second connector based on the determination. identify which one of the first, second and third external connectors is inserted into the receptacle; provide, when the first external connector is inserted into the receptacle, an audio output signal to the first external connector in a first manner; provide, when the second external connector is inserted into the receptacle, an audio output signal to the second external connector in a second manner which differs from the first manner; and provide, when the third external connector is inserted into the receptacle, an audio output signal to the third external connector in a third manner which differs from the first and second manners, wherein the circuit determines whether an external connector with a first number of contacts which is inserted into the receptacle is a short connector via the connector length detecting module, and identifies a first connector or a second connector based on the determination.