Call method, electronic equipment, storage medium and chip system
Patent Information
- Application Number
- CN202480038079.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2026-02-13
AI Technical Summary
If an electronic device experiences call abnormalities during a call, such as a silent call, it is mainly because the session parameters were not fully set during the call setup process.
Do not set session parameters before the call path is established. Set complete session parameters after the call path is established, including sound card device switching and audio stream management, to ensure that the call proceeds normally.
It alleviated call anomalies, improved the user experience, and prevented downlink silence during calls.
Smart Images

Figure CN121533004A_ABST
Abstract
Description
Call method, electronic device, storage medium and chip system TECHNICAL FIELD
[0001] Embodiments of the present application relate to the terminal field, and in particular to a call method, an electronic device, a storage medium and a chip system. BACKGROUND
[0002] With the development of terminal technology, the functions of electronic devices are becoming richer and richer. As a basic function, most electronic devices have a call function.
[0003] At present, electronic devices have abnormal call situations.
[0004] SUMMARY
[0005] Therefore, embodiments of the present application provide a call method, an electronic device, a storage medium and a chip system, which can alleviate the abnormal call situation of the electronic device and improve the user experience.
[0006] In a first aspect, a call method is provided, which can be applied to an electronic device such as a mobile phone. The method comprises: after a first call is hung up, the electronic device creates a first audio stream. Next, at a first time point, the electronic device starts a second call after creating the first audio stream. Then, at a second time point, the electronic device closes the first audio stream; the second time point is later than the first time point; wherein, after the first time point and before the second time point, the sound card device of the electronic device is a first device. At a third time point, the electronic device sets the sound card device to a second device; the third time point is later than the second time point. Next, at a fourth time point, the electronic device completes the call path establishment, and before the fourth time point, the electronic device does not set the session parameter; the fourth time point is later than the third time point. After the fourth time point, the electronic device sets the session parameter. Next, the electronic device transmits voice data of the second call.
[0007] The sound card device of the electronic device can be understood as a device that the electronic device is currently using to play / capture sound. The first call can be hung up by the electronic device, or it can be hung up by another electronic device in communication with the electronic device. The call path can be the call path of the second call, which is used to transmit voice data of the second call. That is, the electronic device can transmit voice data of the second call through the call path. The electronic device starting the second call can be sending a message specified in the communication protocol in a manner specified in the communication protocol. For example, the electronic device sends an INVITE message of the second call. For another example, the electronic device receives an INVITE message of the second call, and then the electronic device sends a 200 OK message for the INVITE.
[0008] In the method, the electronic device does not set the session parameters before the call path is established, for example, before the fourth time point. In this way, the electronic device can set complete session parameters after the call path is established, can alleviate the call abnormality of the electronic device, and can improve the user experience.
[0009] In a possible design of the first aspect, the method further includes: after the first call is hung up, the electronic device creates a second audio stream, and the electronic device creating the second audio stream is performed before the electronic device creating the first audio stream. Next, after the first time point, the electronic device sets the sound card device to the second device. Then, after the first time point and before the second time point, the electronic device closes the second audio stream, and after the second audio stream is closed, the electronic device sets the sound card device to the first device.
[0010] Optionally, the state change of the audio stream is open or close, which causes the electronic device to reset the sound card device. Optionally, after the electronic device creates the second audio stream, the electronic device sets the sound card device of the electronic device to the first device corresponding to the second audio stream based on the state of the second audio stream changing to open. Then, optionally, at the first time point, the second call is started, and the electronic device creates an audio stream of the second call. The electronic device sets the sound card device of the electronic device to the second device corresponding to the audio stream of the second call based on the state of the audio stream of the second call changing to open. Optionally, because the audio stream of the call has a higher priority, the device corresponding to the audio stream of the call can also have a higher priority than the device corresponding to the audio stream of the prompt tone, so that the sound card device is set to the second device with a higher priority when the audio stream of the call (i.e., the second call audio stream) is determined to be open. Next, optionally, after the electronic device closes the second audio stream, the electronic device acquires the first audio stream and does not acquire the audio stream of the second call based on the state of the second audio stream changing to close. The electronic device sets the sound card device to the first device corresponding to the first audio stream. Optionally, closing the second audio stream causes the electronic device to reset the sound card device. Because the audio stream of the second call has not been completely established, the audio stream of the second call cannot be acquired, it is determined that there is no audio stream of the call and there is the first audio stream, so the sound card device is set to the first device corresponding to the first audio stream. Then, optionally, at the third time point, after the electronic device closes the first audio stream, the electronic device acquires the audio stream of the second call based on the state of the first audio stream changing to close. The electronic device sets the sound card device to the second device corresponding to the audio stream of the second call. Optionally, at the third time point, because the audio stream of the second call is acquired, the sound card device is set to the first device with a higher priority. In a possible design of the first aspect, no muting is performed during a time period between the third time point and a fourth time point. The above no muting can be no muting of the second device. Here, only an example is described, and the sound card device setting or switching described in other descriptions in the solution can be referred to the explanation and description herein.
[0011] In this design, the electronic device does not set the mute before the call path is established, which can avoid the phenomenon that the mute cannot be cancelled after the call path is established, can alleviate the phenomenon that the call downlink is silent, and can improve the user experience.
[0012] In a possible design of the first aspect, the call path includes a sending path and a receiving path, and the method further includes: the electronic device opening the sending path and opening the receiving path. The electronic device completing the call path establishment includes: in the case of exiting the opening of the receiving path, exiting the opening of the sending path. Alternatively, the electronic device completing the call path establishment includes: in the case of exiting the opening of the sending path, exiting the opening of the receiving path. It can be understood that, at the fourth time point, completing the call path establishment means that, at the fourth time point, the opening of the receiving path is exited and the opening of the sending path is exited; it should not be understood that the opening of the receiving path and the opening of the sending path are both exited at the fourth time point. The exiting of the opening of the sending path can be understood as that the process of opening the sending path is completed. Alternatively, the electronic device exits the function of opening the sending path. The exiting of the opening of the receiving path can be understood as that the process of opening the receiving path is completed. Alternatively, the electronic device exits the function of opening the receiving path.
[0013] In another possible design of the first aspect, the method further includes: between the first time point and the second time point, exiting the opening of the receiving path.
[0014] In another possible design of the first aspect, the method further includes: based on starting the second call, creating an audio stream of the second call. Subsequently, setting the sound card device as the second device after the first time point includes: based on creating the audio stream of the second call, setting the sound card device as the second device after the first time point.
[0015] In another possible design of the first aspect, the electronic device starting the second call includes: the electronic device answering the second call made by the other electronic device, for example, the electronic device receiving an INVITE message of the second call, and then the electronic device sending a 200 OK message for the INVITE. Alternatively, the electronic device starting the second call includes: the electronic device making the second call to the other electronic device, for example, the electronic device sending an invitation (INVITE) message of the second call.
[0016] In another possible design of the first aspect, the device names of the first device and the second device are different, or the device parameters of the first device and the second device are different. The device parameters include one or more of a code rate, a bit rate, a sampling rate, and a bit width.
[0017] In another possible design of the first aspect, before the fourth time point, based on the audio stream of the second call being in an initialization state, no session parameter is set. And / or, before the fourth time point, based on the audio stream of the second call being in the initialization state, no muting is performed.
[0018] In another possible design of the first aspect, after the fourth time point, the electronic device sets session parameters, including: after the fourth time point, acquiring the current state of the audio stream of the second call. Then, the electronic device determines that the current state of the audio stream of the second call is not the initialization state and sets the session parameters for the second call.
[0019] In another possible design of the first aspect, the electronic device includes an application processor, a modem processor, and an audio digital signal processor. The aforementioned setting of session parameters for the second call includes: the application processor sending the session parameters of the second call to the modem processor via the audio digital signal processor.
[0020] In a second aspect, an electronic device is provided, comprising a processor and a memory; the processor and the memory are coupled; the memory is used to store computer program code; the computer program code includes computer instructions, which, when executed by the processor, cause the electronic device to perform the method provided by the first aspect and any possible design of the first aspect.
[0021] In one possible design of the second aspect, the processor may include an application processor, a modem processor, and an audio digital signal processor.
[0022] Thirdly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform the methods provided by the first aspect and any possible design of the first aspect.
[0023] Fourthly, a computer program product containing instructions is provided, which, when run on an electronic device, enables the electronic device to perform the methods provided by the first aspect and any possible design of the first aspect.
[0024] Fifthly, a chip system is provided, comprising at least one processor and an interface circuit, wherein the at least one processor and the interface circuit are connected. The processor is configured to create a first audio stream after a first call is ended. The processor is also configured to initiate a second call at a first time point after creating the first audio stream. The processor is further configured to close the first audio stream at a second time point; the second time point is later than the first time point; wherein, after the first time point and before the second time point, the sound card device of the electronic device is the first device. The processor is further configured to set the sound card device as the second device at a third time point; the third time point is later than the second time point. The processor is further configured to complete the call path establishment at a fourth time point; before the fourth time point, no session parameters are set; the fourth time point is later than the third time point. The processor is further configured to set session parameters after the fourth time point. The processor is also configured to transmit voice data of the second call.
[0025] The processor is further configured to start the second call. It can be understood that the processor is configured to send an INVITE message of the second call, or the processor is configured to receive the INVITE message of the second call, and then send a 200 OK message for the INVITE.
[0026] The processor can be further configured to perform the method provided in the first aspect and any possible design of the first aspect.
[0027] The technical effects brought by any design of the second aspect to the fifth aspect can refer to the technical effects brought by different designs of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0028] FIG. 1 is a structural schematic diagram of an electronic device according to an embodiment of the present application;
[0029] FIG. 2 is an architectural schematic diagram of an electronic device according to an embodiment of the present application;
[0030] FIG. 3 is a schematic diagram of a communication system according to an embodiment of the present application;
[0031] FIG. 4 is a schematic diagram of a process of starting an ultrasonic audio stream according to an embodiment of the present application;
[0032] FIG. 5 is a schematic diagram of an audio stream state according to an embodiment of the present application;
[0033] FIG. 6 is a flowchart of a call method according to an embodiment of the present application;
[0034] FIG. 7 is a schematic diagram of a sound card device of a mobile phone according to an embodiment of the present application;
[0035] FIG. 8 is another flowchart of a call method according to an embodiment of the present application;
[0036] FIG. 9 is another schematic diagram of a sound card device of a mobile phone according to an embodiment of the present application;
[0037] FIG. 10 is a schematic diagram of a user interface according to an embodiment of the present application;
[0038] FIG. 11 is a schematic diagram of a set of user interfaces according to an embodiment of the present application;
[0039] FIG. 12 is a schematic diagram of system information of an electronic device according to an embodiment of the present application;
[0040] FIG. 13 is a schematic diagram of a user interface according to an embodiment of the present application;
[0041] FIG. 14 is a schematic diagram of another system information about an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] 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 present application, unless otherwise specified, " / " represents an "or" relationship between the objects before and after the " / ", for example, A / B can represent A or B; in the present application, "and / or" is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone, where A and B can be singular or plural. In addition, in the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, "first", "second", etc. are used to distinguish the same items or similar items with basically the same function and role. Those skilled in the art can understand that "first", "second", etc. do not limit the quantity and execution order, and "first", "second", etc. also do not necessarily mean different.
[0043] At the same time, in the embodiments of the present application, "exemplary" or "for example" is used to represent as an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. On the contrary, "exemplary" or "for example" is used to present the relevant concept in a specific way, for the purpose of understanding.
[0044] In the technical solutions disclosed in the present application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solutions comply with the relevant legal regulations and do not violate public order and good customs.
[0045] With the development of terminal technology, the functions of electronic devices (such as mobile phones) are becoming more and more rich. For example, mobile phones can have call functions, shooting functions, network functions, etc.
[0046] At present, most electronic devices (such as mobile phones) have the basic function of call function.
[0047] It should be noted that the call function of the electronic device can be understood as that the electronic device makes voice call through a telecommunication network provided by a telecommunication operator.
[0048] The electronic device can establish a receive (RX) / transmitter (TX) path with a base station. After the electronic device establishes the RX / TX path, the electronic device can perform the call function.
[0049] In some scenarios, during the establishment of the RX / TX path, the electronic device has a situation of incomplete setting of session parameters, which can cause the electronic device to be unable to set the session parameters again after the establishment of the RX / TX path is completed, which can cause the electronic device to have a phenomenon of silent call.
[0050] The session parameters can be understood as parameters for configuring the sound-related devices of the electronic device. For example, the session parameters can include one or more of a code rate, a bit rate, a sampling rate, and a bit width. In some embodiments, the session parameters can also be referred to as call parameters, or can also be referred to as mixer parameters.
[0051] Therefore, embodiments of the present application provide a call method, in which the electronic device starts a call, and then establishes an RX and TX path, and during the establishment of the RX path or the TX path, the electronic device does not send session parameters. Next, the electronic device sends the session parameters after the establishment of the RX and TX paths is completed. Then, the electronic device performs the call. In this way, the phenomenon of silent call of the electronic device can be alleviated, and the user experience can be improved.
[0052] That is, the electronic device does not set the session parameters before the establishment of the call path is completed, and sets the session parameters after the establishment of the call path is completed. Through this method, the occurrence of call abnormalities can be alleviated, and the user experience can be improved.
[0053] The call method provided by the embodiments of the present application can be applied to the process in which the user uses the call function of the electronic device. The electronic device can be a mobile phone, a user equipment (UE), a terminal equipment, a tablet computer, or the like.
[0054] Next, the hardware structure, the software architecture, and the communication system related to the call function of the electronic device are introduced.
[0055] For example, referring to FIG. 1, FIG. 1 is a structural schematic diagram of an electronic device 100.
[0056] 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, an antenna, a mobile communication module 150, an audio device 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a display screen 194, a subscriber identification module (SIM) card interface 195, and the like.
[0057] 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.
[0058] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modulator demodulator (modem), 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), and the like. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0059] In some embodiments, the digital signal processor (DSP) described above can further include one or more of an audio digital signal processor (aDSP), an advanced digital signal processor (ADSP), and a sensor digital signal processor (SDSP). It should be understood that in actual use, the digital signal processor can further include more other processors, and the specific configuration can be set according to actual use requirements. In the following embodiments of the present application, the technical solutions provided in the embodiments of the present application will be introduced taking the DSP including aDSP and SDPS as an example.
[0060] It should be understood that in actual use, the DSP can further include other processors, for example, the DSP can be a system control processor (SCP). The system control processor can also be referred to as an SCP coprocessor. For another example, the DSP can include a sensor hub. The embodiments of the present application do not limit this.
[0061] 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 instruction fetching and instruction execution.
[0062] The processor 110 can further be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that have just been used or are used repeatedly by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0063] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0064] The I2C interface is a bidirectional synchronous serial bus including a serial data line (SDA) and a serial clock line (SCL). The electronic device can implement the touch function of the electronic device 100 through the I2C interface.
[0065] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple sets of I2S buses. The processor 110 can be coupled with the audio device 170 through the I2S buses to implement communication between the processor 110 and the audio device 170. In some embodiments, the audio device 170 can deliver audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering a phone call through a Bluetooth earphone.
[0066] The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals. In some embodiments, the audio device 170 and the wireless communication module 160 can be coupled through a PCM bus interface. In some embodiments, the audio device 170 can also deliver audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering a phone call through a Bluetooth earphone. Both the I2S interface and the PCM interface can be used for audio communication.
[0067] 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. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0068] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or combinations of multiple interface connection modes in the above embodiments.
[0069] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1 and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves to be radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.
[0070] The modem processor can include a modulator and a demodulator. The modulator is used to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs the sound signal through the audio device (not limited to the loudspeaker 170A and the receiver 170B, etc.), or displays images or videos through the display screen 194. In some embodiments, the modem processor can be a separate device. In some other embodiments, the modem processor can be independent of the processor 110 and arranged in the same device as the mobile communication module 150 or other functional modules.
[0071] The modem processor can also be referred to as an adjustment demodulator, a modem chip, a modem chip, etc.
[0072] In some embodiments, the antenna and the mobile communication module 150 of the electronic device 100 are coupled such that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), etc.
[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to extend the memory capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to perform a data storage function. For example, files such as music, videos, etc. are stored in the external memory card.
[0074] The internal memory 121 can be used to store computer executable program codes including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by executing 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 for a function (such as a sound play function, an image play function, etc.), etc. The data storage area can store data created during the 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 further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0075] The electronic device 100 can implement an audio function through an audio device 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, an application processor, etc. For example, music play, recording, etc.
[0076] The audio device 170 is configured to convert digital audio information into an analog audio signal output, and to convert an analog audio input into a digital audio signal. The audio device 170 can also be configured to encode and decode audio signals. In some embodiments, the audio device 170 can be disposed in the processor 110, or some functional modules of the audio device 170 can be disposed in the processor 110.
[0077] The speaker 170A, also referred to as a "loudspeaker", is configured 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.
[0078] The receiver 170B, also referred to as an "earpiece", is configured to convert an audio electrical signal into a sound signal. When the electronic device 100 receives a call or a voice message, the user can listen to the voice by holding the receiver 170B close to the ear.
[0079] The microphone 170C, also referred to as a "microphone", "voice microphone", is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak into the microphone 170C by holding the mouth close to the microphone 170C, and input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, in addition to collecting sound signals, the noise reduction function can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, in addition to collecting sound signals and noise reduction, the sound source can also be identified, and the directional recording function can also be realized.
[0080] The earphone interface 170D is configured to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0081] 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 SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195. The multiple cards can be of the same type or of different types. The SIM card interface 195 can be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with a network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be disconnected from the electronic device 100.
[0082] After the structure of the electronic device 100 is introduced, the architecture of the electronic device is introduced.
[0083] 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. In this embodiment of this application, the architecture of the electronic device 100 is exemplarily described by taking a layered architecture of an Android system as an example. TM
[0084] FIG. 2 is a schematic diagram of the architecture of the electronic device 100 according to an embodiment of this application.
[0085] 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 Android system is divided into four layers, from top to bottom, an application layer, a framework layer (FMK), a hardware abstraction layer (HAL), and a platform audio layer (PAL). TM
[0086] The application layer can include a series of application packages.
[0087] As shown in FIG. 2, the application packages include application packages such as telephone and short message.
[0088] The framework layer provides application programming interfaces (APIs) and programming frameworks for the application programs of the application layer. The framework layer includes some pre-defined functions.
[0089] As shown in FIG. 2, the application framework layer can include window management, content provision, view system, phone management, resource management, notification management, etc.
[0090] The window manager is used to manage window programs. The window manager can acquire the size of a display screen, determine whether there is a status bar, lock a screen, take a screenshot, etc.
[0091] The content provision is used to store and acquire data, and make the data accessible to applications. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phonebook, etc.
[0092] The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build an application. 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.
[0093] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of a call state (including call connection, call disconnection, etc.). The phone manager can also be referred to as a phone manage service, a phone manage service module, a phone manage system, etc. In some embodiments, the above-mentioned phone management can execute the process of starting or stopping the hang-up prompt tone audio stream through the module related to the phone audio in the framework layer. That is, the process of starting the hang-up prompt tone can be executed by the audio policy manager module, and the process of stopping the hang-up prompt tone audio stream can be executed by the audio flinger module.
[0094] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The resource manager can also be referred to as a resource manage service, a resource manage service module, a resource manage system.
[0095] Notification management enables applications to display notification information in the status bar, which can be used to convey alert-type messages that can automatically disappear after a brief stay without user interaction. For example, notification management is used to inform of download completion, message reminders, etc. Notification management can also be a notification that appears in the form of a chart or a scroll bar text 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 that appears in the form of a dialog window on the screen. For example, the status bar prompts text information, emits a prompt sound, the electronic device vibrates, the indicator light flashes, etc.
[0096] The hardware abstraction layer can provide a standard interface to display device hardware functions to a higher level framework layer. The hardware abstraction layer includes a plurality of library modules, each of which implements an interface for a specific type of hardware component. The library module can include an audio module. When the application framework layer requires access to device hardware, the system will load the corresponding library module for the hardware component. Vendors can define interfaces at the hardware abstraction layer. Among them, the audio module is used to display the functions of the audio-related hardware of the electronic device to the framework layer. The above-mentioned audio module can be referred to as an audio HAL, an audio hal module, etc.
[0097] The PAL is a software layer between the hardware and the operating system, and its role is to abstract hardware details so that the operating system and applications can interact with devices on different hardware platforms in a unified way.
[0098] The PAL includes a super-sound audio stream, a hang-up prompt audio stream, a call audio stream, etc.
[0099] In some embodiments, the platform audio layer can include a management component that manages the software modules included in the PAL layer, which can start the super-sound audio stream, the hang-up prompt audio stream, the call audio stream, etc. Among them, the management component that manages the software modules included in the PAL layer can be referred to as a PAL management component.
[0100] It can be understood that the architecture of the electronic device shown in FIG. 2 is only an example, and in actual application, the architecture of the electronic device can also be divided into more or fewer levels. For example, the PAL layer can be divided into the HAL layer, that is, the HAL layer can include the PAL layer. Specifically, the actual use case is the limit, and the embodiments of the present application do not limit this.
[0101] For example, in combination with FIG. 2, the voice call scenario of the electronic device is introduced. Among them, the voice call scenario of the electronic device can include a scenario of connecting a voice call (hereinafter can be referred to as a call scenario) or a scenario of hanging up a voice call (hereinafter can be referred to as a hang-up scenario).
[0102] Next, the phone receiving scenario of the electronic device is introduced.
[0103] In the phone receiving scenario, after the user receives the phone call, the AP sends information indicating the incoming call (the phone is connected) to the phone management through the phone application. In FIG. 2, this step is indicated by reference numeral ①.
[0104] Next, the AP sends the incoming call notification to the audio module through the phone management. In FIG. 2, this step is indicated by reference numeral ②.
[0105] Then, the AP starts the call audio stream through the audio module. In FIG. 2, this step is indicated by reference numeral ③.
[0106] The process of starting the call audio stream can include initializing resources required for the call audio stream, and establishing the RX path and the TX path. The call audio stream is used for voice call.
[0107] Next, after the call audio stream is started, the call audio stream starts running. The AP sends session parameters to the modem through the aDSP. In FIG. 2, this step is indicated by reference numeral ④.
[0108] Then, the aDSP and the modem send / receive audio data through the session parameters. In this way, the phone can realize the voice call function. In FIG. 2, this step is indicated by reference numeral ⑤.
[0109] In some embodiments, after the call audio stream starts running, the AP can also start the ultrasonic audio stream. In FIG. 2, this step is indicated by reference numeral ⑥.
[0110] The ultrasonic audio stream can be used for proximity detection. For example, after the ultrasonic audio stream is started, the earpiece can send ultrasonic waves, and receive the reflected ultrasonic waves through the microphone. The electronic device can determine whether there is an object approaching the earpiece of the electronic device through the time of flight of the ultrasonic waves (for example, the time period from when the ultrasonic waves are sent by the earpiece to when the ultrasonic waves are received by the microphone). When there is an object approaching the earpiece of the electronic device, the electronic device turns off the screen.
[0111] The start of the ultrasonic audio stream can have a correlation relationship with other audio streams of the electronic device. For example, the ultrasonic audio stream is started after the other audio stream is started, and the ultrasonic audio stream is closed after the other audio stream is closed.
[0112] The process of starting the ultrasonic audio stream by the AP is described below, and is not described in detail here.
[0113] Thus, through the steps of the above label ① to label ⑥, the user can use the call function of the electronic device, and use the electronic device to make a voice call. In addition, during the voice call of the electronic device, when the user approaches the receiver of the electronic device, the display screen of the electronic device can be turned off; in this way, the user can be prevented from accidentally touching the display screen of the electronic device.
[0114] Next, the phone-off scenario of the electronic device is introduced.
[0115] After the user hangs up the call, the AP sends information indicating the call-off (hang up the call) to the phone management through the call application. In FIG. 2, this step is indicated by label ①.
[0116] Next, the AP sends the call-off notification to the audio module through the phone management. In FIG. 2, this step is indicated by label ②.
[0117] After that, the AP closes the call audio stream through the audio module. In FIG. 2, this step is indicated by label ③.
[0118] The above closing of the call audio stream can include releasing the resources required by the call audio stream, and disconnecting the RX path and the TX path.
[0119] After the call audio stream is started, the AP starts the hang-up prompt tone audio stream. In FIG. 2, this step is indicated by label ⑦.
[0120] The hang-up prompt tone audio stream is used to play the hang-up prompt tone. After the hang-up prompt tone audio stream is started, the electronic device plays the hang-up prompt tone.
[0121] Next, the AP starts the over audio stream. In FIG. 2, this step is indicated by label ⑧.
[0122] Thus, the user can end the use of the call function of the electronic device, and stop the voice call through the electronic device. After the voice call of the electronic device is ended, the electronic device can play the hang-up prompt tone. During the playing of the hang-up prompt tone by the electronic device, when the user approaches the receiver of the electronic device, the display screen of the electronic device can be turned off; in this way, the user can be prevented from accidentally touching the display screen of the electronic device.
[0123] As an example, in the call-answering scenario, as an example, the call application can also send information indicating the call-off to the above-mentioned audio policy manager module. After that, the audio policy manager starts to start the hang-up prompt tone audio stream. Next, the audio flinger closes the hang-up prompt tone audio stream.
[0124] Optionally, in the above hang-up scenario and the answer scenario, the process of starting the audio stream can be performed by the audio module, or can be performed by other software modules of the AP, such as the PAL management component and the like. For example, the PAL management component can start the call audio stream; for example, the PAL management component initializes the resources required by the call audio stream, and the PAL management component establishes the RX path and the TX path. The PAL management component starts the hang-up prompt tone audio stream; for example, the PAL management component initializes the resources required by the hang-up prompt tone audio stream. It should be understood that, in actual use, the call audio stream, the hang-up prompt tone audio stream, the call audio stream, and the hang-up prompt tone audio stream can also be started by other software modules, and the present application does not make any limitation in this regard.
[0125] After introducing the architecture of the electronic device, the communication system related to the call function of the electronic device is introduced.
[0126] For example, referring to FIG. 3, FIG. 3 shows a communication system related to the call function of the electronic device.
[0127] The communication system can include a base station 200 and an electronic device 100.
[0128] For the related structure of the base station 200 and the introduction, please refer to the conventional technology, and the present application does not make any limitation in this regard.
[0129] The RX path can be understood as a path for the electronic device 100 to receive signals. In wireless communication, it usually includes an antenna, a modem processor, and an audio digital signal processor. The RX path is responsible for capturing signals from the sender (the base station 200) and converting them into a form that the device can process, such as digital data.
[0130] The TX path can be understood as a path for the electronic device 100 to send signals. It also includes an antenna, a modem processor, and an audio digital signal processor. The TX path is responsible for converting signals generated by the device (such as digital data) into a form suitable for transmission in the transmission medium (such as air), and sending it out, such as to the base station 200.
[0131] It can be understood that the RX path and the TX path constitute a call path, and the electronic device can transmit voice data of the call through the path. That is, the electronic device can receive voice data of the call through the RX path, and the electronic device can send voice data of the call through the TX path.
[0132] Next, taking the electronic device as a mobile phone, the mobile phone having the structure shown in FIG. 1 and the architecture shown in FIG. 2 as an example, the call method provided by the present application is introduced.
[0133] Before introducing the call method provided by the embodiments of the present application, the process of starting the ultrasonic audio stream by the mobile phone is introduced.
[0134] For example, referring to FIG. 4, the mobile phone can start the ultrasonic audio stream through the following steps 1-6.
[0135] Step 1. When the mobile phone is booted, the ultrasonic proximity sensor driver of the sensor digital sensor (SDSP) registers the ultrasonic proximity sensor driver as a proximity sensor driver program in a sensor execution environment (SEE).
[0136] Step 2. With the help of the sensor framework and the sensor HAL, the application starts to listen to the proximity event.
[0137] That is, the application can listen to the proximity event through the universal sensor framework and the sensor HAL.
[0138] Step 3. According to the application request, the sensor HAL enables the ultrasonic proximity sensor device (UPD device) through the API of the SEE client on the SDSP.
[0139] Step 4. The ultrasonic proximity sensor device on the SDSP notifies the audio sensor proxy service (ASPS) to set the ultrasonic wave use case in the aDSP. The ASPS passes this request to the audio context manager (ACM) in the platform audio layer (PAL) to set the ultrasonic audio use case, such as the ultrasonic audio stream.
[0140] It can be understood that the ACM is a module for managing the context relationship of the audio stream. Specifically, the ASPS can set the start of the ultrasonic audio stream as the context of the start of other audio streams; that is, after the PAL starts other audio streams, the AP performs the following step 5. Wherein the other audio stream can be understood as an audio stream other than the ultrasonic audio stream.
[0141] Step 5. The PAL sets the ultrasonic detector, the ultrasonic generator and the related DSP parameters in the aDSP.
[0142] Among them, in some embodiments, the ultrasonic detector and the ultrasonic generator described above can be independent physical devices. In some other embodiments, the ultrasonic detector described above can be the microphone of the mobile phone, and the ultrasonic generator described above can be the earpiece of the mobile phone.
[0143] Step 6. The aDSP loads the required library for the ultrasonic generator and the ultrasonic detector, and starts detection.
[0144] After step 6, the ultrasonic audio stream is started. That is, the phone can detect the proximity event through the ultrasonic audio stream.
[0145] As can be seen from the above description of steps 1-6, the phone can start the ultrasonic audio stream by starting a virtual proximity sensor (e.g., an ultrasonic proximity sensor). The process of starting the ultrasonic audio stream can be understood as the process of starting a virtual proximity sensor. The virtual proximity sensor can be understood as the UPD device described above. In the future, the SDSP can also send the proximity event to the UPD device when detecting the proximity event through the ultrasonic audio stream, and the UPD device can deliver the proximity event to the application through the sensor HAL and the sensor framework based on the application's registered listening.
[0146] It can be understood that the phone detects the proximity event through the ultrasonic audio stream is a solution to replace the proximity sensor (e.g., the photoelectric sensor). Since it can be achieved through the microphone and the earpiece of the phone, the hardware cost of the phone can be reduced.
[0147] As can be seen from the above description of steps 1-6, the ultrasonic audio stream is started in response to other audio streams; similar to the process of starting the ultrasonic audio stream, the ultrasonic audio stream can also be closed in response to the closing of other audio streams.
[0148] Next, the logic related to the sound device (snd device) of the phone is introduced. The sound device of the phone can be understood as the sound device that the phone is currently using or working on, or the device that the phone is currently using to play or collect sound.
[0149] For example, the sound device can include handset, voice-handset, or none. When the sound device of the phone is none, it can be understood that the phone currently has no sound device, and the phone is not playing sound. It should be understood that the above handset, voice-handset, or none are only examples, and the sound device of the phone can also include more sound devices in actual use.
[0150] In some embodiments, the phone can set the sound device of the phone through the resource manager. That is, the resource manager can start, stop, or switch the sound device of the phone.
[0151] As a possible implementation, the resource manager can set the sound device of the phone based on the state of the audio stream.
[0152] The state of the audio stream can include open, start, stop, or close. Alternatively, the state of the audio stream can change in the order of open-start-stop-close.
[0153] In some aspects, the state of the audio stream can be referred to as stream init after the state of the audio stream is open and before the state of the audio stream is start. In some aspects, the state of the audio stream can be referred to as stream ready after the state of the audio stream is start and before the state of the audio stream is close. In some aspects, the state of the audio stream can be referred to as stream idle after the state of the audio stream is close and before the state of the audio stream is open. The stream init can be referred to as an initialization state.
[0154] For example, the resource management can set the sound card device of the mobile phone based on the state of the audio stream being open. Alternatively, the resource management can set the sound card device of the mobile phone based on the state of the audio stream being close. The state of the audio stream can be changed based on some functions, such as the state of the audio stream being updated to open when the connect DeviceSession function is called. Alternatively, the state of the audio stream being updated to close when the disconnect DeviceSession function is called. Accordingly, the resource management can also set the sound card device of the mobile phone based on the disconnect DeviceSession function being called or the connect DeviceSession function being called.
[0155] It should be noted that in some cases, the disconnect DeviceSession function or the connect DeviceSession function described above can not be synchronized in time with respect to resource management and audio stream. That is, the disconnect DeviceSession function can act on the audio stream first and then act on the resource management, or the disconnect DeviceSession function can act on the resource management first and then act on the audio stream. Therefore, in these cases, the resource management can not be synchronized with the state of the audio stream. That is, the resource management can set the sound card device of the mobile phone before the state of the audio stream is open, or the resource management can set the sound card device of the mobile phone after the state of the audio stream is open, or the resource management can set the sound card device of the mobile phone before the state of the audio stream is close, or the resource management can set the sound card device of the mobile phone after the state of the audio stream is close. Specifically, there can be a certain time difference between the time point of the change of the state of the audio stream and the time point of the resource management setting the sound card device of the mobile phone, and the time difference can be within 1-2 seconds.
[0156] It can be understood that the audio stream can set the sound card device of the mobile phone and the parameters of the sound card device through the parameters carried by the audio stream itself. At the same time, the audio stream also has a priority. The parameters of the sound card device include one or more of the following: channel number, sampling rate, bit width, format, and device name. The sound card device of the mobile phone can be understood as the sound card device of the mobile phone for playing / capturing sound.
[0157] For example, the priority of the hang-up prompt tone audio stream is relatively low, lower than the priority of the call audio stream.
[0158] For example, the bit number set by the hang-up prompt tone audio stream is different from the bit number set by the call audio stream. For example, the hang-up prompt tone audio stream sets 16 bits, and the call audio stream sets 32 bits.
[0159] For another example, as can be seen from the foregoing description, the start of the ultra-sound audio stream depends on other audio streams, the sound card device corresponding to the ultra-sound audio stream, and the priority is not fixed. When the ultra-sound audio stream starts, the device set by the ultra-sound audio stream is the current sound card device of the mobile phone, and the priority of the ultra-sound audio stream represents the priority of the audio stream of the current sound card device of the mobile phone.
[0160] For example, the on-hook prompt tone audio stream, which is set to handset, has a first priority. In response to the start of the on-hook prompt tone audio stream, the resource management sets the sound card device of the handset to handset. Then, the super sound audio stream starts, the sound card device of the super sound audio stream is set to handset, and the priority of the super sound audio stream is the first priority.
[0161] For example, the on-hook prompt tone audio stream, which is set to handset, has a first priority. In response to the start of the on-hook prompt tone audio stream, the resource management sets the sound card device of the handset to handset. Then, the super sound audio stream starts, the sound card device of the super sound audio stream is set to handset, and the priority of the super sound audio stream is the first priority.
[0162] As a possible implementation, the resource management can compare the current sound card device of the handset with the sound card device set by the audio stream, and set the sound card device of the handset.
[0163] For example, the state of the audio stream A is set to open. Based on the state of the audio stream A becoming open, the resource management judges whether the current sound card device of the handset is the same as the sound card device set by the audio stream A. In the case that the current sound card device of the handset is the same as the sound card device set by the audio stream A, the resource management does not change the sound card device of the handset. In the case that the current sound card device of the handset is not the same as the sound card device set by the audio stream A, the resource management compares the priority of the current sound card device of the handset with the priority of the audio stream A. The priority of the current sound card device of the handset is the priority of the audio stream which sets the sound card device of the handset to the current sound card device of the handset. In the case that the priority of the current sound card device of the handset is greater than or equal to the priority of the sound card device set by the audio stream A, the resource management does not change the sound card device of the handset. In the case that the priority of the current sound card device of the handset is less than the priority of the sound card device set by the audio stream A, the resource management sets the sound card device of the handset to the sound card device set by the audio stream A.
[0164] Optionally, after the resource management sets the sound card device of the handset to the sound card device set by the audio stream A, the resource management can also acquire the parameter of the sound card device set by the audio stream whose working state is stream ready. Next, the resource management sets the parameter of the sound card device of the handset to the parameter of the sound card device set by the audio stream whose working state is stream ready.
[0165] For example, the state of the audio stream B is set as close. In response to the state of the audio stream B becoming close, the resource management acquires the audio stream. In the case that the resource management acquires one audio stream, the resource management sets the sound card device of the mobile phone as the sound card device set by the audio stream. In the case that the resource management acquires multiple audio streams, the resource management sets the sound card device of the mobile phone as the sound card device with the highest priority among the sound card devices set by the multiple audio streams. In the case that the resource management does not acquire the audio stream, the resource management sets the sound card device of the mobile phone as none.
[0166] For the call audio stream, the mobile phone needs to establish the RX path and the TX path after the call audio stream is started. For example, the call audio stream establishes the RX path and the TX path through a manner in the communication protocol. It can be understood that the mobile phone needs a certain time to establish the RX path and the TX path. Meanwhile, the resource management can not acquire the call audio stream after the call audio stream of the mobile phone is started and before the RX path or the TX path is established completely. Specifically, the resource management can not acquire the call audio stream within a period of time after the state of the call audio stream becomes open.
[0167] For the RX path and the TX path, refer to the corresponding part of FIG. 3.
[0168] Next, the call method provided by the embodiment of the present application is introduced.
[0169] For example, referring to FIG. 6, the call method provided by the embodiment of the present application can include steps S500-S509, or can include S500-S508, S510 and S511.
[0170] It should be noted that the positional relationship between the steps in the content shown in FIG. 6 does not represent the execution order of the steps by the mobile phone.
[0171] S500. After the call A is hung up, the phone application sends information indicating that the call A is hung up to the phone management.
[0172] The operation of hanging up the call A can be the operation of hanging up the call A by any one of the two parties of the call A. For example, the operation of hanging up the call A by the user through the user graphical interface of the mobile phone. For another example, the operation of hanging up the call A by the call party of the mobile phone.
[0173] Optionally, the step S500 can include: in response to the operation of hanging up the call A, the phone application sends information indicating that the call A is hung up to the phone management.
[0174] Optionally, the step S500 can comprise: based on the call A being hung up, the phone application sending information indicating the call A being hung up to the phone management.
[0175] As a possible implementation, the phone application can send the information indicating the call A being hung up to the phone management through an API of the phone management.
[0176] After the step S500, the mobile phone executes a step S501.
[0177] S501. The phone management sends a notification of the call A being hung up to the audio module.
[0178] After the step S501, the mobile phone executes a step S502.
[0179] S502. The audio module starts a hang-up prompt tone audio stream.
[0180] The hang-up prompt tone audio stream can be a low-latency stream.
[0181] The sound card device set for the hang-up prompt tone audio stream is handset, the bit rate is 16 bit, and the priority is the first priority.
[0182] After the step S502, the mobile phone executes a step S503.
[0183] S503. Based on the audio module starting the hang-up prompt tone audio stream, the PAL management component starts an ultra sound audio stream.
[0184] For optional implementation of the step S503, please refer to the steps 1-6 described above, which will not be repeated here.
[0185] S504. In response to an operation of answering the call B, the phone application sends information indicating the call B being answered to the phone management.
[0186] After the step S504, the mobile phone executes a step S505.
[0187] S505. The phone management sends a notification of the call B being answered to the audio module.
[0188] After the step S505, the mobile phone executes a step S506.
[0189] S506. The audio module starts a call audio stream.
[0190] The sound card device set for the call audio stream is voice-handset, and the priority is the second priority. The second priority is higher than the first priority described above.
[0191] It should be noted that the mobile phone can perform step S504 after step S500, or the mobile phone can perform step S503 before step S506. The timing relationship of steps S500-S503 and S504-S506 is subject to actual use requirements, and embodiments of the present application do not make any limitation on this.
[0192] S507. The audio module closes the on-hang prompt tone audio stream.
[0193] The on-hang prompt tone audio stream is closed.
[0194] After step S507, step S508 is performed.
[0195] S508. Based on the on-hang prompt tone audio stream being closed, the PAL management component closes the super-audio stream.
[0196] Specifically, the process can refer to steps 1-6 described above, and will not be repeated here.
[0197] Next, referring to FIG. 7, in the process of performing steps S506-S508 by the mobile phone, the sound card device of the mobile phone is introduced in combination with the content about resource management switching sound card devices described above.
[0198] Before the mobile phone performs step S506, based on step S502, the resource management sets the sound card device of the mobile phone as handset.
[0199] After the mobile phone performs step S506, the resource management is invoked based on the connectDeviceSession function described above, the resource management obtains the super-audio stream, and the resource management sets the sound card device of the mobile phone as voice-handset based on the priority of the call audio stream being higher than the priority of the current sound card device (handset) of the mobile phone.
[0200] After the mobile phone performs step S507, the resource management is invoked based on the disconnectDeviceSession function described above, the resource management obtains the super-audio stream, and the resource management sets the sound card device of the mobile phone as handset. Among them, the RX channel or TX channel of the call audio stream is not established, and the resource management does not obtain the super-audio stream.
[0201] After the mobile phone performs step S508, the resource management is invoked based on the state of the super-audio stream being close, the resource management obtains the call audio stream, and the resource management sets the sound card device of the mobile phone as voice-handset. Among them, after step S508, the RX channel of the call audio stream is established, and the resource management can obtain the call audio stream.
[0202] It is noted that in most cases, the RX path for establishing the audio stream for the call is completed first, and then the TX path is completed. In some cases, the TX path can be completed first, and then the RX path is completed.
[0203] From the process of steps S506-S508 performed by the mobile phone, it can be seen from the introduction of the sound card device of the mobile phone that after the mobile phone performs step S508, the resource management switches the sound card device of the mobile phone, for example, sets the sound card device of the mobile phone as voice-handset.
[0204] In some solutions, after the mobile phone performs step S508, the mobile phone can perform step S509.
[0205] S509. The PAL management component sets the session parameter based on the resource management switching the sound card device of the mobile phone.
[0206] As a possible implementation, the mobile phone (for example, the AP of the mobile phone) can send the session parameter to the modem through the aDSP. The session parameter can also be referred to as a call parameter, or also referred to as a mixer parameter.
[0207] Optionally, the PAL management component can be a component related to the audio session included in the PAL layer, for example, a session ALSA utils module. That is, the session ALSA utils module can send the session parameter to the modem through the aDSP.
[0208] In this solution, when the sound card device of the mobile phone is switched, the mobile phone sends the session parameter (for example, the AP of the mobile phone sends the session parameter to the modem through the aDSP), so that the sound card device after the switching can work based on the session parameter of the mobile phone. However, in this solution, it is not considered that when the sound card device of the mobile phone is switched, the mobile phone can send an incomplete call parameter. For example, because the RX path is completed and the TX path is not completed, the session parameter sent by the mobile phone can be incomplete (for example, only including the session parameter of the RX path), which can cause that after the TX path and the RX path are both completed, the mobile phone cannot send the complete session parameter to the modem through the aDSP. As a result, the phenomenon of no sound in the call of the mobile phone can occur, for example, no sound in the uplink call and the downlink call.
[0209] In other solutions, after the mobile phone performs step S509, the mobile phone can perform step S510.
[0210] S510. The PAL management component does not set the session parameter based on the working state being the initialization state.
[0211] As a possible implementation, the step S510 can include: after the resource management switches the sound card device of the mobile phone, the session ALSA utils module acquires the working state of the call audio stream. Next, the session ALSA utils module sets no session parameters based on that the working state is the initialization state.
[0212] After the step S510, both the RX path and the TX path are established, and the working state of the call audio stream is stream ready. Next, the mobile phone can perform the step S511. Alternatively, in some schemes, after the step S508, the mobile phone can perform the step S511.
[0213] S511. The PAL management component sets the session parameters based on that the working state is not the initialization state.
[0214] As a possible implementation, the step S511 can include: after the resource management switches the sound card device of the mobile phone, and after the RX path is established and the TX path is established, the session ALSA utils module acquires the working state of the call audio stream. Next, the session ALSA utils module sets the session parameters based on that the working state is not the initialization state, and the session ALSA utils module sends the session parameters to the modem through the aDSP.
[0215] For example, the session ALSA utils module can acquire the current working state of the call audio stream according to the flag of the call audio stream, such as the stream handle flag. The session ALSA utils module can call the getCurState() function to acquire the current working state of the call audio stream, and the input parameter of the function is the stream handle. Next, the session ALSA utils module determines that the working state is not the initialization state (stream init), and the call audio stream sets the session parameters.
[0216] For another example, the session ALSA utils module can set the session parameters of the RX path and the TX path respectively. For example, the session ALSA utils module can call the setSessionParameters(streamHandle, RX_HOSTLESS) function to set the session parameters of the RX path. For another example, the session ALSA utils module can call the setSessionParameters(streamHandle, TX_HOSTLESS) function to set the session parameters of the TX path.
[0217] In this solution, since the handset does not set the session parameter in step S510, the handset can set the complete session parameter in step S511, so that the phenomenon of no sound in the handset call can be alleviated.
[0218] It should be noted that the above description of steps S510-S511 in the embodiments of the present application is based on the PAL management component (e.g., session ALSA utils module) as the execution subject, and in actual use, other software modules (e.g., software threads) can also be used as the execution subject. In particular, the actual use is preferred, and the embodiments of the present application do not limit this.
[0219] Optionally, step S510 can further include: based on the state of the call audio stream being an initialization state, the handset does not set the mute of the sound card device (e.g., voice-handset) of the call audio stream.
[0220] For example, based on the state of the call audio stream being an initialization state, the handset does not set the mute of the sound card device of the call audio stream, which can include: the PAL management component (e.g., PayloadBuilder module) obtains the working state of the call audio stream. Next, the PayloadBuilder module determines that the working state of the call audio stream is streaminit, and the PayloadBuilder module does not call the setPopSuppressorMute(streamHandle) function, and does not set the mute of the sound card device of the call audio stream.
[0221] Compared with some methods in which when the sound card device of the handset changes, the handset does not distinguish the working state of the call audio stream, and sets the sound card device to mute. This can cause that when the RX path and the TX path are both established, the handset cannot cancel the mute of the sound card device, which can cause the phenomenon of no sound in the downlink call of the handset. In this method, based on the call audio stream not being set to mute, the phenomenon of no sound in the downlink call of the handset can be alleviated.
[0222] For example, referring to FIG. 8, the call method provided by the embodiments of the present application includes steps S800-S808.
[0223] It should be noted that the positional relationship between the steps shown in FIG. 8 does not represent the execution order of the steps by the handset.
[0224] S800. After the operation of hanging up the call C, the phone application sends information indicating that the call C is hung up to the phone management.
[0225] After the mobile phone executes step S800, the mobile phone executes step S801.
[0226] S801. The phone management sends a notification of hanging up the call C to the audio module.
[0227] After the mobile phone executes step S801, the mobile phone executes step S802.
[0228] S802. The audio module starts a hang-up prompt tone audio stream.
[0229] The steps S800-S802 are similar to the steps S500-S503, and thus are not described herein.
[0230] S803. In response to the operation of dialing the call D, the phone application sends information indicating the dialing of the call D to the phone management.
[0231] After the mobile phone executes step S803, the mobile phone executes step S804.
[0232] S804. The phone management sends a notification of dialing the call D to the audio module.
[0233] After the mobile phone executes step S804, the mobile phone executes step S805.
[0234] S805. The audio module starts a call audio stream.
[0235] The steps S803-S805 are similar to the steps S504-S506, and thus are not described herein.
[0236] It is noted that the mobile phone can execute step S803 after step S800, or the mobile phone executes step S802 before step S805. The time sequence between the steps S800-S802 and the steps S803-S805 is subject to actual use requirements, and the embodiments of the present application do not limit the time sequence.
[0237] After S805, the mobile phone executes step S806.
[0238] S806. The audio module closes the hang-up prompt tone audio stream.
[0239] Next, the sound card device of the mobile phone before and after the mobile phone executes step S805 and step S806 is introduced with reference to FIG. 9.
[0240] Before the handset executes step S805, based on step S802, the resource management sets the sound card device of the handset to 16bit handset. Wherein, the bit rate corresponding to the hang-up prompt tone audio stream is 16bit. Next, the resource management sets the sound card device of the handset to voice-handset corresponding to the call audio stream based on that the call audio stream is changed to open, and the resource management sets the parameter of voice-handset to 16bit corresponding to the hang-up prompt tone audio stream whose working state is stream ready. After that, the resource management sets the sound card device of the handset to voice-handset corresponding to the call audio stream based on that the hang-up prompt tone audio stream is changed to close, and the resource management sets the parameter of voice-handset to 32bit corresponding to the call audio stream.
[0241] S807. The PAL management component sends the session parameters based on that the working state is not the initialization state.
[0242] After step S807, the RX channel and the TX channel are established, and the working state of the call audio stream is stream ready. Next, the handset can execute step S808.
[0243] S808. The PAL management component sends the session parameters based on that the working state is not the initialization state.
[0244] Wherein, the detailed introduction about steps S807-S808, and the technical effects are similar to steps S510-S511, please refer to the foregoing description, and no more details are given here.
[0245] Next, the call method provided by the embodiments of the present application is introduced in combination with the use process of the user.
[0246] Use process 1
[0247] In use process 1, the user hangs up call 1, and the handset creates an ultra sound audio stream. Wherein, the handset can execute steps S500-S503 to start the ultra sound audio stream.
[0248] For example, please refer to Fig. 10. The handset displays interface 1000 of call 1, and the interface 1000 of call 1 includes hang-up button 1001; next, in response to the triggering operation of the hang-up button 1001, the handset generates a touch event, and the phone application sends information indicating that call 1 is hung up based on the event, and the handset executes steps S500-S503. Wherein, the triggering operation of the hang-up button can be the click operation of the touch area corresponding to the hang-up button.
[0249] Next, at time point A, the user answers the call 2 through the handset, and based on the user answering the call 2, the handset starts the call audio stream. The time point A is after the handset creates the super audio stream.
[0250] For example, referring to FIG. 11. The handset displays the interface 1100 of the call 2, which includes an answer button 1101. Next, in response to a triggering operation on the answer button 1101, the handset generates a touch event, and the phone application sends information indicating that the call 2 is answered to the handset based on the touch event, and performs the steps S504-S506.
[0251] As an example, the handset can send information specified in a communication protocol in a manner specified in the communication protocol. For example, the handset receives an INVITE message of the call 2. Then, the handset displays the interface 1100 of the call 2. Next, in response to a triggering operation on the answer button 1101, the handset sends a 200 OK message for the INVITE message.
[0252] After the time point A, the resource management of the handset sets the sound card device of the handset to the device 1 based on starting the call audio stream.
[0253] Then, at time point B, the handset closes the super audio stream. The time point B is before the call path is established. It should be understood that the call path can be the RX path or the TX path of the call 2. The handset can perform the step S508 to close the super audio stream. Alternatively, the handset can perform the step S508 after performing the step S507.
[0254] Next, at time point C, the resource management sets the sound card device of the handset to the device 2 based on closing the super audio stream.
[0255] The handset does not set the session parameter during a time period from the time point C to a time point when the RX path and the TX path are established. That is, the handset does not set the session parameter in response to the process at the time point C. The handset can perform the step S510 to not set the session parameter, such as not sending the session parameter from the aDSP to the modem.
[0256] Then, at time point D, the handset sets the session parameter. The handset can set the session parameter by performing the step S511.
[0257] The time point D is after the call path is established, such as after the RX path and the TX path are established.
[0258] After time point D, the phone proceeds with call 2, e.g., the phone transmits voice data of call 2. For example, referring to FIG. 11 again, the phone displays interface 1110 of call 2.
[0259] In use process 1, time point A is earlier than time point B, time point B is earlier than time point C, and time point C is earlier than time point D.
[0260] In use process 1, the phone avoids setting incomplete session parameters by not sending session parameters until both the RX path and the TX path are established, which alleviates the problem of no sound in call and improves user experience.
[0261] It is noted that in use process 1, the phone sets session parameters once (e.g., the AP of the phone sends session parameters to the modem via the aDSP) after call 2 is answered and before the user proceeds with call 2.
[0262] Next, system information (e.g., status of audio streams, input events of the phone, etc.) of the phone during use process 1 is introduced. The system information can also be referred to as a log.
[0263] For example, referring to FIG. 12, before time point A, touch event 1 occurs based on the user hanging up call 1. After time point A, touch event 2 occurs based on the user answering call 2. Next, between time point A and time point B, the call audio stream is in an open state. At time point B, the super audio stream is in a close state. At time point C, the resource manager sets the sound card device of the phone to device 2. Before time point D, the TX path is established. After time point D, the phone sets session parameters. The RX path is established, which can be before time point C, or after time point C, or at time point C. For example, the RX path can be established between time point A and time point B. For another example, the RX path can be established before time point C.
[0264] For example, after the user hangs up call 1, the system information of the phone can include call end. For example, the call end can be: timestamp Z handleCalls END.
[0265] Wherein, after the user hangs up call 1, the system information of the phone can include, creating a super-audio stream. Exemplarily, creating a super-audio stream can be: timestamp A pal_stream_open the flag of super-audio stream. The flag of super-audio stream can be the PID of super-audio stream, and / or the stream handle of super-audio stream.
[0266] Wherein, before the user answers call 2, the phone receives an incoming call, such as receiving an INVITE message, the system information of the phone can include, call is incoming. Exemplarily, call is incoming can be: timestamp Y handleCalls INCOMING. After the user answers call 2, the system information block of the phone includes, call is active. Exemplarily, call is active can be: timestamp X handleCalls ACTIVE.
[0267] Wherein, at time point B, the system information of the phone can include: closing the super-audio stream. Exemplarily, closing the super-audio stream can be: timestamp B pal_stream_stop the flag of super-audio stream. Optionally, the pal_stream_stop can be replaced by pal_stream_close.
[0268] Wherein, at time point C, the system information of the phone can include: setting the sound card device of the phone to device 2. Exemplarily, setting the sound card device of the phone to device 2 can be: timestamp C Updated snd device to the name of device 2 for device.
[0269] Wherein, between time point A and time point B, the system information of the phone can include: exiting the open RX path. Exemplarily, exiting the open RX path can be: timestamp D key1 value1 VOICE_CALL_RX. Wherein, VOICE_CALL_RX represents the RX path. key1 value1 represents the graph open exit.
[0270] It can be understood that the above-mentioned exiting the open RX path can be understood as: the phone completes the process of executing the open RX path. Or, the phone exits the function of executing the open RX path.
[0271] Wherein, before time point D, the system information of the mobile phone can include: exit open TX path. Exemplarily, the exit open TX path can be: timestamp E key2 value2 VOICE CALL TX. Wherein, VOICE CALL TX represents TX path. Key2 value2 represents Graph open exit.
[0272] Wherein, at time point D, the system information of the mobile phone can include: the mobile phone sets session parameters. Exemplarily, the mobile phone sets session parameters can be: timestamp F setMixerParameter.
[0273] Wherein, after the mobile phone executes the above step S506, the system information of the mobile phone can include: start hangup prompt tone audio stream. Exemplarily, the start hangup prompt tone audio stream can be: timestamp V startOutput() flag of hangup prompt tone audio stream. Wherein, the flag of hangup prompt tone audio stream can be the PID of the hangup prompt tone audio stream.
[0274] Wherein, after the mobile phone executes the above step S507, the system information of the mobile phone can include: stop hangup prompt tone audio stream. Exemplarily, the stop hangup prompt tone audio stream can be: timestamp U stopOutput session flag of hangup prompt tone audio stream. Wherein, the flag of hangup prompt tone audio stream can be the PID of the hangup prompt tone audio stream.
[0275] Usage process 2
[0276] In usage process 2, the user hangs up call 3, and the mobile phone creates a hangup prompt tone audio stream. Wherein, the mobile phone can execute the above steps S800-S802 to start the hangup prompt tone audio stream. Wherein, this process is similar to the process corresponding to the above Fig. 10, and is not described here.
[0277] Next, at time point E, the user dials call 4 through the mobile phone, and based on the user dialing call 4, the mobile phone starts a call audio stream. Wherein, time point E is after the mobile phone starts the hangup prompt tone audio stream.
[0278] Exemplarily, referring to Fig. 13, the mobile phone displays a dialing interface 1300. The dialing interface includes a number keypad. Next, in response to the user's dialing operation, the mobile phone generates a touch event, and the phone application sends information indicating dialing call 4 based on the touch event, and the mobile phone executes the above steps S803-S805.
[0279] As an example, the handset can send information specified in the communication protocol in a manner specified in the communication protocol. For example, in response to a user's dialing operation, the handset sends the INVITE message of call 4.
[0280] After time point E, the handset's resource management sets the handset's sound card device to device 3 based on the initiation of the call audio stream.
[0281] After time point F, the handset closes the on-hold prompt tone audio stream. Time point B is before the call path is established. It should be understood that the call path can be the RX path or the TX path of call 4. The handset can perform step S806 to close the on-hold prompt tone audio stream.
[0282] Next, at time point G, the handset's resource management sets the handset's sound card device to device 4 based on the closing of the prompt tone audio stream.
[0283] From time point G to the time point when the RX path and the TX path are established, the handset does not set the session parameters. That is, the handset does not set the session parameters in response to the process at time point G. The handset can perform step S807 to not set the session parameters, such as not sending the session parameters from the aDSP to the modem.
[0284] Then, at time point H, the handset sets the session parameters. The handset can perform step S808 to set the session parameters.
[0285] Time point H is after the call path is established, such as after the RX path and the TX path are established.
[0286] After time point H, the handset proceeds with call 4, such as the handset transmitting voice data of call 4.
[0287] In use process 2, time point E is earlier than time point F, time point F is earlier than time point G, and time point G is earlier than time point H.
[0288] Next, the system information of the handset during the handset's performance of use process 2 is described. For example, the status of the audio streams, the input events occurring at the handset, etc.
[0289] For example, referring to FIG. 14, before time point E, based on the user hanging up the call 3, the phone generates touch event 3. Then, at time point E, based on the user answering the call 4, the phone generates touch event 4. Next, between time point E and time point F, the call audio stream is in an open state. At time point F, the hang-up prompt tone audio stream is in a close state. At time point G, the resource manager sets the sound card device of the phone to device 4. Then, the phone establishes the RX channel and completes. Before time point H, the phone establishes the TX channel and completes. Then, at time point H, the phone sets the session parameters.
[0290] For example, after the user dials the call 4 through the phone, the system information of the phone can include that the call is being dialed. For example, the call being dialed can be: timestamp W handleCalls DIALING.
[0291] For example, the embodiment of the present application further provides a call method, which can be applied to an electronic device such as a phone, and the method comprises steps one to seven.
[0292] Step one: after a first call is hung up, the phone creates a first audio stream.
[0293] For example, the optional implementation of this step can refer to the above step S503 or the above step S802.
[0294] Step two: after the phone creates the first audio stream, at a first time point, the phone starts a second call.
[0295] For example, the optional implementation of this step can refer to the above step S803 or the above step S504.
[0296] Step three: at a second time point, the phone closes the first audio stream; wherein, after the first time point and before the second time point, the sound card device of the electronic device is a first device.
[0297] For example, the optional implementation of this step can refer to the above step S508 or the above step S806. The sound card device of the electronic device can be understood as a device that is being used by the electronic device to play / capture sound.
[0298] Step four: at a third time point, the phone sets the sound card device to a second device; the third time point is later than the second time point.
[0299] For example, the optional implementation of this step can refer to the above description about the resource manager setting the sound card device of the phone.
[0300] Step five: at a fourth time point, the mobile phone completes the call path establishment, and before the fourth time point, the session parameter is not set; the fourth time point is later than the third time point.
[0301] The call path can be the call path of the second call. For example, the mobile phone completing the call path establishment can be understood as that the mobile phone exits the open TX path in the case of exiting the open RX path, or that the mobile phone exits the open RX path in the case of exiting the open TX path.
[0302] It can be understood that, at the fourth time point, the call path establishment is completed, which means that, at the fourth time point, the open RX path is exited and the open TX path is exited; it can also be understood that the open RX path is exited and the open TX path is exited, both of which occur at the fourth time point.
[0303] Step six: after the fourth time point, the session parameter is set.
[0304] For example, the optional implementation of this step can refer to the above step S808 or the above step S511.
[0305] Step seven: the mobile phone transmits the voice data of the second call.
[0306] For example, the mobile phone can transmit the voice data of the second call through the call path. For example, the mobile phone can send the voice data of the second call through the RX path of the second call, and the mobile phone can send the voice data of the second call through the TX path of the second call.
[0307] Optionally, the call method further includes: after the first call is hung up, the electronic device creates a second audio stream, and the electronic device creates the second audio stream is performed before the electronic device creates the first audio stream. Next, after the first time point, the electronic device sets the sound card device to the second device. Then, after the first time point and before the second time point, the electronic device closes the second audio stream, and after closing the second audio stream, the electronic device sets the sound card device to the first device.
[0308] Wherein, after the electronic device creates the second audio stream, the resource management of the electronic device becomes open based on the state of the second audio stream, and the resource management sets the sound card device of the electronic device as the first device corresponding to the second audio stream. Then, at the first time point, the second call is started, and the electronic device creates an audio stream of the second call. The resource management becomes open based on the state of the audio stream of the second call, and the resource management sets the sound card device of the electronic device as the second device corresponding to the audio stream of the second call. Next, after the electronic device closes the second audio stream, the resource management becomes close based on the state of the second audio stream, and the resource management acquires the first audio stream and does not acquire the audio stream of the second call. The resource management sets the sound card device as the first device corresponding to the first audio stream. Then, at the third time point, after the electronic device closes the first audio stream, the resource management becomes close based on the state of the first audio stream, the resource management acquires the audio stream of the second call, and the resource management sets the sound card device of the electronic device as the second device corresponding to the audio stream of the second call.
[0309] Optionally, during the period between the third time point and the fourth time point, no mute is set. Wherein, the above-mentioned no mute can include no mute being set to the second device.
[0310] Optionally, the call path includes a sending path and a receiving path, and the method further includes: the electronic device opens the sending path and opens the receiving path. The above-mentioned electronic device completing the call path establishment includes: in the case of exiting the open receiving path, the open sending path is exited. Alternatively, the above-mentioned electronic device completing the call path establishment includes: in the case of exiting the open sending path, the open receiving path is exited.
[0311] It can be understood that, at the fourth time point, the call path establishment is completed, which means that, at the fourth time point, the open receiving path is exited and the open sending path is exited; or, the open receiving path is exited and the open sending path is exited, both of which occur at the fourth time point. Wherein, the open sending path being exited can be understood as the process of opening the sending path being completed. Alternatively, the electronic device exits the function of opening the sending path. The open receiving path being exited can be understood as the process of opening the receiving path being completed. Alternatively, the electronic device exits the function of opening the receiving path.
[0312] Optionally, the above-mentioned electronic device starting the second call includes: the electronic device answers the second call made by the other electronic device, such as the electronic device receiving an INVITE message of the second call, and then the electronic device sending a 200OK message for the INVITE. Alternatively, the above-mentioned electronic device starting the second call includes: the electronic device makes the second call to the other electronic device, such as the electronic device sending an invitation (INVITE) message of the second call.
[0313] It should be noted that the personal information used in the technical solutions of the present application is limited to information obtained with the individual consent of the user, including but not limited to informing and reminding the user to read the relevant user agreement (notification) before the user uses the function, and signing the agreement including authorization of relevant user information (authorization).
[0314] The algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented in hardware or a combination of hardware and computer software. Whether a certain function is implemented in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solutions. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered beyond the scope of the present application.
[0315] The present embodiment can divide the functional modules of the electronic device according to the above-mentioned method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing module. The integrated module can be implemented in the form of hardware. It should be noted that the division of modules in the present embodiment is illustrative, and is only a logical functional division. Actual implementation can have another division method.
[0316] The present application also provides an electronic device, which can include one or more processors, memories and communication interfaces.
[0317] The memory, the communication interface and the processor are coupled together, for example, through a bus.
[0318] The communication interface is used for data transmission with other devices. The memory stores computer program code. The computer program code includes computer instructions, which, when executed by the processor, causes the electronic device to perform the related method steps in the above-mentioned method embodiments of the present application.
[0319] The processor can be a processor or controller, such as a central processing unit (CPU), a general purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, transistor logic, hardware component, or any combination thereof. The processor can implement or execute various example logical blocks, modules, and circuits described in connection with the present disclosure. The processor can also be a combination of computing functionality, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0320] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0321] The chip system can further include other discrete devices, which are not limited in the present application.
[0322] The chip system can further include other discrete devices, which are not limited in the present application.
[0323] The chip system can further include other discrete devices, which are not limited in the present application.
[0324] The electronic device, the computer readable storage medium or the computer program product provided in the application are used to execute the corresponding method provided above, and thus the beneficial effects achieved thereby can refer to the beneficial effects of the corresponding method provided above, which will not be described here again.
[0325] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0326] In several embodiments provided in the application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0327] The units described as separate components can or can not be physically separated, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0328] In addition, each functional unit in each embodiment of the application can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0329] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or in the part that contributes to the present application, or the whole or part of the technical solutions can be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in the embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0330] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A call method characterized by, The method is applied to an electronic device, and the method comprises: creating a first audio stream after a first call is hung up; starting a second call at a first time point after the first audio stream is created; closing the first audio stream at a second time point; the second time point is later than the first time point; wherein, after the first time point and before the second time point, a sound card device of the electronic device is a first device; setting the sound card device as a second device at a third time point; the third time point is later than the second time point; completing call path establishment at a fourth time point; no session parameter is set before the fourth time point; the fourth time point is later than the third time point; setting a session parameter after the fourth time point; transmitting voice data of the second call.
2. The method of claim 1, wherein, The method further comprises: creating a second audio stream after the first call is hung up; the creating of the second audio stream is performed before the creating of the first audio stream; setting the sound card device as the second device after the first time point; closing the second audio stream after the first time point and before the second time point; the sound card device is set as the first device after the second audio stream is closed.
3. The method of claim 1 or 2, wherein, no muting is set in a time period between the third time point and the fourth time point.
4. The method according to any one of claims 1 to 3, characterized in that, The call path comprises a sending path and a receiving path, and the method further comprises: opening the sending path and opening the receiving path; The completing of the call path establishment comprises: exiting the opening of the sending path in the case of exiting the opening of the receiving path.
5. The method of claim 4, wherein, The method further comprises: exiting the opening of the receiving path between the first time point and the second time point.
6. The method of claim 2, wherein, The method further comprises: creating an audio stream of the second call based on the starting of the second call; The setting of the sound card device as the second device after the first time point comprises: setting the sound card device as the second device after the first time point based on the creating of the audio stream of the second call.
7. The method according to any one of claims 1 to 6, characterized in that, The starting of the second call comprises: the electronic device answering the second call made by another electronic device; or the electronic device making the second call to another electronic device. The device names of the first device and the second device are different, or the device parameters of the first device and the second device are different; 8. The method according to any one of claims 1 to 7, characterized in that, The device parameters comprise one or more of a code rate, a bit rate, a sampling rate, and a bit width.
9. The method of any one of claims 1-8, wherein, no session parameter is set before the fourth time point based on the audio stream of the second call being in an initialization state; and / or, no muting is set before the fourth time point based on the audio stream of the second call being in the initialization state. The setting of the session parameter after the fourth time point comprises:
10. The method according to any one of claims 1 to 9, characterized in that, acquiring a current state of the audio stream of the second call after the fourth time point; determining that a current state of an audio stream of the second call is not an initialization state, and setting a session parameter for the second call.
11. The method of claim 10, wherein, The electronic device includes an application processor, a modem processor, and an audio digital signal processor; The setting of the session parameter for the second call includes: The application processor sends the session parameter of the second call to the modem processor through the audio digital signal processor.
12. An electronic device, comprising: The electronic device includes a processor and a memory; the processor is coupled to the memory; the memory is configured to store computer program codes; the computer program codes include computer instructions, when the processor executes the computer instructions, the electronic device executes the method as claimed in any one of claims 1-11.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium includes computer instructions, when the computer instructions run on the electronic device, the electronic device executes the method as claimed in any one of claims 1-11.
14. A chip system, characterized by The chip system includes at least one processor and an interface circuit, the at least one processor is connected with the interface circuit; The at least one processor is configured to, After the first call is hung up, create a first audio stream; After the creation of the first audio stream, start the second call at a first time point; At a second time point, close the first audio stream; the second time point is later than the first time point; wherein, after the first time point and before the second time point, the sound card device of the electronic device is a first device; At a third time point, set the sound card device as a second device; the third time point is later than the second time point; At a fourth time point, complete the call path establishment, before the fourth time point, no session parameter is set; the fourth time point is later than the third time point; After the fourth time point, set the session parameter; Transmit voice data of the second call.