Patent Description:
Recently, electronic devices have become thinner to enhance aesthetics. To provide a thin electronic device, a <NUM> terminal for connecting an earphone or a headset may be removed. Such an electronic device may implement a scheme for connecting an audio output device (e.g., earphone or headset) by using a USB Type-C connector instead of a <NUM> terminal. An electronic device connected to an audio output device through a USB Type-C connector may transmit and receive control signals to and from the audio output device through a configuration channel (CC) defined in the USB Type-C specification. <CIT> discloses systems and methods for using distributed Universal Serial Bus (USB) host drivers. <CIT> discloses a method and mobile terminal for realizing audio transmission. <CIT> discloses an information processing device, information processing method and program, and discloses an information processing device for supplying charge current to a portable device through a USB port.

When an audio output device is connected through the USB Type-C connector of the electronic device while an audio signal is output through the speaker of the electronic device, the electronic device may change the audio signal output path from the speaker of the electronic device to the audio output device.

However, even after the audio output device is connected through the USB Type-C connector while an audio signal is being output through the speaker of the electronic device, as the recognition process of the audio output device lengthens, a sound leakage phenomenon where the audio signal is output through the speaker of the electronic device for a certain period of time may occur.

According to various embodiments of the disclosure, when an audio output device is connected through the USB Type-C connector of the electronic device while an audio signal is being output through the speaker, the electronic device can transmit in advance information necessary for recognizing the audio output device to the audio framework that processes the audio signal.

According to various embodiments of the disclosure, there is provided an electronic device in accordance with claim <NUM>.

According to various embodiments of the disclosure, a method for an electronic device to recognize an audio output device is disclosed in accordance with claim <NUM>.

According to various embodiments of the disclosure, when an audio output device is connected through a USB Type-C connector, the electronic device may transmit in advance information necessary for recognition of the audio output device to an audio framework that processes audio signals, shortening the time required to recognize the audio output device.

The above and other aspects, features and advantages of certain embodiments of the disclosure will be more apparent from the following detailed description, taken in conjunction with the accompanying drawings, in which:.

<FIG> is a block diagram of an electronic device <NUM> in a network environment <NUM> according to various embodiments.

The input device <NUM> may include, for example, a microphone, a mouse, a keyboard or a digital pen (e.g., a stylus pen).

According to an embodiment, the audio module <NUM> may obtain the sound via the input device <NUM>, or output the sound via the sound output device <NUM> or a headphone of an external electronic device (e.g., an electronic device <NUM>) (e.g., speaker or headphone) directly (e.g., wiredly) or wirelessly coupled with the electronic device <NUM>.

According to an embodiment, the communication module <NUM> may include a wireless communication module <NUM> (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) (e.g., a wireless transceiver) or a wired communication module <NUM> (e.g., a local area network (LAN) communication module or a power line communication (PLC) module) (e.g., a wired transceiver). A corresponding one of these communication modules may communicate with the external electronic device via the first network <NUM> (e.g., a short-range communication network, such as BluetoothTM, wireless-fidelity (Wi-Fi) direct, or infrared data association (IrDA)) or the second network <NUM> (e.g., a long-range communication network, such as a cellular network, the Internet, or a computer network (e.g., local area network (LAN) or wide area network (WAN)).

According to an embodiment, the antenna module <NUM> may include an antenna including a radiating element implemented by a conductive material or a conductive pattern formed in or on a substrate (e.g., PCB).

<FIG> is a block diagram <NUM> illustrating the program <NUM> according to various embodiments.

According to an embodiment, the program <NUM> may include an operating system (OS) <NUM> to control one or more resources of the electronic device <NUM>, middleware <NUM>, or an application <NUM> executable in the OS <NUM>. The OS <NUM> may include, for example, Android™, iOS™, Windows™, Symbian™, Tizen™, or Bada™. At least part of the program <NUM>, for example, may be pre-loaded on the electronic device <NUM> during manufacture, or may be downloaded from or updated by an external electronic device (e.g., the electronic device <NUM> or <NUM>, or the server <NUM>) during use by a user.

The OS <NUM> may control management (e.g., allocating or deallocation) of one or more system resources (e.g., process, memory, or power source) of the electronic device <NUM>. The OS <NUM>, additionally or alternatively, may include one or more driver programs to drive other hardware devices of the electronic device <NUM>, for example, the input device <NUM>, the sound output device <NUM>, the display device <NUM>, the audio module <NUM>, the sensor module <NUM>, the interface <NUM>, the haptic module <NUM>, the camera module <NUM>, the power management module <NUM>, the battery <NUM>, the communication module <NUM>, the subscriber identification module <NUM>, or the antenna module <NUM>.

The middleware <NUM> may provide various functions to the application <NUM> such that a function or information provided from one or more resources of the electronic device <NUM> may be used by the application <NUM>. The middleware <NUM> may include, for example, an application manager <NUM>, a window manager <NUM>, a multimedia manager <NUM>, a resource manager <NUM>, a power manager <NUM>, a database manager <NUM>, a package manager <NUM>, a connectivity manager <NUM>, a notification manager <NUM>, a location manager <NUM>, a graphic manager <NUM>, a security manager <NUM>, a telephony manager <NUM>, or a voice recognition manager <NUM>.

The application manager <NUM>, for example, may manage the life cycle of the application <NUM>. The window manager <NUM>, for example, may manage one or more graphical user interface (GUI) resources that are used on a screen. The multimedia manager <NUM>, for example, may identify one or more formats to be used to play media files, and may encode or decode a corresponding one of the media files using a codec appropriate for a corresponding format selected from the one or more formats. The resource manager <NUM>, for example, may manage the source code of the application <NUM> or a memory space of the memory <NUM>. The power manager <NUM>, for example, may manage the capacity, temperature, or power of the battery <NUM>, and determine or provide related information to be used for the operation of the electronic device <NUM> based at least in part on corresponding information of the capacity, temperature, or power of the battery <NUM>. According to an embodiment, the power manager <NUM> may interwork with a basic input/output system (BIOS) (not shown) of the electronic device <NUM>.

The database manager <NUM>, for example, may generate, search, or change a database to be used by the application <NUM>. The package manager <NUM>, for example, may manage installation or update of an application that is distributed in the form of a package file. The connectivity manager <NUM>, for example, may manage a wireless connection or a direct connection between the electronic device <NUM> and the external electronic device. The notification manager <NUM>, for example, may provide a function to notify a user of an occurrence of a specified event (e.g., an incoming call, message, or alert). The location manager <NUM>, for example, may manage locational information on the electronic device <NUM>. The graphic manager <NUM>, for example, may manage one or more graphic effects to be offered to a user or a user interface related to the one or more graphic effects.

The security manager <NUM>, for example, may provide system security or user authentication. The telephony manager <NUM>, for example, may manage a voice call function or a video call function provided by the electronic device <NUM>. The voice recognition manager <NUM>, for example, may transmit a user's voice data to the server <NUM>, and receive, from the server <NUM>, a command corresponding to a function to be executed on the electronic device <NUM> based at least in part on the voice data, or text data converted based at least in part on the voice data. According to an embodiment, the middleware <NUM> may dynamically delete some existing components or add new components. According to an embodiment, at least part of the middleware <NUM> may be included as part of the OS <NUM> or may be implemented as another software separate from the OS <NUM>.

The application <NUM> may include, for example, a home <NUM>, dialer <NUM>, short message service (SMS)/multimedia messaging service (MMS) <NUM>, instant message (IM) <NUM>, browser <NUM>, camera <NUM>, alarm <NUM>, contact <NUM>, voice recognition <NUM>, email <NUM>, calendar <NUM>, media player <NUM>, album <NUM>, watch <NUM>, health <NUM> (e.g., for measuring the degree of workout or biometric information, such as blood sugar), or environmental information <NUM> (e.g., for measuring air pressure, humidity, or temperature information) application. According to an embodiment, the application <NUM> may further include an information exchanging application (not shown) that is capable of supporting information exchange between the electronic device <NUM> and the external electronic device. The information exchange application, for example, may include a notification relay application adapted to transfer designated information (e.g., a call, message, or alert) to the external electronic device or a device management application adapted to manage the external electronic device. The notification relay application may transfer notification information corresponding to an occurrence of a specified event (e.g., receipt of an email) at another application (e.g., the email application <NUM>) of the electronic device <NUM> to the external electronic device. Additionally or alternatively, the notification relay application may receive notification information from the external electronic device and provide the notification information to a user of the electronic device <NUM>.

The device management application may control the power (e.g., turn-on or turn-off) or the function (e.g., adjustment of brightness, resolution, or focus) of the external electronic device or some component thereof (e.g., a display device <NUM> or a camera module <NUM> of the external electronic device). The device management application, additionally or alternatively, may support installation, delete, or update of an application running on the external electronic device.

<FIG> illustrates a block diagram <NUM> illustrating an electronic device <NUM> and an audio output device <NUM> according to various embodiments.

With reference to <FIG>, the electronic device <NUM> (e.g., electronic device <NUM> in <FIG>) may include a connector <NUM> (e.g., universal serial bus (USB) connector) to which the audio output device <NUM> can be connected. The electronic device <NUM> may transmit and receive data (e.g., multimedia data such as audio data, or control command signals) to and from the audio output device <NUM> connected through the connector <NUM>.

In one embodiment, the electronic device <NUM> may include an opening formed on one surface of the housing and a hole connected to the opening, and the connector <NUM> (e.g., interface <NUM> in <FIG>) may be disposed inside the hole. However, without being limited thereto, the connector <NUM> may be disposed on the other surface of the housing of the electronic device <NUM>.

In one embodiment, the audio output device <NUM> may include speakers 360a and 360b for outputting audio, a processor <NUM> including a circuit for controlling audio output, and a connector <NUM>. The components constituting the audio output device <NUM> will be described in detail with reference to <FIG>.

In one embodiment, the connector <NUM> may be a connector of the USB Type-C specification. However, it is not limited thereto. For example, the connector <NUM> may conform to various standard or non-standard wired interfaces such as high definition multimedia interface (HDMI), recommended standard <NUM> (RS-<NUM>), power line communication, or plain old telephone service (POTS).

<FIG> and <FIG> illustrate diagrams <NUM> showing the pin configuration of the connector <NUM> of the electronic device <NUM> according to various embodiments.

In one embodiment, the connector (e.g., connector <NUM>) of the audio output device (e.g., audio output device <NUM> in <FIG>) may be inserted into the connector (e.g., connector <NUM> in <FIG>) of the electronic device <NUM> (e.g., electronic device <NUM> in <FIG>). The connector <NUM> of the audio output device <NUM> may be accommodated through the hole of the electronic device <NUM> to physically contact the connector <NUM> of the electronic device <NUM>. Due to this physical contact, the electronic device <NUM> and the audio output device <NUM> may be electrically connected. In one embodiment, the connector <NUM> may have a structure into which a USB Type-C connector can be inserted.

In one embodiment, the structure of the connector <NUM> and the hole of the electronic device <NUM> may have a reversible configuration. The connector <NUM> of the electronic device <NUM> may be symmetrical with respect to a first direction perpendicular to the orientation in which the audio output device <NUM> is inserted (e.g., direction from the bottom of the electronic device <NUM> to the top) and a second direction opposite to the first direction. For example, with reference to <FIG>, the connector <NUM> of the audio output device <NUM> may be inserted into the connector <NUM> of the electronic device <NUM> in an orientation where one surface (e.g., surface A) is parallel to the front surface (e.g., surface on which the display is located) of the electronic device <NUM>. As another example, the connector <NUM> of the audio output device <NUM> may be inserted into the connector <NUM> of the electronic device <NUM> in an orientation where the other surface (e.g., surface B) is parallel to the front surface of the electronic device <NUM>.

With reference to <FIG>, the connector <NUM> of the USB Type-C specification may include a plurality of terminals defined in the USB Type-C specification.

In one embodiment, the plural terminals of the USB Type-C specification may include <NUM> terminals on each of the A and B lines, and may be symmetrical to each other. The line electrically connected between the plural terminals of the connector <NUM> and the connector terminals of the audio output device <NUM> may differ according to the orientation in which the connector <NUM> of the audio output device <NUM> is inserted.

In one embodiment, terminals CC1 (configuration channel <NUM>) and CC2 (configuration channel <NUM>) included in the USB Type-C specification may be used as a port for detecting connector insertion/removal and identifying the connector connection mode. For example, when the electronic device <NUM> and the audio output device <NUM> are connected through the connector <NUM>, an electrical signal (e.g., digital ID or resistor ID) is exchanged through terminals CC1 and CC2, and the electronic device <NUM> may detect the insertion or removal of the audio output device <NUM> accordingly. Based on the value detected through at least one of terminals CC1 and CC2, the electronic device <NUM> may control the connector connection mode to operate in downstream facing port (DFP) mode (e.g., data transmitting mode), upstream facing port (UFP) mode (e.g., data receiving mode), source mode (e.g., power transmitting mode), and/or sink mode (e.g., power receiving mode).

In one embodiment, terminal GND (ground) (e.g., A1/B12, B1/A12) and terminal VBUS (e.g., A4/A9, B4/B9) may be a port used for power. For example, terminal VBUS may be used to supply power from the electronic device <NUM> to the audio output device <NUM> connected through the connector <NUM>.

In one embodiment, terminals TX1+/-, TX2+/-, RX1+/- and RX2+/- (e.g., A2/A3, B2/B3, B11/B10, and A11/A10) may be used as a port for high-speed data communication according to the USB Type-C specification. For example, when an external electronic device, such as the audio output device <NUM>, capable of directly transmitting and receiving PCM data being a digital signal is connected to the connector <NUM>, PCM data can be transmitted and received through terminals TX1+/-, TX2+/-, RX1+/- and RX2+/-.

In one embodiment, terminals D+ and D- (e.g., A6/B6 and A7/B7) may be a port for transmitting and receiving data (e.g., USB packets).

In one embodiment, when the electronic device <NUM> transmits an audio signal to the audio output device <NUM> after the audio output device <NUM> is connected to the connector <NUM>, one of the left audio signal (L) and the right audio signal (R) can be transmitted through terminals A6/B6 (D+), and the other one of the left audio signal (L) or the right audio signal (R) can be transmitted through terminals A7/B7 (D-). The L/R audio signal may be an analog signal.

According to various embodiments, the role of each terminal in various operation modes is defined by the USB Type-C standard, and a detailed description of the role of each terminal will be omitted.

<FIG> illustrates a block diagram <NUM> of the electronic device <NUM> and the audio output device <NUM> according to various embodiments.

With reference to <FIG>, in various embodiments, the electronic device (e.g., electronic device <NUM> in <FIG>) may include a processor <NUM>, a USB connector <NUM> (e.g., connector <NUM> in <FIG>), and a memory <NUM>. The audio output device (e.g., audio output device <NUM> in <FIG>) may include a USB connector <NUM> (e.g., connector <NUM> in <FIG>), a processor <NUM>, a microphone <NUM>, and a speaker <NUM>.

In various embodiments, the electronic device <NUM> may be electrically connected to the audio output device <NUM> through various input/output interfaces (e.g., peripheral component interconnect express (PCIe) interface, lightning interface, or USB interface).

In the following embodiments, it is assumed that the electronic device <NUM> is connected to the audio output device <NUM> through a USB interface.

In various embodiments, the electronic device <NUM> may be electrically connected to the audio output device <NUM> through the USB connector <NUM>. For example, the connector <NUM> of the audio output device <NUM> may be accommodated through the hole of the electronic device <NUM> to be in physical contact with the USB connector <NUM> of the electronic device <NUM>, and the electronic device <NUM> and the audio output device <NUM> may be electrically connected according to the physical contact.

In one embodiment, the USB connector <NUM> may be implemented in the form of USB Type-C. However, it is not limited thereto.

In various embodiments, the processor <NUM> of the electronic device <NUM> may detect that the audio output device <NUM> is connected to the USB connector <NUM>. The USB driver <NUM> of the processor <NUM> may check the resistance value detected at the CC pin when the audio output device <NUM> is fastened to the USB connector <NUM>, and may identify the type (e.g., earphone) of the audio output device <NUM> based on the resistance value (e.g., <NUM>). The processor <NUM> may supply power for the operation of the audio output device <NUM> to the audio output device <NUM> through a port (e.g., VBUS port) for power supply.

In various embodiments, when the audio output device <NUM> is connected to the USB connector <NUM>, the processor <NUM> may perform a series of preparation operations (e.g., enumeration) for data transmission between the electronic device <NUM> and the audio output device <NUM>. During a series of preparation operations for data transmission between the electronic device <NUM> and the audio output device <NUM>, the processor <NUM> may obtain information on the audio output device <NUM>. The information on the audio output device <NUM> may include vendor identification (VID) indicating manufacturer information of the audio output device <NUM>, product identification (PID) indicating the product, and device descriptor information indicating the number of interfaces supported by the audio output device <NUM>, a sample rate, channel information, and/or a bit rate.

In one embodiment, in response to the connection of the audio output device <NUM> to the USB connector <NUM>, the USB driver <NUM> may transmit some of the obtainable information about the audio output device <NUM>, such as VID, PID, and audio card information to be generated, to the audio framework <NUM> via the USB framework <NUM>. As some of the information about the audio output device <NUM> is transmitted to the audio framework <NUM>, to shorten the time to recognize the audio output device <NUM>, the audio framework <NUM> for processing an audio signal through the audio output device <NUM> may be put into the ready state.

In one embodiment, the audio framework <NUM> may access at specified time intervals to open an audio card to be generated based on the VID, PID, and audio card information to be generated of the audio output device <NUM>. For example, based on the VID, PID, and audio card information to be generated of the audio output device <NUM>, the audio framework <NUM> may access the interface for processing an audio signal corresponding to audio card information at specified time intervals to check whether the interface is activated. In one embodiment, when at least another portion of the information about the audio output device <NUM>, such as the number of interfaces supported by the audio output device <NUM>, the sample rate, channel information, and/or the bit rate, is obtained, the interface for audio signal processing may be activated.

Upon activation of the interface for audio signal processing, the processor <NUM> may transmit an audio signal to the audio output device <NUM> through the activated interface.

In various embodiments, the processor <NUM> may control the function of the audio output device <NUM> based on a control signal, for example, a control signal using the audio playback application <NUM>. The processor <NUM> may control the function of the audio output device <NUM>, such as adjusting the volume of a sound corresponding to an audio signal output from the audio output device <NUM>, based on various control signals.

In various embodiments, the audio playback application <NUM>, the audio framework <NUM>, the USB framework <NUM>, and the USB driver <NUM> may be implemented on the processor <NUM>.

In various embodiments, the audio output device <NUM> may include a USB connector <NUM>, a processor <NUM>, a microphone <NUM>, and a speaker <NUM>.

In one embodiment, the audio output device <NUM> may be electrically connected to the electronic device <NUM> through the USB connector <NUM> (e.g., connector <NUM> in <FIG>). The USB connector <NUM> may be implemented in the form of USB Type-C. However, it is not limited thereto.

In various embodiments, the processor <NUM> may include an audio codec (not shown) that processes audio signals. The audio codec (not shown) may be implemented as a hardware component included in the processor <NUM>. The processor <NUM> may perform various processing operations, such as audio signal amplification and sound quality improvement corresponding to an audio signal, based on a control signal received from the electronic device <NUM>.

In various embodiments, the processor <NUM> may control the speaker <NUM> to output a sound corresponding to the processed audio signal. The processor <NUM> may include a digital-to-analog converter (DAC) that converts the processed audio signal into an analog signal. The processor <NUM> may generate a sound corresponding to a signal processed by using the DAC and control the speaker <NUM> to output the generated sound.

In various embodiments, the microphone <NUM> may pick up sound around the electronic device <NUM> or the audio output device <NUM> and convert the picked-up sound into a digital form.

The electronic device <NUM> may include: a USB Type-C connector <NUM> including at least one CC (configuration channel) pin; a processor <NUM> operatively connected to the USB Type-C connector <NUM>; and a memory <NUM> operatively connected to the processor <NUM>, wherein the processor <NUM> is configured to: obtain, when an audio output device <NUM> is connected to the USB Type-C connector <NUM>, first information of the audio output device <NUM> by using a USB driver <NUM>; transmit the first information and audio card information of the audio output device <NUM> to an audio framework <NUM> through a USB framework <NUM>; control the audio framework <NUM> to access an interface corresponding to the audio card information based on the first information and the audio card information of the audio output device <NUM>; and activate, when at least a portion of second information of the audio output device <NUM> is obtained through the USB driver <NUM> while accessing the interface, the interface by transmitting the at least a portion of the second information to the audio framework <NUM> through the USB framework <NUM>.

According to various embodiments, the first information of the audio output device <NUM> may include a vendor identification (VID) indicating manufacturer information of the audio output device <NUM> and a product identification (PID) indicating the product.

According to various embodiments, the electronic device <NUM> may further include a speaker (not shown), and the processor <NUM> may be configured to detect the connection of the audio output device <NUM> to the USB Type-C connector <NUM> while outputting an audio signal through the speaker (not shown).

According to various embodiments, the processor <NUM> may be configured to block the output of the speaker (not shown) after transmitting the first information and the audio card information to the audio framework <NUM> through the USB framework <NUM>.

According to various embodiments, the processor <NUM> may be configured to unblock the blocked output of the speaker (not shown) in response to activation of the interface.

According to various embodiments, the second information of the audio output device <NUM> may include at least one of presence of a speaker, presence of a microphone, number of interfaces supported by the audio output device <NUM>, sample rate for each interface, bit rate, channel information, or endpoint.

According to various embodiments, the processor <NUM> may be configured to:
determine, after obtaining the first information, whether audio output device matching the first information is stored in the memory <NUM>; obtain, if audio output device matching the first information is stored in the memory <NUM>, the audio output device and audio card information corresponding thereto from the memory <NUM>; and activate the interface based on the audio output device and the audio card information obtained from the memory <NUM>.

According to various embodiments, the processor <NUM> may be configured to activate clock boosting upon connection of the audio output device <NUM> to the USB Type-C connector <NUM>.

According to various embodiments, the processor <NUM> may be configured to deactivate activated clock boosting upon activation of the interface.

According to various embodiments, the processor <NUM> may be configured to: set the electronic device <NUM> to operate in a USB host mode; check, upon connection of the audio output device <NUM> to the USB Type-C connector <NUM>, whether the resistance value detected at the CC pin is <NUM>; and maintain the USB host mode and obtain first information of the audio output device <NUM> if the resistance value detected at the CC pin is <NUM>.

According to various embodiments, the processor <NUM> may be configured to control the USB driver <NUM> or the power delivery integrated circuit (PDIC) driver to activate terminal VBUS of the USB Type-C connector <NUM> upon connection of the audio output device <NUM> to the USB Type-C connector <NUM>.

<FIG> illustrates a diagram <NUM> illustrating software layers of the electronic device <NUM> according to various embodiments.

In one embodiment, the audio playback application <NUM>, the audio framework <NUM>, the USB framework <NUM>, the USB driver <NUM>, the PDIC driver <NUM>, and the audio driver <NUM> may be implemented on the processor (e.g., processor <NUM>). More specifically, the audio playback application <NUM> may be implemented on the application layer <NUM>; the audio framework <NUM> and the USB framework <NUM> may be implemented on the framework layer <NUM>; the PDIC driver <NUM>, the USB driver <NUM>, and the audio driver <NUM> may be implemented on the kernel layer <NUM>; and the USB connector <NUM> may be implemented on the hardware (H/W) layer <NUM>.

The USB driver <NUM> detects that an audio output device (e.g., audio output device <NUM> in <FIG>) is connected to the USB connector <NUM>. The USB driver <NUM> may check the resistance value detected at the CC pin after the audio output device <NUM> is fastened to the USB connector <NUM>, and identify the type (e.g., earphone) of the audio output device <NUM> based on the resistance value (e.g., <NUM>). The USB driver <NUM> may supply power for the operation of the audio output device <NUM> to the audio output device <NUM> through a port (e.g., VBUS port) that supplies power to the audio output device <NUM>.

In one embodiment, the PDIC driver <NUM> may perform PD communication through the CC pin to determine a power role or a data role.

In one embodiment, when the audio output device <NUM> is connected to the USB connector <NUM>, the USB driver <NUM> may perform a series of preparation operations (e.g., enumeration) for data transmission between the electronic device <NUM> and the audio output device <NUM>.

In one embodiment, the USB driver <NUM> may create a node for the audio output device <NUM> to drive the audio output device <NUM> connected to the USB connector <NUM> by performing a series of preparation operations (e.g., enumeration) for data transmission between the electronic device <NUM> and the audio output device <NUM>.

In one embodiment, the node for the audio output device <NUM> may include first information and second information. The first information of the audio output device <NUM> may include a vendor identification (VID) indicating manufacturer information of the audio output device <NUM> and a product identification (PID) indicating the product. The second information of the audio output device <NUM> may include information regarding presence of a speaker, presence of a microphone, number of interfaces supported by the audio output device <NUM>, sample rate for each interface, bit rate, channel information, and/or endpoint.

In response to connection of the audio output device <NUM> to the USB connector <NUM> of the electronic device <NUM>, the USB driver <NUM> obtains first information of the audio output device <NUM> while performing a series of preparation operations (e.g., enumeration). The USB driver <NUM> transmits the first information of the audio output device <NUM> to the audio framework <NUM> through the USB framework <NUM>. In one embodiment, the USB driver <NUM> may transmit card number information on which the audio output device <NUM> is to be generated together with the first information of the audio output device <NUM> to the audio framework <NUM> through the USB framework <NUM>.

When the first information and audio card information (e.g., card number information to be generated) of the audio output device <NUM> is transmitted to the audio framework <NUM> through the USB framework <NUM> in response to connection of the audio output device <NUM> to the USB connector <NUM> of the electronic device <NUM>, the audio framework <NUM> accesses to open a sound card of the audio output device <NUM> based on the first information and audio card information of the audio output device <NUM>. The audio card information is kernel interface information generated by the audio driver <NUM> and can be used when the audio framework <NUM> opens a card (e.g., sound card of the audio output device <NUM>) in the kernel. In response to connection of the audio output device <NUM> to the USB connector <NUM>, the USB driver <NUM> may transmit the card number information to be generated to the USB framework <NUM>. The USB framework <NUM> may forward the card number information to be generated received from the USB driver <NUM> to the audio framework <NUM>. The audio framework <NUM> may attempt to access and open an audio card corresponding to the card number information to be generated received from the USB framework <NUM>.

Upon completion of a series of preparation operations (e.g., enumeration), the USB driver <NUM> obtains second information of the audio output device <NUM> connected to the USB connector <NUM> separately from the first information through the USB notify driver <NUM>, USB PHY driver <NUM>, USB host interface (XHCI) <NUM>, USB host controller driver (HCD) <NUM>, USB core & hub driver <NUM> of the USB driver <NUM>, and the USB host manager <NUM>, USB advanced Linux sound architecture (ALSA) manager <NUM>, USB ALSA device (<NUM>) of the USB framework <NUM>.

When the second information of the audio output device <NUM> is received, the audio framework <NUM> may open a sound card (e.g., soundcard info node <NUM>) of the audio output device <NUM> and open the PCM node <NUM> finally to output an audio signal.

In the related art, the USB driver <NUM> may recognize the audio output device <NUM> by obtaining the first information and second information of the audio output device <NUM> connected to the USB connector <NUM> through the USB notify driver <NUM>, USB PHY driver <NUM>, USB host interface <NUM>, USB host controller driver <NUM>, USB core & hub driver <NUM> of the USB driver <NUM>, and the USB host manager <NUM>, USB ALSA manager <NUM>, USB ALSA device <NUM> of the USB framework <NUM>.

The audio framework <NUM> for audio signal processing is put into the ready state by obtaining the first information in advance, an access is made to open the sound card of the audio output device <NUM> (e.g., to check whether the audio output device <NUM> is in a state capable of audio signal processing), and the sound card is opened upon obtaining the second information, which can shorten the time for recognizing the audio output device <NUM> compared with a related art method.

In one embodiment, the audio framework <NUM> may provide functions that can be supported by a component (e.g., sound output device <NUM> in <FIG>) of the electronic device <NUM> or the audio output device <NUM> to enable an application (e.g., audio playback application <NUM>) to perform audio output. The audio framework <NUM> may generate a control signal for controlling the sound output device <NUM> or the audio output device <NUM> based on the configuration information received from the audio playback application <NUM>, and transmit the control signal to the audio driver <NUM>.

In one embodiment, the audio framework <NUM> may generate a control signal for controlling the audio output device <NUM> based on the configuration information received from the audio playback application <NUM>, and transmit audio-related data (e.g., pulse code modulation (PCM) data corresponding to audio, and audio output path) and the control signal to the audio driver <NUM>.

In one embodiment, the audio driver <NUM> may transmit the control signal received from the audio framework <NUM> to the USB driver <NUM>, so that the audio output device <NUM> connected to the USB connector <NUM> can output audio. For example, the electronic device <NUM> may transmit audio-related data to the audio output device <NUM>. The processor (e.g., processor <NUM> in <FIG>) of the audio output device <NUM> may receive audio-related data and output the audio-related data through the corresponding speaker (e.g., speaker <NUM> in <FIG>).

In one embodiment, the audio playback application <NUM> may refer to an application for controlling functions related to audio playback (e.g., audio output activation or deactivation, volume adjustment during audio reproduction, or audio equalization). The audio playback application <NUM> may provide a user interface that enables the user to control the functions related to audio playback. When a user input is received on the user interface, the audio playback application <NUM> may transmit the configuration information corresponding to the received user input to the audio framework <NUM>.

<FIG> illustrates a flowchart <NUM> of a method for the electronic device <NUM> to recognize an audio output device <NUM> according to various embodiments.

With reference to <FIG>, at operation <NUM>, in response to connection of an audio output device (e.g., audio output device <NUM> in <FIG>) to the USB Type-C connector (e.g., USB connector <NUM> of <FIG>), the USB driver (e.g., USB driver <NUM> in <FIG>) of the processor (e.g., processor <NUM> in <FIG>) may obtain first information of the audio output device <NUM>. For example, the processor <NUM> may activate VBUS in response to connection of the connector (e.g., connector <NUM> in <FIG>) of the audio output device <NUM> to the USB Type-C connector <NUM>. The audio output device <NUM> may start to operate with power received through VBUS. When the signal line of terminal A6/B6 (D+) among plural terminals provided in the USB Type-C connector <NUM> is pulled up, the electronic device (e.g., electronic device <NUM> in <FIG>) may detect that terminal A6/B6 (D+) is pulled up, and perform a series of preparation operations (e.g., enumeration) for data transmission with the audio output device <NUM>.

In one embodiment, while a series of preparation operations (e.g., enumeration) are performed for data transmission between the electronic device <NUM> and the audio output device <NUM>, the first information of the audio output device <NUM> may be obtained from the audio output device <NUM>. For example, the first information of the audio output device <NUM> may include a vendor identification (VID) indicating manufacturer information of the audio output device <NUM> and a product identification (PID) indicating the product.

In one embodiment, operation <NUM> may be performed while an audio signal is output through the speaker (e.g., sound output device <NUM> of <FIG>) of the electronic device <NUM>.

In one embodiment, at operation <NUM>, the processor <NUM> (e.g., USB driver <NUM>) may transmit the first information and the audio card information of the audio output device <NUM> to the audio framework (e.g., audio framework <NUM> in <FIG>) through the USB framework (e.g., USB framework <NUM> in <FIG>).

In one embodiment, operation <NUM> of transmitting the first information and/or audio card information of the audio output device <NUM> to the audio framework <NUM> through the USB framework <NUM> may correspond to an operation for putting the audio framework <NUM> into the ready state so as to enable the audio output device <NUM> to process an audio signal using an interface corresponding to the audio card information.

In one embodiment, at operation <NUM>, the processor <NUM> may control the audio framework <NUM> to access an interface for audio signal processing corresponding to the audio card information, based on the first information and the audio card information of the audio output device <NUM>. For example, the audio framework <NUM> may attempt to access the audio card corresponding to the audio card information at specified time intervals based on the first information and audio card information of the audio output device <NUM> obtained from the USB framework <NUM>.

In one embodiment, at operation <NUM>, when at least a portion of the second information of the audio output device <NUM> is obtained while accessing the interface, the processor <NUM> may activate the interface for audio signal processing.

In one embodiment, as described above with reference to <FIG>, the processor <NUM> may obtain the second information of the audio output device <NUM> connected to the USB connector <NUM> through the USB notify driver <NUM>, USB PHY driver <NUM>, USB host interface <NUM>, USB host controller driver <NUM>, USB core & hub driver <NUM> of the USB driver <NUM>, and the USB host manager <NUM>, USB ALSA manager <NUM>, USB ALSA device <NUM> of the USB framework <NUM> while performing a series of preparation operations for data transmission with the audio output device <NUM>.

In one embodiment, when at least a portion of the second information of the audio output device <NUM> is obtained as the execution of a series of preparation operations for data transmission with the audio output device <NUM> is completed, the processor <NUM> may determine that a node for the audio output device <NUM> has been created and may activate an interface (e.g., interface corresponding to audio card information) for audio signal processing through the audio output device <NUM>.

In one embodiment, the second information of the audio output device <NUM> may include information regarding presence of a speaker, presence of a microphone, number of interfaces supported by the audio output device <NUM>, sample rate for each interface, bit rate, channel information, and/or endpoint.

In one embodiment, when the audio output device <NUM> is connected to the USB Type-C connector <NUM>, the USB driver <NUM> may generate a node representing information of the audio output device <NUM>. For example, the node may be an interface that allows access to the kernel to output an audio signal through the audio output device <NUM>.

In one embodiment, the processor <NUM> may put the audio framework <NUM> into the ready state by obtaining the first information of the audio output device <NUM>, and may access an audio card to be generated at specified time intervals by using the audio framework <NUM> put into the ready state. When at least some of the second information about the audio output device <NUM> is obtained while accessing the audio card, the processor <NUM> may activate an interface for audio signal processing through connection with the audio output device <NUM> (e.g., generation of a node representing information of the audio output device <NUM>), which may reduce the time for recognizing the audio output device <NUM>.

In one embodiment, although not shown, the processor <NUM> may transmit an audio signal to the audio output device <NUM> through the activated interface.

In one embodiment, although not shown, the processor <NUM> may map the generated node indicating information about the audio output device <NUM>, for example, first information, second information, and audio card information to the identification information (e.g., VID or PID) of the audio output device <NUM>, and store the mapping result in the memory (e.g., memory <NUM> in <FIG>).

In one embodiment, it has been described at operation <NUM> of <FIG> that the USB driver <NUM> transmits the first information of the connected audio output device <NUM> to the audio framework <NUM> through the USB framework <NUM>. However, it is not limited thereto. In another embodiment, the USB driver <NUM> may transmit the first information and audio card information to be generated of the connected audio output device <NUM> to the audio framework <NUM> without passing through the USB framework <NUM>.

In one embodiment, it has been described at operation <NUM> that VBUS activation is performed by the USB driver <NUM> in response to connection of the connector <NUM> of the audio output device <NUM> to the USB Type-C connector <NUM>. However, it is not limited thereto. For example, in response to connection of the connector <NUM> of the audio output device <NUM> to the USB Type-C connector <NUM>, VBUS activation may be performed by the PDIC driver (e.g., PDIC driver <NUM> in <FIG>). Compared with the case where VBUS activation is performed by the USB driver <NUM>, when VBUS activation is performed by the PDIC driver <NUM>, as the timing of performing a series of preparation operations (e.g., enumeration) for data transmission with the audio output device <NUM> becomes also earlier, the time for recognizing the audio output device <NUM> may be shortened.

In one embodiment, as operations <NUM>, <NUM>, <NUM> and <NUM> of <FIG> are identical respectively to operations <NUM>, <NUM>, <NUM> and <NUM> of <FIG> described above, detailed descriptions thereof may be replaced with corresponding descriptions with reference to <FIG>.

With reference to <FIG>, at operation <NUM>, in response to connection of an audio output device (e.g., audio output device <NUM> in <FIG>) to the USB Type-C connector (e.g., USB connector <NUM> in <FIG>) while outputting an audio signal through the speaker (e.g., sound output device <NUM> in <FIG>) of the electronic device <NUM>, the USB driver (e.g., USB driver <NUM> in <FIG>) of the processor (e.g., processor <NUM> in <FIG>) may obtain the first information of the audio output device <NUM>. The first information of the audio output device <NUM> may include a vendor identification (VID) indicating manufacturer information of the audio output device <NUM> and a product identification (PID) indicating the product.

At operation <NUM>, the processor <NUM> (e.g., USB driver <NUM>) transmits the first information and the audio card information of the audio output device <NUM> to the audio framework (e.g., audio framework <NUM> in <FIG>) through the USB framework (e.g., USB framework <NUM> in <FIG>).

In one embodiment, at operation <NUM>, the processor <NUM> may block (e.g., mute) the output of the speaker of the electronic device (e.g., electronic device <NUM> of <FIG>). When the first information and audio card information of the audio output device <NUM> is obtained after the audio output device <NUM> is connected to the USB Type-C connector <NUM>, as the speaker output is blocked, an audio signal may be not output through the speaker of the electronic device <NUM>.

In one embodiment, at operation <NUM>, the processor <NUM> may control the audio framework <NUM> to access an interface for audio signal processing corresponding to the audio card information, based on the first information and the audio card information of the audio output device <NUM>.

In one embodiment, at operation <NUM>, when at least a portion of the second information of the audio output device <NUM> is obtained while accessing the interface, the processor <NUM> may activate the interface for audio signal processing. Upon activation of the interface for audio signal processing, at operation <NUM>, the processor <NUM> may unblock the speaker output of the electronic device <NUM>. For example, as the connection of the audio output device <NUM> is recognized (e.g., a state in which the audio output device <NUM> can process an audio signal) due to the activation of the interface, the audio signal output path may be changed from the speaker of the electronic device <NUM> to the audio output device <NUM> (e.g., speaker <NUM> in <FIG>).

In one embodiment, although not shown, the processor <NUM> may transmit an audio signal to the audio output device <NUM> through the activated interface. For example, the audio output device <NUM> may output an audio signal received from the electronic device <NUM> through the speaker <NUM>.

In various embodiments, the speaker output is blocked in <FIG> in addition to the embodiment of <FIG> where the first information and audio card information of the audio output device <NUM> connected to the USB Type-C connector <NUM> is transmitted to the audio framework <NUM>, so that the time for recognizing the audio output device <NUM> may be shortened (e.g., about <NUM> to <NUM>).

In one embodiment, as operations <NUM> and <NUM> of <FIG> are identical respectively to operations <NUM> and <NUM> of <FIG> described above, detailed descriptions thereof may be replaced with corresponding descriptions with reference to <FIG>.

With reference to <FIG>, at operation <NUM>, in response to connection of an audio output device (e.g., audio output device <NUM> in <FIG>) to the USB Type-C connector (e.g., USB connector <NUM> in <FIG>) while outputting an audio signal through the speaker (e.g., sound output device <NUM> in <FIG>) of the electronic device (e.g., electronic device <NUM> in <FIG>), the USB driver (e.g., USB driver <NUM> in <FIG>) of the processor (e.g., processor <NUM> in <FIG>) may obtain the first information of the audio output device <NUM>. At operation <NUM>, the processor <NUM> (e.g., USB driver <NUM>) may transmit the first information of the audio output device <NUM> to the audio framework (e.g., audio framework <NUM> in <FIG>) through the USB framework (e.g., USB framework <NUM> in <FIG>).

In one embodiment, at operation <NUM>, the processor <NUM> may check whether audio output device corresponding to the first information of the audio output device <NUM> is stored in the memory (e.g., memory <NUM> in <FIG>). The first information of the audio output device <NUM> may include a vendor identification (VID) indicating manufacturer information of the audio output device <NUM> and a product identification (PID) indicating the product. Based on the first information such as VID and PID obtained from the audio output device <NUM>, the processor <NUM> may determine whether audio output device matching the VID and PID is present in the memory <NUM>.

In one embodiment, if audio output device corresponding to the first information is stored in the memory <NUM>, at operation <NUM>, the processor <NUM> may obtain information on the audio output device <NUM> from the memory <NUM>. For example, if audio output device matching the first information of the audio output device <NUM> such as VID and PID exists in the memory <NUM>, the processor <NUM> may obtain information of the audio output device <NUM> mapped to the VID and PID, such as second information and audio card information, from the memory <NUM>. The second information of the audio output device <NUM> may include information regarding presence of a speaker, presence of a microphone, number of interfaces supported by the audio output device <NUM>, sample rate for each interface, bit rate, channel information, and/or endpoint.

In one embodiment, at operation <NUM>, the processor <NUM> may activate an interface for audio signal processing based on the information of the audio output device <NUM> obtained from the memory <NUM>.

In one embodiment, if audio output device corresponding to the first information is not stored in the memory <NUM>, the processor <NUM> may perform operations <NUM> and <NUM> of <FIG> described above.

In the embodiment of <FIG>, when audio output device corresponding to the first information is stored in the memory <NUM>, as the interface is activated upon obtaining the second information and audio card information of the audio output device <NUM> from the memory <NUM>, the connection of the audio output device <NUM> may be recognized (e.g., in a state where the audio output device <NUM> can process audio signals). As the stored second information and audio card information of the audio output device <NUM> are obtained from the memory <NUM>, it is not necessary to obtain the second information and audio card information of the audio output device <NUM> whenever the audio output device <NUM> is connected to the USB Type-C connector <NUM>, so that the time taken to recognize the audio output device <NUM> can be reduced.

<FIG> is a flowchart <NUM> of a method for the electronic device <NUM> to recognize an audio output device <NUM> according to various embodiments.

In one embodiment, as operations <NUM>, <NUM> and <NUM> of <FIG> are identical respectively to operations <NUM>, <NUM> and <NUM> of <FIG> described above, detailed descriptions thereof may be replaced with corresponding descriptions with reference to <FIG>.

With reference to <FIG>, at operation <NUM>, the USB driver (e.g., USB driver <NUM> in <FIG>) of the processor (e.g., processor <NUM> in <FIG>) may detect that an audio output device (e.g., audio output device <NUM> in <FIG>) is connected to the USB Type-C connector (e.g., USB connector <NUM> of <FIG>). At operation <NUM>, the connection may be detected while an audio signal is output through the speaker (e.g., sound output device <NUM> in <FIG>) of the electronic device (e.g., electronic device <NUM> in <FIG>).

In one embodiment, at operation <NUM>, the processor <NUM> may activate clock boosting. For example, the clock may include an application processor (AP) clock, a memory interface (MIF) clock, and a USB bus clock. In one embodiment, activating clock boosting upon detecting connection of the audio output device <NUM> to the USB type C connector <NUM> may improve the performance of the electronic device <NUM>.

In one embodiment, at operation <NUM>, the processor <NUM> may obtain first information of the connected audio output device <NUM>. For example, while performing a series of preparation operations (e.g., enumeration) for data transmission between the electronic device <NUM> and the audio output device <NUM> in a state where clock boosting is activated, the processor <NUM> may obtain first information of the audio output device <NUM> from the audio output device <NUM>.

In one embodiment, at operation <NUM>, the processor <NUM> (e.g., USB driver <NUM>) may transmit the first information and audio card information of the audio output device <NUM> to the audio framework <NUM> through the USB framework (e.g., USB framework <NUM> in <FIG>). At operation <NUM>, based on the first information of the audio output device <NUM>, the processor <NUM> may control the audio framework <NUM> to access an interface for audio signal processing corresponding to the audio card information.

In one embodiment, at operation <NUM>, the processor <NUM> may deactivate clock boosting.

In the embodiment of <FIG>, the processor <NUM> may activate clock boosting in response to connection of the audio output device <NUM> to the USB Type-C connector <NUM>, and may deactivate clock boosting when recognition of the audio output device <NUM> is completed. In other words, after the audio output device <NUM> is connected to the USB connector, the processor <NUM> may activate clock boosting until the audio output device <NUM> is recognized (e.g., activation of an interface for audio signal processing) and perform operations for recognizing the connection of the audio output device <NUM> while the performance of the electronic device <NUM> is improved due to activation of clock boosting, so that the time for recognizing the audio output device <NUM> can be shortened.

In various embodiments, the electronic device <NUM> may be a dual role device supporting a USB host mode and a USB device mode. When the audio output device (e.g., audio output device <NUM> in <FIG>) is connected to the USB Type-C connector (e.g., USB connector <NUM> in <FIG>) of the electronic device (e.g., electronic device <NUM> in <FIG>) and the role is determined accordingly by the PDIC driver (e.g., PDIC driver <NUM> in <FIG>), the electronic device <NUM> may determine whether to operate in the USB host mode (e.g., mode for supplying power to the audio output device <NUM> connected to the USB Type-C connector <NUM> and/or mode for transmitting data) or in the USB device mode.

In the embodiment of <FIG>, the electronic device <NUM> initially sets its mode to the USB host mode and remains in the USB host mode without having to switch between the USB host mode and the USB device mode when the audio output device <NUM> is connected to the USB Type-C connector <NUM>, so that the time for recognizing the audio output device <NUM> can be shortened.

With reference to <FIG>, at operation <NUM>, the processor (e.g., processor <NUM> in <FIG>) may configure the electronic device <NUM> to operate in the USB host mode.

In one embodiment, at operation <NUM>, the USB driver (e.g., USB driver <NUM> in <FIG>) of the processor <NUM> may detect connection of an audio output device <NUM> to the USB Type-C connector <NUM>.

In one embodiment, at operation <NUM>, the processor <NUM> may check whether the resistance value detected at the CC pin is <NUM>. If the resistance value detected at the CC pin is <NUM>, at operation <NUM>, the processor <NUM> may obtain the first information of the audio output device <NUM>. At operation <NUM>, the processor <NUM> (e.g., USB driver <NUM>) may transmit the obtained first information and audio card information of the audio output device <NUM> to the audio framework <NUM> through the USB framework (e.g., USB framework <NUM> in <FIG>). At operation <NUM>, based on the first information and the audio card information of the audio output device <NUM>, the processor <NUM> may control the audio framework <NUM> to access an interface for audio signal processing corresponding to the audio card information. At operation <NUM>, when at least a portion of the second information of the audio output device <NUM> is obtained while accessing the interface, the processor <NUM> may activate the interface for audio signal processing.

In one embodiment, if the resistance value detected at the CC pin is not <NUM>, at operation <NUM>, the processor <NUM> may transition to the USB device mode.

According to various embodiments of the disclosure, as the operations of <FIG> are performed, the time for recognizing the audio output device <NUM> may be shortened as shown in Table <NUM> below. For example, in the related art, after the audio output device <NUM> is connected to the USB Type-C connector <NUM>, as information about the audio output device <NUM> is obtained through the PDIC driver <NUM>, the USB driver <NUM>, the audio driver <NUM>, the USB framework <NUM>, and the audio framework <NUM>, it may take <NUM> seconds for the audio output device <NUM> to be recognized. In various embodiments of the disclosure, when the audio output device <NUM> is connected to the USB Type-C connector <NUM>, some information of the audio output device <NUM> is obtained in advance and the USB framework <NUM> is controlled to transmit the obtained information of the audio output device <NUM> to the audio framework <NUM> for audio processing, so that the time for recognizing the audio output device <NUM> may be shortened from <NUM> seconds of the related art to <NUM> seconds.

According to various embodiments, a method for the electronic device <NUM> to recognize an audio output device <NUM> may include: obtaining, in response to connection of the audio output device <NUM> to a USB Type-C connector <NUM> including at least one configuration channel (CC) pin, first information of the audio output device <NUM>; transmitting the first information and audio card information of the audio output device <NUM> to an audio framework <NUM> through a USB framework <NUM>; accessing an interface corresponding to the audio card information based on the first information and the audio card information of the audio output device <NUM>; and activating the interface when at least a portion of second information of the audio output device <NUM> is obtained while accessing the interface and the at least a portion of the second information is transmitted to the audio framework <NUM> through the USB framework <NUM>.

According to various embodiments, the method may further include outputting an audio signal through a speaker (not shown) of the electronic device <NUM> before detecting the connection of the audio output device <NUM> to the USB Type-C connector <NUM>.

According to various embodiments, the method may further include blocking the output of the speaker (not shown) after transmitting the first information and the audio card information to the audio framework <NUM> through the USB framework <NUM>.

According to various embodiments, the method may further include unblocking the output of the speaker upon activation of the interface.

According to various embodiments, the method may further include: determining, after obtaining the first information of the audio output device <NUM>, whether audio output device matching the first information is present in the memory (e.g., memory <NUM> in <FIG>); obtaining, upon determining that audio output device matching the first information is present in the memory, information about the audio output device <NUM> and audio card information corresponding to the audio output device <NUM> from the memory <NUM>; and activating the interface based on the information about the audio output device <NUM> and the audio card information obtained from the memory <NUM>.

According to various embodiments, the method may further include activating clock boosting in response to connection of the audio output device <NUM> to the USB Type-C connector <NUM>.

According to various embodiments, the method may further include deactivating clock boosting in response to activation of the interface.

According to various embodiments, the method may further include configuring the electronic device <NUM> to operate in a USB host mode. Obtaining first information of the audio output device <NUM> may include: checking whether the resistance value detected at the CC pin is <NUM>; and obtaining, if the resistance value detected at the CC pin is <NUM>, the first information of the audio output device <NUM> while maintaining the USB host mode.

The electronic device according to certain embodiments may be one of various types of electronic devices.

The term "non-transitory" simply means that the storage medium is a tangible device, and does not include a signal (e.g., an electromagnetic wave), but this term does not differentiate between where data is semi-permanently stored in the storage medium and where the data is temporarily stored in the storage medium.

According to an embodiment, a method according to certain embodiments of the disclosure may be included and provided in a computer program product.

Claim 1:
An electronic device comprising:
a USB Type-C connector (<NUM>),
a processor operatively connected to the USB Type-C connector; and
a memory operatively connected to the processor,
wherein the processor is configured to:
obtain, based on detecting connection of an audio output device to the USB Type-C connector by using a USB driver (<NUM>),
first information and audio card information of the audio output device through the USB driver (<NUM>),
wherein the first information is related to identification information of the audio output device and the audio card information is related to an interface (<NUM>) generated by an audio driver (<NUM>);
transmit the first information and the audio card information of the audio output device to an audio framework (<NUM>) through a USB framework (<NUM>); control the audio framework (<NUM>) to access the interface (<NUM>) based on the first information and the audio card information of the audio output device;
activate, when at least a portion of second information related to an attribute of the audio output device is obtained through the USB driver (<NUM>) while accessing the interface (<NUM>), the interface (<NUM>) by transmitting at least the portion of the second information to the audio framework (<NUM>) through the USB framework; framework (<NUM>); and
transmit an audio signal to the audio output device through the activated interface (<NUM>).