Control methods for audio receiving devices and audio receiving devices
By configuring a multi-functional interface on the audio receiving device and detecting the interface status, the device can automatically select the working mode, thus solving the applicability problem of the audio receiving device in environments with dense interfaces. This enables concurrent operation of audio transmission and charging, expanding the applicability of the device.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN MAONO TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-30
AI Technical Summary
Existing audio receiving devices have limited applicability in environments with dense interfaces. The male connectors and compact interfaces cause physical interference, making them unsuitable as backup channels for audio transmission and resulting in unstable connections.
The audio receiving device is configured with a second type of interface, which is a multi-functional interface that supports audio output and power input. By detecting the connection status and device type of the first and second types of interfaces, status information is generated, and the male connector priority mode or female connector output mode is automatically selected to realize the concurrent operation of audio signal routing and power acquisition.
While retaining the traditional male connector method, it provides a reliable alternative audio output solution for situations where the first type of interface cannot be used, solves the physical interference problem, realizes concurrent operation of audio transmission and charging, and expands the applicability of the device in interface-dense environments.
Smart Images

Figure CN122317482A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of audio equipment control technology, and more particularly to a control method for an audio receiving device and an audio receiving device. Background Technology
[0002] Existing audio equipment systems typically consist of two parts: an audio transmitter and an audio receiver (for example, a lavalier microphone system includes a transmitter and a receiver). The audio receiver, as the core component, generally adopts a detachable male connector design to adapt to audio and video recording devices such as cameras and mobile phones. For extended battery life, the audio receiver usually has a USB Type-C female port for charging only, and can be charged via pogo pin contact when placed in a dedicated charging case.
[0003] However, the Type-C female port on audio receivers only has a charging function. In scenarios where users purchase only a single audio receiver without a charging case, this interface cannot serve as a backup channel for audio transmission, forcing users to rely solely on the male connector. When users need to connect the audio receiver to devices with densely packed interfaces, such as computers, the large male connector is prone to physical interference with adjacent interfaces or cables, resulting in difficulty in insertion or unstable connections. These shortcomings reduce the applicability of audio receivers in environments with dense interfaces. Summary of the Invention
[0004] Based on this, embodiments of the present invention provide a control method for an audio receiving device and an audio receiving device to solve the problem of low applicability of existing audio receiving devices in interface-dense environments.
[0005] In a first aspect, embodiments of the present invention provide a control method for an audio receiving device, the audio receiving device including a first type interface and a second type interface, the first type interface being used to connect a first external device via a detachable connector, and the second type interface being a multi-functional interface supporting audio output and power input, the method comprising: Detect the connection status of the first type of interface and the type of the first external device connected to it, and generate first status information; Detect the connection status of the second type of interface and the type of the connected second external device, and generate second status information; Based on the first status information and the second status information, select one preset working mode from multiple preset working modes as the target working mode, and control the audio receiving device to enter the target working mode; The plurality of preset operating modes include at least a male-first mode and a female-output mode. In the male-first mode, the audio signal received by the audio receiving device is routed to the first type of interface for output, and the built-in power supply of the audio receiving device is charged according to the connection status of the second type of interface. In the female-output mode, the audio signal received by the audio receiving device is encoded into a digital audio protocol format suitable for the second type of interface, the encoded audio signal is output through the second type of interface, and power is obtained from the second external device connected through the second type of interface. The obtained power is used to power the audio receiving device and to charge the built-in power supply.
[0006] Secondly, embodiments of the present invention provide an audio receiving device, the audio receiving device including a first type interface, a second type interface, a wireless receiving module, an interface detection module, an audio routing module, a power management module, a built-in power supply, and a main control unit. The first type interface is used to connect to a first external device via a detachable connector, and the second type interface is a multi-functional interface supporting both audio output and power input; wherein: The interface detection module is used to detect the connection status of the first type of interface and the type of the first external device connected to it, and generate first status information; and to detect the connection status of the second type of interface and the type of the second external device connected to it, and generate second status information. The main control unit is used to select a preset working mode as the target working mode from a plurality of preset working modes according to the first state information and the second state information, and control the audio receiving device to enter the target working mode. The plurality of preset operating modes include at least a male-first mode and a female-output mode. In the male-first mode, the audio signal received by the wireless receiving module is routed to the first type of interface for output, and the built-in power supply is charged according to the connection status of the second type of interface. In the female-output mode, the audio signal received by the wireless receiving module is encoded into a digital audio protocol format suitable for the second type of interface, the encoded audio signal is output through the second type of interface, and power is obtained from the connected second external device through the second type of interface. The obtained power is used to power the audio receiving device and to charge the built-in power supply.
[0007] The beneficial effects of a technical solution provided by this invention are as follows: By configuring a second type interface on an audio receiving device as a multi-functional interface supporting both audio output and power input, and by detecting the connection status and device type of the first and second type interfaces, first and second status information are generated. Based on this, the device automatically selects either a male-first mode or a female-output mode from multiple preset operating modes. When the first type interface cannot connect properly due to physical interference and the second type interface is connected to a data device, the device automatically switches to female-output mode, encodes the audio signal into a digital format, outputs it through the second type interface, and obtains power from the connected device to power the device and charge its built-in power supply. Thus, this invention, while retaining the traditional male-connection method, provides a reliable alternative audio output solution for situations where the first type interface cannot be used. It solves the problem of physical interference between the male connector and the compact interface, and achieves concurrent audio transmission and charging through the same multi-functional interface, significantly expanding the applicability of the device in interface-dense environments. Attached Figure Description
[0008] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a schematic diagram of an audio receiving device according to an embodiment of the present invention; Figure 2 This is a flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 3 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 4 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 5 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 6 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 7 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 8 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 9This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 10 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 11 This is another flowchart of a control method for an audio receiving device according to an embodiment of the present invention; Figure 12 This is another flowchart of the control method for an audio receiving device in one embodiment of the present invention. Detailed Implementation
[0010] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0011] This invention provides a control method for an audio receiving device, which can be applied to, for example... Figure 1 The audio receiving device shown may include a first type of interface and a second type of interface. The first type of interface is used to connect a first external device via a detachable connector. Specifically, the first type of interface can support different types of detachable male terminals (i.e., connectors or detachable connectors), such as any one of Type-C male, Lightning male, or 3.5mm male connectors, to accommodate different types of audio and video recording devices, such as cameras, mobile phones, tablets, or mixers, etc., without limitation here. The second type of interface is a multi-functional interface supporting audio output and power input. Specifically, the second type of interface can be a USB Type-C female port, supporting digital audio signal output, data transmission, and power input functions. It can be used to connect a second external device such as a computer, laptop, or tablet, and can also connect power devices such as USB power adapters, power banks, etc., without limitation here.
[0012] Before elaborating on the control method of the audio receiving device, the hardware structure and module connection relationship of the audio receiving device implementing the method are first explained in order to better understand the technical solution of the embodiments of the present invention.
[0013] like Figure 1As shown, the audio receiving device may include: a first type interface (i.e., a male transmission end), a second type interface (i.e., a female transmission end), a wireless transmission module, an interface detection module, an audio transmission module, a power management module, a built-in battery, and a main control unit (MCU). The interface detection module includes a male connector status recognition module and a female connector status recognition module. The connection relationships between the modules are as follows: The audio transmission module is connected to the first type interface, the second type interface, and the main control unit, respectively, and is used to selectively route audio signals to the first type interface or the second type interface according to the control instructions of the main control unit. The first type interface is connected to the audio transmission module and is used to output audio signals to the connected first external device in male-first mode. The second type interface is connected to the audio transmission module and the power management module, respectively, and is used to receive digital audio signals output by the audio transmission module and transmit them to the connected second external device or power device in female output mode, while transmitting externally input power to the power management module.
[0014] The male connector status recognition module is connected to the first type interface and the main control unit, and is used to detect the connection status of the first type interface and the type of the first external device connected thereto, and send the detection result to the main control unit in the form of data or instructions; the female connector status recognition module is connected to the second type interface and the main control unit, and is used to detect the connection status of the second type interface and the type of the second external device connected thereto, and send the detection result to the main control unit in the form of data or instructions.
[0015] The main control unit is connected to the male connector status recognition module, the female connector status recognition module, the audio transmission module, and the power management module, respectively. It is used to output control commands based on the received detection results, control the audio transmission module to select the audio signal routing direction, and control the power management module to select the power input path.
[0016] The power management module connects to the second-type interface, the built-in battery, and the main control unit. It obtains external power from the second-type interface and determines the current flow based on control commands from the main control unit: in charging mode, the charging current flows to the built-in battery; in non-charging mode, the current directly supplies power to the internal circuitry of the audio receiver. The power output of the power management module connects to the wireless transmission module, the audio transmission module, and the main control unit, providing operating power to each module. The built-in battery connects to the power management module to store energy and power the audio receiver when needed.
[0017] Please refer to the following. Figures 2 to 12 The document provides a detailed explanation of the control methods for audio receiving devices, including specific steps.
[0018] Firstly, such as Figure 2As shown, the present invention provides a control method for an audio receiving device, applicable to, for example... Figure 1 Taking the audio receiving device shown as an example, the method includes the following steps: S101: Detect the connection status of the first type of interface and the type of the first external device connected, and generate first status information.
[0019] In step S101, the first type interface refers to the interface structure on the audio receiving device used to connect to the first external device via a detachable connector, which can accept different types of detachable male terminals; the connection status refers to whether the first type interface has established a physical and electrical connection with the connector; the type of the first external device refers to the device category to which the external device connected to the first type interface via the detachable connector belongs, which can be an audio terminal device, a data terminal device, or other preset device types, and is not limited here; the first status information refers to the comprehensive status data generated after detecting the connection status of the first type interface and the type of the connected first external device.
[0020] S102: Detect the connection status of the second type interface and the type of the connected second external device, and generate second status information.
[0021] In step S102, the second type interface refers to a multi-functional interface on the audio receiving device that supports audio output and power input, which can and may selectively realize audio signal transmission and external power input; the connection status refers to whether the second type interface has established a physical connection, electrical connection and data communication connection with the external device; the type of the second external device refers to the device category to which the external device connected to the second type interface belongs, which can be a power device or a data device, and is not limited here; the second status information refers to the comprehensive status data generated after detecting the connection status of the second type interface and the type of the connected second external device.
[0022] S103: Based on the first state information and the second state information, select one preset working mode from multiple preset working modes as the target working mode, and control the audio receiving device to enter the target working mode. The preset operating modes include a male-first mode and a female-output mode. In male-first mode, the audio signal received by the audio receiving device is routed to the first type of interface for output, and the built-in power supply of the audio receiving device is charged according to the connection status of the second type of interface. In female-output mode, the audio signal received by the audio receiving device is encoded into a digital audio protocol format suitable for the second type of interface, the encoded audio signal is output through the second type of interface, and power is obtained from the second external device connected through the second type of interface. The obtained power is used to power the audio receiving device and charge the built-in power supply.
[0023] In step S103, the preset operating mode refers to a set of operating modes pre-set by the audio receiving device according to different connection states, including at least the male connector priority mode and the female port output mode. The male connector priority mode means that when the first type interface is in a valid connection state, the audio signal received by the audio receiving device is routed to the first type interface for output first, and the connection state of the second type interface determines whether to charge the built-in power supply. The female port output mode means that when the first type interface is not connected or does not meet the priority output condition, the audio signal received by the audio receiving device is encoded into a digital audio protocol format suitable for the second type interface, and the encoded audio signal is output through the second type interface. The device also obtains power from the connected second external device through the second type interface to power the audio receiving device and charge the built-in power supply. The target operating mode refers to the current operating mode selected from multiple preset operating modes according to the first state information and the second state information.
[0024] As an example, after acquiring first and second status information, the main control unit determines the mode based on the first and second status information and dynamically selects a preset working mode as the target working mode from multiple preset working modes. The main control unit then controls the audio receiving device to enter the target working mode. When the first status information indicates that the first type interface is in a valid connection state and the connected first external device is an audio terminal device, the main control unit selects the male-first mode as the target working mode. In this mode, the audio signal received by the audio receiving device is preferentially routed to the first type interface for output, and the connection status of the second type interface determines whether to charge the built-in power supply. When the first status information indicates that the first type interface is not connected, or the first type interface does not meet the priority output condition, and the second status information indicates that the second type interface is connected to the second external device and has audio transmission conditions, the main control unit selects the female-output mode as the target working mode. In this mode, the audio signal received by the audio receiving device is encoded into a digital audio protocol format suitable for the second type interface, the encoded audio signal is output through the second type interface, and power is obtained from the connected second external device through the second type interface. The obtained power is used to power the audio receiving device and charge the built-in power supply. In this way, the audio receiving device can automatically select the appropriate working mode according to the interface connection status, realize the coordinated control of the audio output path and the power supply path, effectively avoid the operational complexity caused by manual switching, and improve the adaptability, stability and ease of use of the device in different connection scenarios.
[0025] For example, when a user inserts a connector with a 3.5mm male tip into a first type of interface, and a second type of interface is connected to a charger with an output of 5V / 1A, the audio receiving device detects first status information indicating that the first type of interface is in a valid connection state and the connected first external device is an audio terminal device. It also detects second status information indicating that the second type of interface is connected to a power supply and the VBUS voltage is 5V. Based on this, the main control unit selects the male tip priority mode from multiple preset operating modes as the target operating mode and controls the audio receiving device to enter this target operating mode, routing the received audio signal to the output of the first type of interface, and then... The Type II interface obtains 5V / 1A of power from the charger to charge the built-in power supply. For example, when the Type I interface is not connected but the Type II interface is connected to a laptop computer with a power supply capacity of 5V / 900mA, the main control unit selects the female output mode as the target working mode according to the first and second status information, and controls the audio receiving device to enter the female output mode. The audio signal is encoded into a digital audio protocol format suitable for the Type II interface and then output through the Type II interface. It also obtains 5V / 900mA of power from the laptop computer to power the device and charge the built-in power supply, thereby realizing the synchronization of audio output and power supply.
[0026] The following embodiment will elaborate on the two main working modes involved in step S103.
[0027] In male-first mode, the audio receiving device routes the audio signal received by the wireless transmission module to the first type interface for output via the audio transmission module. At this time, regardless of whether a device is connected to the second type interface, the audio signal is output to the connected first external device in analog signal form through the first type interface. Furthermore, based on the connection status of the second type interface, the audio receiving device determines whether to charge its internal power supply. Specifically, if a power supply or data device is connected to the second type interface, power is obtained from the connected device through the second type interface to power the operation of the audio receiving device and charge its internal power supply; if no device is connected to the second type interface, it relies solely on its internal power supply.
[0028] For example, when a user connects an audio receiver to a camera for video recording via the male connector, the audio receiver enters male-priority mode, and the audio signal is output to the camera through the male connector. If the user also connects the audio receiver to a 5V / 2A power bank via the female connector, it will draw 5V / 2A of power from the power bank to power the audio receiver and charge its built-in battery, allowing for simultaneous use and charging, thus extending the usage time.
[0029] In female output mode, the audio receiving device encodes the audio signal received by the wireless transmission module, converting it into a digital audio protocol format suitable for the Type 2 interface. Specifically, the audio signal can be encoded into USB audio format and output as a digital signal to the connected second external device through the Type 2 interface. The device also obtains power from the connected second external device through the Type 2 interface; a portion of the obtained power is used to power the internal circuitry of the audio receiving device, and the remainder is used to charge its built-in power supply.
[0030] For example, when a user needs to connect an audio receiver to a computer for live streaming, but the male connector cannot be inserted due to the close arrangement of computer interfaces, the user can use a Type-C cable to connect the female connector of the audio receiver to a computer with a power supply capacity of 5V / 900mA. When the system detects that the male connector is not connected but the female connector is effectively connected to the data device, it automatically enters female output mode, encodes the audio signal into USB audio format, outputs it to the computer through the female connector, and obtains 5V / 900mA of power from the computer to power and charge the device, thus solving the problem of the male connector being unusable.
[0031] In summary, the beneficial effects of the technical solution provided by this embodiment of the invention are as follows: By configuring the second type interface on the audio receiving device as a multi-functional interface supporting both audio output and power input, and by detecting the connection status and device type of the first and second type interfaces, first and second status information are generated, and based on this, the device automatically selects either the male-first mode or the female-output mode from multiple preset operating modes. When the first type interface cannot be connected normally due to physical interference and the second type interface is connected to a data device, the device automatically switches to the female-output mode, encodes the audio signal into a digital format, outputs it through the second type interface, and obtains power from the connected device through this interface to power the device and charge its built-in power supply. Thus, this invention, while retaining the traditional male connector connection method, provides a reliable alternative audio output solution for situations where the first type interface cannot be used. It solves the problem of physical interference between the male connector and the compact interface, and achieves concurrent operation of audio transmission and charging through the same multi-functional interface, significantly expanding the applicability of the device in interface-dense environments.
[0032] In one embodiment, such as Figure 3 As shown, step S101, which involves detecting the connection status of the first type of interface and the type of the connected first external device, and generating the first status information, includes the following steps: S111: Detect the presence of a physical insertion event of the connector by means of a physical sensor located in the first type interface slot; S112: If a physical insertion event is detected at the first type interface, the electrical connection status of the connector is detected; S113: If the electrical connection status of the connector is detected to be normal, then the type of the first external device connected through the connector is detected; S114: Generate first status information based on the detection results of the physical insertion event, the detection results of the electrical connection status, and the detection results of the type of the first external device.
[0033] In this embodiment, the physical sensor can be a microswitch or a Hall sensor, disposed within the slot of the first type of interface. When the external connector is fully inserted, the physical sensor is triggered to generate a corresponding electrical signal. For example, when the user inserts the Type-C male connector into the first type of interface, the male connector terminal is fully inserted into the slot, triggering the microswitch to close and generating a high-level signal, indicating the presence of a physical insertion event; conversely, when no male connector is inserted or the male connector is not fully inserted, the microswitch remains open, generating a low-level signal, indicating the absence of a physical insertion event; a physical insertion event refers to the physical state change triggered when the connector is fully inserted into the slot of the first type of interface; the electrical connection status refers to the continuity of the signal line between the connector and the first type of interface, used to determine whether there is an open circuit, short circuit, or normal connection.
[0034] As an example, the process by which an audio receiving device detects the connection status of a first type interface and the type of the connected first external device and generates first status information is as follows: First, a physical sensor installed in the slot of the first type interface detects whether a physical insertion event of a connector is detected; if a physical insertion event is detected, the electrical connection status of the connector is further detected; if the electrical connection status of the connector is detected to be normal, the type of the first external device connected through the connector is further detected; finally, based on the detection results of the physical insertion event, the electrical connection status, and the type of the first external device, first status information is generated. Through the above-mentioned layered detection method, the audio receiving device can confirm the connection status of the first type interface at three levels: physical connection, electrical connection, and device type, thereby improving the accuracy and reliability of the first status information, avoiding subsequent incorrect selection of working mode due to loose connections, poor contact, or misjudgment of device type, and providing a stable data foundation for subsequent audio signal routing and working mode switching.
[0035] In one embodiment, such as Figure 4 As shown, step S112, which involves detecting the electrical connection status of the connector, includes the following steps: S1121: Apply a test voltage to the signal line of the connector and measure the response current flowing through the signal line under the test voltage; S1122: Calculate the current impedance value of the signal line based on the test voltage and response current; S1122: Compare the current impedance value with the preset standard impedance range; S1122: If the current impedance value falls within the standard impedance range, then the electrical connection status of the connector is determined to be normal. S1122: If the current impedance value is higher than the upper limit threshold of the standard impedance range, the electrical connection state of the connector is determined to be open circuit. S1122: If the current impedance value is lower than the lower threshold of the standard impedance range, the electrical connection state of the connector is determined to be a short circuit state.
[0036] In this embodiment, the signal line refers to the line in the connector used to transmit electrical signals; the test voltage refers to the voltage signal applied to the signal line to detect the electrical connection status; the response current refers to the current value flowing through the signal line under the action of the test voltage; the current impedance value refers to the signal line impedance parameter calculated based on the test voltage and the response current; the standard impedance range refers to the preset impedance range used to determine whether the electrical connection of the connector is normal, and the standard impedance range includes an upper threshold and a lower threshold; the electrical connection status refers to the electrical conduction status presented after the connector is inserted into the first type interface, which includes at least the normal state, the open circuit state, and the short circuit state.
[0037] As an example, the specific process of an audio receiving device detecting the electrical connection status of a connector is as follows: First, a test voltage is applied to the signal line of the connector, and the response current flowing through the signal line under the test voltage is measured; then, the current impedance value of the signal line is calculated based on the test voltage and the response current; next, the current impedance value is compared with a pre-set standard impedance range; if the current impedance value falls within the standard impedance range, the electrical connection status is determined to be normal; if the current impedance value is higher than the upper threshold of the standard impedance range, the electrical connection status is determined to be open circuit; if the current impedance value is lower than the lower threshold of the standard impedance range, the electrical connection status is determined to be short circuit. Through this method, the audio receiving device can accurately determine the electrical connection status of the connector, identifying not only normal connection status but also open circuit and short circuit statuses, thereby effectively avoiding erroneous judgments caused by poor contact, broken lines, or abnormal short circuits, and improving the accuracy of interface status detection.
[0038] For example, in a specific application scenario, after the user inserts the connector into a Type 1 interface, a 3.3V test voltage is applied to the connector's signal line. The measured response current is 33mA, and the calculated current impedance is 100Ω. If the standard impedance range is set to 80Ω to 120Ω, the current impedance value falls within this range and is considered normal. Alternatively, if a 3.3V test voltage is applied to the connector's signal line and the measured response current is 0.33mA, the calculated current impedance is 10kΩ, far exceeding the upper threshold of 120Ω, indicating an open circuit, suggesting a possible poor contact or wire breakage. Furthermore, if a 3.3V test voltage is applied to the connector's signal line and the measured response current is 66mA, the calculated current impedance is 50Ω, below the lower threshold of 80Ω, indicating a short circuit. Based on these determinations, the audio receiving device can accurately identify the electrical connection status of the connector and generate corresponding status information for the main control unit.
[0039] In one embodiment, such as Figure 5As shown, step S113, which involves detecting the type of the first external device connected via the connector, includes the following steps: S1131: Detects the voltage or logic level of a specific function pin in the connector; S1132: Determine the interface type of the inserted connector based on the detected voltage or logic level value. The interface type includes Type-C male, Lightning male, or 3.5mm male. S1133: Determine the type of the first external device connected through the connector based on the determined interface type and the detected voltage or logic level value.
[0040] In this embodiment, a specific function pin refers to a functional pin set in the connector to characterize the interface type or device type. Different interface types of connectors correspond to different specific function pin definitions. The voltage value refers to the potential value presented on the specific function pin. The logic level value refers to the high or low level state presented on the specific function pin. The interface type refers to the specific type of connector inserted into the first type of interface, which may include at least a Type-C male connector, a Lightning male connector, or a 3.5mm male connector, and is not limited here.
[0041] The detection of the first external device type can be achieved by identifying the electrical characteristics of specific functional pins. Different detection methods are used depending on the male connector type. For example, when a Type-C male connector is inserted, the voltage value of the CC pin is detected. According to the USB Type-C specification, a CC pin voltage of 0.4V indicates connection to a standard downstream port (data device), 0.9V indicates connection to a charging downstream port (data device with both data and charging functions), and 1.5V indicates connection to a dedicated charging port (power device). When a Lightning male connector is inserted, the communication signal on the ID pin is detected, and the signal is decoded according to the MFi certification protocol to identify the type of the connected device. For example, if the decoded device information is "iPhone," it is identified as a data device; if it is "iPad accessory," it is identified as a charging device; if it is an audio-related identifier, it is identified as an audio terminal device. When a 3.5mm male connector is inserted, the DC bias voltage on the audio pin is detected. For example, if a 2.5V bias voltage is detected at the microphone pin, it indicates that the connected device is an audio recording device that provides bias voltage (such as a camera or mixer); if no bias voltage is detected, it may be an audio playback device (such as headphones) or other types of devices.
[0042] As an example, the specific process by which an audio receiving device detects the type of a first external device connected through a connector is as follows: First, the voltage or logic level value of a specific functional pin in the connector is detected; then, based on the detected voltage or logic level value, the interface type of the connector inserted into the first type of interface is determined to be a Type-C male, a Lightning male, or a 3.5mm male; finally, based on the determined interface type and the detected voltage or logic level value, the specific type of the first external device connected through the connector is determined. In this way, the audio receiving device can accurately identify the connected external device based on the pin electrical characteristics corresponding to connectors of different interface types, thereby avoiding misidentification of the device type due to similar interface shapes or mixed connector types, and improving the accuracy and compatibility of identifying the first external device type.
[0043] For example, in a specific application scenario, when a voltage of 0.4V is detected on a specific function pin, the inserted connector is determined to be a Type-C male according to the USB Type-C specification, and the first external device connected is identified as a data device with a standard downlink port. As another example, when a communication signal conforming to the MFi protocol is detected on a specific function pin, the inserted connector is determined to be a Lightning male, and decoding the communication signal identifies the first external device connected as an iPhone data device. Yet another example is when a 2.5V DC bias voltage is detected on an audio pin, the inserted connector is determined to be a 3.5mm male, and the first external device connected is identified as an audio recording device providing the bias voltage. Through these detection methods, the audio receiving device can accurately determine the type of the first external device connected through the connector.
[0044] In one embodiment, such as Figure 6 As shown, step S102, which involves detecting the connection status of the second type of interface and the type of the connected second external device, and generating second status information, includes the following steps: S121: Detect the voltage value of the configuration channel pin of the second type interface; S122: Based on the detected voltage value of the configuration channel pin, determine whether the second type interface is in a no-device-connection state, the connected second external device is a power supply device, or the connected second external device is a data device; S123: If the determination result is that the connected second external device is a data device, then check whether there is a data signal activity conforming to the predetermined protocol on the data line pin of the second type interface to confirm whether the data connection with the data device is valid; S124: Detect the voltage value of the power supply pin of the second type interface, and determine whether there is an external power input based on the detected voltage value of the power supply pin; S125: Generate second status information based on the determination result of the second external device type, the confirmation result of the data connection validity, and the determination result of the external power input.
[0045] In this embodiment, the configuration channel pin refers to the functional pin in the second type interface used to identify the connection direction and the type of the peer device, and its voltage state is used to indicate the connection type of the interface; the voltage value refers to the potential value obtained by detecting the configuration channel pin or the power pin; the data line pin refers to the signal pin used for data transmission; the data signal activity conforming to the predetermined protocol refers to the data transmission behavior conforming to the USB specification detected on the data line pin; the data connection validity refers to whether the data communication link between the audio receiving device and the connected data device has been successfully established; the power pin refers to the pin used to transmit electrical energy; and the external power input refers to the state of obtaining electrical energy from an external device through the second type interface.
[0046] As an example, the specific process by which an audio receiving device detects the connection status of a second type interface and the type of the connected second external device and generates second status information is as follows: First, the voltage value of the configuration channel pin of the second type interface is detected; based on the detected voltage value of the configuration channel pin, it is determined whether the second type interface is in a no-device-connection state, whether the connected second external device is a power supply device, or whether the connected second external device is a data device; if the determination result is that the connected second external device is a data device, then the data line pin of the second type interface is further detected to see if there is a data signal activity conforming to a predetermined protocol, in order to confirm whether the data connection with the data device is valid; at the same time, the voltage value of the power supply pin of the second type interface is detected, and based on the detected voltage value of the power supply pin, it is determined whether there is an external power input; finally, based on the determination result of the second external device type, the confirmation result of the data connection validity, and the determination result of the external power input, the second status information is generated. Through the aforementioned multi-dimensional detection methods, the audio receiving device can comprehensively determine the connection status of the second type of interface. It can not only distinguish between power devices and data devices, but also confirm whether the data link is valid and whether an external power input exists, thereby improving the accuracy and completeness of the second status information, providing a reliable basis for subsequent working mode selection and power management, and enhancing the stability and adaptability of the system.
[0047] For example, when the second type interface is connected to a computer, a configuration channel pin voltage of 0.4V is detected, indicating a connection to a data device; a data packet preamble conforming to the USB specification is detected on the data line pins, confirming a valid data connection; and a power pin voltage of 5.0V is detected, confirming an external power input. The generated second status information can be represented as {Connection Type: Data Device, Data Activity: Valid, VBUS Voltage: 5V}, indicating a connection to a valid data device and a power input. As another example, when the second type interface is only connected to a charger, a configuration channel pin voltage of 1.5V is detected, indicating a connection to a power device; a power pin voltage of 5.0V is detected, confirming an external power input; and there is no signal activity on the data line pins. The generated second status information can be represented as {Connection Type: Power Device, VBUS Voltage: 5V}, indicating a connection to a power device and a power input. For example, when no device is connected to the second type interface, if the configuration channel pin voltage is detected to be 0V, it is determined that no device is connected; if the power supply pin voltage is 0V, it is confirmed that there is no external power input; the second status information generated at this time can be represented as {connection type: no connection, VBUS voltage: 0V}, indicating that no device is connected. The above is only an example and does not constitute a limitation of the present invention.
[0048] In one embodiment, such as Figure 7 As shown, in step S103, which involves selecting a preset working mode as the target working mode from multiple preset working modes based on the first and second state information, and controlling the audio receiving device to enter the target working mode, the steps include the following: S131: Determine whether the first type interface is in a valid connection state based on the first state information. A valid connection state is when the first type interface has a physical insertion, the electrical connection is normal, and the connected first external device is an audio terminal device. S132: If the first type interface is in a valid connection state, select the male connector priority mode as the target working mode and control the audio receiving device to enter the male connector priority mode; S133: If the first type interface is not in a valid connection state, then determine whether the second type interface is validly connected to the data device based on the second status information; S134: If the second type interface is effectively connected to the data device, select the female output mode as the target working mode and control the audio receiving device to enter the female output mode. S135: If the second type interface is not effectively connected to the data device, determine whether the second type interface is only connected to the power device based on the second status information; S136: If the second type interface is only connected to a power supply device, select pure charging mode as the target operating mode and control the audio receiving device to enter pure charging mode. In pure charging mode, audio signal output is stopped and the built-in power supply is charged only.
[0049] In this embodiment, an effective connection state is defined as the first type of interface simultaneously satisfying the conditions of a physical insertion event, a normal electrical connection state, and the connected first external device being an audio terminal device. Male-first mode refers to the working mode where, when the first type of interface is in an effective connection state, the audio signal is preferentially routed to the output of the first type of interface. Female-output mode refers to the working mode where, when the first type of interface is not in an effective connection state and the second type of interface is effectively connected to a data device, the audio signal is encoded into a digital audio format and output through the second type of interface. Pure charging mode refers to the working mode where, when the second type of interface is only connected to a power supply device, audio output is stopped and only the built-in power supply is charged.
[0050] As an example, the specific process by which the audio receiving device selects a target operating mode based on the first and second state information is as follows: First, it determines whether the first type interface is in a valid connection state based on the first state information; if the first type interface is in a valid connection state, the male-first mode is selected as the target operating mode, and the audio receiving device is controlled to enter the male-first mode; if the first type interface is not in a valid connection state, it further determines whether the second type interface is validly connected to the data device based on the second state information; if the second type interface is validly connected to the data device, the female output mode is selected as the target operating mode, and the audio receiving device is controlled to enter the female output mode; if the second type interface is not validly connected to the data device, it further determines whether the second type interface is only connected to the power supply device based on the second state information; if the second type interface is only connected to the power supply device, the pure charging mode is selected as the target operating mode, and the audio receiving device is controlled to enter the pure charging mode, stopping audio signal output and only charging the built-in power supply. Through the above-mentioned hierarchical judgment and mode selection method, the audio receiving device can automatically switch to the corresponding working mode according to the actual connection status of the first type interface and the second type interface, so that the audio output path, digital audio output path and charging path can be consistent with the current connection scenario, thereby avoiding the complicated operation caused by manual switching, reducing audio conflicts or power supply abnormalities caused by mode misselection, and improving the device's adaptability, ease of use and operational stability in different connection scenarios.
[0051] For example, in a specific application scenario, when a user inserts a 3.5mm headphone into the first type of interface, and the first status information indicates that there is a physical insertion, a normal electrical connection, and the connected device is an audio terminal device, the first type of interface is in a valid connection state. The audio receiving device selects the male-first mode as the target operating mode and routes the audio signal to the first type of interface for output. As another example, when the first type of interface is not connected to any device, but the second status information indicates that the second type of interface is connected to a computer and the data connection is valid, the audio receiving device selects the female output mode as the target operating mode, encodes the audio signal into USB audio format, outputs it to the computer through the second type of interface, and simultaneously obtains power from the computer to power and charge the device. Yet another example, when the first type of interface is not connected to any device, but the second status information indicates that the second type of interface is only connected to a charger and there is a power input, the audio receiving device selects the pure charging mode as the target operating mode, stops audio signal output, and only charges the built-in power supply.
[0052] In one embodiment, such as Figure 8 As shown, in male-first mode, the method further includes the following steps: S201: Determine whether the second type interface is connected to a power supply device or a data device based on the second status information; S202: If the second type interface is connected to a power supply device, then power is obtained from the connected power supply device through the second type interface. The obtained power is used to power the audio receiving device and charge the built-in power supply. S203: If the second type interface is connected to a data device, then power is obtained from the connected data device through the second type interface. The obtained power is used to power the audio receiving device and charge the built-in power supply. The data transmission path of the second type interface is controlled to enter a silent state, and the second type interface is prohibited from responding to the enumeration request issued by the data device. S204: If no device is connected to the second type interface, the audio receiving device will be powered only by the built-in power supply.
[0053] In this embodiment, a power supply device refers to an external device that only provides power to the audio receiving device without performing data communication; a data device refers to an external device that can perform data communication with the audio receiving device and may initiate protocol interactions; an enumeration request refers to a protocol request initiated by the data device to the audio receiving device when establishing a communication connection to identify the device type and capabilities; and the data transmission path entering a silent state refers to disabling or blocking the data communication function of the second type interface so that it does not respond to communication requests from the data device.
[0054] As an example, in male-first mode, the audio receiving device determines the connection type of the second type interface based on the second status information and processes it accordingly: If the second status information indicates that the second type interface is connected to a power supply device (e.g., a charger with a 5V / 1A output), it obtains 5V / 1A of power from the charger through the second type interface, using part of it to maintain device operation and the remainder to charge the built-in power supply; if the second status information indicates that the second type interface is connected to a data device (e.g., a computer with a power supply capacity of 5V / 900mA), it obtains 5V / 900mA of power through the second type interface for power supply and charging, while controlling the data transmission path to enter a silent state, preventing the audio receiving device from responding to enumeration requests issued by the computer, thereby avoiding being identified as an audio peripheral and interfering with the audio output currently being made through the first type interface; if the second status information indicates that no device is connected to the second type interface, the audio receiving device is powered solely by the built-in power supply. Through the above control strategy, while ensuring the priority of audio output from the first type interface, the power supply capacity of the second type interface is fully utilized, while effectively avoiding communication conflicts with data devices, thus improving the stability and compatibility of system operation.
[0055] In one embodiment, such as Figure 9 As shown, in the female output mode, the method further includes the following steps: S301: Perform an enumeration negotiation process with the connected data device through the second type interface to configure the audio receiving device as a device that conforms to the USB audio class specification; S302: Negotiate power supply parameters with the connected data device through the second type interface, and obtain working power from the data device according to the negotiation result; S303: The acquired working power is preferentially allocated to the internal circuitry of the audio receiving device. If there is any remaining power, it is used to charge the built-in power supply. S304: Real-time detection of the total instantaneous power consumption of the internal circuit. If the total instantaneous power consumption exceeds the upper limit of the power obtained from the data device, the internal circuit will be switched to be supplied with additional power by the built-in power supply.
[0056] In this embodiment, the enumeration negotiation process refers to the interactive process between the audio receiving device and the data device for device identification, capability declaration, and function configuration according to the USB communication protocol; the USB audio class specification refers to the standard protocol used to regulate audio data transmission by audio devices through the Universal Serial Bus interface; the power supply parameters refer to the voltage, current, and power limit parameters involved when the data device provides power to the audio receiving device; the internal circuit refers to the circuit units in the audio receiving device used to implement audio processing, signal conversion, and control functions; the instantaneous total power consumption refers to the total power consumed by each functional module of the internal circuit at a certain moment; and the power limit refers to the maximum power that the data device can provide through the second type interface.
[0057] As an example, the specific operation of the audio receiving device in female output mode is as follows: First, it performs an enumeration negotiation process with the connected data device through the second type interface to configure itself as a device conforming to the USB audio class specification, thereby realizing standardized transmission of audio data; at the same time, it negotiates power supply parameters with the data device through the second type interface and obtains working power from the data device according to the negotiation result; in terms of power distribution, the obtained working power is given priority to the internal circuit of the audio receiving device to ensure the stability of audio processing and output, and when there is residual power, it is used to charge the built-in power supply; in addition, by detecting the total instantaneous power consumption of the internal circuit in real time, when the total instantaneous power consumption exceeds the upper limit of the power provided by the data device, it automatically switches to the built-in power supply to supplement the power supply of the internal circuit.
[0058] For example, in a specific application scenario, when a user connects an audio receiving device to a laptop computer with a power supply capacity of 5V / 900mA via a Type II interface, the device first performs an enumeration negotiation process with the laptop computer to ensure it is recognized as an audio device conforming to the USB Audio Class specification, thereby enabling the transmission of digital audio data. Subsequently, the two parties negotiate the power supply parameters, with the laptop computer providing 5V / 900mA of power to the audio receiving device. Of this power, approximately 300mA is prioritized for driving the audio decoding and signal processing circuits, while the remaining 600mA is used to charge the built-in power supply. If the user enables high-power functions during use, causing the total instantaneous power consumption of the internal circuitry to reach 800mA, exceeding the 900mA limit provided by the laptop computer, the system automatically switches to the built-in power supply to supplement the power gap (e.g., the built-in power supply provides 200mA), thereby preventing audio interruption or abnormal device shutdown and ensuring the continuity and stability of audio playback. Through the above mechanism, coordinated control of data communication, audio output and power management is achieved. This not only ensures the continuity and stability of audio output, but also enables timely power compensation when power supply is limited, avoiding equipment malfunctions due to insufficient power supply, thereby improving the system's reliability, compatibility and energy efficiency management level.
[0059] In one embodiment, such as Figure 10 As shown, in pure charging mode, the method further includes the following steps: S401: Negotiate charging parameters with the connected power supply device through the charging protocol, and determine the maximum charging current and maximum charging voltage supported by the power supply device based on the negotiation results; S402: Detects the current status of the built-in power supply, including battery voltage and battery temperature; S403: Select an appropriate charging stage from multiple preset charging stages based on the current state of the built-in power supply. The multiple preset charging stages include a pre-charging stage, a constant current charging stage, a constant voltage charging stage, and a trickle charging stage. S404: Determine the target charging current and target charging voltage based on the selected charging stage, the current state of the built-in power supply, the maximum charging current, and the maximum charging voltage; S405: Performs a charging operation for the built-in power supply according to the target charging current and target charging voltage.
[0060] In this embodiment, the charging protocol refers to the communication rules between the audio receiving device and the power supply device for negotiating voltage, current, and power parameters, such as the USB Power Delivery (PD) protocol or the BC1.2 protocol; the maximum charging current and maximum charging voltage refer to the upper limits of current and voltage that the power supply device can safely provide under the current negotiation conditions; the current state of the built-in power supply includes battery voltage and battery temperature, used to assess the battery's state of charge and safety state; the pre-charge phase refers to the phase of charging with a smaller current when the battery voltage is low; the constant current charging phase refers to the phase of charging the battery with a basically constant current; the constant voltage charging phase refers to the phase of charging with a constant voltage and gradually reducing the current when the battery voltage is close to the target voltage; the trickle charging phase refers to the phase of supplementing charging with a very small current when the battery is close to fully charged; the target charging current and target charging voltage refer to the actual control parameters determined according to the state of the built-in power supply and the capabilities of the power supply device under the current charging phase.
[0061] As an example, the audio receiving device operates in pure charging mode as follows: First, it negotiates with the connected power supply device via the charging protocol to obtain the maximum supported charging current and maximum charging voltage; simultaneously, it monitors the current status of the built-in power supply in real time, including battery voltage and battery temperature; then, based on the current status of the built-in power supply, it selects an appropriate charging stage from the pre-charging stage, constant current charging stage, constant voltage charging stage, and trickle charging stage; next, combining the selected charging stage, the current status of the built-in power supply, and the maximum supported charging current and maximum charging voltage of the power supply device, it determines the target charging current and target charging voltage; finally, it performs the charging operation for the built-in power supply according to the target charging current and target charging voltage, and continuously monitors the battery status and dynamically adjusts the charging parameters during the charging process.
[0062] For example, in a specific application scenario, when an audio receiving device connects to a charger supporting the PD fast charging protocol via a Type II interface and enters pure charging mode, the device first negotiates with the charger via the PD protocol to determine that the charger supports a maximum charging voltage of 9V and a maximum charging current of 1.5A. Then, it detects that the built-in power supply's battery voltage is 2.5V and the temperature is 25℃. Since the battery voltage is below the pre-charging threshold of 2.8V, the system selects the pre-charging stage, charging with a target charging current of 100mA. When the battery voltage rises to 3.0V, the system automatically switches to the constant current charging stage, using the 1.5A supported by the power supply as the upper limit, and combining this with the battery's maximum allowable charging current of 1.2A, determining the target charging current to be 1.2A. When the battery voltage reaches 4.1V, it enters the constant voltage charging stage, charging at a constant voltage of 4.2V, with the charging current gradually decreasing from 1.2A. When the charging current drops to 50mA, it enters the trickle charging stage, maintaining the charge with a small current of 50mA until the battery is fully charged. Throughout the entire process, the system continuously monitors the battery temperature to ensure charging safety. Through the aforementioned multi-stage adaptive charging control mechanism, not only can the optimal charging strategy be adopted under different battery conditions to improve charging efficiency, but it can also effectively avoid safety risks such as overcharging and overheating, thereby improving the lifespan and charging safety of the built-in power supply and enhancing the compatibility and stability of the device under different power supply environments.
[0063] In one embodiment, such as Figure 11 As shown, the method further includes the following steps: S501: Real-time detection of connection status changes of the first type of interface; S502: If the first type of interface is detected to change from a valid connection state to a disconnected state, then the current output audio signal is gradually faded out within a preset time window until the audio output is zero. S503: After the audio output is zero, clear the buffered data temporarily stored in the audio routing path and release the hardware resources associated with the first type interface; S504: Re-detect the connection status of the second type interface and the type of the connected second external device, and determine whether to switch to the female output mode or the pure charging mode based on the re-detection result.
[0064] In this embodiment, the unconnected state refers to the state where there is no physical insertion of the first type interface or the electrical connection does not meet the normal state; the preset time window refers to the limited time interval used to perform audio signal smooth transition processing, such as 5ms to 10ms, which is not limited here; the fade-out processing refers to the processing method of gradually reducing the amplitude of the audio signal until it is zero within the time window; the audio routing path refers to the signal processing path that the audio signal passes through from the input end to the output end; the buffered data refers to the audio data temporarily stored in the buffer during the audio transmission process; the hardware resources refer to the circuit resources such as amplifiers, level conversion circuits, and main control units related to the first type interface.
[0065] As an example, the specific process of the audio receiving device handling the state transition of the first type of interface is as follows: During operation, the connection status change of the first type of interface is continuously detected; when the first type of interface is detected to change from a valid connection state to an unconnected state (e.g., the user accidentally unplugs the headphones), the current output audio signal is gradually faded out within a preset 5ms time window, so that the audio output smoothly transitions to zero, thereby avoiding popping or audio abrupt changes caused by sudden disconnection; after the audio output is zero, the cached data temporarily stored in the audio routing path is cleared to prevent residual data from affecting subsequent audio processing, and the hardware resources related to the first type of interface are released to reduce system power consumption; subsequently, the connection status of the second type of interface and the type of the connected second external device are re-detected, and it is determined whether to switch to the female output mode or the pure charging mode based on the result of the re-detection.
[0066] For example, in a specific application scenario, when a user is listening to audio through headphones connected via the first type of interface, if the user suddenly unplugs the headphones, the system detects that the first type of interface has changed from a valid connection state to a disconnected state. Within a 5ms time window, the system linearly reduces the audio output volume from the current level to zero, thus avoiding an abrupt "pop" sound. Subsequently, the system clears residual audio data from the audio buffer and shuts down the driver circuit associated with the headphone jack. Next, the system detects the status of the second type of interface. If the second type of interface is connected to a computer with a power supply of 5V / 900mA and is in data communication mode, it automatically switches to female output mode and outputs audio through the second type of interface. If the second type of interface is only connected to a charger with an output of 5V / 1A, it switches to pure charging mode and only performs charging operations. Through this processing flow, a smooth transition and orderly release of resources are achieved when the interface is disconnected, while ensuring that the system can promptly reselect an appropriate operating mode based on the current connection status, thereby improving user experience, system stability, and resource utilization efficiency.
[0067] In one embodiment, such as Figure 12 As shown, the method further includes the following steps: S601: After the target working mode is running stably, store the working mode identifier of the target working mode and the configuration parameters related to the target working mode in non-volatile memory; S602: When the audio receiving device wakes up from the power-on reset state or the low-power sleep state, it preferentially reads the stored working mode identifier from the non-volatile memory. S603: If the working mode identifier is successfully read, the corresponding hardware module is initialized according to the read working mode identifier, and the audio receiving device is controlled to directly enter the target working mode corresponding to the working mode identifier. S604: While performing fast recovery, perform background detection on the connection status of the first type interface and the second type interface, as well as the type of the connected device, in parallel; S605: If the detection result obtained from the background detection is inconsistent with the connection status requirement corresponding to the stored working mode identifier, the fast recovery state is immediately terminated, and the control method of the audio receiving device described above is re-executed.
[0068] In this embodiment, the working mode identifier refers to the identification information used to uniquely represent each preset working mode, such as "male connector priority mode", "female output mode" or "pure charging mode"; configuration parameters refer to the operating parameters related to the target working mode, including audio routing configuration parameters, power management parameters and interface control parameters; non-volatile memory refers to the storage unit that can still retain data when power is off, such as Flash memory or EEPROM; power-on reset state refers to the state in which the audio receiving device initializes after power is connected; low-power sleep state refers to the sleep state that the audio receiving device enters when running with reduced power consumption; fast recovery refers to the process of quickly entering the target working mode by reading the stored working mode identifier and directly initializing the corresponding hardware module; background detection refers to the interface status detection process executed in parallel during device operation, used to obtain the connection status and device type information of the first type interface and the second type interface in real time; inconsistent connection status requirements refer to the situation where the background detection result does not match the interface connection conditions corresponding to the stored working mode identifier.
[0069] As an example, the specific process of the audio receiving device to achieve fast recovery is as follows: After the currently executed target working mode is running stably (for example, running continuously for 30 seconds), the working mode identifier of the target working mode and related configuration parameters are stored in non-volatile memory; when the device wakes up from the power-on reset state or low-power sleep state, the stored working mode identifier is read from the non-volatile memory first; if the working mode identifier is successfully read, the corresponding hardware module is initialized according to the read working mode identifier, and the device is controlled to directly enter the target working mode corresponding to the working mode identifier; while performing fast recovery, the connection status of the first type interface and the second type interface and the type of the connected device are detected in parallel to verify whether the current actual connection status matches the recovered working mode; if the detection result obtained by the background detection is inconsistent with the connection status requirement corresponding to the stored working mode identifier, the fast recovery state is immediately terminated, and the steps of the above-mentioned audio receiving device control method are re-executed, that is, steps S101 to S103 are re-executed to re-detect the interface status and dynamically select the appropriate target working mode. Through the above mechanism, a combination of rapid response and adaptive correction is achieved during device startup or wake-up. This not only significantly shortens the mode recovery time and improves the user experience, but also avoids incorrect mode recovery caused by environmental changes, thereby improving the system's reliability and intelligence.
[0070] For example, in a specific application scenario, when the audio receiving device has been in female output mode and running stably for 30 seconds during its last use, the system packages and stores the working mode identifier "female output mode" and related configuration parameters (such as USB audio sampling rate 48kHz, bit depth 16bit, power negotiation parameters 5V / 900mA) in the Flash memory, along with a CRC checksum. When the device is powered on again, it first reads the working mode identifier and directly initializes the audio encoding module and interface communication module related to the female output mode, enabling the device to respond within 50ms. The system quickly enters the female output mode, thereby reducing initialization waiting time. At the same time, the system performs background checks on the connection status of the first and second type interfaces every 100ms. If the system detects that a 3.5mm headphone is already plugged into the first type interface and meets the valid connection conditions (physical insertion, electrical normal, device type is audio terminal), it means that the current actual connection situation does not match the female output mode. The system immediately terminates the quick recovery process and re-executes the interface detection and mode selection steps to switch to the male connector priority mode, ensuring that the device's working mode is consistent with the actual usage scenario.
[0071] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0072] Secondly, such as Figure 1 As shown, this embodiment of the invention provides an audio receiving device, which includes a first type interface, a second type interface, a wireless receiving module, an interface detection module, an audio routing module, a power management module, a built-in power supply, and a main control unit. The first type interface is used to connect to a first external device via a detachable connector, and the second type interface is a multi-functional interface supporting both audio output and power input; wherein: The interface detection module is used to detect the connection status of the first type of interface and the type of the first external device connected to it, and generate first status information; and to detect the connection status of the second type of interface and the type of the second external device connected to it, and generate second status information. The main control unit is used to select a preset working mode as the target working mode from a plurality of preset working modes according to the first state information and the second state information, and control the audio receiving device to enter the target working mode. The plurality of preset operating modes include at least a male-first mode and a female-output mode. In the male-first mode, the audio signal received by the wireless receiving module is routed to the first type of interface for output, and the built-in power supply is charged according to the connection status of the second type of interface. In the female-output mode, the audio signal received by the wireless receiving module is encoded into a digital audio protocol format suitable for the second type of interface, the encoded audio signal is output through the second type of interface, and power is obtained from the connected second external device through the second type of interface. The obtained power is used to power the audio receiving device and to charge the built-in power supply.
[0073] In one embodiment, the interface detection module includes a male connector status recognition module; The male head status recognition module is used for: A physical sensor installed in the first type of interface slot is used to detect whether a physical insertion event of the connector is present. If a physical insertion event is detected at the first type of interface, the electrical connection status of the connector is then detected. If the electrical connection status of the connector is detected to be normal, then the type of the first external device connected through the connector is detected; First state information is generated based on the detection results of the physical insertion event, the detection results of the electrical connection status, and the detection results of the type of the first external device.
[0074] In one embodiment, the male head status recognition module is further configured to: A test voltage is applied to the signal line of the connector, and the response current flowing through the signal line under the action of the test voltage is measured; Calculate the current impedance value of the signal line based on the test voltage and the response current; The current impedance value is compared with a preset standard impedance range; If the current impedance value falls within the standard impedance range, then the electrical connection status of the connector is determined to be normal. If the current impedance value is higher than the upper limit threshold of the standard impedance range, then the electrical connection state of the connector is determined to be an open circuit state. If the current impedance value is lower than the lower limit threshold of the standard impedance range, then the electrical connection state of the connector is determined to be a short circuit state.
[0075] In one embodiment, the male head status recognition module is further configured to: Detect the voltage or logic level value of a specific functional pin in the connector; Based on the detected voltage or logic level value, determine the interface type of the connector to be inserted, including Type-C male, Lightning male, or 3.5mm male. Based on the determined interface type and the detected voltage or logic level value, the type of the first external device connected through the connector is determined.
[0076] In one embodiment, the interface detection module includes a female port status recognition module; The mother port status recognition module is used for: Detect the voltage value of the configuration channel pin of the second type of interface; Based on the detected voltage value of the configuration channel pin, it is determined that the second type interface is in a no-device-connection state, the connected second external device is a power supply device, or the connected second external device is a data device; If the determination result is that the connected second external device is a data device, then check whether there is a data signal activity conforming to the predetermined protocol on the data line pin of the second type interface to confirm whether the data connection with the data device is valid; Detect the voltage value of the power pin of the second type of interface, and determine whether there is an external power input based on the detected voltage value of the power pin; The second status information is generated based on the determination result of the second external device type, the confirmation result of the data connection validity, and the determination result of the external power input.
[0077] In one embodiment, the main control unit is further configured to: Based on the first status information, it is determined whether the first type of interface is in a valid connection state. The valid connection state is that the first type of interface has a physical insertion, the electrical connection is normal, and the first external device connected is an audio terminal device. If the first type of interface is in a valid connection state, then the male connector priority mode is selected as the target working mode, and the audio receiving device is controlled to enter the male connector priority mode; If the first type of interface is not in a valid connection state, then determine whether the second type of interface is validly connected to the data device based on the second status information; If the second type of interface is effectively connected to the data device, the female port output mode is selected as the target working mode, and the audio receiving device is controlled to enter the female port output mode. If the second type of interface is not effectively connected to the data device, then determine whether the second type of interface is only connected to the power device based on the second status information; If the second type of interface is only connected to a power supply device, then the pure charging mode is selected as the target operating mode, and the audio receiving device is controlled to enter the pure charging mode. In the pure charging mode, audio signal output is stopped and the built-in power supply is charged only.
[0078] In one embodiment, in the male-first mode, the main control unit is further configured to: Based on the second status information, determine whether the second type of interface is connected to a power device or a data device; If the second type of interface is connected to a power supply device, then power is obtained from the connected power supply device through the second type of interface. The obtained power is used to power the audio receiving device and to charge the built-in power supply. If the second type interface is connected to a data device, power is obtained from the connected data device through the second type interface. The obtained power is used to power the audio receiving device and charge the built-in power supply. The data transmission path of the second type interface is controlled to enter a silent state, and the second type interface is prohibited from responding to the enumeration request issued by the data device.
[0079] In one embodiment, in the pure charging mode, the main control unit is further configured to: The charging parameters are negotiated with the connected power supply device through the charging protocol, and the maximum charging current and maximum charging voltage supported by the power supply device are determined based on the negotiation results. The current state of the built-in power supply is detected, including battery voltage and battery temperature; Based on the current state of the built-in power supply, select an appropriate charging stage from a plurality of preset charging stages, including a pre-charging stage, a constant current charging stage, a constant voltage charging stage, and a trickle charging stage. The target charging current and target charging voltage are determined based on the selected charging stage, the current state of the built-in power supply, the maximum charging current, and the maximum charging voltage. The built-in power supply is charged according to the target charging current and the target charging voltage.
[0080] In one embodiment, the male head status recognition module is further configured to: Real-time detection of connection status changes of the first type of interface; If the first type of interface is detected to change from a valid connection state to a disconnected state, a fade-out process with gradually decreasing amplitude is performed on the currently output audio signal within a preset time window until the audio output is zero. After the audio output is zero, clear the cached data temporarily stored in the audio routing path and release the hardware resources associated with the first type of interface; The female port status recognition module is also used to re-detect the connection status of the second type of interface and the type of the connected second external device, and determine whether to switch to female port output mode or pure charging mode based on the re-detection result.
[0081] Thirdly, embodiments of the present invention provide an audio receiving device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the control method for the audio receiving device described in the above embodiments, such as steps S101-S103, S201-S204, S301-S304, S401-S405, S501-S504, and S601-S605. Figures 2 to 12 As shown in the figure, to avoid repetition, it will not be repeated here.
[0082] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps of the control method for the audio receiving device described in the above embodiments, such as steps S101-S103, S201-S204, S301-S304, S401-S405, S501-S504, and S601-S605, or... Figures 2 to 12 As shown in the figure, to avoid repetition, it will not be repeated here.
[0083] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0084] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A control method of an audio receiving apparatus, characterized by, The audio receiving device includes a first type of interface and a second type of interface. The first type of interface is used to connect a first external device via a detachable connector. The second type of interface is a multi-functional interface that supports both audio output and power input. The method includes: Detect the connection status of the first type of interface and the type of the first external device connected to it, and generate first status information; Detect the connection status of the second type of interface and the type of the connected second external device, and generate second status information; Based on the first status information and the second status information, select one preset working mode from multiple preset working modes as the target working mode, and control the audio receiving device to enter the target working mode; The plurality of preset operating modes include at least a male-first mode and a female-output mode. In the male-first mode, the audio signal received by the audio receiving device is routed to the first type of interface for output, and the built-in power supply of the audio receiving device is charged according to the connection status of the second type of interface. In the female-output mode, the audio signal received by the audio receiving device is encoded into a digital audio protocol format suitable for the second type of interface, the encoded audio signal is output through the second type of interface, and power is obtained from the second external device connected through the second type of interface. The obtained power is used to power the audio receiving device and to charge the built-in power supply.
2. The method of claim 1, wherein, The step of detecting the connection status of the first type of interface and the type of the connected first external device, and generating first status information, includes: A physical sensor installed in the first type of interface slot is used to detect whether a physical insertion event of the connector is present. If a physical insertion event is detected at the first type of interface, the electrical connection status of the connector is then detected. If the electrical connection status of the connector is detected to be normal, then the type of the first external device connected through the connector is detected; First state information is generated based on the detection results of the physical insertion event, the detection results of the electrical connection status, and the detection results of the type of the first external device.
3. The method of claim 2, wherein, The detection of the electrical connection status of the connector includes: A test voltage is applied to the signal line of the connector, and the response current flowing through the signal line under the action of the test voltage is measured; Calculate the current impedance value of the signal line based on the test voltage and the response current; The current impedance value is compared with a preset standard impedance range; If the current impedance value falls within the standard impedance range, then the electrical connection status of the connector is determined to be normal. If the current impedance value is higher than the upper limit threshold of the standard impedance range, then the electrical connection state of the connector is determined to be an open circuit state. If the current impedance value is lower than the lower limit threshold of the standard impedance range, then the electrical connection state of the connector is determined to be a short circuit state.
4. The method of claim 2, wherein, The detection of the type of the first external device connected through the connector includes: Detect the voltage or logic level value of a specific functional pin in the connector; Based on the detected voltage or logic level value, determine the interface type of the connector to be inserted, including Type-C male, Lightning male, or 3.5mm male. Based on the determined interface type and the detected voltage or logic level value, the type of the first external device connected through the connector is determined.
5. The method according to claim 1, characterized in that, The step of detecting the connection status of the second type of interface and the type of the connected second external device, and generating second status information, includes: Detect the voltage value of the configuration channel pin of the second type of interface; Based on the detected voltage value of the configuration channel pin, it is determined that the second type interface is in a no-device-connection state, the connected second external device is a power supply device, or the connected second external device is a data device; If the determination result is that the connected second external device is a data device, then check whether there is a data signal activity conforming to the predetermined protocol on the data line pin of the second type interface to confirm whether the data connection with the data device is valid; Detect the voltage value of the power pin of the second type of interface, and determine whether there is an external power input based on the detected voltage value of the power pin; The second status information is generated based on the determination result of the second external device type, the confirmation result of the data connection validity, and the determination result of the external power input.
6. The method according to claim 1, characterized in that, The step of selecting a preset working mode as a target working mode from multiple preset working modes based on the first state information and the second state information, and controlling the audio receiving device to enter the target working mode, includes: Based on the first status information, it is determined whether the first type of interface is in a valid connection state. The valid connection state is that the first type of interface has a physical insertion, the electrical connection is normal, and the first external device connected is an audio terminal device. If the first type of interface is in a valid connection state, then the male connector priority mode is selected as the target working mode, and the audio receiving device is controlled to enter the male connector priority mode; If the first type of interface is not in a valid connection state, then determine whether the second type of interface is validly connected to the data device based on the second status information; If the second type of interface is effectively connected to the data device, the female port output mode is selected as the target working mode, and the audio receiving device is controlled to enter the female port output mode. If the second type of interface is not effectively connected to the data device, then determine whether the second type of interface is only connected to the power device based on the second status information; If the second type of interface is only connected to a power supply device, then the pure charging mode is selected as the target operating mode, and the audio receiving device is controlled to enter the pure charging mode. In the pure charging mode, audio signal output is stopped and the built-in power supply is charged only.
7. The method according to claim 6, characterized in that, In the male-first mode, the method further includes: Based on the second status information, determine whether the second type of interface is connected to a power device or a data device; If the second type of interface is connected to a power supply device, then power is obtained from the connected power supply device through the second type of interface. The obtained power is used to power the audio receiving device and to charge the built-in power supply. If the second type interface is connected to a data device, power is obtained from the connected data device through the second type interface. The obtained power is used to power the audio receiving device and charge the built-in power supply. The data transmission path of the second type interface is controlled to enter a silent state, and the second type interface is prohibited from responding to the enumeration request issued by the data device.
8. The method according to claim 6, characterized in that, In the pure charging mode, the method further includes: The charging parameters are negotiated with the connected power supply device through the charging protocol, and the maximum charging current and maximum charging voltage supported by the power supply device are determined based on the negotiation results. The current state of the built-in power supply is detected, including battery voltage and battery temperature; Based on the current state of the built-in power supply, select an appropriate charging stage from a plurality of preset charging stages, including a pre-charging stage, a constant current charging stage, a constant voltage charging stage, and a trickle charging stage. The target charging current and target charging voltage are determined based on the selected charging stage, the current state of the built-in power supply, the maximum charging current, and the maximum charging voltage. The built-in power supply is charged according to the target charging current and the target charging voltage.
9. The method according to claim 1, characterized in that, The method further includes: Real-time detection of connection status changes of the first type of interface; If the first type of interface is detected to change from a valid connection state to a disconnected state, a fade-out process with gradually decreasing amplitude is performed on the currently output audio signal within a preset time window until the audio output is zero. After the audio output is zero, clear the cached data temporarily stored in the audio routing path and release the hardware resources associated with the first type of interface; The connection status of the second type of interface and the type of the connected second external device are re-detected, and the result of the re-detection is used to determine whether to switch to the female output mode or the pure charging mode.
10. An audio receiving device, characterized in that, The audio receiving device includes a first type of interface, a second type of interface, a wireless receiving module, an interface detection module, an audio routing module, a power management module, a built-in power supply, and a main control unit. The first type of interface is used to connect to a first external device via a detachable connector, and the second type of interface is a multi-functional interface supporting both audio output and power input. The interface detection module is used to detect the connection status of the first type of interface and the type of the first external device connected to it, and generate first status information; and to detect the connection status of the second type of interface and the type of the second external device connected to it, and generate second status information. The main control unit is used to select a preset working mode as the target working mode from a plurality of preset working modes according to the first state information and the second state information, and control the audio receiving device to enter the target working mode. The plurality of preset operating modes include at least a male-first mode and a female-output mode. In the male-first mode, the audio signal received by the wireless receiving module is routed to the first type of interface for output, and the built-in power supply is charged according to the connection status of the second type of interface. In the female-output mode, the audio signal received by the wireless receiving module is encoded into a digital audio protocol format suitable for the second type of interface, the encoded audio signal is output through the second type of interface, and power is obtained from the connected second external device through the second type of interface. The obtained power is used to power the audio receiving device and to charge the built-in power supply.