An electronic device, comprising: at least two interfaces; a switch unit coupled with the at least two interfaces respectively and configured to switch a power-supply path of the electronic device, the power-supply path being provided by one of the at least two interfaces; and a control module coupled with the at least two interfaces and the switch unit respectively, and configured to detect a type of at least one device coupled with the electronic device and control, based on the type of the at least one device, the switch unit to switch the power-supply path of the electronic device, wherein the electronic device being coupled with the at least one device through all or part of the at least two interfaces, wherein the at least two interfaces comprising a first interface and a second interface , and characterized in that : the electronic device further comprises a data selection unit , and the data selection unit is coupled with the first interface and the second interface respectively and comprises a first data selection unit ; and the control module is configured to control the first data selection unit to select to output audio data from a host to an audio output device through the other one of the first interface and the second interface, in response to detecting that the electronic device is coupled with the device which is a host through one of the first interface and the second interface and coupled with another device which is an audio output device through the other one of the first interface and the second interface. at least two interfaces; a switch unit coupled with the at least two interfaces respectively and configured to switch a power-supply path of the electronic device, the power-supply path being provided by one of the at least two interfaces; and a control module coupled with the at least two interfaces and the switch unit respectively, and configured to detect a type of at least one device coupled with the electronic device and control, based on the type of the at least one device, the switch unit to switch the power-supply path of the electronic device, wherein the electronic device being coupled with the at least one device through all or part of the at least two interfaces, wherein the at least two interfaces comprising a first interface and a second interface , and characterized in that : the electronic device further comprises a data selection unit , and the data selection unit is coupled with the first interface and the second interface respectively and comprises a first data selection unit ; and the control module is configured to control the first data selection unit to select to output audio data from a host to an audio output device through the other one of the first interface and the second interface, in response to detecting that the electronic device is coupled with the device which is a host through one of the first interface and the second interface and coupled with another device which is an audio output device through the other one of the first interface and the second interface. the electronic device further comprises a data selection unit , and the data selection unit is coupled with the first interface and the second interface respectively and comprises a first data selection unit ; and the control module is configured to control the first data selection unit to select to output audio data from a host to an audio output device through the other one of the first interface and the second interface, in response to detecting that the electronic device is coupled with the device which is a host through one of the first interface and the second interface and coupled with another device which is an audio output device through the other one of the first interface and the second interface. <EOS>