Audio transmission method, related apparatus, and communication system

By establishing a connection between the first device and the audio device, and having the second device share the audio device for audio input/output, the problem of synchronous transmission of audio needs across multiple devices is solved, improving user experience and transmission efficiency.

WO2026067323A1PCT designated stage Publication Date: 2026-04-02HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-22
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

When users own multiple electronic devices, existing technologies cannot simultaneously meet the audio input/output needs of multiple devices, and the interaction between devices is cumbersome, resulting in a poor user experience.

Method used

By establishing a connection between the first device and the audio device, the second device shares the audio device with the first device for audio input/output, maintains the connection with the first device, and realizes synchronous audio transmission and control between the audio device and multiple electronic devices.

Benefits of technology

It simplifies the interaction between audio devices and multiple electronic devices, improves audio transmission efficiency, and enhances the user experience of listening to or capturing audio.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025122986_02042026_PF_FP_ABST
    Figure CN2025122986_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides an audio transmission method, a related apparatus, and a communication system. The method can be applied to a communication system comprising a first device, a second device, and an audio device. The first device establishes a communication connection with the audio device. The first device can perform an audio input service and an audio output service in the first device by means of the audio device. The second device establishes a communication connection with the first device. The second device can send, to the first device, audio to be played back in the second device. The first device can play back said audio in the second device by means of the audio device. The second device can acquire, by means of the first device, audio collected by the audio device. The audio device does not need to frequently switch connections thereof with the first device and the second device. In this way, the interaction between one audio device and a plurality of devices can be simplified, and the audio transmission efficiency can be improved, thereby improving user experience of listening to or collecting audio.
Need to check novelty before this filing date? Find Prior Art

Description

Audio transmission method, related apparatus and communication system

[0001] This application claims priority to the Chinese patent application No. 202411359528.8, filed on September 26, 2024, and entitled "Audio transmission method, related apparatus and communication system", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of terminal, and in particular, to an audio transmission method, related apparatus and communication system. BACKGROUND

[0003] With the development of electronic devices, the types of electronic devices owned by users are increasing. For example, a user can own multiple types of devices such as a mobile phone, a tablet computer, a notebook computer, and earphones. The user can use different devices to complete different tasks at the same time. However, a pair of earphones can only be used for audio input / output of one electronic device at the same time. If multiple electronic devices have the need for audio input / output, the pair of earphones needs to be frequently switched between the multiple devices. This not only cannot meet the needs of audio input / output of one or more electronic devices in time, but also makes the interaction between devices cumbersome, and the user experience of listening to audio or collecting audio is poor. SUMMARY

[0004] The present application provides an audio transmission method, related apparatus and communication system. A first device establishes a communication connection with an audio device. A second device establishes a communication connection with the first device. The second device can realize audio input / output with the audio device through the first device at the same time as the first device. When the first device and the second device share the audio device, the audio device can maintain the connection with the first device without switching the connection between the first device and the second device. The method can meet the needs of audio input / output of multiple electronic devices in time based on one audio device, and can simplify the interaction between the audio device and the multiple electronic devices, improve the efficiency of audio transmission, and thus improve the user experience of listening to audio or collecting audio.

[0005] In a first aspect, the present application provides an audio transmission method. The method is applied to a communication system including a first device and a second device, and the first device is connected with an audio device. The first device sends a first audio to the audio device, and the first audio is an audio of a first audio application in the first device. The first device receives a second audio collected by the audio device, and sends the second audio to the second device. The second device uses the second audio as the audio input of a first audio input service.

[0006] The first audio can refer to the audio stream of the electronic device 100 shown in FIG. 5G of the present application. The second audio can refer to the audio stream collected by the audio device 300 shown in FIG. 5C of the present application.

[0007] It can be seen that the audio device can simultaneously meet the audio output requirement of the first device and the audio input requirement of the second device while maintaining the connection with the first device. The above method not only facilitates the user to use one audio device to simultaneously realize the audio input / output of multiple electronic devices, improves the user experience of listening to audio or collecting audio, but also simplifies the interaction between the audio device and multiple electronic devices, and improves the efficiency of audio transmission.

[0008] In combination with the first aspect, in some embodiments, the second device sends third audio to the first device, the third audio being audio applied by the second audio application in the second device; the first device mixes the first audio and the third audio to obtain fourth audio; and the first device sends the fourth audio to the audio device. The audio device can play the fourth audio.

[0009] The third audio can refer to the audio stream of the electronic device 200 sent by the electronic device 200 to the electronic device 100 shown in FIGS. 5A-5D. The fourth audio can refer to the audio stream of the electronic device 100 and the electronic device 200 sent by the electronic device 100 to the audio device 300 shown in FIGS. 5A-5D of the present application.

[0010] It can be seen that when the first device and the second device have audio input requirements at the same time, the first device can receive the audio to be played in the second device, and send the mixed audio to be played in the first device and the second device to the audio device. The audio device can play the audio to be played in the first device and the second device at the same time. In this way, the user's demand for listening to audio on multiple devices through one audio device can be met.

[0011] In combination with the first aspect, in some embodiments, the first device receives a first operation, the first operation being used to stop playing the first audio; in response to the first operation, the first device stops sending the first audio to the audio device; the second device sends third audio to the first device, the third audio being audio applied by the second audio application in the second device; and the first device sends the third audio to the audio device.

[0012] The first operation can refer to the operation of the local audio pause output control 512 shown in FIG. 5D of the present application.

[0013] It can be seen that in the case where the audio output of the first device is closed and the audio output of the second device is opened, the first device can send the third audio to the audio device without mixing. The audio device can play the third audio.

[0014] With reference to the first aspect, in some embodiments, the second device receives a second operation, the second operation being used to stop playing the third audio; in response to the second operation, the second device stops sending the third audio to the first device.

[0015] Alternatively, the first device receives a third operation on the first control, the first control being used to control the audio output state of the second device, the third operation being used to turn off the audio output of the second device; in response to the third operation, the first device sends a second message to the second device, the second message being used to instruct the second device to turn off the audio output; according to the second message, the second device stops sending the third audio to the first device.

[0016] For example, the second operation can be an operation on the local audio pause output control 522 shown in FIG. 5F of the present application. The first control can be the audio pause output control 514 of the electronic device 200 shown in FIG. 5F of the present application. The third operation can be an operation on the audio pause output control 514 of the electronic device 200 shown in FIG. 5F of the present application.

[0017] It can be seen that the user can control the second device to turn on or turn off the audio output on the second device, and can also control the second device to turn on or turn off the audio output on the first device. This can facilitate the user to control the audio output state of the second device.

[0018] With reference to the first aspect, in some embodiments, the first device displays first state information, the first state information being used to indicate that the audio output of the second device is turned on; in response to the second operation, the second device sends a first message to the first device, the first message being used to indicate that the second device has turned off the audio output; according to the first message, the first device updates the first state information to second state information, the second state information being used to indicate that the audio output of the second device is turned off.

[0019] The first state information can refer to the icon and text information contained in the audio pause output control 514 of the electronic device 200 shown in FIG. 5F of the present application. The second state information can refer to the icon and text information contained in the audio continue output control 518 of the electronic device 200 shown in FIG. 5G of the present application.

[0020] It can be seen that the first device and the second device can synchronize the audio output state of the second device. The first device can display the corresponding state information according to the current audio output state of the second device, to prompt the user of the current audio output state of the second device. The user can quickly understand the audio output state of the first device and the second device on the first device.

[0021] In some embodiments, after the second device stops sending the third audio to the first device, the second device receives an operation for continuing to play the third audio. In response to the operation for continuing to play the third audio, the second device can send the third audio to the first device. The first device can hand over the third audio to the audio device for playing.

[0022] Alternatively, the first device displays a control for controlling an audio output state of the second device. After the second device stops sending the third audio to the first device, the first device receives an operation for turning on the audio output of the second device. In response to the operation for turning on the audio output of the second device, the first device can send a message to the second device for instructing the second device to turn on the audio output. According to the message, the second device can send the third audio to the first device. The first device can hand over the third audio to the audio device for playing.

[0023] In some embodiments, after the second device receives the second message, the second device sends the third audio to the first device.

[0024] It can be seen that after the user controls the second device to turn off the audio input on the first device or the second device, the user can control the second device to turn on the audio input on the first device or the second device.

[0025] In some embodiments, before the first device sends the second audio to the second device, the second device receives a fourth operation for turning on the audio input of the second device. In response to the fourth operation, the second device sends a third message to the first device, the third message being for instructing the second device to have turned on the audio input.

[0026] Alternatively, the first device receives a fifth operation on a second control for controlling an audio input state of the second device, the fifth operation being for turning on the audio input of the second device. In response to the fifth operation, the first device sends a fourth message to the second device, the fourth message being for instructing the second device to turn on the audio input.

[0027] For example, the fourth operation can be an operation on the unmute control 521 shown in FIG. 5B. The second control can be the unmute control 513 of the electronic device 200 shown in FIG. 5B. The fifth operation can be an operation on the unmute control 513 of the electronic device 200 shown in FIG. 5B.

[0028] It can be seen that the user can control the second device to turn on or turn off the audio input on the second device, and can also control the second device to turn on or turn off the audio input on the first device. This can facilitate the user to control the audio input state of the second device.

[0029] With reference to the first aspect, in some embodiments, the first device displays third status information, the third status information being used to indicate that the audio input of the second device is closed; and the first device updates the third status information to fourth status information according to the third message, the fourth status information being used to indicate that the audio input of the second device is opened.

[0030] The third status information can refer to the icon and text information contained in the mute control 513 of the electronic device 200 shown in FIG. 5B. The fourth status information can refer to the icon and text information contained in the mute control 515 of the electronic device 200 shown in FIG. 5C.

[0031] It can be seen that the first device and the second device can synchronize the audio input state of the second device. The first device can display the corresponding status information according to the current audio input state of the second device, to prompt the user about the current audio input state of the second device. The user can quickly learn the audio input state of the first device and the second device on the first device.

[0032] With reference to the first aspect, in some embodiments, the first device uses the second audio as the audio input of the second audio input service.

[0033] It can be seen that, in the case that the audio device maintains the connection with the first device, the first device and the second device can both use the audio collected by the audio device as the audio input of the corresponding audio input service. The first device and the second device can simultaneously use the audio device for the audio input service. Alternatively, after the audio input of one device is opened, the audio input of the other device can be automatically closed. The above method can meet the user's demand of using one audio device to perform audio input on multiple devices, and can simplify the interaction between the audio device and the multiple electronic devices, and improve the efficiency of audio transmission.

[0034] With reference to the first aspect, in some embodiments, before the first device sends the second audio to the second device, the second audio input service of the first device is in a proceeding state; and after the first device sends the second audio to the second device, the first device stops the second audio input service.

[0035] It can be seen that, after the audio input of the second device is opened, the audio input of the first device can be automatically closed. In the case that the user only wants to perform audio input on the second device, the above method can automatically close the audio input of the first device without the user's manual operation, thereby simplifying the user's operation of controlling the audio input.

[0036] In some embodiments, after the second device uses the second audio as the audio input of the first audio input service, the first device receives a sixth operation for starting the audio input of the first device; in response to the sixth operation, the first device uses the second audio as the audio input of a second audio input service, stops sending the second audio to the second device, and sends a fifth message to the second device, the fifth message being used to instruct the second device to close the audio input; and according to the fifth message, the second device stops the first audio input service.

[0037] For example, the sixth operation can be an operation on the unmuting control 516 shown in FIG. 5C of this application.

[0038] It can be seen that after the audio input of the first device is started, the audio input of the second device can be automatically closed. In the case where the user only wants to perform audio input on the first device, the above method can simplify the operation of the user to control the audio input without the user manually closing the audio input of the second device.

[0039] In some embodiments, after the second device uses the second audio as the audio input of the first audio input service, the second device receives a seventh operation for closing the audio input of the second device; in response to the seventh operation, the second device stops the first audio input service, and sends a sixth message to the first device, the sixth message being used to indicate that the second device has closed the audio input; and according to the sixth message, the first device stops sending the second audio to the second device.

[0040] Alternatively, the first device receives an eighth operation on a third control, the third control being used to control the audio input state of the second device, the eighth operation being used to close the audio input of the second device; in response to the eighth operation, the first device stops sending the second audio to the second device, and sends a seventh message to the second device, the seventh message being used to instruct the second device to close the audio input; and according to the seventh message, the second device stops the first audio input service.

[0041] For example, the seventh operation can be an operation on the muting control 523 shown in FIG. 5C of this application. The third control can be the muting control 515 of the electronic device 200 shown in FIG. 5C of this application. The eighth operation can be an operation on the muting control 515 of the electronic device 200 shown in FIG. 5C of this application.

[0042] In some embodiments, the first device updates the fourth state information to the third state information after the audio input state of the second device changes from the started state to the closed state.

[0043] It can be seen that the user can control the second device to turn on or turn off the audio input on the second device, and can also control the second device to turn on or turn off the audio input on the first device. In this way, the user can conveniently control the audio input state of the second device.

[0044] In some embodiments, when the audio input of the first device and the second device are both turned off, the first device can instruct the audio device to stop collecting audio. In this way, the energy of the audio device can be saved.

[0045] In a second aspect, the present application provides an audio transmission method. The method is applied to a first device, and the first device is connected with an audio device. The first device sends first audio to the audio device, the first audio being audio of a first audio application in the first device; the first device receives second audio collected by the audio device, and sends the second audio to a second device.

[0046] The second device uses the second audio as audio input of a first audio input service. The first audio can refer to the audio stream of the electronic device 100 shown in FIG. 5G of the present application. The second audio can refer to the audio stream collected by the audio device 300 shown in FIG. 5C of the present application.

[0047] It can be seen that the audio device can meet the audio output demand of the first device and the audio input demand of the second device while maintaining the connection with the first device. The above method not only can facilitate the user to use one audio device to simultaneously realize the audio input / output of multiple electronic devices, improve the user's experience of listening to audio or collecting audio, but also can simplify the interaction between the audio device and multiple electronic devices, and improve the efficiency of audio transmission.

[0048] In combination with the second aspect, in some embodiments, the first device receives third audio of the second device, the second audio being different from the first audio; the first device mixes the first audio and the third audio to obtain fourth audio; and the first device sends the fourth audio to the audio device.

[0049] It can be seen that when the first device and the second device have audio input demand at the same time, the first device can receive audio to be played in the second device, and send the mixed audio to be played in the first device and the second device to the audio device. The audio device can play the audio to be played in the first device and the second device at the same time. In this way, the user's demand for listening to audio on multiple devices through one audio device can be met.

[0050] In combination with the second aspect, in some embodiments, the first device receives a first operation, the first operation being used to stop playing the first audio; in response to the first operation, the first device stops sending the first audio to the audio device; the first device receives third audio of the second device, the second audio being different from the first audio; and the first device sends the third audio to the audio device.

[0051] It can be seen that, in the case that the audio output of the first device is closed and the audio output of the second device is opened, the first device can send the third audio to the audio device alone without mixing the audio, and the audio device can play the third audio.

[0052] With reference to the second aspect, in some embodiments, the first device displays first status information, the first status information being used to indicate that the audio output of the second device is opened. The first device receives a first message of the second device, the first message being used to indicate that the second device has closed the audio output; and the first device updates the first status information to second status information according to the first message, the second status information being used to indicate that the audio output of the second device is closed.

[0053] The first message can be sent by the second device after the second device receives a second operation. The second operation is used to stop playing the third audio. In addition to sending the first message, the second device can also stop sending the third audio to the first device according to the second operation.

[0054] It can be seen that the first device and the second device can synchronize the audio output state of the second device. The first device can display corresponding status information according to the current audio output state of the second device to prompt the user about the current audio output state of the second device. The user can quickly learn the audio output state of the first device and the second device on the first device.

[0055] With reference to the second aspect, in some embodiments, the first device displays a first control, the first control being used to control the audio output state of the second device. The first device receives a third operation on the first control, the third operation being used to close the audio output of the second device. In response to the third operation, the first device sends a second message to the second device, the second message being used to instruct the second device to close the audio output. The second device can stop sending the third audio according to the second message.

[0056] It can be seen that the user can control the second device to open or close the audio output on the second device, and can also control the second device to open or close the audio output on the first device. This can facilitate the user to control the audio output state of the second device.

[0057] In some embodiments, after the second device stops sending the third audio to the first device, the second device receives an operation for continuing to play the third audio. In response to the operation for continuing to play the third audio, the second device can send the third audio to the first device. The first device can hand over the third audio to the audio device for playing.

[0058] Alternatively, the first device displays a control for controlling the audio output state of the second device. After the second device stops sending the third audio to the first device, the first device receives an operation for starting the audio output of the second device. In response to the operation for starting the audio output of the second device, the first device can send a message to the second device for instructing the second device to start the audio output. According to the message, the second device can send the third audio to the first device. The first device can play the third audio by the audio device.

[0059] In some embodiments, after the audio output state of the second device changes from the off state to the on state, the first device can update the second state information to the first state information.

[0060] It can be seen that after the user controls the second device to turn off the audio input on the first device or the second device, the user can control the second device to turn on the audio input on the first device or the second device.

[0061] In some embodiments, before the first device sends the second audio to the second device, the first device receives a third message of the second device, the third message being for instructing the second device to have turned on the audio input.

[0062] Alternatively, the first device receives a fifth operation on the second control, the second control being for controlling the audio input state of the second device, the fifth operation being for starting the audio input of the second device; in response to the fifth operation, the first device sends a fourth message to the second device, the fourth message being for instructing the second device to start the audio input.

[0063] In some embodiments, the third message can be sent by the second device after receiving a fourth operation, the fourth operation being for starting the audio input of the second device.

[0064] It can be seen that the user can control the second device to turn on or turn off the audio input on the second device, and can also control the second device to turn on or turn off the audio input on the first device. This can facilitate the user to control the audio input state of the second device.

[0065] In some embodiments, the first device displays third state information, the third state information being for instructing the audio input of the second device to be off, and according to the third message, the first device updates the third state information to fourth state information, the fourth state information being for instructing the audio input of the second device to be on.

[0066] It can be seen that the first device and the second device can synchronize the audio input state of the second device. The first device can display corresponding state information according to the current audio input state of the second device, to prompt the user about the current audio input state of the second device. The user can quickly learn about the audio input state of the first device and the second device on the first device.

[0067] With reference to the second aspect, in some embodiments, the first device uses the second audio as the audio input of the second audio input service.

[0068] It can be seen that, in the case where the audio device maintains a connection with the first device, the first device and the second device can both use the audio collected by the audio device as the audio input of the corresponding audio input service. The first device and the second device can simultaneously use the audio device for audio input service. Alternatively, after the audio input of one device is started, the audio input of the other device can be automatically stopped. The above method can meet the user's demand for using one audio device to perform audio input on multiple devices, and can simplify the interaction between the audio device and the multiple electronic devices, and improve the efficiency of audio transmission.

[0069] With reference to the second aspect, in some embodiments, before the first device sends the second audio to the second device, the second audio input service of the first device is in a proceeding state; after the first device sends the second audio to the second device, the first device stops the second audio input service.

[0070] It can be seen that, after the audio input of the second device is started, the audio input of the first device can be automatically stopped. In the case where the user only wants to perform audio input on the second device, the above method can simplify the user's operation of controlling audio input without the user manually stopping the audio input of the first device.

[0071] With reference to the second aspect, in some embodiments, after the first device sends the second audio to the second device, the first device receives a sixth operation for starting the audio input of the first device; in response to the sixth operation, the first device uses the second audio as the audio input of the second audio input service, stops sending the second audio to the second device, and sends a fifth message to the second device, the fifth message being used to instruct the second device to stop the audio input. According to the fifth message, the second device stops the first audio input service.

[0072] It can be seen that, after the audio input of the first device is started, the audio input of the second device can be automatically stopped. In the case where the user only wants to perform audio input on the first device, the above method can simplify the user's operation of controlling audio input without the user manually stopping the audio input of the second device.

[0073] In some embodiments, after the first device sends the second audio to the second device, the first device receives a sixth message from the second device, the sixth message being used to indicate that the second device has closed the audio input; and according to the sixth message, the first device stops sending the second audio to the second device.

[0074] Alternatively, the first device receives an eighth operation on a second control, the second control being used to control the audio input state of the second device, the eighth operation being used to close the audio input of the second device; in response to the eighth operation, the first device stops sending the second audio to the second device, and sends a seventh message to the second device, the seventh message being used to instruct the second device to close the audio input.

[0075] In some embodiments, after the audio input state of the second device changes from the open state to the closed state, the first device can update the fourth state information to the third state information.

[0076] It can be seen that the user can control the second device to open or close the audio input on the second device, and can also control the second device to open or close the audio input on the first device. This can facilitate the user to control the audio input state of the second device.

[0077] In some embodiments, when the audio input of the first device and the second device are both closed, the first device can instruct the audio device to stop collecting audio. This can save the energy of the audio device.

[0078] In a third aspect, the present application provides an electronic device. The electronic device can include a memory and a processor. The memory can be used to store a computer program. The processor can be used to invoke the computer program to perform any possible implementation method of the second aspect.

[0079] In a fourth aspect, the present application provides a computer readable storage medium, which stores instructions, and the instructions are executed by a processor to implement any possible implementation method of the second aspect.

[0080] In a fifth aspect, the present application provides a computer program product, which can include computer instructions, and when the computer instructions are executed on a processor, any possible implementation method of the second aspect can be implemented.

[0081] In a sixth aspect, the present application provides a chip, which is applied to an electronic device, and the chip includes one or more processors, and the processor is used to invoke computer instructions to make the electronic device execute any possible implementation method of the second aspect.

[0082] It can be understood that the electronic device provided in the third aspect, the computer readable storage medium provided in the fourth aspect, the computer program product provided in the fifth aspect, and the chip provided in the sixth aspect are all used to execute the method provided in the embodiments of the present application. Therefore, the beneficial effects achieved by them can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0083] FIG. 1A is a schematic diagram of a communication system 10 according to an embodiment of the present application;

[0084] FIG. 1B is a schematic diagram of a communication system 20 according to an embodiment of the present application;

[0085] FIG. 2A is a schematic diagram of a hardware structure of an electronic device 100 according to an embodiment of the present application;

[0086] FIG. 2B is a schematic diagram of a software structure of an electronic device 100 according to an embodiment of the present application;

[0087] FIG. 2C is a schematic diagram of a structure of an audio device 300 according to an embodiment of the present application;

[0088] FIG. 3A is a schematic diagram of a communication system 30 according to an embodiment of the present application;

[0089] FIG. 3B is a schematic diagram of a communication system 40 according to an embodiment of the present application;

[0090] FIG. 3C is a schematic diagram of a communication system 50 according to an embodiment of the present application;

[0091] FIGS. 4A-4E are schematic diagrams of some audio transmission scenarios according to embodiments of the present application;

[0092] FIGS. 5A-5G are schematic diagrams of some audio transmission scenarios according to embodiments of the present application;

[0093] FIG. 6 is a flowchart of an audio transmission method according to an embodiment of the present application;

[0094] FIG. 7 is a flowchart of an audio transmission method according to an embodiment of the present application;

[0095] FIG. 8 is a flowchart of an audio transmission method according to an embodiment of the present application. DETAILED DESCRIPTION

[0096] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing the specific embodiments and are not intended to be limiting of the present application. As used in the specification and the appended claims of the present application, the singular forms “a,” “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that “at least one” and “one or more” as used in the embodiments herein indicates one or two or more (including two), unless otherwise indicated. The term “and / or” is used to describe the association relationship of associated objects, which means that there can be three relationships; for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character “ / ” generally represents an “or” relationship between the associated objects.

[0097] In this specification, the reference “one embodiment” or “some embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases “in one embodiment”, “in some embodiments”, “in other embodiments”, “in additional embodiments”, etc. in various places in the specification are not necessarily all referring to the same embodiment, but can refer to one or more but not all embodiments, unless otherwise specifically stated. The terms “including”, “containing”, “having” and variations thereof mean “including but not limited to”, unless otherwise specifically stated. The term “connected” includes both direct and indirect connections, unless otherwise stated. “First”, “second”, etc. are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features.

[0098] In the embodiments of the present application, the words “exemplary” or “for example” are used to mean serving as an example, instance, or illustration. Any embodiment or design presented as “exemplary” or “for example” in the embodiments of the present application is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words “exemplary” or “for example” is intended to present concepts in a concrete manner.

[0099] The present application provides an audio transmission method, which can be applied to a communication system including an electronic device 100, an electronic device 200 and an audio device 300. The electronic device 100 and the audio device 300 have a communication connection established therebetween. The electronic device 100 can send audio 1 in the electronic device 100 to the audio device 300 for playing by the audio device 300. The electronic device 100 can also receive audio collected by the audio device 300 and implement a corresponding function based on the audio collected by the audio device 300.

[0100] When the electronic device 200 has a demand for audio input / output, the electronic device 200 can establish a communication connection with the electronic device 100. The electronic device 200 can send audio 2 in the electronic device 200 to the electronic device 100. If the electronic device 100 still has a demand for outputting the audio 1 when receiving the audio 2, the electronic device 100 can mix the audio 1 and the audio 2 and send the mixed audio to the audio device 300. The audio device 300 can play the mixed audio of the audio 1 and the audio 2. If the electronic device 100 has no demand for audio output when receiving the audio 2, the electronic device 100 can send the audio 2 to the audio device 300 for playing by the audio device 300. The electronic device 100 can also determine which device receives the audio collected by the audio device 300 according to the audio input state of the electronic device 100 and the electronic device 200. If the electronic device 200 has an audio input enabled, the electronic device 100 can send the audio collected by the audio device 300 to the electronic device 200. The electronic device 200 can implement a corresponding function based on the audio collected by the audio device 300.

[0101] It can be seen that the electronic device 200 can achieve audio input / output with the electronic device 100 by means of the electronic device 100. When the electronic device 100 and the electronic device 200 both have a demand for audio output, the audio device 300 can simultaneously play the audio of the electronic device 100 and the audio of the electronic device 200. In the case that multiple electronic devices share the audio device 300, the audio device 300 can maintain a connection with one of the electronic devices (e.g., the electronic device 100) without frequently switching the connection with the multiple electronic devices. The above method not only can timely meet the audio input / output demands of multiple electronic devices based on one audio device, but also can simplify the interaction between the audio device and the multiple electronic devices and improve the efficiency of audio transmission, thereby improving the user experience of listening to audio or collecting audio.

[0102] The present application provides a communication system.

[0103] FIG. 1A exemplarily shows a schematic diagram of a communication system 10.

[0104] As shown in FIG. 1A, the communication system 10 can include an electronic device 100, an electronic device 200, and an audio device 300. A communication connection can be established between the electronic device 100 and the electronic device 200. A communication connection can be established between the electronic device 100 and the audio device 300. The communication connection can include, but is not limited to, a Bluetooth communication connection, a wireless fidelity (Wi-Fi) network connection, a wired connection, and the like. Embodiments of the present application do not limit the communication connection between the electronic device 100 and the electronic device 200, and the communication connection between the electronic device 100 and the audio device 300.

[0105] The electronic device 100 and the electronic device 200 can be a mobile phone, a tablet computer, a notebook computer, a smart watch, a television, and the like. The audio device 300 can be a device including an audio output apparatus (e.g., an earpiece, a speaker) and / or an audio input apparatus (e.g., a microphone). For example, the audio device can be a headset, a microphone, a sound box, and the like. Embodiments of the present application do not limit the type of the electronic device 100, the electronic device 200, and the audio device 300.

[0106] In some embodiments, when the electronic device 100 is turned on for audio output, the electronic device 100 can send audio to be played in the electronic device 100 to the audio device 300. The audio device 300 can play the audio in the electronic device 100. When the electronic device 100 is turned on for audio input, the electronic device 100 can instruct the audio device 300 to collect audio. The audio device 300 sends the collected audio to the electronic device 100. The electronic device 100 can implement corresponding functions according to the audio collected by the audio device 300, such as recording, voice call, sending voice message, video recording, and the like.

[0107] In a case where the electronic device 200 turns on the audio output, the electronic device 200 can send the audio to be played in the electronic device 200 to the electronic device 100. If the audio outputs of the electronic device 100 and the electronic device 200 are both in the on state, the electronic device 100 can mix the audio of the electronic device 100 and the audio of the electronic device 200, and send the mixed audio to the audio device 300. The audio device 300 can play the mixed audio. In this way, the audio of the electronic device 100 and the audio of the electronic device 200 can be played simultaneously on the audio device 300. The embodiments of the present application do not limit the mixing method. For example, the audio device 300 includes one or more audio output devices. The audio played by the one or more audio output devices can be the same. That is, the audio played by any one of the one or more audio output devices includes the audio of the electronic device 100 and the audio of the electronic device 200. Alternatively, after mixing, the audio of the electronic device 100 and the audio of the electronic device 200 can be played by different audio output devices of the audio device 300. For example, the audio device 300 is a headset. The headset can include a left earphone and a right earphone. The left earphone can play the audio of the electronic device 100. The right earphone can play the audio of the electronic device 200. In this way, when the audio device 300 plays the audio of the electronic device 100 and the audio of the electronic device 200 simultaneously, the user can listen to the audio from different electronic devices by using different audio output devices of the audio device 300.

[0108] If the audio output of the electronic device 200 is in the on state and the audio output of the electronic device 100 is in the off state, the electronic device 100 can send the audio of the electronic device 200 to the audio device 300. The audio device 300 can play the audio of the electronic device 200.

[0109] In some embodiments, in the case of audio input using the audio device 300, only one of the electronic device 100 and the electronic device 200 can have the audio input enabled at the same time. In the case that the electronic device 200 has the audio input enabled, the electronic device 100 can disable the audio input and send the audio collected by the audio device 300 to the electronic device 200. The electronic device 200 can implement corresponding functions, such as audio recording, voice call, sending voice message, video recording, etc., according to the audio collected by the audio device 300. In the case that the audio input of the electronic device 200 is enabled, if the electronic device 100 enables the audio input, the electronic device 100 can instruct the electronic device 200 to disable the audio input. The electronic device 100 can receive and use the audio collected by the audio device 300 to implement corresponding functions without sending the audio collected by the audio device 300 to the electronic device 200. In the case that the audio input of the electronic device 100 and the electronic device 200 are both disabled, the electronic device 100 can send an instruction to the audio device 300 to stop collecting audio. According to the instruction, the audio device 300 can disable the audio input device.

[0110] In some embodiments, the electronic device 100 and the electronic device 200 can enable the audio input at the same time. In this case, the electronic device 100 can not only use the audio collected by the audio device 300 to implement corresponding functions, but also send the audio collected by the audio device 300 to the electronic device 200 for use by the electronic device 200.

[0111] The electronic device 100 and the electronic device 200 can synchronize the audio input device of the electronic device 200 and the audio output state of the electronic device 200. In this way, the electronic device 100 can determine whether to send the audio collected by the audio device 300 to the electronic device 200. In addition, the electronic device 100 can display a control for controlling the audio input / output state of the electronic device 200, so that the user can perform user operations on the electronic device 100 to control the audio input / output state of the electronic device 200.

[0112] It should be noted that the audio input of the electronic device (such as the electronic device 100 and the electronic device 200) being enabled can indicate that the electronic device has an audio input requirement. The audio output of the electronic device being enabled can indicate that the electronic device has an audio output requirement. Conversely, the audio input of the electronic device being disabled can indicate that the electronic device does not have an audio input requirement. The audio output of the electronic device being disabled can indicate that the electronic device does not have an audio output requirement.

[0113] The communication system 10 can include more devices than the electronic device 100, the electronic device 200, and the audio device 300. For example, the communication system 10 can include other electronic devices connected to the electronic device 100 in addition to the electronic device 200. That is, multiple electronic devices can be connected to the electronic device 100 to share the audio device 300 for audio input / output via the electronic device 100. Alternatively, the communication system 10 can include other audio devices in addition to the audio device 300. The user can select the electronic device 100 connected to the electronic device 200 and the audio device 300 to share the audio device 300 for audio input / output. Alternatively, the user can select the electronic device connected to the electronic device 200 and other audio devices to share the other audio devices for audio input / output.

[0114] FIG. 1B shows a schematic diagram of a communication system 20.

[0115] As shown in FIG. 1B, the communication system 20 can include a mobile phone, a computer, and a headset. The mobile phone can refer to the electronic device 100 shown in FIG. 1A. The computer can refer to the electronic device 200 shown in FIG. 1A. The headset can refer to the audio device 300 shown in FIG. 1A.

[0116] One or more audio applications requiring audio input services and / or audio output services can be installed in the mobile phone and the computer. The audio applications can include conference applications, multimedia playing audio (e.g., music applications, video playing applications), calling applications, instant messaging applications, social applications, camera applications, and the like. The embodiments of the present application do not limit the types of the audio applications.

[0117] The mobile phone and the headset can transmit audio streams. The mobile phone and the computer can transmit audio streams and control streams.

[0118] The audio streams transmitted from the mobile phone to the headset can include audio required to be played by the audio application in the mobile phone and / or audio required to be played by the audio application in the computer. The audio streams transmitted from the headset to the mobile phone can include audio collected by the headset.

[0119] The audio streams transmitted between the mobile phone and the computer can include audio required to be played by the audio application in the computer and / or audio collected by the headset. When the computer is enabled for audio output, the computer can send the audio required to be played by the audio application in the computer to the mobile phone. When the computer is enabled for audio input, the mobile phone can send the audio collected by the headset to the computer.

[0120] The control streams transmitted between the mobile phone and the computer can include an audio input state of the computer and / or an audio output state of the computer.

[0121] In some embodiments, in response to an operation of turning on the audio output on the computer, the computer can send a message to the mobile phone indicating that the computer turns on the audio output. Based on the message indicating that the computer turns on the audio output, the mobile phone can send the audio from the computer to the earphone. In response to an operation of turning on the audio input on the computer, the computer can send a message to the mobile phone indicating that the computer turns on the audio input. Based on the message indicating that the computer turns on the audio input, the mobile phone can send the audio collected by the earphone to the computer. Optionally, the mobile phone can turn off the audio input of the mobile phone according to the message indicating that the computer turns on the audio input. Based on the message indicating that the computer turns on the audio output and the message indicating that the computer turns on the audio input, the mobile phone can also update the audio input status and the audio output status of the computer on the screen.

[0122] In some embodiments, the mobile phone can display controls for controlling the audio input status and the audio output status of the computer on the screen. In response to an operation of turning on the audio output of the computer on the mobile phone, the mobile phone can send a message to the computer indicating that the computer turns on the audio output. The computer can turn on the audio output and send the audio required to be played by the audio application in the computer to the mobile phone. In response to an operation of turning off the audio output of the computer on the mobile phone, the mobile phone can send a message to the computer indicating that the computer turns off the audio output. Based on the message, the computer can stop sending the audio to the mobile phone. In response to an operation of turning on the audio input of the computer on the mobile phone, the mobile phone can send a message to the computer indicating that the computer turns on the audio input. The computer can receive the audio (i.e. the audio collected by the earphone) sent by the mobile phone and use the audio to implement corresponding functions. In response to an operation of turning off the audio input of the computer on the mobile phone, the mobile phone can send a message to the computer indicating that the computer turns off the audio and stop sending the audio collected by the earphone to the computer.

[0123] That is, the above control flow can be used for the mobile phone to synchronize the audio input status and the audio output status of the computer with the computer.

[0124] In the communication system 20, the user can wear the earphone to listen to the audio required to be played by the audio application in the mobile phone and / or the computer. Also, the user can control the audio input status of the mobile phone and the computer to select to transmit the audio collected by the earphone to the audio application in the mobile phone or the computer for use.

[0125] As can be seen, the computer can use the mobile phone to implement the audio input / output with the earphone shared by the mobile phone. The earphone can be connected with the mobile phone at all times without the need to switch the connection between the mobile phone and the computer. In this way, the user can conveniently listen to the audio on the mobile phone and / or the computer in time through the earphone or complete the audio input service of the audio application in the mobile phone and / or the computer in time through the earphone.

[0126] The structure of the device involved in the present application will be described below.

[0127] FIG. 2A illustrates a hardware structural diagram of the electronic device 100.

[0128] As shown in FIG. 2A, the electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0129] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0130] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0131] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0132] The processor 110 can also be provided with a memory for storing instructions and data. In some examples, the memory in the processor 110 is a cache memory. The memory can hold instructions or data that the processor 110 has just used or is cycling through. If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0133] In the present application, the memory can store a computer program for enabling the controller or processor to implement the audio transmission method of the present application through an interface or protocol. Exemplarily, the computer program stored in the memory can be used to: establish a communication connection with an audio device; establish a communication connection with other electronic devices to provide the other electronic devices with the function of using the audio device; control the audio input state and / or audio output state of the electronic devices connected to the electronic device 100; mix the audio in the device and the audio of the electronic devices connected to the electronic device 100; establish a communication connection with other electronic devices connected with the audio device in the case that the audio device is not connected, and use the audio device connected to the other electronic devices to realize audio input / output, etc.

[0134] The USB interface 130 is an interface conforming to the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect a headset to play audio through the headset.

[0135] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The charging management module 140 can charge the battery 142 while also providing power to the electronic device through the power management module 141.

[0136] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc.

[0137] The wireless communication function of the electronic device 100 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0138] Antenna 1 and antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of antennas. For example: antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, antennas can be used in combination with a tuning switch.

[0139] Mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied on electronic device 100. Mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. Mobile communication module 150 can receive electromagnetic waves by antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed signals to a modem processor for demodulation. Mobile communication module 150 can also amplify signals modulated by the modem processor, and convert the signals into electromagnetic waves radiated by antenna 1.

[0140] Wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. applied on electronic device 100. Wireless communication module 160 can be one or more devices integrated with at least one communication processing module. Wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and transmits the processed signals to processor 110. Wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification on the signals, and convert the signals into electromagnetic waves radiated by antenna 2.

[0141] Electronic device 100 realizes display functions through a GPU, display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected to display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.

[0142] Display screen 194 is used to display images, videos, etc. In some embodiments, electronic device 100 can include 1 or N display screens 194, N being a positive integer greater than 1.

[0143] The electronic device 100 can implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display 194, and an application processor, etc.

[0144] The ISP is used to process data fed back by the camera 193. For example, when taking a photo, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye.

[0145] The camera 193 is used to capture a still image or a video. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.

[0146] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0147] The NPU is a neural-network (NN) calculation processor, which is based on the structure of a biological neural network, for example, based on the transmission mode between human brain neurons, to quickly process input information, and can also continuously self-learn. Through the NPU, the electronic device 100 can implement intelligent cognition applications such as image recognition, face recognition, voice recognition, and text understanding, etc.

[0148] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, music, video, and other files are saved in the external memory card.

[0149] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various function applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during use of the electronic device 100 (such as audio data, a phonebook, etc.), etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0150] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, and an application processor, etc. For example, music play, recording, etc.

[0151] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode an audio signal. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the functions of the audio module 170 can be disposed in the processor 110.

[0152] The speaker 170A, also called a "loudspeaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0153] The receiver 170B, also called a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 answers a call or a voice message, the user can listen to the voice by holding the receiver 170B close to the ear.

[0154] The microphone 170C, also called a "microphone", "sound transducer", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound by holding the mouth close to the microphone 170C, and input the sound signal to the microphone 170C.

[0155] The headset interface 170D is used to connect a wired headset.

[0156] In the present application, the above-mentioned speaker 170A, receiver 170B, microphone 170C are all optional.

[0157] The sensor module 180 can include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a gravity sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, an angle sensor, etc.

[0158] The key 190 includes a power-on key, a volume key, etc. The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, etc.

[0159] The SIM card interface 195 is configured to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by being inserted into or pulled out of the SIM card interface 195. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The electronic device 100 interacts with a network through the SIM card to implement functions such as call and data communication. In some examples, the electronic device 100 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be disconnected from the electronic device 100.

[0160] The software system of the electronic device 100 can use a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. The embodiments of this application exemplarily illustrate the software structure of the electronic device 100 by taking a layered architecture as an example.

[0161] FIG. 2B exemplarily shows a software structure diagram of the electronic device 100.

[0162] The layered architecture divides software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom, an application layer, an application framework layer, a system library, and a kernel layer.

[0163] The application layer can include a series of application packages.

[0164] As shown in FIG. 2B, the application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, short message, audio application, multi-device audio management module, and the like.

[0165] The audio application can refer to an application program that has a demand for audio input service and / or audio output service. The audio input service can refer to a service that needs to collect audio, including but not limited to: recording, sending voice messages, shooting videos, voice calls, detecting voice instructions, and the like. The audio output service can refer to a service that needs to play audio, including but not limited to: playing music, playing videos, voice calls, listening to voice messages, and the like. The embodiments of this application do not limit the type of audio application.

[0166] The multi-device audio management module can be used to discover electronic devices in the surrounding area that are connected to audio devices, establish a communication connection between the electronic device 100 and other electronic devices for using the audio devices, manage the audio input state and the audio output state of multiple electronic devices that share an audio device, and the like. In some embodiments, the multi-device audio management module can be based on a Bluetooth connection, a Wi-Fi connection, a USB connection, or the like. ​​The multi-device audio management module can implement discovery, connection and data transmission between electronic devices based on a distributed soft bus. Alternatively, the multi-device audio management module can implement discovery, connection and data transmission between electronic devices based on a standard communication protocol or a private protocol of other device manufacturers. Embodiments of the present application do not limit the implementation of the multi-device audio management module.

[0167] For example, when the electronic device 100 is not connected to an audio device, the electronic device 100 can find, through the multi-device audio management module, an electronic device connected to an audio device in the surrounding. When an electronic device connected to an audio device is found, the electronic device 100 can establish a communication connection with the electronic device connected to the audio device for using the audio device. In this way, the electronic device 100 can share the audio device connected to other electronic devices by connecting to the other electronic devices.

[0168] When the electronic device 100 is connected to the audio device 300, the electronic device 100 can establish, through the multi-device audio management module, a communication connection with other electronic devices not connected to the audio device for using the audio device 300.

[0169] The above-mentioned establishment of a communication connection for using an audio device can be referred to as establishment of a logical link for audio transmission. For example, in a scenario where the electronic device 200 is connected to the electronic device 100 and audio input / output is performed through the electronic device 100 using the audio device 300, the electronic device 100 can establish a logical link between the electronic device 200 and the audio device 300 through the multi-device audio management module. The logical link between the electronic device 200 and the audio device 300 can include a communication link between the electronic device 100 and the electronic device 200 for transmitting an audio stream and a control stream, and a communication link between the electronic device 100 and the audio device 300 for transmitting an audio stream.

[0170] In some embodiments, the multi-device audio management module can be a separate application in the electronic device 100. The multi-device audio management module and the audio application can synchronize the audio input state and the audio output state of the electronic device through a preset interface. Alternatively, the multi-device audio management module can be integrated in the audio application. Embodiments of the present application do not limit the implementation of the multi-device audio management module. The multi-device audio management module can also be referred to as a multi-device audio management application, an interactive scenario control module, etc.

[0171] The electronic device 100 can establish a communication connection between the electronic device 100 and the electronic device 200 based on the multi-device audio management module described above. In this way, the audio device does not switch the connected electronic device, and the audio input / output requirements of multiple electronic devices can be met at the same time. It can be seen that the audio transmission method provided by the present application can be realized through software upgrading or updating, without the need for additional hardware for the audio device 300, the electronic device 100, the electronic device 200, and the like.

[0172] The application framework layer provides APIs and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0173] As shown in FIG. 2B, the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an activity manager, a sound mixing module, a multi-device interaction protocol module, an audio transmission protocol module, and the like.

[0174] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and capture the screen, and the like.

[0175] The content provider is used to store and obtain data, and make the data accessible to the applications. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phone books, and the like.

[0176] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and the like. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.

[0177] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call hang-up, and the like).

[0178] The resource manager provides various resources for the applications, such as localized strings, icons, pictures, layout files, video files, and the like.

[0179] The notification manager enables the applications to display notification information in the status bar (such as a pull-down notification bar). The notification manager can be used to convey notification type messages, which can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of a download, message reminders, and the like. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application running in the background, and can also be a notification in the form of a dialog window appearing on the screen. For example, the text information is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, the indicator light flashes, and the like.

[0180] The activity manager is responsible for managing activities, and is responsible for the start, switching, scheduling of components in the system, and the management and scheduling of applications. The activity manager can be called by an upper layer application to open a corresponding activity.

[0181] The mixing module can be used to mix multiple audio. For example, the audio application in the electronic device 100 has audio 1 to be played. When receiving audio from other electronic devices, such as audio 2, the electronic device 100 can mix audio 1 and audio 2 through the mixing module.

[0182] The multi-device interaction protocol module can include a protocol for transmitting control flow between electronic devices. The above-mentioned protocol can support multiple electronic devices sharing an audio device to synchronize audio input state and audio output state. The embodiments of the present application do not limit the content of the above-mentioned protocol.

[0183] The audio transmission protocol module can include a protocol for audio input and audio output. The above-mentioned protocol can support audio transmission between devices. The embodiments of the present application do not limit the content of the audio transmission protocol.

[0184] The system library can include a plurality of functional modules. For example: surface manager, media library, three-dimensional graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL) and the like.

[0185] The surface manager is used to manage the display subsystem, and provides 2D and 3D layer fusion for multiple applications.

[0186] The media library supports a variety of commonly used audio, video format playback and recording, and static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG and the like.

[0187] The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like.

[0188] The 2D graphics engine is a drawing engine for 2D drawing.

[0189] The kernel layer is a layer between hardware and software. The kernel layer at least includes display driver, camera driver, audio driver, sensor driver.

[0190] The device structure of the electronic device 200 can refer to the structure of the electronic device 100 shown in FIGS. 2A and 2B.

[0191] FIG. 2C illustrates a structural schematic diagram of the audio device 300.

[0192] As shown in FIG. 2C, the audio device 300 can include a processor 310, a memory 320, a communication module 330, a power management module 340, an audio input device 350, and an audio output device 360, which can be coupled through a bus.

[0193] The memory 320 can be used to store program codes. For example, program codes for implementing the audio device 300 to wirelessly pair with other electronic devices, program codes for implementing the audio device 300 to transmit audio streams to other electronic devices, program codes for playing audio, program codes for collecting audio, and the like. Optionally, the memory 320 can also store a Bluetooth address for uniquely identifying the audio device 300, and connection data of electronic devices that have successfully paired with the audio device 300 before. For example, the connection data can be the Bluetooth address of the electronic devices that have successfully paired with the audio device. Based on the connection data, the audio device 300 can automatically pair with the corresponding electronic devices without having to configure the connection with the electronic devices, such as performing legality verification, and the like. The Bluetooth address described above can be a media access control (MAC) address.

[0194] The processor 310 can be used to execute the program codes stored in the memory 320 described above, and call relevant modules to implement the functions of the audio device 300 in the embodiments of the present application. For example, the functions of playing audio, collecting audio and transmitting to other devices, and the like. The processor 310 can specifically be an integrated control chip, or can be composed of a circuit including various active and / or passive components, and the circuit is configured to perform the functions described in the embodiments of the present application that belong to the processor 310. Optionally, the processor 310 of the audio device 300 can be a micro controller unit (MCU).

[0195] In some embodiments, the processor 310 can include one or more interfaces. The processor 310 can be connected to other components of the audio device 300 through the one or more interfaces.

[0196] The communication module 330 can include a wireless communication module. The wireless communication module can be used to support the audio device 300 to exchange data with other electronic devices through wireless communication including Bluetooth, GNSS, WLAN, FM, NFC, IR, etc. In some embodiments, the wireless communication module can be a Bluetooth chip. The audio device 300 can pair with the Bluetooth chip of other electronic devices through the Bluetooth chip and establish a wireless connection, so as to realize wireless communication between the audio device 300 and other electronic devices through the wireless connection. For example, the wireless communication module can send the audio collected by the audio input device to the electronic device that has established a wireless connection (such as a Bluetooth connection) with the audio device 300 after the audio input device collects the audio.

[0197] In addition, the wireless communication module can also be connected with an antenna. The wireless communication module receives electromagnetic waves via the antenna, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 310. The wireless communication module can also receive signals to be sent from the processor 310, perform frequency modulation and amplification, and radiate the signals to the antenna as electromagnetic waves.

[0198] The communication module 330 can also include a wired communication module. The audio device 300 can establish a wired connection with other electronic devices through the wired communication module, and perform data transmission based on the wired connection.

[0199] The power management module 340 can be used to provide power supply for the audio device 300 and power supply for various devices in the audio device 300. The power management module 340 can support the audio device 300 to receive charging input, etc.

[0200] The audio input device 350 can include a microphone or the like to collect audio. The audio input device 350 can process and convert the collected sound into an audio signal, and transmit the audio signal to the processor 310 for further processing.

[0201] The audio output device 360 can include a loudspeaker, a receiver or the like to play audio. The audio output device 360 can convert the audio signal from the processor 310 into sound output.

[0202] The structure shown in FIG. 2C does not constitute a specific limitation on the audio device 300. In actual applications, the audio device 300 can include more or fewer components than shown, or combine certain components, or split certain components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0203] FIG. 3A exemplarily shows a schematic diagram of a communication system 30.

[0204] As shown in FIG. 3A, the communication system 30 can include the electronic device 100, the electronic device 200, and the audio device 300. A communication connection can be established between the electronic device 100 and the electronic device 200. An audio connection can be established between the electronic device 100 and the audio device 300.

[0205] The electronic device 100 can include a multi-device audio management module, a multi-device interaction protocol module, an audio mixing module, an audio application 1, an audio transmission protocol module. The audio application 1 can be any one of the audio applications in the electronic device 100 that is in a running state. The electronic device 200 can include an audio management module, a multi-device interaction protocol module, an audio mixing module, an audio application 2, an audio transmission protocol module. The audio application 2 can be any one of the audio applications in the electronic device 200. The audio management module, the multi-device interaction protocol module, the audio mixing module, and the audio transmission protocol module can refer to the foregoing description of FIG. 2B.

[0206] In a case where the electronic device 100 is connected with the audio device 300, the multi-device audio management module in the electronic device 100 can synchronize the audio input state and the audio output state of the electronic device 200 with the multi-device audio management module of the electronic device 200 based on the multi-device interaction protocol.

[0207] The audio input state of the electronic device 200 can be determined according to the audio input state of the audio application that occupies the audio input port of the electronic device 200. The audio output state of the electronic device 200 can be determined according to the audio output state of the audio application that occupies the audio output port of the electronic device 200.

[0208] For example, the audio application that occupies the audio output port in the electronic device 200 is a music playing application. In a case where the music playing application is playing music, the audio output of the music playing application is in an open state, that is, the audio output of the electronic device 200 is in an open state. In a case where the music playing application is pausing playing music, the audio output of the music playing application is in a closed state, that is, the audio output of the electronic device 200 is in a closed state. For another example, the audio application that occupies the audio input port in the electronic device 200 is a recording application. In a case where the recording application is recording, the audio input of the recording application is in an open state, that is, the audio input of the electronic device 200 is in an open state. In a case where the recording application is pausing recording, the audio input of the recording application is in a closed state, that is, the audio input of the electronic device 200 is in a closed state.

[0209] Here, the audio application 2 in the electronic device 200 is taken as an example of the application that occupies the audio input port and the audio output port of the electronic device 200.

[0210] In some embodiments, when the electronic device 200 receives a user operation for changing the audio input state and / or the audio output state of the audio application 2, the audio application 2 can send the updated audio input state and / or the audio output state of the audio application 2 to the multi-device audio management module in the electronic device 200, i.e., the updated audio input state and / or the audio output state of the electronic device 200. Further, the multi-device audio management module in the electronic device 200 can send the updated audio input state and / or the audio output state of the electronic device 200 to the multi-device audio management module of the electronic device 100.

[0211] The multi-device audio management module of the electronic device 100 can synchronize the audio input state and the audio output state of the electronic device 200 with the audio application 1, so that the audio application 1 determines whether to hand over the audio from the electronic device 200 to the audio device 300 for playing, and determines whether to send the audio collected by the audio device 300 to the electronic device 200.

[0212] The above-mentioned audio application 1 can be an application that occupies the audio input port and / or the audio output port of the electronic device 100.

[0213] In some embodiments, the electronic device 100 can provide a control for controlling the audio input state and the audio output state of the electronic device 200. When the electronic device 100 receives a user operation for changing the audio input state and / or the audio output state of the electronic device 200, the multi-device audio management module in the electronic device 100 can send a message to update the audio input state and / or the audio output state to the multi-device audio management module of the electronic device 200. Further, the multi-device audio management module in the electronic device 200 can instruct the audio application 2 to update the audio input state and / or the audio output state of the audio application 2. For example, when the audio application 2 updates the audio output to the off state, the audio application 2 can stop outputting audio. That is, the electronic device 200 can stop sending audio to the electronic device 100.

[0214] In some embodiments, if the audio application 1 can be an application occupying the audio input port and the audio output port of the electronic device 100, the multi-device audio management module in the electronic device 100 can also synchronize the audio input state and the audio output state of the electronic device 100 with the audio application 1. Wherein, the audio input state of the electronic device 100 is the audio input state of the audio application 1. The audio output state of the electronic device 100 is the audio output state of the audio application 2. When the audio output of the electronic device 100 and the audio output of the electronic device 200 are both in the open state, the multi-device audio management module of the electronic device 100 can open the audio mixing module, so that the audio mixing module can mix the audio in the electronic device 100 and the audio in the electronic device 200. Optionally, in the case that the audio output of the electronic device 100 and / or the electronic device 200 is in the closed state, the multi-device audio management module of the electronic device 100 can close the audio mixing module.

[0215] In some embodiments, if the audio output of the electronic device 100 is in the open state and the audio output of the electronic device 200 is in the closed state, the audio application 1 in the electronic device 100 can send the audio stream to be played to the audio device 300 based on the audio transmission protocol. The audio application 1 can send the audio stream to be played to the audio device 300 through the audio output port. The above-mentioned audio stream to be played can include the audio to be played in the audio application 1. For example, if the audio application 1 is a music playing application, the audio to be played in the audio application 1 can include the audio corresponding to the music to be played. If the audio application 1 is a call application, the audio to be played in the audio application 1 can include the voice audio of the call opposite end of the electronic device 100. If the audio application is a conference application, the audio to be played in the audio application 1 can include the conference audio (i.e. the voice audio of other members in the conference) received after the electronic device 100 joins the conference. In this way, the audio device 300 can play the audio to be played in the audio application 1.

[0216] If the audio output of the electronic device 100 is in the off state and the audio output of the electronic device 200 is in the on state, the audio application 2 in the electronic device 200 can send the audio stream of the electronic device 200 to the electronic device 100 based on the audio transmission protocol. The audio stream of the electronic device 200 can be the audio to be played in the electronic device 200, i.e., the audio to be played in the audio application 2. Wherein, the audio application 2 can send the audio stream to be played to the electronic device 100 via the audio output port. When the electronic device 100 receives the audio stream of the electronic device 200, the audio application 1 in the electronic device 100 can obtain the audio stream of the electronic device 200 via the audio input port. The audio application 1 can send the audio stream to be played to the audio device 300 based on the audio transmission protocol. The audio stream to be played is the audio stream of the electronic device 200. In this way, the audio device 300 can play the audio to be played in the electronic device 200.

[0217] If the audio output of the electronic device 100 and the audio output of the electronic device 200 are both in the on state, the audio application 2 in the electronic device 200 can send the audio stream of the electronic device 200 to the electronic device 100 based on the audio transmission protocol. The audio application 1 in the electronic device 100 can obtain the audio stream of the electronic device 200. The audio application 1 can send the audio to be played in the audio application 1 and the audio to be played in the electronic device 200 to the audio mixing module for mixing. The audio mixing module can send the mixed audio to the audio application 1. Then, the audio application 1 can send the audio stream to be played to the audio device 300 based on the audio transmission protocol. The audio stream to be played is the mixed audio. In this way, the audio device 300 can play the audio to be played in the audio application 1 and the audio to be played in the audio application 2 at the same time.

[0218] If the audio input of the electronic device 100 is in the on state and the audio input of the electronic device 200 is in the off state, the electronic device 100 can instruct the audio device 300 to collect audio. The audio device 300 can send the audio stream collected by the audio device 300 to the electronic device 100 based on the audio transmission protocol. The audio application 1 in the electronic device 100 can obtain the audio stream collected by the audio device 300 via the audio input port. Since the audio input of the audio application 1 is in the on state, the audio application 1 can use the audio stream collected by the audio device 300 to realize the corresponding function.

[0219] If the audio input of the electronic device 100 is in the off state and the audio input of the electronic device 200 is in the on state, the electronic device 100 can instruct the audio device 300 to collect audio. The audio device 300 can send the audio stream collected by the audio device 300 to the electronic device 100 based on the audio transmission protocol. The audio application 1 in the electronic device 100 can obtain the audio stream collected by the audio device 300 via the audio input port. Since the audio input of the electronic device 200 is in the on state, the audio application 1 can send the audio stream collected by the audio device 300 to the electronic device 200 based on the audio transmission protocol. Wherein, the audio application 1 can send the audio stream collected by the audio device 300 to the electronic device 200 via the audio output port. When the electronic device 200 receives the audio stream collected by the audio device 300, the audio application 2 in the electronic device 200 can obtain the audio stream collected by the audio device 300 via the audio input port. Then, the audio application 2 can use the audio stream collected by the audio device 300 to implement the corresponding function.

[0220] In some embodiments, in the case that the audio input and the audio output of the electronic device 100 are both in the off state, if the audio application 1 is still in the running state (for example, running in the background), the electronic device 100 can still implement the audio stream transfer between the audio device 300 and the electronic device 200 through the audio application 1.

[0221] In the case that the audio input and the audio output of the electronic device 100 are both in the off state and the audio application 1 stops running, if there is another audio application in the running state in the electronic device 100, for example, the audio application 3, the electronic device 100 can switch the audio application for implementing the audio stream transfer between the audio device 300 and the electronic device 200 from the audio application 1 to the audio application 3.

[0222] If the audio input and the audio output of the electronic device 100 are both in the off state, and there is no audio application in the running state in the electronic device 100, the connection between the electronic device 100 and the electronic device 200 for using the audio device 300 is disconnected. The electronic device 200 can use its own audio input / output device for audio input / output. Alternatively, in the case that the electronic device 100 has no audio input / output service, the user can manually connect the audio device 300 with the electronic device 200. In response to the user operation of connecting the audio device 300 with the electronic device 200, the electronic device 200 can be connected with the audio device 300 and perform audio input / output through the audio device 300.

[0223] In some embodiments, a wireless connection is established between the electronic device 100 and the audio device 300. There is no audio application running in the electronic device 100. When the electronic device 200 needs to perform audio input / output, the electronic device 200 can search for the audio device in the surrounding. Among them, the electronic device 200 can search for the audio device 300. The electronic device 200 can establish a communication connection with the audio device 300 and perform audio input / output through the audio device 300. That is to say, in the case that the electronic device currently connected to the audio device 300 does not run an audio application, the electronic device 200 can preempt the audio device 300 and directly transmit an audio stream with the audio device 300.

[0224] As can be known from the above communication system 30, the electronic device 200 can realize audio input / output with the electronic device 100 through the electronic device 100 and the audio device 300 at the same time. When the audio output of the electronic device 100 and the electronic device 200 are both in an open state, the audio device 300 can simultaneously play the audio of the electronic device 100 and the audio of the electronic device 200. When the audio input of the electronic device 200 is in an open state, the electronic device 200 can obtain the audio collected by the audio device 300 through the electronic device 100. In the case that the electronic device 100 and the electronic device 200 share the audio device 300, the audio device 300 can keep connected with the electronic device 100 without frequently switching the connection between the electronic device 100 and the electronic device 200. In this way, not only the audio input / output demand of multiple electronic devices can be met in time based on one audio device, but also the interaction between the audio device and the multiple electronic devices can be simplified, the efficiency of audio transmission can be improved, and thus the user experience of listening to audio or collecting audio can be improved.

[0225] FIG. 3B exemplarily shows a schematic diagram of a communication system 40.

[0226] As shown in FIG. 3B, the communication system 40 can include an electronic device 100, an electronic device 200, and an audio device 300.

[0227] In some embodiments, the multi-device audio management module described above can be integrated in an audio application. Exemplarily, the electronic device 100 comprises an audio application 1. The multi-device audio management module is integrated in the audio application 1. The electronic device 200 comprises an audio application 2. The multi-device audio management module can also be integrated in the audio application 2. The audio application 1 and the audio application 2 can be the same application. For example, the audio application 1 and the audio application 2 can be the same conference application, or the same music application, and so on. Alternatively, the audio application 1 and the audio application 2 can be different audio applications. For example, the audio application 1 is a conference application, and the audio application 2 is a music application. The audio application 1 and the audio application 2 can be applications developed by the same application development company, or can be applications developed by different application companies.

[0228] The audio application 1 and the audio application 2 of the electronic device 100 can transmit audio streams. For example, the audio application 2 can send the audio to be played in the audio application 2 to the electronic device 100. The audio application 1 in the electronic device 100 can obtain the audio to be played in the audio application 2 through the audio input port. The audio application 1 can send the audio collected by the audio device 300 to the electronic device 200. The audio application 2 in the electronic device 200 can obtain the audio collected by the audio device 300 through the audio input port.

[0229] The multi-device audio management module in the audio application 1 and the multi-device audio management module in the audio application 2 can transmit control streams. The control streams described above can include information for indicating the audio input state and the audio output state of the electronic device 200. The audio application 1 can determine the audio input state and the audio output state of the electronic device 200 according to the multi-device audio management module integrated in the audio application 1, and then determine whether the audio collected by the audio device 300 needs to be streamed to the electronic device 200.

[0230] In some embodiments, in addition to the audio application 1, the electronic device 100 comprises other audio applications, such as an audio application 3 (not shown in the figure). The multi-device audio management module can also be integrated in the audio application 3. When the application occupying the audio input port and the audio output port of the electronic device 100 is switched from the audio application 1 to the audio application 3, the electronic device 100 can migrate the audio input state and the audio output state of the electronic device 200 to the multi-device audio management module in the audio application 3. The audio application 3 can transmit audio streams with the audio application 2 in the electronic device 200. The multi-device audio management module in the audio application 3 and the multi-device management module in the audio application 2 can transmit the control streams described above.

[0231] Exemplarily, the audio application 1 is a music playing application. The audio application 3 is a conference application. When the electronic device 100 plays music in the music playing application through the audio device 300, the audio to be played in the electronic device 200 can be transmitted to the audio device 300 via the music playing application in the electronic device 100. The audio device 300 can play the audio after mixing the music of the music playing application in the electronic device 100 and the audio to be played in the electronic device 200. If the conference application in the electronic device 100 accesses a conference, the conference application can preempt the audio input port and the audio output port. The music playing application in the electronic device 100 can pause playing the music. The electronic device 100 can play the conference audio of the conference application through the audio device 300. The audio to be played in the electronic device 200 can be transmitted to the audio device 300 via the conference application in the electronic device 100. The audio device 300 can play the audio after mixing the conference audio of the conference application in the electronic device 100 and the audio to be played in the electronic device 200. The multi-device audio management module integrated in the conference application of the electronic device 100 can transmit the control stream with the multi-device audio management module integrated in the audio application 2 of the electronic device 200.

[0232] Optionally, the audio application 1 can display the audio output state and the audio input state of the electronic device 200 according to the audio output state and the audio input state of the electronic device 200 obtained by the multi-device audio management module in the audio application 1 synchronously. The audio application 1 can also provide a control for controlling the audio output state and / or the audio input state of the electronic device 200. When the application occupying the audio input port and the audio output port in the electronic device 100 is switched to another application, for example, the audio application 3, the audio application 3 can display the audio output state and the audio input state of the electronic device 200 according to the audio output state and the audio input state of the electronic device 200 obtained by the multi-device audio management module in the audio application 3 synchronously. The audio application 3 can also provide a control for controlling the audio output state and / or the audio input state of the electronic device 200.

[0233] FIG. 3C exemplarily shows a schematic diagram of the communication system 50.

[0234] As shown in FIG. 3C, the communication system 50 can include the electronic device 100, the electronic device 200, and the audio device 300.

[0235] In some embodiments, the multi-device audio management module and the audio application described above can be independently arranged in the electronic device 100 and the electronic device 200. For example, the electronic device 100 includes an audio application 1 and a multi-device audio management module. The electronic device 200 includes an audio application 2 and a multi-device audio management module. The audio application 1 and the audio application 2 can be the same application. For example, the audio application 1 and the audio application 2 can be the same conference application, or the same music application, and the like. Alternatively, the audio application 1 and the audio application 2 can be different audio applications. For example, the audio application 1 is a conference application, and the audio application 2 is a music application. The audio application 1 and the audio application 2 can be applications developed by the same application development company, or can be applications developed by different application companies.

[0236] The multi-device audio management module in the electronic device 100 can determine that the electronic device 100 is connected with the audio device 300. The electronic device 200 can send a request for using the audio device to the electronic device 100 through the multi-device audio management module in the electronic device 200. In the case that the electronic device 100 agrees that the electronic device 200 uses the audio device 300, the electronic device 100 and the electronic device 200 can establish a communication connection through the respective multi-device audio management modules to transmit audio streams and control streams. The multi-device audio management module in the electronic device 100 can transmit control streams with the multi-device audio management module in the electronic device 200 to synchronize the audio input state and the audio output state of the electronic device 200.

[0237] The audio application 1 in the electronic device 100 and the audio application 2 in the electronic device 200 can transmit audio streams. The transmission of the audio streams between the audio application 1 and the audio application 2 can refer to the description of the foregoing embodiments.

[0238] The multi-device audio management module in the electronic device 100 can synchronize the audio input state and the audio output state of the electronic device 100 and the electronic device 200 with the audio application 1. In the case that the audio application 1 occupies the audio input port and the audio output port of the electronic device 100, the audio input state of the audio application 1 is the audio input state of the electronic device 100, and the audio output state of the audio application 1 is the audio output state of the electronic device 100.

[0239] The multi-device audio management module in the electronic device 200 can synchronize the audio input state and the audio output state of the electronic device 200 with the audio application 2.

[0240] In some embodiments, when the audio application occupying the audio input port and the audio output port in the electronic device 100 is switched to the audio application 3 (not shown in the figure), the multi-device audio management module in the electronic device 100 can synchronize the audio input state and the audio output state of the electronic device 100 and the electronic device 200 with the audio application 3. In the case where the audio application 3 occupies the audio input port and the audio output port of the electronic device 100, the audio input state of the audio application 3 is the audio input state of the electronic device 100, and the audio output state of the audio application 3 is the audio output state of the electronic device 100. Wherein, the application in the electronic device 100 that transmits the audio stream with the electronic device 200 can also be switched from the audio application 1 to the audio application 3.

[0241] Based on the above communication system and device structure, some audio transmission scenarios provided by the present application are introduced below.

[0242] FIGS. 4A-4E exemplarily show schematic diagrams of some audio transmission scenarios provided by the present application.

[0243] As shown in FIG. 4A, the electronic device 100 can display a user interface 410. The user interface 410 can be a user interface of a conference application. For example, the electronic device 100 accesses the conference 1 through the conference application. The user interface 410 can be a user interface for controlling and managing the conference 1.

[0244] The user interface 410 can include a conference time indicator 411, an open video control 412, a mute control 413, a share control 414, an invite control 415, an end control 416, and a search control 417.

[0245] The conference time indicator 411 can be used to indicate the duration of the current conference (e.g., the conference 1).

[0246] The open video control 412 can be used to trigger the electronic device 100 to open the camera to collect images. Wherein, the electronic device 100 can send the collected images to other electronic devices accessing the conference 1. In this way, the user of the electronic device 100 can have a video conference with other members participating in the conference 1.

[0247] The mute control 413 can be used to trigger the electronic device 100 to stop collecting audio. For example, the user of the electronic device 100 can open the mute through the mute control 413 without speaking in the conference 1. When the mute is opened, the voice of the user of the electronic device 100 can not be heard by other members participating in the conference 1.

[0248] Wherein, when the mute is opened, the audio input of the electronic device 100 is closed.

[0249] In some embodiments, the electronic device 100 has a communication connection established with the audio device 300. The electronic device 100 can perform audio input and audio output through the audio device 300. In response to the operation of the mute control 413, the electronic device 100 can instruct the audio device 300 to stop collecting audio.

[0250] The sharing control 414 can be used to trigger the electronic device 100 to perform screen sharing. In which, the electronic device 100 can send the shared screen content to other electronic devices accessing the conference 1. In this way, the user of the electronic device 100 can share the content displayed on the screen of the electronic device 100 to other members participating in the conference 1, so as to perform information presentation and explanation.

[0251] The invite control 415 can be used to invite members who have not accessed the conference 1 to join the conference 1.

[0252] The end control 416 can be used to end the conference 1.

[0253] The search control 417 can be used to search for electronic devices with audio devices connected in the periphery of the electronic device 100.

[0254] The electronic device 100 can receive audio sent by other electronic devices accessing the conference 1, and send the audio to the audio device 300. The audio device 300 can play the audio from the other electronic devices accessing the conference 1. In this way, the user of the electronic device 100 can listen to the speech of other members participating in the conference 1 through the audio device 300.

[0255] In the case of not being muted, the audio device 300 can collect audio, and send the collected audio to the electronic device 100. The electronic device 100 can send the audio collected by the audio device 300 to other electronic devices accessing the conference 1. The audio collected by the audio device 300 can include the voice of the user of the electronic device 100. In this way, other members participating in the conference 1 can hear the speech of the user of the electronic device 100.

[0256] Not limited to the above controls, the user interface 410 can also include more or less controls.

[0257] As shown in FIG. 4B, the electronic device 200 can display a user interface 420. The user interface 420 can be a user interface of a conference application. For example, the electronic device 200 accesses the conference 2 through the conference application. The user interface 420 can be a user interface for controlling and managing the conference 2.

[0258] The user interface 420 can include a conference time indicator 421, an open video control 422, a mute control 423, a sharing control 424, an invite control 425, an end control 426, and a search control 427.

[0259] The meeting time indicator 421 can be used to indicate the duration of the current meeting (e.g., meeting 2). The start video control 422 can be used to trigger the electronic device 200 to start the camera to capture images. The share control 424 can be used to trigger the electronic device 200 to perform screen sharing. The invite control 425 can be used to invite members who have not accessed the meeting 2 to join the meeting 2. The end control 426 can be used to end the meeting 2. These controls can refer to the aforementioned meeting time indicator 411, start video control 412, share control 414, invite control 415, and end control 416 of FIG. 4A.

[0260] The unmute control 423 can be used to trigger the electronic device 200 to capture audio. For example, the user of the electronic device 200 can unmute the unmute control 423 in the case of needing to speak in the meeting 2. When unmuted, the voice of the user of the electronic device 200 can be heard by other members participating in the meeting 2.

[0261] In this case, the audio input of the electronic device 200 is enabled when unmuted.

[0262] The search control 427 can be used to search for electronic devices that have audio devices connected thereto in the vicinity of the electronic device 200.

[0263] In response to an operation (e.g., a tap operation) on the search control 427 of FIG. 4B, the electronic device 200 can search for electronic devices that have audio devices connected thereto in the vicinity of the electronic device 200. For example, the electronic devices that have audio devices connected thereto in the vicinity of the electronic device 200 include the electronic device 100.

[0264] When the electronic device 100 is searched for, the electronic device 100 can display the prompt box 430 of FIG. 4C.

[0265] As shown in FIG. 4C, the prompt box 430 can include prompt information 431, a connect control 432, and a cancel control 433.

[0266] The prompt information 431 can be used to prompt the user to use the audio device 300 through the electronic device 100 to enable the audio input and the audio output of the electronic device 200. For example, the content of the prompt information 431 can include: the electronic device 100 is searched for, and connecting with the electronic device 100 will output the local audio through the audio device 300, and whether to connect. The content of the prompt information 431 is merely an example of the present application, and should not be construed as limiting the present application.

[0267] The connect control 432 can be used to trigger the electronic device 200 to request to establish a communication connection using the audio device 300 with the electronic device 100.

[0268] The cancel control 433 can be used to cancel the electronic device 200 from establishing a communication connection with the electronic device 100 using the audio device 300.

[0269] In some embodiments, in response to the operation on the connect control 432, the electronic device 200 can request to establish a communication connection with the electronic device 100 using the audio device 300. Optionally, the electronic device 100 can display a connection prompt. The connection prompt can include a control to agree to share the audio device 300 with the electronic device 200, and a control to refuse to share the audio device 300 with the electronic device 200. In this way, the user of the electronic device 100 can choose to agree or refuse the electronic device 200 to use the audio device 300.

[0270] When the electronic device 100 and the electronic device 200 establish a communication connection using the audio device 300, the electronic device 200 can send the audio to be played in the electronic device 200 to the audio device 300 through the electronic device 100. The audio device 300 can play the audio to be played in the electronic device 200. For example, in the case that the electronic device 200 accesses the conference 2, the audio to be played in the electronic device 200 can include the audio from other electronic devices accessing the conference 2. In this way, the user of the electronic device 200 can listen to the speeches of other members participating in the conference 2 through the audio device 300.

[0271] The electronic device 200 can also acquire the audio collected by the audio device 300 through the electronic device 100. The electronic device 200 can send the audio collected by the audio device 300 to other electronic devices accessing the conference 2. In this way, the user of the electronic device 200 can be heard by other members participating in the conference 2.

[0272] In some embodiments, the electronic device 100 and the electronic device 200 are different devices of the same user. A user can need to access multiple online conferences at the same time. For example, the user can use the electronic device 100 to access the conference 1, and use the electronic device 200 to access the conference 2. In the case that the electronic device 200 shares the audio device 300 with the electronic device 100 through the electronic device 100, the user can listen to the speeches of the members in the conference 1 and the speeches of the members in the conference 2 through the audio device 300 at the same time. Moreover, the user can also control the audio input state of the electronic device 100 and the electronic device 200 to speak in the conference 1 accessed by the electronic device 100 (i.e., the members participating in the conference 1 can hear the speech of the user of the electronic device 100) or in the conference 2 accessed by the electronic device 200 (i.e., the members participating in the conference 2 can hear the speech of the user of the electronic device 200).

[0273] In some embodiments, if a wireless connection is established between the electronic device 100 and the audio device 300, and there is no audio application in the running state in the electronic device 100, the electronic device 200 can display a control for connecting the audio device 300 in response to the operation on the search control 427 shown in FIG. 4B. In response to the control for connecting the audio device 300, the electronic device 200 can establish a communication connection with the audio device 300 and directly transmit an audio stream with the audio device 300. In this way, the electronic device 200 can not need to establish a communication connection with the electronic device 100, and thus not need to realize the flow of the audio stream between the audio device 300 and the electronic device 200 through the electronic device 100.

[0274] In some embodiments, there are multiple electronic devices connected with audio devices around the electronic device 200. In response to the operation on the search control 427 shown in FIG. 4B, the electronic device 200 can search for multiple electronic devices connected with audio devices. The electronic device 200 can provide options corresponding to the multiple electronic devices connected with audio devices, so that the user selects through which audio device to realize the audio input and the audio output of the electronic device 200.

[0275] Exemplarily, as shown in FIG. 4D, when multiple electronic devices connected with audio devices are searched, the electronic device 200 can display a prompt box 440. The prompt box 440 can include a device option 441, a device option 442, a device option 443, and a cancel control 444.

[0276] The device option 441 can be used to select the connection with the electronic device 100. The electronic device 100 is connected with the audio device 300. In the case where the electronic device 200 is connected with the electronic device 100, the electronic device 200 can use the audio device 300 for audio input and audio output.

[0277] The device option 442 can be used to select the connection with the electronic device with the device name of "Zhang San's mobile phone". The "Zhang San's mobile phone" is connected with the audio device with the device name of "Zhang San's earphone". In the case where the electronic device 200 is connected with the "Zhang San's earphone", the electronic device 200 can use the "Zhang San's earphone" for audio input and audio output.

[0278] The device option 443 can be used to select the connection with the electronic device with the device name of "Li Si's notebook computer". The "Li Si's notebook computer" is connected with the audio device with the device name of "Li Si's earphone". In the case where the electronic device 200 is connected with the "Li Si's notebook computer", the electronic device 200 can use the "Li Si's earphone" for audio input and audio output.

[0279] The electronic device 100, "Zhang San's mobile phone", and "Li Si's notebook computer" can all be electronic devices 200 searched for and connected with audio devices. The electronic device 200 can provide more or fewer device options corresponding to electronic devices connected with audio devices, not limited to the device options 441-443. The device names are only exemplary and should not be construed as limiting.

[0280] The cancel control 444 can be used to cancel the establishment of a communication connection with the other electronic device using the audio device.

[0281] In response to an operation, such as a click operation, on the device option 441, the electronic device 200 can display the device option 441 from the unselected state shown in FIG. 4D to the selected state shown in FIG. 4E.

[0282] In the case where the device option 441 is in the selected state, the electronic device 200 can display the connection control 445 in the prompt box 440. In response to an operation on the connection control 445, the electronic device 200 can establish a communication connection with the electronic device 100 using the audio device 300. In this way, the electronic device 200 can realize sharing of the audio device 300 with the electronic device 100 through the electronic device 100.

[0283] As can be seen, if there are multiple electronic devices connected with different audio devices around the electronic device 200, the user can select one electronic device as needed to establish a logical link for audio transmission with the audio device connected with the electronic device. The above embodiments can improve the user's experience of listening to audio and collecting audio. The user can autonomously select multiple electronic devices to share one audio device, so as to realize audio input / output of multiple electronic devices through one audio device.

[0284] In some embodiments, if the electronic device 200 searches for only one electronic device connected with an audio device, the electronic device 200 can directly establish a communication connection with the electronic device connected with the audio device searched for by the electronic device 200, so as to use the corresponding audio device for audio input and audio output. That is, the electronic device 200 can not need to display the prompt box 430 shown in FIG. 4C.

[0285] In some embodiments, after receiving the user operation for establishing a connection with one electronic device connected with an audio device shown in FIG. 4C-FIG. 4D, the electronic device 200 can further provide a related control for setting an audio input / output path, for the user to set the audio device connected with the electronic device connected with the electronic device 200 as an audio input device and / or an audio output device of the electronic device 200.

[0286] Exemplarily, the electronic device 200 is connected with the electronic device 100. The electronic device 100 is connected with the audio device 300. The electronic device 200 can provide: an audio input apparatus access control, an audio output apparatus access control, and an audio input and output apparatus access control.

[0287] In response to the operation of the audio input apparatus access control, the electronic device 200 can regard the audio device 300, with which a logical link is established, as only an audio input apparatus. Where the audio input of the electronic device 200 is turned on, the electronic device 200 can acquire the audio collected by the audio device 300 through the electronic device 100 to implement a corresponding audio input service. Where the audio output of the electronic device 200 is turned on, the electronic device 200 can play corresponding audio through its self-provided audio output apparatus (e.g., a loudspeaker or an earpiece of the electronic device 200, etc.). The electronic device 100 and the electronic device 200 can synchronize the audio input state of the electronic device 200, without synchronizing the audio output state of the electronic device 200. The electronic device 100 can provide a control for controlling the audio input state of the electronic device 200, without providing a control for controlling the audio output state of the electronic device 200.

[0288] In response to the operation of the audio output apparatus access control, the electronic device 200 can regard the audio device 300, with which a logical link is established, as only an audio output apparatus. Where the audio output of the electronic device 200 is turned on, the electronic device 200 can send the audio to be played to the audio device 300 through the electronic device 100 to implement a corresponding audio output service. Where the audio input of the electronic device 200 is turned on, the electronic device 200 can collect audio through its self-provided audio input apparatus (e.g., a microphone of the electronic device 200, etc.). The electronic device 100 and the electronic device 200 can synchronize the audio output state of the electronic device 200, without synchronizing the audio input state of the electronic device 200. The electronic device 100 can provide a control for controlling the audio output state of the electronic device 200, without providing a control for controlling the audio input state of the electronic device 200.

[0289] In response to the operation of the audio input and output device access control, the electronic device 200 can take the audio device 300 that has established a logical link therewith as an audio input device and an audio output device. Where the audio input of the electronic device 200 is turned on, the electronic device 200 can acquire the audio collected by the audio device 300 through the electronic device 100 to implement a corresponding audio input service. Where the audio output of the electronic device 200 is turned on, the electronic device 200 can send the audio to be played to the audio device 300 through the electronic device 100 to implement a corresponding audio output service. The audio input state and the audio output state of the electronic device 200 can be synchronized between the electronic device 100 and the electronic device 200. The electronic device 100 can provide a control for controlling the audio input state of the electronic device 200 and a control for controlling the audio output state of the electronic device 200.

[0290] The above embodiments can facilitate the user to set the audio input / output path of the electronic device 200 according to the needs, and improve the user experience.

[0291] It should be noted that the audio application that occupies the audio input port and the audio output port of the electronic device 200 can be other audio applications (such as a music application, a call application, etc.) other than the conference application. The search control 427 shown in FIG. 4B can be included on the user interface of one or more audio applications in the electronic device 200. That is, when the user uses one or more audio applications in the electronic device 200, the electronic device 200 can search for the electronic device that has connected the audio device in the surrounding through the search control 427. Optionally, the electronic device 200 can also provide the search control 427 on the user interface of a non-audio application (such as the setting interface of a setting application, a drop-down control interface, etc.). The electronic device 200 can search for the electronic device that has connected the audio device in the surrounding at any time (such as when no audio application is running), and establish a communication connection with the electronic device for using the audio device. When the electronic device 200 has a demand for audio input / audio output, the electronic device 200 can implement the audio input / audio output through the logical link with the audio device. The method for the electronic device 200 to provide the search control 427 is not limited in the embodiments of the present application.

[0292] FIGS. 5A-5G exemplarily show schematic diagrams of some audio transmission scenarios provided by the present application.

[0293] As shown in FIG. 5A, the electronic device 100 has a communication connection established with the electronic device 200. The electronic device 100 has a communication connection established with the audio device 300. Here, it is exemplarily described that the users using the electronic device 100, the electronic device 200, and the audio device 300 are all user 1. The electronic device 100 can display a user interface 510. The user interface 510 can refer to the description of the user interface 410 shown in the foregoing FIG. 4A. The electronic device 200 can display a user interface 520. The user interface 520 can refer to the description of the user interface 520 shown in the foregoing FIG. 4B.

[0294] The user interface 520 can include a mute control 521, and a local audio pause output control 522. The mute control 521 can indicate that the audio input of the electronic device 200 is in a closed state, which can refer to the description of the mute control 423 shown in the foregoing FIG. 4B. The local audio pause output control 522 can indicate that the audio output of the electronic device 200 is in an open state, and can be used to close the audio output of the electronic device 200.

[0295] The user interface 510 can include a mute control 511, a local audio pause output control 512, an electronic device 200 audio pause output control 514, and an electronic device 200 mute control 513. The mute control 511 can indicate that the audio input of the electronic device 100 is in an open state, which can refer to the description of the mute control 413 shown in the foregoing FIG. 4A. The local audio pause output control 512 can indicate that the audio output of the electronic device 100 is in an open state, and can be used to close the audio output of the electronic device 100. The electronic device 200 audio pause output control 514 can indicate that the audio output of the electronic device 200 is in an open state, and can be used to close the audio output of the electronic device 200. The electronic device 200 mute control 513 can indicate that the audio input of the electronic device 200 is in a closed state, and can be used to open the audio input of the electronic device 200.

[0296] In some embodiments, the electronic device 200 can send the current audio input state and the audio output state of the electronic device 200 to the electronic device 100. For example, the current audio input of the electronic device 200 is closed, and the audio output is open. The electronic device 100 can display the electronic device 200 mute control 513 according to the current audio input state of the electronic device 200, and display the electronic device 200 audio pause output control 514 according to the current audio output state of the electronic device 200.

[0297] It can be seen that the current audio outputs of the electronic device 100 and the electronic device 200 are both in an open state. The electronic device 200 can send an audio stream to the electronic device 100. For example, the electronic device 200 accesses conference 2. The electronic device 200 can receive audio from other electronic devices accessing conference 2. The audio stream sent by the electronic device 200 to the electronic device 100 can include the audio from the other electronic devices 2 accessing conference 2. The electronic device 100 accesses conference 1. The electronic device 100 can receive audio from other electronic devices accessing conference 1. The audio to be played in the electronic device 100 can include the audio from the other electronic devices accessing conference 1. The electronic device 100 can mix the audio stream of the electronic device 200 and the audio to be played in the electronic device 100, and send the mixed audio to the audio device 300. The audio device 300 can play the mixed audio. In this way, the user 1 can listen to the speeches of the members participating in conference 1 and the speeches of the members participating in conference 2 through the audio device 300 at the same time.

[0298] The embodiments of the present application do not limit the above-mentioned mixing method. For example, the audio device 300 includes a left earphone and a right earphone. The audio played by the left earphone can be the audio mixed with the audio stream of the electronic device 100 and the audio stream of the electronic device 200. The audio played by the right earphone can also be the audio mixed with the audio stream of the electronic device 100 and the audio stream of the electronic device 200. Alternatively, the left earphone plays the audio stream of the electronic device 100. The right earphone plays the audio stream of the electronic device 200.

[0299] The audio input of the electronic device 100 is open. The audio input of the electronic device 200 is closed. The electronic device 100 can instruct the audio device 300 to collect audio. The audio device 300 can send the collected audio stream to the electronic device 100. The conference application in the electronic device 100 can obtain the audio stream collected by the audio device 300, and send the audio stream collected by the audio device 300 to other electronic devices accessing conference 1. The audio stream collected by the audio device 300 can include the voice of the user (i.e., user 1) accessing conference 1 using the electronic device 100. In this way, the speeches of the user 1 can be heard by other members participating in conference 1. Among them, since the audio input of the electronic device 200 is closed, the electronic device 100 will not send the audio stream collected by the audio device 300 to the electronic device 200, so the speeches of the user 1 can not be heard by other members participating in conference 2.

[0300] As shown in FIG. 5B, in response to the operation on the unmuting control 521, the electronic device 200 can send a message that the electronic device 200 is unmuting to the electronic device 100 in addition to sending the audio stream to the electronic device 100.

[0301] As shown in FIG. 5C, according to the operation on the unmute control 521 described above, the electronic device 200 can replace the unmute control 521 with a mute control 523. The mute control 523 can indicate that the audio input of the electronic device 200 is in an open state, which can be referred to the mute control 413 shown in FIG. 4A described above. According to the message that the electronic device 200 is unmuted described above, the electronic device 100 can replace the electronic device 200 unmute control 513 with an electronic device 200 mute control 515. The electronic device 200 mute control 515 has the same function as the mute control 523, and can be used to trigger the electronic device 200 to open the mute (i.e., close the audio input).

[0302] Optionally, in the case that the electronic device 100 and the electronic device 200 share one audio device 300, at most one of the electronic device 100 and the electronic device 200 can have the audio input in an open state. Therefore, when the audio input of the electronic device 200 is open, the electronic device 100 can close the audio input. According to the message that the electronic device 200 is unmuted described above, the electronic device 100 can also replace the mute control 511 shown in FIG. 5B with an unmute control 516 shown in FIG. 5C. The unmute control 516 can indicate that the audio input of the electronic device 100 is in a closed state, and can be used to open the audio input of the electronic device 100.

[0303] As shown in FIG. 5C, the current audio outputs of the electronic device 100 and the electronic device 200 are both in an open state. The electronic device 200 can send the audio stream of the electronic device 200 to the electronic device 100. The audio stream of the electronic device 200 can be referred to the introduction of FIG. 5A. The electronic device 100 can mix the audio stream of the electronic device 200 with the audio to be played in the electronic device 100, and send the mixed audio to the audio device 300. The audio device 300 can play the mixed audio described above. In this way, the user 1 can listen to the speeches of the members participating in the conference 1 and the speeches of the members participating in the conference 2 through the audio device 300 at the same time.

[0304] The audio input of the electronic device 100 is closed. The audio input of the electronic device 200 is open. The audio device 300 can send the collected audio stream to the electronic device 100. The electronic device 100 can send the audio stream collected by the audio device 300 to the electronic device 200. The conference application in the electronic device 200 can obtain the audio stream collected by the audio device 300, and send the audio stream collected by the audio device 300 to other electronic devices accessing the conference 2. In this way, the voice of the user 1 can be heard by other members participating in the conference 2, but not heard by other members participating in the conference 1.

[0305] It can be seen that when user 1 wants to speak in conference 2, user 1 can open the audio input of electronic device 200 (i.e., un-mute) by un-muting control 521 or electronic device 200 un-muting control 513. When electronic device 200 opens the audio input, electronic device 100 can automatically close the audio input. In this way, the user operation can be simplified, and the user does not need to operate mute control 511 shown in FIG. 5B to close the audio input of electronic device 100. The above method can avoid the speech of user 1 in conference 2 being heard by the members in conference 1.

[0306] Similarly, when electronic device 100 opens the audio input, electronic device 100 can instruct electronic device 200 to close the audio input. In this way, user 1 can speak in conference 1 accessed by electronic device 100, and avoid the speech of user 1 being heard by the members in conference 2 accessed by electronic device 200.

[0307] Optionally, the audio outputs of electronic device 100 and electronic device 200 can be simultaneously in an open state. For example, after electronic device 100 receives the audio stream collected by audio device 300, the conference application in electronic device 100 can send the audio stream collected by audio device 300 to other electronic devices accessing conference 1. Electronic device 100 can also send the audio stream collected by audio device 300 to electronic device 200. The conference application in electronic device 200 can send the audio stream collected by audio device 300 to other electronic devices accessing conference 2. In this way, the members participating in conference 1 and the members participating in conference 2 can both hear the speech of user 1.

[0308] The audio outputs of electronic device 100 and electronic device 200 can be simultaneously in a closed state. When the audio outputs of electronic device 100 and electronic device 200 are both closed, electronic device 100 can instruct audio device 300 to stop collecting audio. For example, when user 1 does not need to speak in conference 1 and conference 2, user 1 can close the audio input of electronic device 100 (i.e., mute) by mute control 511 shown in FIG. 5B, and close the audio input of electronic device 200 by mute control 523 shown in FIG. 5C or electronic device 200 mute control 515.

[0309] In response to the operation of local audio pause output control 512 shown in FIG. 5D, electronic device 100 can replace local audio pause output control 512 with local audio continue output control 517 shown in FIG. 5E. Local audio continue output control 517 can indicate that the audio output of electronic device 100 is in a closed state, and can be used to open the audio output of electronic device 100.

[0310] As shown in FIG. 5E, the audio output of the electronic device 100 is off. The audio output of the electronic device 200 is on. The electronic device 200 can send the audio stream of the electronic device 200 to the electronic device 100. The electronic device 100 can send the audio stream of the electronic device 200 to the audio device 300. The audio device 300 can play the audio stream of the electronic device 200. The audio stream of the electronic device 200 can include the speech of the members of the conference 2. Wherein, the electronic device 100 can receive the audio from the electronic device accessing the conference 1. Since the audio output of the electronic device 100 is off, the electronic device 100 can not need to send the above-mentioned audio from the electronic device accessing the conference 1 to the audio device 300. In this way, the user can only listen to the speech of the members of the conference 2 through the audio device 300, but not the speech of the members of the conference 1.

[0311] In addition, the audio input of the electronic device 100 is off. The audio input of the electronic device 200 is on. The electronic device 100 can send the audio stream collected by the audio device 300 to the electronic device 200. For details, please refer to the foregoing description of FIG. 5C.

[0312] It needs to be explained that although the audio input and the audio output of the electronic device 100 are currently both off, there is still an audio application running in the electronic device 100 (for example, the conference application shown in FIG. 5E). Therefore, the electronic device 200 can maintain the connection with the electronic device 100, and realize the flow of the audio stream between the audio device 300 and the electronic device 200 through the electronic device 100. Wherein, the conference application in the electronic device 100 can obtain the audio stream of the electronic device 200, and send the audio stream of the electronic device 200 to the audio device 300. The conference application in the electronic device 100 can obtain the audio stream collected by the audio device 300, and send the audio stream collected by the audio device 300 to the electronic device 200.

[0313] In some embodiments, the electronic device 100 ends the conference 1 and ends the running of the conference application. In the case that there is no audio application running in the electronic device 100, the electronic device 100 uses the audio device 300 with the electronic device 200. The electronic device 200 can use its own audio input / output device for audio input / output. For example, after the conference 1 shown in FIG. 5E ends, the electronic device 100 ends the running of the conference application, and there is no other audio application running in the electronic device 100. The electronic device 100 can be disconnected with the electronic device 200. Then, the electronic device 200 can use its own audio output device (such as the speaker of the electronic device 200) to play the audio of the conference 2, and use its own audio input device (such as the microphone of the electronic device 200) to collect audio. Wherein, after the conference 1 in the electronic device 100 ends, the user can connect the audio device 300 with the electronic device 200. In this way, the electronic device 200 can directly transmit the audio stream with the audio device 300 to perform audio input / output services.

[0314] Wherein, in the case that the electronic device 200 is connected with the audio device 300 and there is an audio application running in the electronic device 200, if the electronic device 100 needs to perform audio input / output again, the electronic device 100 can be connected with the electronic device 200. The electronic device 100 can realize the flow of the audio stream between the audio device 300 and the electronic device 100 through the audio application in the electronic device 200.

[0315] As shown in FIG. 5F, in response to the operation of the electronic device 200 audio pause output control 514, the electronic device 100 can send a message to the electronic device 200 to pause the audio output of the electronic device 200.

[0316] As shown in FIG. 5G, according to the above operation of the electronic device 200 audio pause output control 514, the electronic device 100 can replace the operation of the electronic device 200 audio pause output control 514 with the electronic device 200 audio continue output control 518. The electronic device 200 audio continue output control 518 can indicate that the audio output of the electronic device 100 is in the off state, and can be used to turn on the audio output of the electronic device 200.

[0317] According to the above message of the electronic device 200 pausing the audio output, the electronic device 200 can turn off the audio output, and replace the local audio pause output control 522 shown in FIG. 5F with the local audio continue output control 524 shown in FIG. 5G. The local audio continue output control 524 has the same function as the electronic device 200 audio continue output control 518, and can be used to trigger the electronic device 200 to turn on the audio output. Wherein, when the audio output is turned off, the electronic device 200 can stop sending the audio stream of the electronic device 200 to the electronic device 100.

[0318] As the audio output of the electronic device 100 is on, the electronic device 100 can send the audio stream of the electronic device 100 to the audio device 300. The audio stream of the electronic device 100 can include the speech of the members of the conference 2. In this way, the user can only listen to the speech of the members of the conference 1 through the audio device 300, without listening to the speech of the members of the conference 2.

[0319] In addition, the audio input of the electronic device 100 is on. The audio input of the electronic device 200 is off. The conference application in the electronic device 100 can send the audio stream collected by the audio device 300 to the other electronic devices accessing the conference 1. For details, please refer to the foregoing description of FIG. 5A.

[0320] The electronic device 200 unmute control 513, the electronic device 200 audio pause output control 514 shown in FIG. 5B, the electronic device 200 mute control 515 shown in FIG. 5D, and the electronic device 200 audio continue output control 518 shown in FIG. 5G can include the state information (for example, the control icon, the text information in the control, etc.) of the electronic device 200. According to the electronic device 200 unmute control 513 and the electronic device 200 mute control 515, the user can know whether the audio input of the electronic device 200 is on. According to the electronic device 200 audio pause output control 514 and the electronic device 200 audio continue output control 518, the user can know whether the audio output state of the electronic device 200 is on. When the audio input of the electronic device 200 is on, the electronic device 100 can update the electronic device 200 unmute control 513 to the electronic device 200 mute control 515. When the audio output of the electronic device 200 is on, the electronic device 100 can update the electronic device 200 audio continue output control 518 to the electronic device 200 audio pause output control 514.

[0321] It should be noted that the above controls for turning on / off the audio input and the audio output of the electronic device 100, and the controls for turning on / off the audio input and the audio output of the electronic device 200 are only exemplary descriptions of the present application.

[0322] In some embodiments, the electronic device 100 can also store the audio input state information and the audio output state information of the electronic device 200. When the audio input state of the electronic device 200 changes, the electronic device 100 can update the audio input state information of the electronic device 200 stored in the memory. When the audio output state of the electronic device 200 changes, the electronic device 100 can update the audio output state information of the electronic device 200 stored in the memory.

[0323] As can be seen from the above scenario, the electronic device 200 can use the electronic device 100 to implement audio input / output with the audio device 300 at the same time as the electronic device 100. In the case where the electronic device 100 and the electronic device 200 both open the audio output, the audio device 300 can simultaneously play the audio of the electronic device 100 and the audio of the electronic device 200. The audio device 300 can maintain a connection with the electronic device 100 without frequently switching the connection between the electronic device 100 and the electronic device 200. The user can quickly listen to the audio in the electronic device 100 and / or the electronic device 200 and quickly input audio in the electronic device 100 and / or the electronic device 200 by opening or closing the audio input / output of the electronic device 100 and the electronic device 200. That is, the user can input in the electronic device connected with the audio device 300 or listen to the audio of the electronic device connected with the audio device 300 without waiting for the audio device 300 to complete the switching of the connection. The above method can simplify the interaction between the audio device 300 and multiple electronic devices, improve the efficiency of audio transmission, and thus improve the user experience of listening to audio or collecting audio.

[0324] FIG. 6 shows a flowchart of an audio transmission method provided by the present application.

[0325] If the electronic device 100 does not establish a communication connection with other electronic devices to use the audio device 300, the audio device 300 can be used only for audio input / output of the electronic device 100. After the electronic device 100 establishes a communication connection with other electronic devices to use the audio device 300, the audio device 300 can be used for audio input / output of multiple electronic devices.

[0326] Case 1: Only the electronic device 100 uses the audio device 300 for audio input / output.

[0327] S611: The electronic device 100 sends the audio a1 of the electronic device 100 to the audio device 300.

[0328] The audio a1 can be audio to be played by any one of the audio applications in the electronic device 100. For example, the electronic device 100 accesses the conference 1 through the conference application. The audio a1 can include audio sent by other electronic devices accessing the conference 1 to the electronic device 100. For another example, the electronic device 100 opens the music application. The audio a1 can include audio corresponding to the music being played in the music application. For another example, the electronic device 100 makes a voice call through the call application. The audio a1 can include audio sent by the opposite end of the call to the electronic device 100. The embodiments of the present application do not limit the above audio a1.

[0329] S612: The audio device 300 plays the audio a1.

[0330] S613, the audio device 300 collects the audio a2.

[0331] S614, the audio device 300 sends the audio a2 to the electronic device 100.

[0332] If the audio input of the electronic device 100 is on, the electronic device 100 can instruct the audio device 300 to collect the audio. The audio device 300 can send the collected audio a2 to the electronic device 100.

[0333] S615, the electronic device 100 implements function 1 based on the audio a2.

[0334] The audio application in the electronic device 100 that occupies the audio input port can obtain the audio a2 through the audio input port, and implement function 1 based on the audio a2. For example, the electronic device 100 accesses conference 1 through a conference application. The conference application can obtain the audio a2, and send the audio a2 to other electronic devices that access the conference 1. That is, function 1 can be a function of a user speaking in the conference 1. For another example, the electronic device 100 makes a voice call through a call application. The call application can obtain the audio a2, and send the audio a2 to a call peer. That is, function 1 can be a voice call function. For another example, the electronic device 100 opens a recording application. The recording application can obtain the audio a2, and save the audio a2 as a recording file. That is, function 1 can be a recording function. The embodiments of the present application do not limit the above function 1.

[0335] If the audio input of the electronic device 100 is off, the electronic device 100 can instruct the audio device 300 to stop collecting the audio.

[0336] Case two: the electronic device 100 and the electronic device 200 share the audio device 300 for audio input / output.

[0337] 1, the electronic device 100 and the electronic device 200 both output audio, and the electronic device 100 inputs audio.

[0338] S616, the electronic device 100 and the electronic device 200 establish a communication connection.

[0339] The electronic device 100 and the electronic device 200 can establish a communication connection for using the audio device 300. The electronic device 200 can use the audio device 300 with the electronic device 100 for audio input / output.

[0340] In a possible implementation, the electronic device 200 can discover the electronic device 100 connected with the audio device by using the discovery technology of the distributed soft bus. The electronic device 200 can establish a communication connection with the electronic device 100 by using the connection technology of the distributed soft bus. In this case, the electronic device 200 can send a request for using the audio device 300 to the electronic device 100. The electronic device 100 can agree or refuse the request for using the audio device 300. In the case that the electronic device 100 agrees to use the audio device 300, the electronic device 100 and the electronic device 200 can establish a communication connection for using the audio device 300. Then, the electronic device 100 and the electronic device 200 can transmit the audio stream and the control stream by using the transmission technology of the distributed soft bus. The embodiments of the present application do not limit the method for the electronic device 200 to discover the electronic device 100, establish a communication connection with the electronic device 100, and transmit data.

[0341] The scenario in which the electronic device 100 and the electronic device 200 establish a communication connection can refer to the scenario shown in FIGS. 4A-4E.

[0342] S617, the electronic device 200 receives a user operation 1 for starting the audio output of the electronic device 200 and stopping the audio input of the electronic device 200.

[0343] For example, referring to the scenario shown in FIGS. 5A-5G, the electronic device 200 accesses the conference 2 by using a conference application. The user operation 1 can include an operation on the local audio continue output control 524 shown in FIG. 5G and an operation on the mute control 523 shown in FIG. 5C.

[0344] For another example, the electronic device 200 includes a music application. The user operation 1 can include an operation for playing a specified music in the music application.

[0345] The embodiments of the present application do not limit the user operation 1.

[0346] S618, the electronic device 200 sends the audio input state and the audio output state of the electronic device 200 to the electronic device 100.

[0347] In this case, the audio input of the electronic device 200 is in a stopped state, and the audio output of the electronic device 200 is in a started state.

[0348] S619, the electronic device 200 sends the audio a3 of the electronic device 200 to the electronic device 100.

[0349] The audio a2 can be an audio to be played in any one of the audio applications of the electronic device 200. The audio a2 can refer to the description of the audio a1.

[0350] S620, the electronic device 100 mixes the audio a1 and the audio a3 to obtain an audio a4.

[0351] In a possible implementation, the electronic device 100 can provide options corresponding to multiple mixing modes. The electronic device 100 can mix the audio a1 and the audio a3 according to the mixing mode selected by the user. The embodiments of the present application do not limit the mixing mode.

[0352] S621, the electronic device 100 sends the audio a4 to the audio device 300.

[0353] S622, the audio device 300 plays the audio a4.

[0354] The steps S620 and S622 are optional. In a possible implementation, the electronic device 100 can not mix the audio a1 and the audio a3. Wherein, the electronic device 100 can send the audio a1 to the audio device 300. When receiving the audio a3, the electronic device 100 can send the audio a3 to the audio device 300. The audio a1 and the audio a3 can be transmitted to the audio device 300 as two different audio streams.

[0355] In a possible implementation, the electronic device 100 can provide corresponding controls to change the audio input state and the audio output state of the electronic device 200 according to the audio input state and the audio output state of the electronic device 200. For example, as known from the step S617, the electronic device 200 has currently opened the audio output and closed the audio input. The electronic device 100 can provide the electronic device 200 audio pause output control 514 and the electronic device 200 unmute control 513 shown in the foregoing FIG. 5A. In this way, the user can adjust the audio input state and the audio output state of the electronic device 100 on the electronic device 100, and also adjust the audio input state and the audio output state of the electronic device 200 on the electronic device 100.

[0356] The embodiments of the present application do not limit the control for changing the audio input state and the audio output state of the electronic device 200. In different audio applications, the control for changing the audio input state of the electronic device 200 can be different, and the control for changing the audio output state of the electronic device 200 can also be different. For example, if the audio output scene of the electronic device 200 is an audio playing scene, the control for changing the audio output state of the electronic device 200 can include a control for pausing playing music, a control for continuing playing music. If the audio output scene of the electronic device 200 is a video playing scene, the control for changing the audio output state of the electronic device 200 can include a control for pausing playing video, a control for continuing playing video. If the audio input scene of the electronic device 200 is a recording scene, the control for changing the audio input state of the electronic device 200 can include a control for pausing recording, a control for continuing recording.

[0357] S623, the audio device 300 collects the audio a5.

[0358] S624, the audio device 300 sends the audio a5 to the electronic device 100.

[0359] S625, the electronic device 100 implements function 1 based on the audio a5.

[0360] Since the audio input of the electronic device 200 is closed and the audio input of the electronic device 100 is opened, the electronic device 100 can not need to send the audio a5 to the electronic device 200. The method that the electronic device 100 implements function 1 based on the audio a5 can refer to the introduction of the foregoing step S615.

[0361] It needs to be explained that if the audio application of the electronic device 100 occupying the audio input port is different when receiving the foregoing audio a2 and the foregoing audio a5, the function implemented by the electronic device 100 based on the audio a2 can be different from the function implemented based on the audio a5. For example, if the electronic device 100 is accessing the conference 1 through the conference application when receiving the foregoing audio a2, the electronic device 100 can implement the function of the user speaking in the conference 1 based on the audio a2. If the electronic device 100 is conducting voice call through the call application when receiving the foregoing audio a5, the electronic device 100 can implement the voice call function based on the audio a2.

[0362] 2, the electronic device 100 and the electronic device 200 both output audio, and the electronic device 200 inputs audio.

[0363] S626, the electronic device 200 receives user operation 2, and the user operation 1 is used to open the audio input of the electronic device 200.

[0364] For example, referring to the scenario shown in FIGS. 5A-5G, the electronic device 200 accesses the meeting 2 through the meeting application. The user operation 2 can include the operation of releasing the mute control 521 shown in FIG. 5B.

[0365] For another example, the electronic device 200 includes a recording application. The user operation 2 can include the operation of starting recording in the recording application. Embodiments of the present application do not limit the user operation 2.

[0366] S627, the electronic device 200 sends the audio input state of the electronic device 200 to the electronic device 100.

[0367] The audio input of the electronic device 200 can be in an open state.

[0368] S628, the electronic device 100 determines that the electronic device 200 is a device for receiving audio according to the audio input state of the electronic device 200, and closes the audio input of the electronic device 100.

[0369] In a possible implementation, the electronic device 100 can update the control for changing the audio input state of the electronic device 200 according to the audio input state of the electronic device 200. For example, when receiving the audio input state of the electronic device 200 in step S627, the electronic device 100 can replace the electronic device 200 mute control 513 shown in FIG. 5B with the electronic device 200 mute control 515 shown in FIG. 5C.

[0370] When the audio input of the electronic device 100 is closed, the electronic device 100 can update the control for changing the audio input state of the electronic device 100. For example, the audio input scenario of the electronic device 100 is an online meeting scenario. When the audio input of the electronic device 100 is closed, the electronic device 100 can replace the mute control 511 shown in FIG. 5B with the release mute control 516 shown in FIG. 5C. Embodiments of the present application do not limit the control for changing the audio input state and the audio output state of the electronic device 100.

[0371] S629, the electronic device 200 sends the audio a3 of the electronic device 200 to the electronic device 100.

[0372] As known from the foregoing steps S617-S622, the audio output of the electronic device 200 is open. In the case that the electronic device 200 does not close the audio output, the electronic device 200 can continuously send the audio to be played in the electronic device 200, such as the audio a3, to the electronic device 100.

[0373] S630, the electronic device 100 mixes the audio a1 and the audio a3 to obtain the audio a4.

[0374] S631, the electronic device 100 sends the audio a4 to the audio device 300.

[0375] S632, the audio device 300 plays the audio a4.

[0376] S633, the audio device 300 collects the audio a6.

[0377] S634, the audio device 300 sends the audio a6 to the electronic device 100.

[0378] S635, the electronic device 100 sends the audio a6 to the electronic device 200.

[0379] Since the audio input of the electronic device 200 is turned on, the electronic device 100 can send the audio a6 to the electronic device 200.

[0380] S636, the electronic device 200 implements function 2 based on the audio a6.

[0381] The function 2 can refer to the introduction of the aforementioned function 1. Here, it will not be described again. Among them, since the audio input of the electronic device 100 is turned off, the audio application in the electronic device 100 can not need to use the audio a6 to implement the audio input function.

[0382] When the audio application occupying the audio input port in the electronic device 200 changes, the audio input function implemented by the electronic device 200 based on the audio a2 can also change accordingly.

[0383] It needs to be explained that in the step S628, when the audio input of the electronic device 200 is turned on, the audio input of the electronic device 100 is turned off, which is optional. For example, when the audio input of the electronic device 200 is turned on, the electronic device 100 can still keep the audio input of the electronic device 100 in the turned-on state. In this way, when the audio a2 is received, the electronic device 100 can implement the corresponding audio input function (such as the aforementioned function 1) based on the audio a6 in addition to the step S635.

[0384] In a possible implementation, the electronic device 100 can receive an operation for adjusting the audio input state and / or the audio output state of the electronic device 200. Then, the electronic device 100 can send a message for adjusting the audio input state and / or the audio output state to the electronic device 200. The electronic device 200 can adjust the audio input state and / or the output state according to the message.

[0385] For example, in a case where the audio input of the electronic device 200 is turned on, the electronic device 100 receives an operation for turning off the audio input of the electronic device 200. In response to the operation for turning off the audio input of the electronic device 200, the electronic device 100 can transmit a message for turning off the audio input to the electronic device 200. According to the message for turning off the audio input, the electronic device 200 can turn off the audio input. In this case, the electronic device 100 can replace a control for turning off the audio input of the electronic device 200 with a control for turning on the audio input of the electronic device 200. The electronic device 200 can also replace a control for turning off the audio input of the electronic device 200 with a control for turning on the audio input of the electronic device 200. In this way, a user can perform an operation on the electronic device 100 or the electronic device 200 to turn on the audio input of the electronic device 200 again.

[0386] For another example, in a case where the audio output of the electronic device 200 is turned on, the electronic device 100 receives an operation for turning off the audio output of the electronic device 200. In response to the operation for turning off the audio output of the electronic device 200, the electronic device 100 can transmit a message for turning off the audio output to the electronic device 200. According to the message for turning off the audio output, the electronic device 200 can turn off the audio output. In this case, the electronic device 100 can replace a control for turning off the audio output of the electronic device 200 with a control for turning on the audio output of the electronic device 200. The electronic device 200 can also replace a control for turning off the audio output of the electronic device 200 with a control for turning on the audio output of the electronic device 200. In this way, a user can perform an operation on the electronic device 100 or the electronic device 200 to turn on the audio output of the electronic device 200 again.

[0387] In some embodiments, the electronic device 100 and the electronic device 200 can adjust the audio input state / audio output state of the electronic device 100 and the electronic device 200 according to a preset policy. The preset policy can include an audio output policy and / or an audio input policy. In this way, it is not necessary for a user to manually adjust the audio input state / audio output state of the electronic device 100 and the electronic device 200.

[0388] In this case, the electronic device 100 can store a priority order of different audio output services and a priority order of different audio input services. The preset audio output policy can include turning on the audio output of an electronic device having the highest priority of an audio output service and turning off the audio output of other electronic devices when the electronic devices share the audio device 300 for audio output. The preset audio input policy can include turning on the audio input of an electronic device having the highest priority of an audio input service and turning off the audio input of other electronic devices when the electronic devices share the audio device 300 for audio input.

[0389] For example, the priority of the music playing service in the music application is lower than the priority of the voice call service in the call application. The electronic device 100 and the electronic device 200 share the audio device 300 for audio input / output. The audio output of the electronic device 100 is turned on, and the music of the music application in the electronic device 100 is played through the audio device 300. When the electronic device 200 answers the voice call, the electronic device 100 can turn on the audio input and the audio output. The electronic device 200 can send the audio of the voice call to the electronic device 100. The electronic device 100 can identify that the priority of the audio output service to which the audio to be played in the electronic device 200 belongs is higher than the priority of the music playing service in the electronic device 100. Therefore, the electronic device 100 can pause playing the music, i.e., turn off the audio output of the electronic device 100. The electronic device 100 can send the audio of the electronic device 200 to the audio device 300. In this way, if the user is listening to the music on the electronic device 100 using the audio device 300, and the electronic device 200 receives a voice call, the user can directly use the audio device 300 to answer the voice call on the electronic device 200 after answering the voice call. In addition, in order to avoid disturbing the user from answering the voice call on the electronic device 200, the electronic device 100 can automatically pause playing the music.

[0390] It should be noted that after adjusting the audio input state and / or the audio output state of the electronic device 100 and / or the electronic device 200 according to the above-mentioned preset strategy, the electronic device 100 and / or the electronic device 200 can also adjust the audio input state and / or the audio output state of the electronic device 100 and / or the electronic device 200 according to the operation of the user manually adjusting the audio input state and / or the audio output state. For example, the user can manually turn on the audio output of the electronic device with a low priority of the audio output service and turn off the audio output of the electronic device with a high priority of the audio output service as needed.

[0391] The above-mentioned audio output strategy and the audio input strategy are only exemplary descriptions of the present application and should not be construed as limiting the present application.

[0392] In some embodiments, after the electronic device 200 establishes a communication connection with the electronic device 100, the electronic device 200 can also switch to connect other electronic devices to use the audio device connected by the other electronic devices for audio input / output.

[0393] For example, in a case that the electronic device 200 and the electronic device 100 share the audio device 300 for audio input / output, the electronic device 200 can search for an electronic device that is connected with the audio device in the surrounding. Referring to the foregoing description of FIG. 4E, the electronic device 200 can also search for "Zhang San's mobile phone". The electronic device 200 can establish a communication connection with "Zhang San's mobile phone", so as to share "Zhang San's earphone" with "Zhang San's mobile phone" for audio input / output. After the electronic device 200 establishes the communication connection with "Zhang San's mobile phone", the electronic device 200 can send the audio to be played in the electronic device 200 to "Zhang San's mobile phone". "Zhang San's mobile phone" can play the audio to be played in the electronic device 200 by "Zhang San's earphone". The electronic device 200 can also acquire the audio collected by "Zhang San's earphone" through "Zhang San's mobile phone". In this way, the electronic device 200 can switch the audio device for audio input / output from the audio device 300 to "Zhang San's earphone".

[0394] As can be known from the foregoing method, the electronic device 200 can share the audio device 300 with the electronic device 100 for audio input / output by means of the electronic device 100. In a case that the electronic device 100 and the electronic device 200 both open the audio output, the audio device 300 can play the audio of the electronic device 100 and the audio of the electronic device 200 simultaneously. The electronic device 100 and the electronic device 200 can flexibly adjust the audio input state / audio output state according to the preset strategy and / or the user's operation of adjusting the audio input / output state. When adjusting the audio input state / audio output state of the electronic device 100 and the electronic device 200, the audio device 300 can maintain the connection with the electronic device 100 without frequently switching the connection between the electronic device 100 and the electronic device 200. In this way, the situation that the audio device 300 causes the time delay of audio transmission due to switching the connection of the electronic device can be avoided. The foregoing method can simplify the interaction between the audio device 300 and multiple electronic devices, improve the efficiency of audio transmission, and thus improve the user experience of listening to audio or collecting audio.

[0395] FIG. 7 exemplarily shows a flowchart of an audio transmission method provided in the present application.

[0396] S711, the electronic device 100 and the electronic device 200 establish a communication connection.

[0397] The step S711 can refer to the foregoing description of step S616 shown in FIG. 6.

[0398] S712, the electronic device 100 receives a user operation 3, and the user operation 3 is used to open the audio input and the audio output of the electronic device 200, and close the audio input and the audio output of the electronic device 100.

[0399] Electronic device 100 can turn off its audio input and audio output according to user operation 3. For example, electronic device 100 connects to conference 1 through a conferencing application. When both audio input and audio output of electronic device 100 are on, electronic device 100 can pass audio from other electronic devices connected to conference 1 to audio device 300 for playback, and send audio collected by audio device 300 to other electronic devices connected to conference 1. When audio input and audio output of electronic device 100 are turned off, electronic device 100 can stop sending audio from other electronic devices connected to conference 1 to audio device 300, and stop sending audio collected by audio device 300 to other electronic devices connected to conference 1.

[0400] In this setup, both audio input and audio output of electronic device 100 are turned off, but an audio application (such as a conferencing application) is still running on electronic device 100. Therefore, electronic device 200 can maintain a connection with electronic device 100 and enable the flow of audio streams between audio device 300 and electronic device 200 through the audio application running on electronic device 100.

[0401] S713, Electronic device 100 sends the audio input status and audio output status of electronic device 200 to electronic device 200.

[0402] In response to user operation 3 described above, electronic device 100 can send a message to electronic device 200 to adjust the audio input and audio output states. This message may include the adjusted audio input and audio output states of electronic device 200. Electronic device 200 can adjust the audio input and audio output states according to this message. For example, electronic device 200 can enable audio input and audio output.

[0403] S714, Electronic device 200 sends audio a3 of electronic device 200 to electronic device 100.

[0404] After the electronic device 200 turns on its audio output, it can send audio a3 to the electronic device 100. Audio a3 can be referred to the description in the foregoing embodiments.

[0405] S715, Electronic device 100 sends audio a3 to audio device 300.

[0406] Since the audio output of electronic device 100 is turned off, electronic device 100 can directly send audio a3 to audio device 300 without mixing.

[0407] S716, Audio device 300 plays audio a3.

[0408] S717, Audio Device 300 captures audio a7.

[0409] S718, the audio device 300 sends the audio a7 to the electronic device 100.

[0410] S719, the electronic device 100 determines that the electronic device 200 is a device receiving audio according to the audio input state of the electronic device 200.

[0411] S720, the electronic device 100 sends the audio a7 to the electronic device 200.

[0412] The electronic device 100 can store the latest audio input state of the electronic device 200. In the case that the current audio input of the electronic device 100 is turned on, the electronic device 100 can send the audio (for example, the audio a7) collected by the audio device 300 to the electronic device 200.

[0413] S721, the electronic device 200 implements function 2 based on the audio a7.

[0414] The function 2 can refer to the description of the foregoing embodiments. Here, no longer be described.

[0415] From the above method, the electronic device 200 can help the electronic device 100 to implement audio input / output with the electronic device 100 and the audio device 300 at the same time. In the case that the audio output of the electronic device 100 and the electronic device 200 are both turned on, the audio device 300 can play the audio of the electronic device 100 and the audio of the electronic device 200 at the same time. Among them, the audio device 300 can keep connected with the electronic device 100, without the need to frequently switch the connection between the electronic device 100 and the electronic device 200. The user can quickly listen to the audio in the electronic device 100 and / or the electronic device 200 and quickly input audio in the electronic device 100 and / or the electronic device 200 by turning on or off the audio input / output of the electronic device 100 and the electronic device 200. That is, the user can not need to wait for the audio device 300 to complete the switching of the connection before inputting or listening to the audio of the electronic device connected by the audio device 300. The above method can simplify the interaction between the audio device 300 and multiple electronic devices, improve the efficiency of audio transmission, and thus improve the user experience of listening to audio or collecting audio.

[0416] FIG. 8 exemplarily shows a flowchart of an audio transmission method provided by the present application.

[0417] S811, the first device sends a first audio to an audio device, the first audio being an audio of a first audio application in the first device.

[0418] The first device can be the electronic device 100 in the foregoing embodiments. The audio device can be the audio device 300 in the foregoing embodiments. A communication connection is established between the first device and the audio device. The first device can perform audio input service and / or audio output service in the first device through the audio device.

[0419] For example, a first audio application in the first device has first audio to be played. The first device can send the first audio to the audio device. The audio device can play the first audio. The first audio application can refer to the introduction of the audio application 1 in the embodiments.

[0420] The first audio can refer to the audio stream of the electronic device 100 shown in FIG. 5G of the present application. The second audio can refer to the audio stream collected by the audio device 300 shown in FIG. 5C of the present application.

[0421] S812, the first device receives the second audio collected by the audio device, and sends the second audio to the second device.

[0422] The first device can establish a communication connection with the second device. The second device can be the electronic device 200 in the foregoing embodiments. The process that the first device establishes a communication connection with the second device can refer to the scenarios shown in FIGS. 4A-4E.

[0423] The first audio input service in the second device is in a proceeding state. The first audio input service can include services such as recording, sending a voice message, voice call and the like that need to collect audio. The embodiments of the present application do not limit the type of the first audio input service. The second device can obtain the second audio collected by the audio device based on the logical link that the first device establishes with the audio device for audio transmission.

[0424] S813, the second device uses the second audio as audio input of the first audio input service.

[0425] For example, the first audio input service is a voice call. The second device can send the second audio to a device at the opposite end of the voice call. Alternatively, the first audio input service is recording. The second device can save the second audio as a recording file.

[0426] It can be seen that the audio device can meet the audio output demand of the first device and the audio input demand of the second device at the same time while maintaining the connection with the first device. The above method not only can facilitate a user to use one audio device to simultaneously realize audio input / audio output of multiple electronic devices, improve the user experience of listening to audio or collecting audio, but also can simplify the interaction between the audio device and multiple electronic devices, and improve the efficiency of audio transmission.

[0427] In some embodiments, the second audio application in the second device has third audio to be played. The second device can send the third audio to the first device. The first device can mix the first audio and the third audio to obtain fourth audio. The first device can send the fourth audio to the audio device. The audio device can play the fourth audio. In this way, the user can listen to the audio to be played in the first device and the second device simultaneously through the audio device. Moreover, in the above process, the audio device can always keep connected with the first device, without switching the connection between the first device and the second device. This can improve the efficiency of audio transmission.

[0428] In some embodiments, when the first audio application in the first device stops playing the first audio, the first device can stop sending the first audio to the audio device. If the second audio application in the second device still has third audio to be played, the second device can continue to send the third audio to the first device. The first device can send the third audio to the audio device without mixing. The audio device can play the third audio.

[0429] In some embodiments, the second device can receive an operation for controlling the second device to turn on or turn off the audio output. Optionally, the first device can receive an operation for controlling the second device to turn on or turn off the audio output, and instruct the second device to turn on or turn off the audio output based on the operation. For details, refer to the scenarios shown in FIGS. 5A-5G.

[0430] In some embodiments, the second audio input service in the first device can be in a proceeding state. The first device can use the second audio collected by the audio device as the audio input of the second audio input service. The second audio input service can include recording, sending a voice message, voice call, and other services that need to collect audio. The embodiments of the present application do not limit the type of the second audio input service.

[0431] In some embodiments, the second audio input service in the first device can be in a proceeding state. The first device can use the second audio collected by the audio device as the audio input of the second audio input service. The second audio input service can include recording, sending a voice message, voice call, and other services that need to collect audio. The embodiments of the present application do not limit the type of the second audio input service.

[0432] Or, in the case that the first device uses the second audio for the second audio input service, if the second device opens the audio input, the first device can stop the second audio input service and send the second audio to the second device. The second device can use the second audio for the first audio input service. Or, in the case that the first device sends the second audio to the second device, and the second device uses the second audio for the first audio input service, if the first device opens the audio input, the first device can stop sending the second audio to the second device, and the second device can stop the first audio input service or use the audio collected by the audio input device of the second device for the first audio input service. The first device can use the second audio for the second audio input service.

[0433] The second device can receive an operation for controlling the second device to open or close the audio input. Optionally, the first device can receive the operation for controlling the second device to open or close the audio input, and instruct the second device to open or close the audio input based on the operation. For details, refer to the scenarios shown in FIGS. 5A-5G.

[0434] It can be seen that the second device can use the first device to implement audio input / output with the audio device at the same time as the first device. When the first device and the second device both have audio output requirements, the audio device can play the audio of the electronic device 100 and the audio of the second device at the same time. In the case that multiple electronic devices share the audio device, the audio device can maintain connection with the first device without frequent switching of connection between the first device and the second device. The above method not only can timely meet the audio input / output requirements of multiple electronic devices based on one audio device, but also can simplify the interaction between the audio device and the multiple electronic devices and improve the efficiency of audio transmission, thereby improving the user experience of listening to audio or collecting audio.

[0435] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the above-mentioned various method embodiments.

[0436] The embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program runs on a processor, the steps in the above-mentioned various method embodiments can be implemented.

[0437] The embodiment of the present application further provides a chip system, which includes a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit the processing circuit. The processing circuit is used to run the code instructions so that the chip system implements the steps of any method embodiment of the present application. The chip system can be a single chip or a chip module composed of multiple chips.

[0438] It can be understood that the various user interfaces described in the embodiments of the present application are only example interfaces, and do not constitute a limitation on the scheme of the present application. In other embodiments, the user interface can have a different interface layout, can include more or fewer controls, can add or reduce other function options, as long as the same inventive idea is provided based on the present application, it is within the scope of the present application.

[0439] It should be noted that any feature or any part of any feature in any embodiment of the present application can be combined, and the combined technical solution is also within the scope of the embodiments of the present application, without causing contradiction or conflict.

[0440] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An audio transmission method, characterized by, The method is applied to a communication system comprising a first device and a second device, the first device being connected with an audio device, and the method comprises: The first device sends first audio to the audio device, the first audio being audio of a first audio application in the first device; The first device receives second audio collected by the audio device and sends the second audio to the second device; The second device uses the second audio as audio input of a first audio input service.

2. The method of claim 1, wherein, The method further comprises: The second device sends third audio to the first device, the third audio being audio of a second audio application in the second device; The first device mixes the first audio and the third audio to obtain fourth audio; The first device sends the fourth audio to the audio device.

3. The method of claim 1, wherein, The method further comprises: The first device receives a first operation for stopping playing the first audio; In response to the first operation, the first device stops sending the first audio to the audio device; The second device sends third audio to the first device, the third audio being audio of a second audio application in the second device; The first device sends the third audio to the audio device.

4. The method according to claim 2 or 3, characterized in that, The method further comprises: The second device receives a second operation for stopping playing the third audio; In response to the second operation, the second device stops sending the third audio to the first device; Alternatively, The first device receives a third operation on a first control for controlling an audio output state of the second device, the third operation being for turning off the audio output of the second device; In response to the third operation, the first device sends a second message to the second device, the second message being for instructing the second device to turn off the audio output; According to the second message, the second device stops sending the third audio to the first device.

5. The method of claim 4, wherein, The first device displays first state information for indicating that the audio output of the second device is turned on; the method further comprises: In response to the second operation, the second device sends a first message to the first device, the first message being for indicating that the second device has turned off the audio output; According to the first message, the first device updates the first state information to second state information, the second state information being for indicating that the audio output of the second device is turned off.

6. The method according to any one of claims 1-5, characterized in that, Before the first device sends the second audio to the second device, the method further comprises: The second device receives a fourth operation for turning on the audio input of the second device; In response to the fourth operation, the second device sends a third message to the first device, the third message being for indicating that the second device has turned on the audio input; Alternatively, The first device receives a fifth operation on a second control for controlling an audio input state of the second device, the fifth operation being for turning on the audio input of the second device; In response to the fifth operation, the first device sends a fourth message to the second device, the fourth message being used to instruct the second device to turn on the audio input.

7. The method of claim 6, wherein, The first device displays third status information, the third status information being used to indicate that the audio input of the second device is turned off; and the method further comprises: According to the third message, the first device updates the third status information to fourth status information, the fourth status information being used to indicate that the audio input of the second device is turned on.

8. The method according to any one of claims 1-7, characterized in that, The method further comprises: The first device uses the second audio as audio input of a second audio input service.

9. The method of claim 8, wherein, Before the first device sends the second audio to the second device, the second audio input service of the first device is in a proceeding state; After the first device sends the second audio to the second device, the method further comprises: The first device stops the second audio input service from proceeding.

10. The method of any one of claims 1-9, wherein, After the second device uses the second audio as audio input of a first audio input service, the method further comprises: The first device receives a sixth operation, the sixth operation being used to turn on the audio input of the first device; In response to the sixth operation, the first device uses the second audio as audio input of a second audio input service, stops sending the second audio to the second device, and sends a fifth message to the second device, the fifth message being used to instruct the second device to turn off the audio input; According to the fifth message, the second device stops the first audio input service from proceeding.

11. The method according to any one of claims 1-9, characterized in that, After the second device uses the second audio as audio input of a first audio input service, the method further comprises: The second device receives a seventh operation, the seventh operation being used to turn off the audio input of the second device; In response to the seventh operation, the second device stops the first audio input service from proceeding, and sends a sixth message to the first device, the sixth message being used to indicate that the second device has turned off the audio input; According to the sixth message, the first device stops sending the second audio to the second device; Or, The first device receives an eighth operation on a third control, the third control being used to control the audio input state of the second device, the eighth operation being used to turn off the audio input of the second device; In response to the eighth operation, the first device stops sending the second audio to the second device, and sends a seventh message to the second device, the seventh message being used to instruct the second device to turn off the audio input; According to the seventh message, the second device stops the first audio input service from proceeding.

12. An audio transmission method, characterized by, The method is applied to a first device, the first device being connected with an audio device, and the method comprises: The first device sends a first audio to the audio device, the first audio being audio of a first audio application in the first device; The first device receives second audio collected by the audio device, and sends the second audio to the second device.

13. The method of claim 12, wherein, The method further includes: The first device receives third audio of the second device, the second audio being different from the first audio; The first device mixes the first audio and the third audio to obtain fourth audio; The first device sends the fourth audio to the audio device.

14. The method of claim 12, wherein, The method further includes: The first device receives a first operation for stopping playing the first audio; In response to the first operation, the first device stops sending the first audio to the audio device; The first device receives third audio of the second device, the second audio being different from the first audio; The first device sends the third audio to the audio device.

15. The method according to claim 13 or 14, characterized in that, The first device displays first status information indicating that the second device has opened audio output; the method further includes: The first device receives a first message from the second device, the first message indicating that the second device has closed audio output; According to the first message, the first device updates the first status information to second status information indicating that the second device has closed audio output.

16. The method according to claim 13 or 14, characterized in that The first device displays a first control for controlling the audio output state of the second device; the method further includes: The first device receives a third operation on the first control, the third operation being for closing the audio output of the second device; In response to the third operation, the first device sends a second message to the second device, the second message indicating that the second device closes audio output.

17. The method according to any one of claims 12-16, characterized by, Before the first device sends the second audio to the second device, the method further includes: The first device receives a third message from the second device, the third message indicating that the second device has opened audio input; Or, The first device receives a fifth operation on a second control for controlling the audio input state of the second device, the fifth operation being for opening the audio input of the second device; In response to the fifth operation, the first device sends a fourth message to the second device, the fourth message indicating that the second device opens audio input.

18. The method of claim 17, wherein, The first device displays third status information indicating that the second device has closed audio input; the method further includes: According to the third message, the first device updates the third status information to fourth status information indicating that the second device has opened audio input.

19. The method of any one of claims 12-18, wherein, The method further includes: The first device uses the second audio as audio input of a second audio input service.

20. The method of claim 19, wherein, Before the first device sends the second audio to the second device, the second audio input service of the first device is in a running state; After the first device sends the second audio to the second device, the method further includes: The first device stops sending the second audio to the second device.

21. The method of any one of claims 12-20, wherein, After the first device sends the second audio to the second device, the method further includes: The first device receives a sixth operation for starting audio input of the first device; In response to the sixth operation, the first device stops sending the second audio to the second device using the second audio as audio input of a second audio input service, and sends a fifth message to the second device, the fifth message being used to instruct the second device to close audio input.

22. The method of any one of claims 12-20, wherein, After the sending of the second audio to the second device, the method further includes: The first device receives a sixth message of the second device, the sixth message being used to instruct the second device to have closed audio input; According to the sixth message, the first device stops sending the second audio to the second device; Or, The first device receives an eighth operation on a third control, the third control being used to control audio input state of the second device, the eighth operation being used to close audio input of the second device; In response to the eighth operation, the first device stops sending the second audio to the second device, and sends a seventh message to the second device, the seventh message being used to instruct the second device to close audio input.

23. An electronic device, comprising: The electronic device includes a memory and a processor, wherein the memory is used to store a computer program; the processor executes the computer program to implement the method of any one of claims 12-22.

24. A computer readable storage medium storing instructions, the instructions comprising: The instructions are executed by the processor to implement the method of any one of claims 12-22.

25. A computer program product, characterised in that, The computer program product contains computer instructions, which are executed by the processor to implement the method of any one of claims 12-22.

Citation Information

Patent Citations

  • Cross-device audio data transmission method and electronic device

    CN116137639A

  • Audio playing method and related device

    CN117149128A

  • Audio output method and terminal device

    WO2021147406A1