WO2025148705A1 - 出声通道切换方法、终端设备及存储介质 - Google Patents

出声通道切换方法、终端设备及存储介质

Info

Publication number
WO2025148705A1
WO2025148705A1 PCT/CN2024/142874 CN2024142874W WO2025148705A1 WO 2025148705 A1 WO2025148705 A1 WO 2025148705A1 CN 2024142874 W CN2024142874 W CN 2024142874W WO 2025148705 A1 WO2025148705 A1 WO 2025148705A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
bluetooth device
terminal device
call
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/142874
Other languages
English (en)
French (fr)
Inventor
安东
马利民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202480056132.8A priority Critical patent/CN121844699A/zh
Publication of WO2025148705A1 publication Critical patent/WO2025148705A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/19Connection re-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/30Connection release

Definitions

  • the present application belongs to the field of communication technology, and in particular, relates to a method for switching an audio channel, a terminal device, and a storage medium.
  • terminal devices can establish connections with other external devices and exchange data.
  • terminal devices can simultaneously establish Bluetooth connections with multiple Bluetooth devices, such as Bluetooth headsets, car Bluetooth, Bluetooth bracelets, Bluetooth speakers, etc.
  • the terminal device can establish a Synchronous Connection Oriented (SCO) link with any Bluetooth device that has established a Bluetooth connection. After the SCO link is established, the terminal device can send the call audio data corresponding to the call task to the Bluetooth device with which the SCO link is established during the execution of the call task, so that it can be used as the sound output channel of the call audio data, such as playing the call audio data through a Bluetooth headset or car Bluetooth.
  • SCO Synchronous Connection Oriented
  • the method further includes: if the device type of the second Bluetooth device is different from the device type of the first Bluetooth device and the preset priority of the first Bluetooth device is greater than the preset priority of the second Bluetooth device, establishing a synchronous directional link with the first Bluetooth device.
  • the above method can accurately determine the output audio device that the user may need among the multiple Bluetooth devices connected to the terminal device.
  • the third Bluetooth device when the third Bluetooth device outputs the call audio data as an audio output device, the third Bluetooth device can continue to be used as an audio output device when the fourth Bluetooth device sends a link establishment request and the fourth Bluetooth device is not the target Bluetooth device, and the sound output channel is not switched, thereby avoiding the situation where the sound output channel is switched due to the triggering of the link establishment request when the fourth Bluetooth device is not the target Bluetooth device, thereby improving the stability of the third Bluetooth device outputting the call audio data as an audio output device, and ensuring the user experience of using the third Bluetooth device for calls.
  • the terminal device 100 can determine an audio output device in at least one Bluetooth device 200 that establishes a Bluetooth connection. After determining the audio output device, a SCO link is established with the determined audio output device.
  • the SCO link is a synchronous directional link used to transmit data communications with high time requirements.
  • the audio output device can be used for call output and media output.
  • the audio output device can receive call audio data sent by the terminal device and perform call output.
  • the audio output device can perform media output based on the received media audio data sent by the terminal device, such as playing music.
  • the terminal device when a Bluetooth device is determined as an audio output device of the terminal device, the terminal device establishes a SCO link with the Bluetooth device.
  • each paired device includes a corresponding audio output configuration option 22.
  • the device can be set as an audio output device, or the device can be canceled from being set as an audio output device.
  • the vehicle-mounted device 1 can be set as an audio output device based on the audio output configuration option 22 of the vehicle-mounted device 1.
  • corresponding priorities can be set in advance for Bluetooth devices belonging to different device types in the terminal device.
  • the audio connection device can be determined based on the preset priority among the multiple Bluetooth devices that have established the communication connection. For example, assuming that the priority pre-set for the vehicle-mounted device is lower than the priority of the Bluetooth headset, when the terminal device simultaneously establishes a communication connection with the vehicle-mounted device 1 and the Bluetooth headset 1, based on the priority, the terminal device determines the Bluetooth headset 1 as the audio output device.
  • the terminal device determines the audio output device based on the priority, it can also reconfirm the audio output device based on the user's operation on the audio output configuration option.
  • the above describes the correspondence between the terminal device, the Bluetooth device and the Bluetooth configuration interface by way of example through the content of the Bluetooth configuration interface of the terminal device.
  • the memory 302 can be used to store program codes, such as program codes for physically connecting the Bluetooth device 200 with multiple terminal devices, connecting with terminal devices in accordance with service specifications, processing audio services of terminal devices (such as music playback, answering/making calls, etc.), charging the Bluetooth device 200, and wireless pairing and connection between the Bluetooth device 200 and other terminal devices, etc.
  • the memory 302 can also be used to store other information, such as the priority of the terminal device.
  • the processor 301 may include one or more processing units, and different processing units may be independent devices or integrated into one or more processors 301.
  • the processor 301 may specifically be an integrated control chip, or may be composed of a circuit including various active and/or passive components, and the circuit is configured to perform the functions of the processor 301 described in the embodiments of the present application.
  • the Bluetooth chip can support basic rate (BR)/enhanced data rate (EDR) Bluetooth and BLE, for example, it can receive/send page information, receive/send BLE broadcast messages, etc.
  • the Bluetooth chip can transmit a signal, such as a BLE signal, so that the terminal device 100 discovers the Bluetooth device 200 and establishes a Bluetooth connection and communication with the Bluetooth device 200.
  • the Bluetooth chip can also monitor signals transmitted by the terminal device 100, such as detection requests, scanning signals, etc., and can send response signals, scanning responses, etc., so that the terminal device 100 can discover the Bluetooth device 200 and establish a wireless connection and communication with the Bluetooth device 200.
  • the Bluetooth chip can monitor the service information of the terminal device 100. If the service information is monitored, it is determined that the terminal device 100 has an audio service.
  • the audio module 304 can be used to manage audio data and implement the input and output of audio streams by the Bluetooth device 200.
  • the audio module 304 can obtain an audio stream from the wireless communication module 303, or transmit an audio stream to the wireless communication module 303, to implement functions such as making and receiving calls, playing music, starting/turning off a voice assistant of a terminal device connected to a headset, and receiving/sending user voice data through the Bluetooth device 20.
  • the audio module 304 may include a speaker (or earpiece, receiver) component for outputting an audio stream, a microphone (or microphone, microphone), a microphone receiving circuit matched with the microphone, etc.
  • the speaker can be used to convert an audio electrical signal into a sound signal and play it.
  • the microphone can be used to convert a sound signal into an audio electrical signal.
  • the power module 305 can be used to provide system power for the Bluetooth device 20, power each module of the Bluetooth device 20, and support the Bluetooth device 20 to receive charging input.
  • the power module 305 may include a power management unit (PMU) and a battery.
  • the power management unit may receive external charging input, transform the electrical signal input from the charging circuit and provide it to the battery for charging, and may also transform the electrical signal provided by the battery and provide it to other modules such as the audio module 304 and the wireless communication module 303, and prevent the battery from being overcharged, over-discharged, short-circuited or overcurrented.
  • the power module 305 may also include a wireless charging coil for wirelessly charging the Bluetooth device 20.
  • the power management unit may also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance).
  • the multiple input/output interfaces 306 can be used to provide an interface for charging the Bluetooth device 20 or a wired connection interface for communication.
  • the input/output interface can be a USB interface.
  • the input/output interface 306 can be an earphone electrical connector.
  • the Bluetooth device 20 can establish an electrical connection with the electrical connector in the earphone box through the earphone electrical connector, thereby charging the battery in the Bluetooth device 20.
  • the Bluetooth device 20 can also communicate data with the earphone box, for example, it can receive a pairing instruction from the earphone box.
  • the Bluetooth device 20 may further include a sensor 307.
  • the sensor 307 may be a distance sensor or a proximity light sensor, which may be used to determine whether the Bluetooth device 20 is worn by the user.
  • the Bluetooth device 20 may use a distance sensor to detect whether there is an object near the Bluetooth device 20, thereby determining whether the Bluetooth device 20 is worn by the user.
  • the Bluetooth device 20 may turn on a speaker.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the Bluetooth device 20. It may have more or fewer components than those shown in FIG. 3, may combine two or more components, or may have different component configurations.
  • the outer surface of the Bluetooth device 20 may also include a button 308, an indicator light (which may indicate battery level, incoming/outgoing calls, pairing mode, etc.), a display screen (which may prompt the user with relevant information), a dust screen (which may be used in conjunction with a handset), and other components.
  • the button 308 may be a physical button or a touch button (used in conjunction with a touch sensor), etc., which is used to trigger operations such as power on, power off, pause, play, record, start pairing, and reset.
  • FIG4 is a schematic diagram of an audio output device confirmation method provided by an embodiment of the present application.
  • the audio output device confirmation method is applied to a terminal device. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. As shown in FIG4, the method includes:
  • Step S401 Establish a Bluetooth connection with a target device.
  • the target device is a device to which the terminal device is to establish a Bluetooth connection.
  • a Bluetooth connection can be established with the target device in response to a Bluetooth connection instruction.
  • the terminal device triggers a Bluetooth connection instruction of the target device.
  • a Bluetooth connection is established with the target device if the Bluetooth of the terminal device is turned on.
  • step S402 is performed to determine whether multiple Bluetooth devices are connected.
  • the terminal device After connecting to the target device, the terminal device determines the Bluetooth device that has currently established a Bluetooth connection, and determines whether multiple Bluetooth devices are connected.
  • step S403 is executed to determine whether the target device is a speaker device.
  • the device type icon of the headset one and the device type icon of the vehicle-mounted device one can be displayed on the Bluetooth configuration interface.
  • the device type icon of the Bluetooth device it is convenient for the user to confirm the device type of the Bluetooth device.
  • step S404 is executed to determine the device that triggers the call task as an audio output device.
  • the device that triggers the call task can be a terminal device or a target device, such as a speaker device.
  • the terminal device receives an incoming call
  • the incoming call operation control corresponding to the incoming call will be displayed on the display screen of the terminal device (and/or the display screen of the speaker device), and the incoming call operation control includes an answering control; in response to the user's operation of the answering control on the display screen of the terminal device (or the display screen of the speaker device), the call task is triggered.
  • the terminal device determines itself as an audio output device and directly plays the call audio data corresponding to the call task.
  • the call task when the user operates the answering control on the display screen of the speaker device, the call task is triggered, and the terminal device determines the speaker device as an audio output device, and sends the call audio data corresponding to the call task to the speaker device, so that the speaker device plays the call audio data corresponding to the call task.
  • the device that plays the call audio data of the call task is determined by the user triggering the call task corresponding to the incoming call, thereby avoiding the situation where the terminal device directly plays the call audio data of the call task through the speaker device after connecting to a Bluetooth device (such as a speaker device), thereby ensuring the user's call privacy.
  • step S405 is executed to determine the target device as an audio output device.
  • step S406 is executed to determine whether the multiple Bluetooth devices are devices of the same type.
  • step S407 is executed to determine the target device as an audio output device.
  • the target device is the last device among multiple Bluetooth devices to establish Bluetooth communication with the terminal device.
  • the user intention is predicted based on the user behavior, and the target device is determined as the audio output device, so that the determined audio output device can better meet the user's needs.
  • the target device is determined as an audio output device; if multiple Bluetooth devices are all Bluetooth headsets and the multiple devices include a hearing aid, the hearing aid is determined as the audio output device; if multiple Bluetooth devices are all Bluetooth headsets and the multiple devices include multiple hearing aids, the last connected hearing aid among the multiple hearing aids can be determined as the audio output device.
  • the priorities corresponding to different device types can be preset. For example, based on the device type of the Bluetooth device, the priority corresponding to the Bluetooth device can be determined. The priorities corresponding to different device types can be set according to the needs of the user.
  • the Bluetooth headset can be determined as the first priority
  • the vehicle-mounted device can be determined as the second priority
  • the speaker can be determined as the third priority. Among them, the first priority is greater than the second priority, and the second priority is greater than the third priority.
  • the headset in response to the second operation of the user on the terminal device, the headset is determined as the audio output device, and the SCO link with the vehicle is disconnected, and the SCO link with the headset is established, so that the call audio data corresponding to the first call task is output from the headset.
  • the audio output device can be reconfirmed based on the operation of the user on the terminal device to achieve the switching of the sound output channel.
  • the terminal device will reject all connection request instructions sent by the vehicle.
  • the terminal device in response to the second operation of the user on the terminal device, after the terminal device establishes the SCO link with the headset, during the execution of the first call task, if the terminal device receives the connection request instruction sent by the vehicle again, it does not respond to the connection request instruction, does not disconnect the synchronous directional link with the headset, and maintains the synchronous directional link with the headset; and sends a rejection message to the vehicle.
  • the synchronous directional link with the first Bluetooth device is disconnected, and a synchronous directional link with the second Bluetooth device is established.
  • the request method corresponding to the link establishment request sent by the second Bluetooth device may include a connection request instruction and/or an AT+BCC instruction. The above method can redetermine the audio output device in response to the request of the Bluetooth device and establish a new synchronous directional link when the terminal device is not executing the call task.
  • FIG. 8 is a schematic diagram of a channel switching method based on the second instruction provided by an embodiment of the present application.
  • the method shown in FIG. 8 may be a specific implementation of step S508 in FIG. 5 .
  • the method includes:
  • Step S601 if the request instruction of the link establishment request is the second instruction, determine the reception time of the link establishment request.
  • Step S602 determining whether the receiving time is within a preset time period after the terminal device starts the first call task.
  • the preset time period is a time period in which the probability of the user switching to the voice channel is relatively low.
  • the preset time period can be set according to the needs of the user. For example, the preset time period can be set based on the reaction time of the user operation. For example, the preset time period can be set to 2S or 3.5S.
  • the link establishment request received within the preset time period after the terminal device starts the first call task is determined to be a link establishment request automatically triggered by the Bluetooth device.
  • the receiving time is within the preset time period after the terminal device starts the first call task, it does not respond to the link establishment request sent by the second Bluetooth device, does not disconnect the synchronous directional link with the first Bluetooth device, and maintains the synchronous directional link with the first Bluetooth device.
  • step S604 is executed to disconnect the synchronous directional link with the first Bluetooth device and establish a synchronous directional link with the second Bluetooth device.
  • the above implementation manner can further judge the link establishment request of the received second instruction based on the preset time period after the terminal device starts the first call task, so as to determine whether the link establishment request is a link establishment request actively triggered by the second Bluetooth device, and determine whether to disconnect the synchronous directional link with the first Bluetooth device and re-establish the synchronous directional link with the second Bluetooth device based on the result of the judgment, thereby avoiding the situation where the sound channel is switched against the user's wishes during the device's execution of the call task, and further improving the accuracy of the sound channel switching.
  • step S701 is executed to determine whether a synchronous directional link is established with a third Bluetooth device.
  • the third Bluetooth device is a Bluetooth device that establishes a Bluetooth connection with the terminal device and the device type is a Bluetooth headset. If it is determined that the terminal device establishes a synchronous directional link with the third Bluetooth device, it is determined that the terminal device currently only establishes a Bluetooth connection with a single third Bluetooth device, and does not establish Bluetooth communication with other devices other than the third Bluetooth device.
  • the third Bluetooth device can be the target device in the method shown in FIG. 4.
  • a synchronous directional link can be established with the third Bluetooth device.
  • the terminal device can determine an audio output device from the third Bluetooth device and any of the Bluetooth devices, and establish a SCO link with the determined audio output device.
  • the audio output device can be determined based on the respective priorities of the third Bluetooth device and any of the Bluetooth devices.
  • any of the Bluetooth devices can be determined as an audio output device, and a SCO link between the terminal device and any of the Bluetooth devices can be established.
  • step S702 is executed.
  • the call audio data corresponding to the second call task is sent to the third Bluetooth device, so that the third Bluetooth device plays the call audio data corresponding to the second call task.
  • the second call task may be any call task triggered after the terminal device establishes a call with the third Bluetooth device.
  • Step S703 receiving a first Bluetooth connection instruction, and establishing a Bluetooth connection with a fourth Bluetooth device.
  • the first Bluetooth connection instruction is used to instruct the user to establish a Bluetooth connection with the fourth Bluetooth device.
  • the fourth Bluetooth device is the Bluetooth device to be connected to the terminal device. In the embodiment of the present application, there is no restriction on the device type of the fourth Bluetooth device.
  • the fourth Bluetooth device can be any one of a Bluetooth headset, a vehicle-mounted device, and a speaker.
  • the first Bluetooth connection instruction can be triggered based on the user's operation on the Bluetooth configuration interface. After receiving the first Bluetooth connection instruction, the terminal device establishes a Bluetooth connection with the fourth Bluetooth device.
  • Step S704 during the execution of the second call task, if a link establishment request sent by a fourth Bluetooth device is received, the link establishment request is not responded to.
  • the synchronous directional link with the third Bluetooth device is not disconnected, and the synchronous directional link with the third Bluetooth device is maintained.
  • the request method corresponding to the link establishment request sent by the fourth Bluetooth device may include a connection request instruction and/or an AT+BCC instruction.
  • the synchronous directional link with the third Bluetooth device can be disconnected, and a synchronous directional link with the fourth Bluetooth device can be established.
  • the terminal device sends the call audio data corresponding to the second call task to the fourth Bluetooth device based on the synchronous directional link with the fourth Bluetooth device, so that the fourth Bluetooth device plays the call audio data corresponding to the second call task.
  • the above method can use the fourth Bluetooth device as the audio output device based on the user's operation of reconfirming the audio output device on the terminal device, so that the call audio data corresponding to the second call task is switched from the third Bluetooth device to the fourth Bluetooth device, thereby improving the user experience.
  • the above implementation method when the third Bluetooth device outputs call audio data as an audio output device, can continue to use the third Bluetooth device as an audio output device when the fourth Bluetooth device sends a link establishment request, and does not switch the sound output channel. This avoids the situation where the sound output channel is switched due to triggering a link establishment request when the fourth Bluetooth device is not the target Bluetooth device, improves the stability of the third Bluetooth device outputting call audio data as an audio output device, and ensures the user experience of using the third Bluetooth device for calls.
  • the synchronous directional link with the third Bluetooth device is disconnected, and a synchronous directional link with the fourth Bluetooth device is established.
  • the request method corresponding to the link establishment request sent by the fourth Bluetooth device may include a connection request instruction and/or an AT+BCC instruction. The above method can redetermine the audio output device in response to the request of the Bluetooth device and establish a new synchronous directional link when the terminal device is not executing the call task.
  • FIG10 is a schematic diagram of a method for switching an output channel provided in an embodiment of the present application.
  • the present application takes the method shown in FIG10 as an example of executing after step S504 in FIG5 for explanation. As shown in FIG10 , the method includes:
  • step S801 in response to a second Bluetooth connection instruction, a Bluetooth connection is established with a fifth Bluetooth device.
  • the second Bluetooth connection instruction is used to instruct the user to establish a Bluetooth connection with the fifth Bluetooth device.
  • the fifth Bluetooth device is the Bluetooth device to be connected to the terminal device, and can be the device to be connected to the terminal device while the terminal device is performing the first call task. In the embodiment of the present application, there is no restriction on the device type of the fifth Bluetooth device.
  • the fifth Bluetooth device can be any one of a Bluetooth headset, a car device, and a speaker.
  • the second Bluetooth connection instruction can be triggered based on the user's operation on the Bluetooth configuration interface. After receiving the second Bluetooth connection instruction, the terminal device establishes a Bluetooth connection with the fifth Bluetooth device.
  • Step S801 during the execution of the first call task, if a link establishment request sent by a fifth Bluetooth device is received, the link establishment request is not responded to.
  • the request method corresponding to the link establishment request sent by the fifth Bluetooth device may include a connection request instruction and/or an AT+BCC instruction.
  • the synchronous directional link with the first Bluetooth device can be disconnected and a synchronous directional link with the fifth Bluetooth device can be established based on the user's operation of determining the fifth Bluetooth device as the audio output device on the terminal device.
  • the terminal device sends the call audio data corresponding to the first call task to the fifth Bluetooth device based on the synchronous directional link with the fifth Bluetooth device, so that the fifth Bluetooth device plays the call audio data corresponding to the first call task.
  • the above method can use the fifth Bluetooth device as the audio output device based on the user's operation of reconfirming the audio output device on the terminal device, so that the call audio data corresponding to the first call task is switched from playing from the first Bluetooth device to playing from the fifth Bluetooth device, thereby improving the user experience.
  • the terminal device when the first Bluetooth device serves as an audio output device to output call audio data corresponding to the first call task, if the terminal device establishes a Bluetooth connection with the fifth Bluetooth device during the execution of the first call task, during the execution of the first call task, even if the fifth Bluetooth device sends a link establishment request, the terminal device can continue to use the first Bluetooth device as an audio output device without switching the sound output channel, thereby avoiding the situation where the sound output channel is switched due to the fifth Bluetooth device triggering the link establishment request, improving the stability of the first Bluetooth device outputting call audio data as an audio output device, and ensuring the user experience of using the first Bluetooth device to make calls.
  • the synchronous directional link with the first Bluetooth device is disconnected, and a synchronous directional link with the fifth Bluetooth device is established.
  • the request method corresponding to the link establishment request sent by the fifth Bluetooth device may include a connection request instruction and/or an AT+BCC instruction. The above method can redetermine the audio output device in response to the request of the Bluetooth device and establish a new synchronous directional link when the terminal device is not executing the call task.
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the I1C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the I2S interface can be used for audio communication.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 can be coupled through the PCM bus interface.
  • the UART interface is a universal serial data bus for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100.
  • the processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
  • the USB interface 130 is an interface that complies with 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 terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other terminal devices 100, such as AR devices, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the terminal device 100.
  • the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger.
  • the charger can be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
  • the wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied to the terminal device 100.
  • the mobile communication module 150 may 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 from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
  • the wireless communication module 160 can provide wireless communication solutions for application in the terminal device 100, including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.
  • WLAN wireless local area networks
  • Bluetooth BT
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor that serves abnormality reminders and connects the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • AMOLED active-matrix organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.
  • the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the terminal device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the camera 193 is used to capture still images or videos.
  • the object is projected onto the photosensitive element by generating an optical image through the lens.
  • the internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
  • RAM random access memories
  • NVM non-volatile memories
  • the external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 100.
  • the external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
  • the terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the speaker 170A also known as the "speaker” is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music or listen to hands-free calls through the speaker 170A.
  • the receiver 170B also known as the "earpiece”, is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also known as the “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C with the human mouth to input the sound signal into the microphone 170C.
  • the terminal device 100 can be provided with at least one microphone 170C.
  • the terminal device 100 can be provided with two microphones 170C, which can not only collect sound signals, but also realize noise reduction function. In other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100.
  • the air pressure sensor 180C is used to measure the air pressure.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).
  • the distance sensor 180F is used to measure the distance.
  • the proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the button 190 includes a power button, a volume button, etc.
  • the button 190 may be a mechanical button. It may also be a touch button.
  • the motor 191 may generate a vibration prompt.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, the change of the power, or may be used to indicate messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be connected to or separated from the terminal device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.
  • the terminal device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 can also be compatible with external memory cards.
  • the terminal device 100 interacts with the network through the SIM card to implement functions such as calls and data communications.
  • the terminal device 100 uses an eSIM, i.e., an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.
  • An embodiment of the present application also provides a computer storage medium, which stores computer instructions.
  • the terminal device 100 executes the above-mentioned related method steps to implement the method provided in the above-mentioned embodiment, such as the sound channel switching method.
  • the embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the method provided in the above-mentioned embodiment, such as the sound channel switching method.
  • an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the method provided in the above embodiment, such as the sound channel switching method.
  • the terminal device, computer storage medium, computer program product or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided in the above embodiments. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
  • the above implementation methods technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic, for example, the division of the module or unit is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of the device or unit, which can be electrical, mechanical or other forms.
  • the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed in multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

本申请提供一种出声通道切换方法、终端设备及存储介质,涉及通信技术领域。所述方法包括:若终端设备与多个蓝牙设备建立蓝牙连接并与第一蓝牙设备建立同步定向链路,响应于第一通话任务,将通话音频数据发送至第一蓝牙设备;若接收到第二蓝牙设备发送的链路建立请求且链路建立请求对应的请求指令为第一指令,维持与所述第一蓝牙设备的同步定向链路;若请求指令为第二指令,断开与第一蓝牙设备的同步定向链路,并建立与第二蓝牙设备的同步定向链路,将通话音频数据发送至第二蓝牙设备。上述方法能够在蓝牙设备发送第一指令的链路建立请求后,不进行出声通道的切换,避免了因蓝牙设备主动触发链路建立请求导致出声通道切换的情况出现。

Description

出声通道切换方法、终端设备及存储介质
本申请要求于2024年01月10日提交中国专利局,申请号为202410044056.0,发明名称为“出声通道切换方法、终端设备及存储介质”的中国专利申请的优先权,所主张的优先权的全部内容通过引用结合在本申请中。
技术领域
本申请属于通信技术领域,尤其涉及一种出声通道切换方法、终端设备及存储介质。
背景技术
通过无线通信协议,终端设备可以与其他外部设备建立连接并交互数据。例如,通过蓝牙协议,终端设备可以同时与多个蓝牙设备建立蓝牙连接,如蓝牙耳机、车载蓝牙、蓝牙手环、蓝牙音箱等。终端设备可以与任意一个建立蓝牙连接的蓝牙设备建立同步定向(Synchronous Connection Oriented,SCO)链路。在建立SCO链路后,终端设备在执行通话任务的过程中,可以将通话任务对应的通话音频数据发送给与其建立SCO链路的蓝牙设备,使其作为通话音频数据的出声通道,如通过蓝牙耳机或车载蓝牙播放通话音频数据。
与终端设备建立SCO链路的蓝牙设备在播放通话音频数据的过程中,与该终端设备建立蓝牙连接的其他蓝牙设备也可能向终端设备发出建立SCO的连接请求。如果终端设备直接响应建立SCO的连接请求,与发送连接请求的蓝牙设备建立SCO链路,可能会出现音频设备违背用户意愿成功抢占出声通道的事件发生,即导致出现违背用户意愿切换出声通道的情况,导致用户使用体验不佳。
发明内容
本申请实施例公开了一种出声通道切换方法、终端设备及存储介质,可以避免在终端设备执行通话任务过程中,出现违背用户意愿切换出声通道的情况。
本申请第一方面公开了一种出声通道切换方法,应用于终端设备,所述方法包括:若所述终端设备与多个蓝牙设备建立蓝牙连接并与所述多个蓝牙设备中的第一蓝牙设备建立同步定向链路,响应于第一通话任务,基于与所述第一蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第一蓝牙设备,使得所述第一蓝牙设备播放所述第一通话任务对应的通话音频数据;在所述第一通话任务的执行过程中,若接收到所述多个蓝牙设备中的第二蓝牙设备发送的链路建立请求,确定所述链路建立请求对应的请求指令;若所述请求指令为第一指令,维持与所述第一蓝牙设备的同步定向链路;若所述请求指令为第二指令,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路;基于与所述第二蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第二蓝牙设备,使得所述第二蓝牙设备播放所述第一通话任务对应的通话音频数据。
上述方法,可以在第二蓝牙设备发送请求类型为第一指令的链路建立请求后,继续将第一蓝牙设备作为音频输出设备,不进行出声通道的切换,避免了因第二蓝牙设备主动触发链路建立请求导致出声通道切换的情况出现,从而避免了在设备执行通话任务过程中,出现违背用户意愿切换出声通道的情况。同时,在第二蓝牙设备发送第二指令的链路建立请求后,停止将第一蓝牙设备作为音频输出设备,将第二蓝牙设备作为音频输出设备,使得第一通话任务对应的通话音频数据从第一蓝牙设备播放切换至从第二蓝牙设备播放,实现了出声通道的切换。
在一些可选的实施方式中,所述方法还包括:所述若所述请求指令为第二指令,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路,包括:若所述请求指令为第二指令且所述链路建立请求为所述终端设备开启所述第一通话任务后的预设时间段之后接收的请求,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路。上述方法,可以基于终端设备开启所述第一通话任务后的预设时间段,对接收到的第二指令的链路建立请求进行进一步判定,以确定该链路建立请求是否为第二蓝牙设备主动触发的链路建立请求,并基于判断的结果确定是否断开与第一蓝牙设备的同步定向链路,重新建立与第二蓝牙设备的同步定向链路,避免了在设备执行通话任务过程中,出现违背用户意愿切换出声通道的情况,进一步提高了出声通道切换的准确率。
在一些可选的实施方式中,所述方法还包括:若所述请求指令为第二指令且所述链路建立请求为所述终端设备开启所述第一通话任务后的预设时间段之内接收的请求,维持与所述第一蓝牙设备的同步定向链路。上述方法,可以避免基于蓝牙设备自动生成的第二指令的链路建立请求进行出声通道切换的情况出现,进一步提高了出声通道切换的准确率。
在一些可选的实施方式中,所述终端设备与多个蓝牙设备建立蓝牙连接之后,所述方法还包括:若所述第二蓝牙设备的设备类型与所述第一蓝牙设备的设备类型不同且所述第一蓝牙设备的预设优先级大于所述第二蓝牙设备的预设优先级,建立与所述第一蓝牙设备的同步定向链路。上述方法,可以在终端设备连接的多个蓝牙设备中准确地确定用户可能需要的输出音频设备。
在一些可选的实施方式中,所述终端设备与多个蓝牙设备建立蓝牙连接之后,所述方法还包括:若所述第二蓝牙设备的设备类型与所述第一蓝牙设备的设备类型相同,建立与所述第一蓝牙设备的同步定向链路,所述第一蓝牙设备与所述终端设备建立蓝牙连接的时间晚于所述第二蓝牙设备与所述终端设备建立蓝牙连接的时间。上述方法,可以在终端设备连接的多个蓝牙设备中准确地确定用户可能需要的输出音频设备。
在一些可选的实施方式中,所述方法还包括:若所述终端设备与单个的第三蓝牙设备建立蓝牙连接以及同步定向链路,响应于第二通话任务,基于与所述第三蓝牙设备的同步定向链路,将所述第二通话任务对应的通话音频数据发送至所述第三蓝牙设备,使得所述第三蓝牙设备播放所述第二通话任务对应的通话音频数据;接收蓝牙连接指令,与第四蓝牙设备建立蓝牙连接;在所述第二通话任务的执行过程中,若接收到所述第四蓝牙设备发送的链路建立请求且所述第四蓝牙设备不为目标蓝牙设备,维持与所述第三蓝牙设备的同步定向链路。上述方法,在第三蓝牙设备作为音频输出设备输出通话音频数据时,可以在第四蓝牙设备发送链路建立请求且第四蓝牙设备不为目标蓝牙设备的情况下,继续将第三蓝牙设备作为音频输出设备,不进行出声通道的切换,避免了因在第四蓝牙设备不为目标蓝牙设备时触发链路建立请求导致出声通道切换的情况出现,提高了第三蓝牙设备作为音频输出设备输出通话音频数据的稳定性,保证了用户使用第三蓝牙设备进行通话的使用体验。
在一些可选的实施方式中,所述方法还包括:在所述第一通话任务的执行过程中,响应于第二蓝牙连接指令,与第五蓝牙设备建立蓝牙连接;在第一通话任务的执行过程中,若接收到所述第五蓝牙设备发送的链路建立请求,不响应链路建立请求。在第一蓝牙设备作为音频输出设备输出第一通话任务对应的通话音频数据时,若终端设备在第一通话任务的执行过程中与第五蓝牙设备建立蓝牙连接,在第一通话任务的执行过程中,即使第五蓝牙设备发送链路建立请求,终端设备也可以继续将第一蓝牙设备作为音频输出设备,不进行出声通道的切换,避免了因第五蓝牙设备触发链路建立请求导致出声通道切换的情况出现,提高了第一蓝牙设备作为音频输出设备输出通话音频数据的稳定性,保证了用户使用第一蓝牙设备进行通话的使用体验。
在一些可选的实施方式中,所述第一指令为connection request;所述第二指令为AT+BCC。
本申请第二方面公开了一种出声通道切换方法,应用于蓝牙芯片,所述方法包括:若所述终端设备与多个蓝牙设备建立蓝牙连接并与所述多个蓝牙设备中的第一蓝牙设备建立同步定向链路,响应于第一通话任务,基于与所述第一蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第一蓝牙设备,使得所述第一蓝牙设备播放所述第一通话任务对应的通话音频数据;在所述第一通话任务的执行过程中,若接收到所述多个蓝牙设备中的第二蓝牙设备发送的链路建立请求,确定所述链路建立请求对应的请求指令;若所述请求指令为第一指令,维持与所述第一蓝牙设备的同步定向链路;若所述请求指令为第二指令,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路;基于与所述第二蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第二蓝牙设备,使得所述第二蓝牙设备播放所述第一通话任务对应的通话音频数据。
本申请第三方面公开了一种终端设备,所述终端设备包括处理器和存储器,所述存储器用于存储指令,所述处理器用于调用所述存储器中的指令,使得所述终端设备执行如第一方面所述的出声通道切换方法。
本申请第四方面公开了一种计算机可读存储介质,包括计算机指令,当所述计算机指令在终端设备上运行时,使得所述终端设备执行如第一方面所述的出声通道切换方法。
应当理解地,上述提供的第二方面所述的方法、第三方面所述的终端设备、第四方面所述的计算机可读存储介质,均与上述第一方面的方法对应,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
附图说明
图1为本申请实施例提供的出声通道切换方法适用的系统架构示意图。
图2为本申请提供的一种蓝牙配置界面的示意图。
图3为本申请实施例提供的一种蓝牙设备的结构示意图。
图4为本申请实施例提供的一种音频输出设备确认方法的示意图。
图5为本申请实施例提供的一种出声通道切换方法的示意图。
图6为本申请实施例提供的一种第二蓝牙设备发送链路建立请求的示意图。
图7为本申请实施例提供的一种第二蓝牙设备发送链路建立请求的示意图。
图8为本申请实施例提供的一种基于第二指令进行通道切换方法的示意图。
图9为本申请实施例提供的一种出声通道切换方法的示意图。
图10为本申请实施例提供的一种出声通道切换方法的示意图。
图11为本申请实施例提供的一种终端设备的结构示意图。
具体实施方式
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,“示例性”、“或者”、“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性”、“或者”、“例如”等词旨在以具体方式呈现相关概念。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请中的技术领域的技术人员通常理解的含义相同。本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。应理解,本申请中除非另有说明,“/”表示或的意思。例如,A/B可以表示A或B。本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B三种情况。“至少一个”是指一个或者多个。“多个”是指两个或多于两个。例如,a、b或c中的至少一个,可以表示:a,b,c,a和b,a和c,b和c,a、b和c七种情况。应当理解的是,本文的流程图中所示步骤的顺序可以改变,某些也可以省略。
为了能够更好地理解本申请实施例,下面将结合附图对本申请实施例提供的出声通道切换方法进行举例描述。下面这几个具体的实施例可以独立实现,也可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。
图1为本申请实施例提供的出声通道切换方法适用的系统架构示意图,该系统架构包括终端设备100和至少一个蓝牙设备200。终端设备100与蓝牙设备200可以通过蓝牙(blue tooth,BT),近场通信(near field communication,NFC),无线保真(wireless fidelity,Wi-Fi)和Wi-Fi直连等无线通信方式进行通信。在本申请实施例中,以蓝牙通信为例进行示意。在本申请的一实施方式中,终端设备100与蓝牙设备200可以通过蓝牙技术进行通信。蓝牙技术可以包括经典蓝牙、低功耗蓝牙(bluetooth low energy,BLE)、蓝牙5.0。终端设备100可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、人工智能(artificial intelligence,AI)设备、可穿戴式设备、车载设备、智能家居设备和/或智慧城市设备等终端设备。
如图1所示,蓝牙设备200可以包括蓝牙耳机201、智能手表202、蓝牙音箱203、智能电视204、车载设备205等支持蓝牙功能且可播放音频的设备。蓝牙设备可以用于对终端设备100发送的音频数据进行播放。在本申请的实施例中,蓝牙耳机201可以有多种类型,例如可以是助听器、真正无线立体声(True Wireless Stereo,TWS)耳机、耳塞式耳机、入耳式耳机、头戴式耳机、耳罩式耳机、颈带式耳机或挂耳式耳机等。蓝牙耳机可以包括分别佩戴于用户左耳和右耳的第一部分和第二部分。第一部分与第二部分可以通过连接线相连,例如颈带式耳机;第一部分与第二部分也可以是相互独立的两部分,例如真无线立体声(true wireless stereo,TWS)耳机。
在本申请的实施例中,终端设备100可以在建立蓝牙连接的至少一个蓝牙设备200中,确定音频输出设备。在确定音频输出设备后,建立与确定的音频输出设备之间的SCO链路。SCO链路即为同步定向链路,用于传输对时间要求较高的数据通信。音频输出设备可以用于进行通话输出和媒体输出。例如,音频输出设备可以接收终端设备发送的通话音频数据,进行通话输出。又如,音频输出设备可以基于接收到的终端设备发送的媒体音频数据进行媒体输出,例如,播放音乐等。在本申请的实施例中,当一蓝牙设备被确定为终端设备的音频输出设备,终端设备建立与该蓝牙设备的SCO链路。例如,当耳机一为终端设备的音频输出设备,终端设备建立与耳机一的SCO链路。终端设备在执行通话任务的过程中,可以基于与耳机一的SCO链路,将通话任务对应的通话音频数据发送至耳机一,使得耳机一播放通话音频数据。音频输出设备可以基于与终端设备间的SCO链路,向终端设备发送通话任务中采集到的音频数据,使得终端设备将音频数据传递至通话任务对应的其他终端设备。
下面结合终端设备的用户界面来举例说明,本申请中终端设备与多个蓝牙设备建立蓝牙连接后的情形。图2为本申请提供的一种蓝牙配置界面的示意图。如图2所示,该蓝牙配置界面包括终端设备的蓝牙的开关状态、设备名称、已配对的设备、音频输出配置选项。其中,蓝牙的开关状态可以通过开关控件21进行控制。例如,当开关控件21中的圆圈在左边时,表示终端设备的蓝牙处于关闭状态;当开关控件21中的圆圈在右边时,表示终端设备的蓝牙处于开启状态。用户可以通过对开关控件21的操作,切换终端设备蓝牙的状态。
设备名称为终端设备蓝牙的名称。设备名称可以是用户自定义的名称,也可以是终端设备预置的名称。
已配对的设备中包括与终端设备建立了蓝牙连接的设备以及建立过蓝牙连接的设备。建立了蓝牙连接的设备为当前与终端设备建立蓝牙连接的设备。建立过蓝牙连接的设备为历史与终端设备建立过蓝牙连接且当前未建立蓝牙连接的设备。与终端设备当前建立蓝牙连接的设备中可以包括确定的音频输出设备。如图2所示,当终端设备建立与耳机一的SCO链路后,可以在耳机一对应的显示区域内显示链路已建立提示,如“已连接用于通话和媒体的音频”。在本申请的一实施例中,终端设备可以直接作为音频输出设备,利用终端设备上的扬声器对通话任务对应的通话音频数据进行播放,也可以对终端设备上的媒体音频数据进行播放。
在本申请的一实施例中,用户可以针对音频输出配置选项进行选择,手动选择音频输出设备。如图2所示,每个已配对的设备包括对应的一个音频输出配置选项22。基于已配对的设备的音频输出配置选项22,可以将该设备设置为音频输出设备,或者取消将该设备设为音频输出设备。例如,如图2所示,可以基于车载设备一的音频输出配置选项22,将车载设备一设置为音频输出设备。
在本申请的一实施例中,可以在终端设备预先对属于不同设备类型的蓝牙设备设置对应的优先级。当终端设备与多个蓝牙设备建立通信连接后,可以基于预设的优先级在建立通信连接的多个蓝牙设备中确定音频连接设备。例如,假设车载设备预先设置的优先级低于蓝牙耳机的优先级,当终端设备同时与车载设备一和蓝牙耳机一建立通信连接时,基于优先级,终端设备将蓝牙耳机一确定为音频输出设备。在本申请的一实施例中,终端设备基于优先级确定音频输出设备后,还可以基于用户对音频输出配置选项的操作,重新确认音频输出设备。
上述通过在终端设备蓝牙配置界面的内容,示例性的描述了终端设备、蓝牙设备和蓝牙配置界面之间的对应关系。
示例性的,图3示出了一种蓝牙设备的结构示意图。该蓝牙设备200可以包括至少一个处理器301、至少一个存储器302、无线通信模块303、音频模块304、电源模块305以及输入/输出接口306等。该处理器可以包括一个或多个接口,用于与蓝牙设备200的其他部件相连。下面以蓝牙设备200为蓝牙耳机为例,结合图3对蓝牙设备200的各个部件进行具体的介绍。
其中,存储器302可以用于存储程序代码,如用于蓝牙设备200与多个终端设备之间进行实体连接,以及与终端设备之间的业务规范连接,处理终端设备的音频业务(例如音乐播放、接/打电话等),以及用于蓝牙设备200进行充电,蓝牙设备200与其他终端设备进行无线配对连接的程序代码等。存储器302还可以用于存储其他信息,例如终端设备的优先级。
处理器301可以用于执行上述应用程序代码,调用相关模块以实现本申请实施例中蓝牙设备200的功能。例如,实现蓝牙设备200与终端设备100之间进行实体连接、虚拟连接、音频播放、接/打电话、根据设备优先级切换与不同终端设备之间的业务规范连接等功能。其中,该实体连接为基于物理链路的连接,可包括SCO链路,或低功耗异步连接链路(low energy asynchronous connection link/logical transport,LEACL)连接。例如,实现蓝牙设备200向终端设备发送链路建立请求,使得建蓝牙设备200与终端设备的之间SCO链路。虚拟连接指终端设备100在蓝牙设备200附近,且可以接收到蓝牙设备200发送的BLE广播,其并不需要物理链路来进行数据传输。与实体连接相比,虚拟连接更能够节省蓝牙设备200和终端设备100的电量,延长蓝牙设备200和终端设备100的使用时长。
处理器301可以包括一个或多个处理单元,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器301中。处理器301具体可以是集成的控制芯片,也可以由包括各种有源和/或无源部件的电路组成,且该电路被配置为执行本申请实施例描述的属于处理器301的功能。
无线通信模块303可以用于支持通过无线通信技术实现蓝牙设备200与其他终端设备或耳机盒之间的数据交换。在一些实施例中,该无线通信模块303可以为蓝牙芯片。蓝牙设备200可以通过该蓝牙芯片,与其他终端设备的蓝牙芯片之间进行配对并建立无线连接,以通过该无线连接实现蓝牙设备200和其他终端设备之间的无线通信和业务处理。蓝牙芯片可以支持基础速率(basicrate,BR)/增强速率(enhanced data rate,EDR)蓝牙和BLE,例如可以收/发寻呼(page)信息,收/发BLE广播消息等。蓝牙芯片可以支持基础速率(basic rate,BR)/增强速率(enhanced data rate,EDR)蓝牙和BLE,例如可以收/发page信息,收/发BLE广播消息等。示例性的,蓝牙芯片可以发射信号,如BLE信号,使得终端设备100发现蓝牙设备200,并与蓝牙设备200建立蓝牙连接以及通信。蓝牙芯片还可以监听终端设备100发射的信号,如探测请求、扫描信号等,并可以发送响应信号、扫描响应等,使得终端设备100可以发现蓝牙设备200,并与蓝牙设备200建立无线连接以及通信。在本申请实施例中,蓝牙芯片可以监听终端设备100的业务信息,若监听到业务信息,则确定终端设备100有音频业务。
音频模块304可以用于管理音频数据,实现蓝牙设备200输入和输出音频流。例如,音频模块304可以从无线通信模块303获取音频流,或者向无线通信模块303传递音频流,实现通过蓝牙设备20接打电话、播放音乐、启动/关闭与耳机连接的终端设备的语音助手、接收/发送用户的语音数据等功能。音频模块304可以包括用于输出音频流的扬声器(或称听筒、受话器)组件,麦克风(或称话筒,传声器),与麦克风相配合的麦克收音电路等。扬声器可以用于将音频电信号转换成声音信号并播放。麦克风可以用于将声音信号转换为音频电信号。
电源模块305可以用于提供蓝牙设备20的系统电源,为蓝牙设备20各模块供电;支持蓝牙设备20接收充电输入等。电源模块305可以包括电源管理单元(power management unit,PMU)和电池。其中,电源管理单元可以接收外部的充电输入;将充电路输入的电信号变压后提供给电池充电,还可以将电池提供的电信号变压后提供给音频模块304、无线通信模块303等其他模块;以及防止电池过充、过放、短路或过流等。在一些实施例中,电源模块305还可以包括无线充电线圈,用于对蓝牙设备20进行无线充电。另外,电源管理单元还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。
多个输入/输出接口306,可以用于提供蓝牙设备20进行充电的接口或通信的有线连接接口。在一些实施例中,该输入/输出接口可以为USB接口。在另一些实施例中,输入/输出接口306可以为耳机电连接器,当蓝牙设备20放置于耳机盒中时,蓝牙设备20可以通过耳机电连接器与耳机盒中的电连接器建立电连接,从而为蓝牙设备20中的电池充电。在另一些实施例中,在该电连接建立后,蓝牙设备20还可以与耳机盒进行数据通信,例如可以接收来自耳机盒的配对指令。
另外,蓝牙设备20还可以包括传感器307。例如,该传感器307可以是距离传感器或接近光传感器,可以用于确定蓝牙设备20是否被用户佩戴。示例性的,蓝牙设备20可以利用距离传感器来检测蓝牙设备20附近是否有物体,从而确定蓝牙设备20是否被用户佩戴。在确定蓝牙设备20被佩戴时,蓝牙设备20可以打开扬声器。
可以理解的是,本申请实施例示意的结构并不构成对蓝牙设备20的具体限定。其可以具有比图3示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。例如,在蓝牙设备20的外表面还可以包括按键308、指示灯(可以指示电量、呼入/呼出、配对模式等状态)、显示屏(可以提示用户相关信息)、防尘网(可以配合听筒使用)等部件。其中,该按键308可以是物理按键或触摸按键(与触摸传感器配合使用)等,用于触发开机、关机、暂停、播放、录音、开始配对、重置等操作。
下面结合流程图,对本申请实施例提供的一种音频输出设备确认方法进行举例说明。图4为本申请实施例提供的一种音频输出设备确认方法的示意图。所述音频输出设备确认方法应用于终端设备。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。如图4所示,所述方法包括:
步骤S401,与目标设备建立蓝牙连接。
目标设备为终端设备待进行蓝牙连接的设备。在本申请的一实施例中,可以响应于蓝牙连接指令,与目标设备建立蓝牙连接。响应于用户对终端设备蓝牙配置界面上的目标设备图标的点击,终端设备触发目标设备的蓝牙连接指令。在本申请的一实施例中,若终端设备蓝牙处于开启状态,与目标设备建立蓝牙连接。
在与目标设备建立蓝牙连接后,执行步骤S402,确定是否连接多个蓝牙设备。
终端设备在连接目标设备后,确定当前已建立蓝牙连接的蓝牙设备,确定是否连接了多个蓝牙设备。
若未连接多个蓝牙设备,确定终端设备当前仅连接了目标设备,执行步骤S403,确定目标设备是否为音箱设备。
在本申请的一实施例中,终端设备可以基于与目标设备建立蓝牙连接时从目标设备接收到的设备信息,确定目标设备的设备类型,基于设备类型确定目标设备是否为音箱设备。例如,设备信息可以包括Minor Device Class信息和/或Major Device Class信息。可以基于Minor Device Class信息和/或Major Device Class信息,确定蓝牙设备的设备类型。在本申请的一实施例中,若终端设备与一蓝牙设备建立通信连接且确定该蓝牙设备的设备类型,可以在蓝牙配置界面上显示该蓝牙设备对应的设备类型图标。例如,如图2所示,可以在蓝牙配置界面上显示耳机一的设备类型图标和车载设备一的设备类型图标。通过显示蓝牙设备的设备类型图标,可以方便用户确认蓝牙设备的设备类型。
若确定目标设备为音箱设备,执行步骤S404,将触发通话任务的设备,确定为音频输出设备。
在本申请的一实施例中,触发通话任务的设备可以是终端设备,也可以是目标设备,例如,音箱设备。具体地,当终端设备接收到来电后,会在终端设备的显示屏(和/或音箱设备的显示屏)上显示来电对应的来电操作控件,来电操作控件包括接听控件;响应于用户对终端设备的显示屏(或音箱设备的显示屏)上接听控件的操作,触发通话任务。例如,当用户在终端设备的显示屏上对接听控件进行操作,触发了通话任务,终端设备确定其自身为音频输出设备,直接播放通话任务对应的通话音频数据。又如,当用户在音箱设备的显示屏上对接听控件进行操作,触发了通话任务,终端设备将音箱设备确定为音频输出设备,并将通话任务对应的通话音频数据发送至音箱设备,使得音箱设备播放通话任务对应的通话音频数据。通过上述实施方式中对触发通话任务的设备的确定,在终端设备连接音箱且接收到来电,通过用户触发来电对应的通话任务的设备,确定播放通话任务的通话音频数据的设备,避免终端设备在连接蓝牙设备(如音箱设备)后,直接通过音箱设备播放通话任务的通话音频数据的情况出现,从而保证了用户的通话隐私。
若确定目标设备不为音箱设备,执行步骤S405,将目标设备确定为音频输出设备。
若确定连接多个蓝牙设备,即确定当前连接了除目标设备外的其他蓝牙设备,执行步骤S406,确定多个蓝牙设备是否为同类型设备。
若多个蓝牙设备为同类型设备,执行步骤S407,将目标设备确定为音频输出设备。
目标设备为多个蓝牙设备中最后一个与终端设备建立蓝牙通信的设备,基于用户行为对用户意图进行预测,将目标设备确定为音频输出设备,可以使得确定的音频输出设备更符合用户的需求。在本申请的一实施例中,若多个蓝牙设备为设备类型都为蓝牙耳机且所述多个设备中不包含助听器,将目标设备确定为音频输出设备;若多个蓝牙设备为设备类型都为蓝牙耳机且所述多个设备中包含一个助听器,将该助听器确定为音频输出设备;若多个蓝牙设备为设备类型都为蓝牙耳机且所述多个设备中包含多个助听器,可以将多个助听器中最后连接的一个助听器确定为音频输出设备。
若多个蓝牙设备不为同类型设备,执行步骤S408,将多个蓝牙设备具有最高优先级的设备确定为音频输出设备。
在本申请的一实施例中,可以预先设置不同设备类型对应的优先级。例如,基于蓝牙设备的设备类型,可以确定蓝牙设备对应的优先级。不同设备类型对应的优先级可以根据用户的需求进行设置。在本申请的一实施例中,可以将蓝牙耳机确定为第一优先级、车载设备确定为第二优先级、音箱确定为第三优先级。其中,第一优先级大于第二优先级、第二优先级大于第三优先级。
在本申请的一实施例中,可以将每个设备类型中具有特定功能的蓝牙设备设置其对应的优先级,其对应的优先级可以与该蓝牙设备同一设备类型的其他蓝牙设备的优先级可以不同。在蓝牙耳机的设备类型中,助听器用于为听障人士提供给听力支持,具有特定功能。例如,可以将助听器确定为第一优先级、将除助听器外的其他蓝牙耳机确定为第二优先级、车载设备确定为第三优先级、音箱确定为第四优先级。其中,第一优先级大于第二优先级、第二优先级大于第三优先级、第三优先级大于第四优先级。在该实施例中,假如与终端设备建立蓝牙连接的多个设备包括助听器、除助听器外的其他蓝牙耳机、车载设备和音箱等四个蓝牙设备,将助听器确定为音频输出设备。
在本申请的一实施例中,若多个蓝牙设备中包括至少两个相同类型的设备,可以确定所述至少两个相同类型的设备中与终端设备在后连接的设备的优先级高于与终端设备在先连接的设备的优先级。例如,多个蓝牙设备中包括三个蓝牙耳机,如蓝牙耳机一、蓝牙耳机二和蓝牙耳机三,其中,蓝牙耳机一为三个蓝牙耳机中最早与终端设备建立连接的设备、蓝牙耳机三为三个蓝牙耳机中最晚与终端设备建立连接的设备,确定蓝牙耳机三的优先级高于蓝牙耳机二的优先级、蓝牙耳机二的优先级高于蓝牙耳机一的优先级。在本申请的另一实施例中,若多个蓝牙设备中包括至少两个相同类型的设备且所述至少两个相同类型的设备中包括一个助听器时,可以将该助听器确定为音频输出设备;若多个蓝牙设备中包括至少两个相同类型的设备且所述至少两个相同类型的设备中包括多个助听器时,可以将所述多个助听器中最后一个连接的助听器确定为音频输出设备。
在本申请的一实施例中,终端设备确定音频输出设备后,终端设备可以立即与确定的音频输出设备建立SCO链路。在触发一通话任务后,可以基于建立的SCO链路,将该通话任务对应的通话音频数据发送至确定的音频输出设备,使得确定的音频输出设备播放该通话任务对应的通话音频数据。在本申请的一实施方式中,终端设备确定音频输出设备后,可以响应于触发的通话任务,建立与确定的音频输出设备的SCO链路。终端设备可以基于建立的SCO链路,将通话任务对应的通话音频数据发送至确定的音频输出设备,使得确定的音频输出设备播放通话任务对应的通话音频数据。上述实施方式中的通话任务可以是用户在终端设备触发的,也可以是用户在与终端设备建立蓝牙通信的蓝牙设备上触发的,如在确定的音频输出设备上触发的,在此不做任何限定。
在本申请的一实施例中,终端设备确定音频输出设备后,还可以基于用户对音频输出配置选项的操作,重新确定音频输出设备。例如,在执行完步骤S404、S405、S407、S408后,可以基于用户对音频输出配置选项的操作,重新确认音频输出设备。
上述实施例中,可以在终端设备与目标设备建立蓝牙连接后,在与终端设备建立蓝牙连接的蓝牙设备中自动确定合适的音频输出设备,提高对音频输出设备的判断效率。
为了避免在终端设备执行通话任务过程中,出现违背用户意愿切换出声通道的情况,本申请实施例提供了一种出声通道切换方法。图5为本申请实施例提供的一种出声通道切换方法的示意图。所述出声通道切换方法可以应用于终端设备,也可以应用于位于终端设备上的蓝牙芯片。所述蓝牙芯片用于为终端设备提供蓝牙通信连接服务。蓝牙芯片中存储有计算机指令,当该计算机指令在蓝牙芯片上运行时,使得蓝牙芯片执行上述相关方法步骤实现出声通道切换方法。图5以出声通道切换方法应用于终端设备为例,进行举例说明。出声通道切换方法应用于位于终端设备上的蓝牙芯片的具体实施方式,与出声通道切换方法应用于终端设备时的实施方式一致,仅执行主体不同。出声通道切换方法应用于位于终端设备上的蓝牙芯片的一些具体实施方式,可以参见对图5的相关描述。根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。如图5所示,所述方法包括:
步骤S501,确定是否连接多个蓝牙设备。
在本申请的一实施例中,终端设备可以与任意一个蓝牙设备建立蓝牙连接后,即终端设备可以在与未建立蓝牙连接的蓝牙设备建立蓝牙连接后,执行步骤S501。在本申请的另一实施例中,终端设备可以在每一次接收到来电时执行图5所示流程,在步骤S501中判断是否连接多个蓝牙设备。在本申请的一实施方式中,终端设备可以在执行如图4所示中的任意步骤之后或之前执行步骤S501,例如可以在如图4所示的步骤S401之后执行步骤S501,或者可以在如图4所示的步骤S408之后执行步骤S501。在本申请实施例,对执行步骤S501的时间不做任何限制。
在本申请的一实施例中,若连接多个蓝牙设备,终端设备可以在多个蓝牙设备中确定音频输出设备,并与确定的音频输出设备建立SCO链路。关于在多个蓝牙设备中确定音频输出设备的一些具体实施方式可以参见图4中的相关描述。在本申请的一实施方式中,当终端设备已与一蓝牙设备建立SCO链路且终端设备未处于通话任务中,可以在多个蓝牙设备中重新确定音频输出设备。
在本申请的一实施例,在如图4所示的步骤S401之后执行步骤S501的情况下,若确定未连接多个蓝牙设备,可以继续执行如图4所示的步骤S403至步骤S405。
若连接多个蓝牙设备,执行步骤S502,确定多个蓝牙设备中是否存在第一蓝牙设备。
第一蓝牙设备为终端设备连接的多个蓝牙设备中设备类型为蓝牙耳机的任意一个蓝牙耳机设备。在本实施例中,设备类型为蓝牙耳机的蓝牙设备可以包括助听器、TWS耳机、耳塞式耳机、入耳式耳机、头戴式耳机、耳罩式耳机、颈带式耳机和挂耳式耳机中的一种或多种。在本申请的一实施例中,可以基于与多个蓝牙设备建立蓝牙连接时,每个蓝牙设备发送的设备信息,确定每个蓝牙设备的设备类型。
若所述多个蓝牙设备中存在第一蓝牙设备,执行步骤S503,确定终端设备是否与第一蓝牙设备建立SCO链路。
若终端设备与第一蓝牙设备建立SCO链路,确定第一蓝牙设备为终端设备当前的音频输出设备,执行步骤S504,响应于第一通话任务,基于与第一蓝牙设备的同步定向链路,将第一通话任务对应的通话音频数据发送至第一蓝牙设备,使得第一蓝牙设备对第一通话任务对应的通话音频数据进行播放。
第一通话任务可以是终端设备与第一蓝牙设备建立SCO链路后,触发的任意一个通话任务。
步骤S505,在第一通话任务的执行过程中,若接收到第二蓝牙设备发送的链路建立请求,确定链路建立请求对应的请求指令。
第二蓝牙设备为在终端设备进行第一通话任务之前与建立蓝牙连接的设备,即可以是步骤S501中多个蓝牙设备中除第一蓝牙设备外的任意一个设备。链路建立请求用于请求建立与终端设备的SCO链路。第二蓝牙设备可以是具备抢通话声道能力的蓝牙设备,即具备发送链路建立请求能力的设备。
步骤S506,确定请求指令是否为第一指令。
第一指令可以基于用户的需求进行设置,可以设置为蓝牙设备经常自动触发的链路建立请求的请求方式。例如,第一指令可以为connection request指令。connection request指令是蓝牙通信中蓝牙设备常用的一个指令,用于请求终端设备建立SCO链路。
若链路建立请求的请求指令为第一指令,不响应链路建立请求。若链路建立请求的请求指令为第一指令,不断开与所述第一蓝牙设备的同步定向链路,维持与所述第一蓝牙设备的同步定向链路。在本申请的一实施例中,若链路建立请求的请求指令为第一指令,向第二蓝牙设备发送拒绝信息。图6为本申请实施例提供的一种第二蓝牙设备发送链路建立请求的示意图。例如,假设第一蓝牙设备为耳机,第二蓝牙设备为车载。如图6所示,终端设备在第一通话任务之前,与耳机和车载建立蓝牙连接。终端设备在执行第一通话任务时,将耳机作为音频输出设备,与耳机建立SCO链路。基于与耳机的SCO链路,将第一通话任务对应的通话音频数据发送至耳机,使得第一通话任务对应的来电音频和通话音频从耳机输出。车载在终端设备执行第一通话任务的过程中,向终端设备发送connection request指令。终端设备在接收到connection request指令后,向车载发送拒绝信息。
若链路建立请求的请求方式不为第一指令,执行步骤S507,确定请求方式是否为第二指令。
若链路建立请求的请求方式不为第二指令,流程结束。在本申请的一实施例中,若链路建立请求的请求方式不为第二指令,可以在终端设备上显示链路建立请求对应的提示信息,提示信息上包括通道切换控件。通道切换控件用于断开与第一蓝牙设备的同步定向链路,并建立与第二蓝牙设备的同步定向链路。响应于用户对通道切换控件的操作,终端设备可以断开与第一蓝牙设备的同步定向链路,并建立与第二蓝牙设备的同步定向链路。
若链路建立请求的请求指令为第二指令,执行步骤S508,断开与第一蓝牙设备的同步定向链路,并建立与第二蓝牙设备的同步定向链路。
第二指令可以基于用户的需求进行设置,可以设置为经用户操作终端设备触发的链路建立请求的请求方式。例如,第二指令可以为AT+BCC。AT+BCC是蓝牙通信中蓝牙设备常用的一个指令,用于请求终端设备将其作为音频输出设备,请求终端设备建立与其的SCO链路。
当断开与第一蓝牙设备的同步定向链路后,终端设备停止向第一蓝牙设备发送第一通话任务对应的通话音频数据,第一蓝牙设备停止播放第一通话任务对应的通话音频数据。
步骤S509,基于与第二蓝牙设备的同步定向链路,将第一通话任务对应的通话音频数据发送至第二蓝牙设备,使得第二蓝牙设备对第一通话任务对应的通话音频数据进行播放。
上述实施方法,在第二蓝牙设备发送请求类型为第一指令的链路建立请求后,继续将第一蓝牙设备作为音频输出设备,不进行出声通道的切换,避免了因第二蓝牙设备主动触发链路建立请求导致出声通道切换的情况出现,从而避免了在设备执行通话任务过程中,出现违背用户意愿切换出声通道的情况。同时,在第二蓝牙设备发送第二指令的链路建立请求后,停止将第一蓝牙设备作为音频输出设备,将第二蓝牙设备作为音频输出设备,使得第一通话任务对应的通话音频数据从第一蓝牙设备播放切换至从第二蓝牙设备播放,实现了出声通道的切换。
在本申请的一实施例中,执行完图5中步骤S504后,在第一通话任务的执行过程中,可以响应于用户在终端设备上的操作,终端设备重新确定音频输出设备,并断开与第一蓝牙设备之间的SCO链路,建立与重新确定的音频输出设备之间的SCO链路,使得第一通话任务对应的通话音频数据从重新确定的音频输出设备输出。例如,假设第一蓝牙设备为耳机,第二蓝牙设备为车载。如图7所示,终端设备在第一通话任务之前,与耳机和车载建立蓝牙连接。终端设备在执行第一通话任务时,将耳机作为音频输出设备,与耳机建立SCO链路。基于与耳机的SCO链路,将第一通话任务对应的通话音频数据发送至耳机,使得第一通话任务对应的通话音频数据从耳机输出。例如,如图7所示,响应于用户在终端设备上的第一操作,将车载确定为音频输出设备,并断开与耳机之间的SCO链路,建立与车载之间的SCO链路,使得第一通话任务对应的通话音频数据从车载输出。又如,如图7所示,响应于用户在终端设备上的第二操作,将耳机确定为音频输出设备,并断开与车载之间的SCO链路,建立与耳机之间的SCO链路,使得第一通话任务对应的通话音频数据从耳机输出。上述实施方式,在第一通话任务的执行过程中,可以基于用户在终端设备上的操作,重新确认音频输出设备,实现出声通道的切换。在本申请的一实施方式中,在第一通话任务的执行过程中,终端设备会对车载发送的connection request指令都进行拒绝。例如,如图7所示,响应于用户在终端设备上的第二操作,终端设备建立与耳机之间的SCO链路之后,在第一通话任务的执行过程中,若终端设备再次接收到车载发送的connection request指令,不响应connection request指令,不断开与耳机的同步定向链路,维持与耳机的同步定向链路;并向车载发送拒绝信息。
在本申请的一实施例中,在第一通话任务执行结束后,若接收到第二蓝牙设备发送的链路建立请求,断开与第一蓝牙设备的同步定向链路,并建立与第二蓝牙设备的同步定向链路。第二蓝牙设备发送的链路建立请求对应的请求方式可以包括connection request指令和/或AT+BCC指令。上述方法,可以在终端设备未执行通话任务的情况下,响应于蓝牙设备的请求重新确定音频输出设备,并建立新的同步定向链路。
为了避免蓝牙设备自动生成第二指令的链路建立请求,本申请实施例提供了一种基于第二指令进行通道切换方法。图8为本申请实施例提供的一种基于第二指令进行通道切换方法的示意图。图8所示的方法可以为对图5中步骤S508的一具体实施方式。如图8所示,所述方法包括:
步骤S601,若链路建立请求的请求指令为第二指令,确定链路建立请求的接收时间。
步骤S602,确定接收时间是否在终端设备开启第一通话任务后的预设时间段内。
预设时间段为用户切换出声通道概率较小的时间段。预设时间段可以根据用户的需求进行设置。例如,可以基于用户操作的反应时间设置预设时间段。例如,预设时间段可以设置为2S、3.5S。在该实施例中,终端设备开启所述第一通话任务后的预设时间段内接收到的链路建立请求,确定为蓝牙设备自动触发的链路建立请求。
当接收时间在终端设备开启所述第一通话任务后的预设时间段之内,确定该链路建立请求为第二蓝牙设备自动触发的链路建立请求,执行步骤S603,不响应链路建立请求。
若接收时间在终端设备开启所述第一通话任务后的预设时间段之内,不响应于第二蓝牙设备发送的链路建立请求,不断开与所述第一蓝牙设备的同步定向链路,维持与所述第一蓝牙设备的同步定向链路。
当接收时间在终端设备开启所述第一通话任务后的预设时间段之后,确定该链路建立请求为用户触发的链路建立请求,执行步骤S604,断开与第一蓝牙设备的同步定向链路,并建立与第二蓝牙设备的同步定向链路。
关于步骤S604的一些具体实施方式,可以参见上文的相关描述。
上述实施方式,可以基于终端设备开启所述第一通话任务后的预设时间段,对接收到的第二指令的链路建立请求进行进一步判定,以确定该链路建立请求是否为第二蓝牙设备主动触发的链路建立请求,并基于判断的结果确定是否断开与第一蓝牙设备的同步定向链路,重新建立与第二蓝牙设备的同步定向链路,避免了在设备执行通话任务过程中,出现违背用户意愿切换出声通道的情况,进一步提高了出声通道切换的准确率。
图9为本申请实施例提供的一种出声通道切换方法的示意图。如图9所示的方法应用与终端设备,可以在图4中步骤S402、或图5中步骤S501后执行。如图9所示,所述方法包括:
若确定未连接多个蓝牙设备,执行步骤S701,确定是否与第三蓝牙设备建立同步定向链路。
第三蓝牙设备为与终端设备建立蓝牙连接且设备类型为蓝牙耳机的蓝牙设备。若确定终端设备与第三蓝牙设备建立同步定向链路,确定终端设备当前仅与单个的第三蓝牙设备建立蓝牙连接,未与第三蓝牙设备外的其他设备建立蓝牙通信。在本申请的一实施例中,在图4中步骤S402之后执行S701且图4所示方法中的目标设备的设备类型为蓝牙耳机时,第三蓝牙设备可以是图4所示方法中的目标设备。
在本申请的一实施例中,若确定未与第三蓝牙设备建立同步定向链路,可以建立与第三蓝牙设备建立同步定向链路。在本申请的一实施方式中,若确定未与第三蓝牙设备建立同步定向链路且终端设备与任一蓝牙设备建立蓝牙连接,终端设备可以在第三蓝牙设备和所述任一蓝牙设备中确定音频输出设备,并与确定的音频输出设备建立SCO链路。例如,当第三蓝牙设备和所述任一蓝牙设备的设备类型不同时,可以基于第三蓝牙设备和所述任一蓝牙设备各自的优先级,确定音频输出设备。又如,当第三蓝牙设备和所述任一蓝牙设备的设备类型相同时,可以将所述任一蓝牙设备确定为音频输出设备,并建立终端设备与任一蓝牙设备的SCO链路。
若与第三蓝牙设备建立同步定向链路,确定第三蓝牙设备为终端设备当前的音频输出设备,执行步骤S702,响应于第二通话任务,基于与第三蓝牙设备的同步定向链路,将第二通话任务对应的通话音频数据发送至第三蓝牙设备,使得第三蓝牙设备对第二通话任务对应的通话音频数据进行播放。
第二通话任务可以是终端设备与第三蓝牙设备建立后,触发的任意一个通话任务。
步骤S703,接收第一蓝牙连接指令,与第四蓝牙设备建立蓝牙连接。
第一蓝牙连接指令用于指示用户与第四蓝牙设备建立蓝牙连接。第四蓝牙设备为终端设备待连接的蓝牙设备。在本申请的实施例中,对第四蓝牙设备的设备类型不做任何限制。第四蓝牙设备可以是蓝牙耳机、车载设备、音箱中的任意一种蓝牙设备。在终端设备执行第二通话任务的过程中,可以基于用户对蓝牙配置界面的操作,触发第一蓝牙连接指令。终端设备接收到第一蓝牙连接指令后,建立与第四蓝牙设备的蓝牙连接。
步骤S704,在第二通话任务的执行过程中,若接收到第四蓝牙设备发送的链路建立请求,不响应链路建立请求。
若接收到第四蓝牙设备发送的链路建立请求,不断开与第三蓝牙出声的同步定向链路,维持与第三蓝牙设备的同步定向链路。
在本申请的一实施例中,第四蓝牙设备发送的链路建立请求对应的请求方式可以包括connection request指令和/或AT+BCC指令。
在本申请的一实施例中,在第二通话任务的执行过程中,可以基于用户在终端设备上将第四蓝牙设备确定为音频输出设备的操作,断开与第三蓝牙设备的同步定向链路,并建立与第四蓝牙设备的同步定向链路。基于与第四蓝牙设备的同步定向链路后,终端设备基于与第四蓝牙设备的同步定向链路,将第二通话任务对应的通话音频数据发送至第四蓝牙设备,使得第四蓝牙设备对第二通话任务对应的通话音频数据进行播放。上述方法可以基于用户在终端设备上重新确认音频输出设备的操作,将第四蓝牙设备作为音频输出设备,使得第二通话任务对应的通话音频数据从第三蓝牙设备播放切换至从第四蓝牙设备播放,提高了用户体验。
上述实施方法,在第三蓝牙设备作为音频输出设备输出通话音频数据时,可以在第四蓝牙设备发送链路建立请求的情况下,继续将第三蓝牙设备作为音频输出设备,不进行出声通道的切换,避免了因在第四蓝牙设备不为目标蓝牙设备时触发链路建立请求导致出声通道切换的情况出现,提高了第三蓝牙设备作为音频输出设备输出通话音频数据的稳定性,保证了用户使用第三蓝牙设备进行通话的使用体验。
在本申请的一实施例中,在第二通话任务执行结束后,若接收到第四蓝牙设备发送的链路建立请求,断开与第三蓝牙设备的同步定向链路,并建立与第四蓝牙设备的同步定向链路。第四蓝牙设备发送的链路建立请求对应的请求方式可以包括connection request指令和/或AT+BCC指令。上述方法,可以在终端设备未执行通话任务的情况下,响应于蓝牙设备的请求重新确定音频输出设备,并建立新的同步定向链路。
图10为本申请实施例提供的一种出声通道切换方法的示意图。本申请以图10所示的方法在图5中步骤S504后执行为例,进行说明。如图10所示,所述方法包括:
在所述第一通话任务的执行过程中,步骤S801,响应于第二蓝牙连接指令,与第五蓝牙设备建立蓝牙连接。
第二蓝牙连接指令用于指示用户与第五蓝牙设备建立蓝牙连接。第五蓝牙设备为终端设备待连接的蓝牙设备,可以在终端设备进行第一通话任务的过程中与终端设备待建立蓝牙连接的设备。在本申请的实施例中,对第五蓝牙设备的设备类型不做任何限制。第五蓝牙设备可以是蓝牙耳机、车载设备、音箱中的任意一种蓝牙设备。在终端设备执行第一通话任务的过程中,可以基于用户对蓝牙配置界面的操作,触发第二蓝牙连接指令。终端设备接收到第二蓝牙连接指令后,建立与第五蓝牙设备的蓝牙连接。
步骤S801,在第一通话任务的执行过程中,若接收到第五蓝牙设备发送的链路建立请求,不响应链路建立请求。
若接收到第五蓝牙设备发送的链路建立请求,不断开与第一蓝牙出声的同步定向链路,维持与第一蓝牙设备的同步定向链路。
在本申请的一实施例中,第五蓝牙设备发送的链路建立请求对应的请求方式可以包括connection request指令和/或AT+BCC指令。
在本申请的一实施例中,在第一通话任务的执行过程中,可以基于用户在终端设备上将第五蓝牙设备确定为音频输出设备的操作,断开与第一蓝牙设备的同步定向链路,并建立与第五蓝牙设备的同步定向链路。基于与第五蓝牙设备的同步定向链路后,终端设备基于与第五蓝牙设备的同步定向链路,将第一通话任务对应的通话音频数据发送至第五蓝牙设备,使得第五蓝牙设备对第一通话任务对应的通话音频数据进行播放。上述方法可以基于用户在终端设备上重新确认音频输出设备的操作,将第五蓝牙设备作为音频输出设备,使得第一通话任务对应的通话音频数据从第一蓝牙设备播放切换至从第五蓝牙设备播放,提高了用户体验。
上述实施方法,在第一蓝牙设备作为音频输出设备输出第一通话任务对应的通话音频数据时,若终端设备在第一通话任务的执行过程中与第五蓝牙设备建立蓝牙连接,在第一通话任务的执行过程中,即使第五蓝牙设备发送链路建立请求,终端设备也可以继续将第一蓝牙设备作为音频输出设备,不进行出声通道的切换,避免了因第五蓝牙设备触发链路建立请求导致出声通道切换的情况出现,提高了第一蓝牙设备作为音频输出设备输出通话音频数据的稳定性,保证了用户使用第一蓝牙设备进行通话的使用体验。
在本申请的一实施例中,在第一通话任务执行结束后,若接收到第五蓝牙设备发送的链路建立请求,断开与第一蓝牙设备的同步定向链路,并建立与第五蓝牙设备的同步定向链路。第五蓝牙设备发送的链路建立请求对应的请求方式可以包括connection request指令和/或AT+BCC指令。上述方法,可以在终端设备未执行通话任务的情况下,响应于蓝牙设备的请求重新确定音频输出设备,并建立新的同步定向链路。
图11为本申请实施例提供的一种终端设备的结构示意图。参考图11,终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I1C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
I1C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。I2S接口可以用于音频通信。PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I1C接口,I2S接口,UART接口,MIPI接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端设备100,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为服务异常提醒的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。
在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展终端设备100的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端设备100平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry asSCOiation of the USA,CTIA)标准接口。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。陀螺仪传感器180B可以用于确定终端设备100的运动姿态。气压传感器180C用于测量气压。磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。距离传感器180F,用于测量距离。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。环境光传感器180L用于感知环境光亮度。指纹传感器180H用于采集指纹。温度传感器180J用于检测温度。触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。骨传导传感器180M可以获取振动信号。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。马达191可以产生振动提示。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多帧卡。所述多帧卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。
本申请实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在终端设备100上运行时,使得终端设备100执行上述相关方法步骤实现上述实施例中提供的方法,如出声通道切换方法。
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中提供的方法,如出声通道切换方法。
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述实施例中提供的方法,如出声通道切换方法。
其中,本申请实施例提供的终端设备、计算机存储介质、计算机程序产品或芯片均用于执行上文实施例所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不离本申请技术方案的精神和范围。

Claims (11)

  1. 一种出声通道切换方法,应用于终端设备,其特征在于,所述方法包括:
    若所述终端设备与多个蓝牙设备建立蓝牙连接并与所述多个蓝牙设备中的第一蓝牙设备建立同步定向链路,响应于第一通话任务,基于与所述第一蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第一蓝牙设备,使得所述第一蓝牙设备播放所述第一通话任务对应的通话音频数据;
    在所述第一通话任务的执行过程中,若接收到所述多个蓝牙设备中的第二蓝牙设备发送的链路建立请求,确定所述链路建立请求对应的请求指令;
    若所述请求指令为第一指令,维持与所述第一蓝牙设备的同步定向链路;
    若所述请求指令为第二指令,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路;基于与所述第二蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第二蓝牙设备,使得所述第二蓝牙设备播放所述第一通话任务对应的通话音频数据。
  2. 如权利要求1所述的出声通道切换方法,其特征在于,所述若所述请求指令为第二指令,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路,包括:
    若所述请求指令为第二指令且所述链路建立请求为所述终端设备开启所述第一通话任务后的预设时间段之后接收的请求,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路。
  3. 如权利要求2所述的出声通道切换方法,其特征在于,所述方法还包括:
    若所述请求指令为第二指令且所述链路建立请求为所述终端设备开启所述第一通话任务后的预设时间段之内接收的请求,维持与所述第一蓝牙设备的同步定向链路。
  4. 如权利要求1所述的出声通道切换方法,其特征在于,所述终端设备与多个蓝牙设备建立蓝牙连接之后,所述方法还包括:
    若所述第二蓝牙设备的设备类型与所述第一蓝牙设备的设备类型不同且所述第一蓝牙设备的预设优先级大于所述第二蓝牙设备的预设优先级,建立与所述第一蓝牙设备的同步定向链路。
  5. 如权利要求1所述的出声通道切换方法,其特征在于,所述终端设备与多个蓝牙设备建立蓝牙连接之后,所述方法还包括:
    若所述第二蓝牙设备的设备类型与所述第一蓝牙设备的设备类型相同,建立与所述第一蓝牙设备的同步定向链路,所述第一蓝牙设备与所述终端设备建立蓝牙连接的时间晚于所述第二蓝牙设备与所述终端设备建立蓝牙连接的时间。
  6. 如权利要求1所述的出声通道切换方法,其特征在于,所述方法还包括:
    若所述终端设备与单个的第三蓝牙设备建立蓝牙连接以及同步定向链路,响应于第二通话任务,基于与所述第三蓝牙设备的同步定向链路,将所述第二通话任务对应的通话音频数据发送至所述第三蓝牙设备,使得所述第三蓝牙设备播放所述第二通话任务对应的通话音频数据;
    接收第一蓝牙连接指令,与第四蓝牙设备建立蓝牙连接;
    在所述第二通话任务的执行过程中,若接收到所述第四蓝牙设备发送的链路建立请求,维持与所述第三蓝牙设备的同步定向链路。
  7. 如权利要求1所述的出声通道切换方法,其特征在于,所述方法还包括:
    在所述第一通话任务的执行过程中,响应于第二蓝牙连接指令,与第五蓝牙设备建立蓝牙连接;
    在所述第一通话任务的执行过程中,若接收到所述第五蓝牙设备发送的链路建立请求,不响应链路建立请求。
  8. 如权利要求1至7中任意一项所述的出声通道切换方法,其特征在于,
    所述第一指令为connection request;
    所述第二指令为AT+BCC。
  9. 一种出声通道切换方法,应用于蓝牙芯片,蓝牙芯片安装在终端设备上,其特征在于,所述方法包括:
    若所述终端设备与多个蓝牙设备建立蓝牙连接并与所述多个蓝牙设备中的第一蓝牙设备建立同步定向链路,响应于第一通话任务,基于与所述第一蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第一蓝牙设备,使得所述第一蓝牙设备播放所述第一通话任务对应的通话音频数据;
    在所述第一通话任务的执行过程中,若接收到所述多个蓝牙设备中的第二蓝牙设备发送的链路建立请求,确定所述链路建立请求对应的请求指令;
    若所述请求指令为第一指令,维持与所述第一蓝牙设备的同步定向链路;
    若所述请求指令为第二指令,断开与所述第一蓝牙设备的同步定向链路,并建立与所述第二蓝牙设备的同步定向链路;基于与所述第二蓝牙设备的同步定向链路,将所述第一通话任务对应的通话音频数据发送至所述第二蓝牙设备,使得所述第二蓝牙设备播放所述第一通话任务对应的通话音频数据。
  10. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在终端设备上运行时,使得所述终端设备执行如权利要求1至8任一项所述的出声通道切换方法。
  11. 一种终端设备,其特征在于,所述终端设备包括处理器和存储器,所述存储器用于存储指令,所述处理器用于调用所述存储器中的指令,使得所述终端设备执行如权利要求1至8中任一项所述的出声通道切换方法。
PCT/CN2024/142874 2024-01-10 2024-12-26 出声通道切换方法、终端设备及存储介质 Pending WO2025148705A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202480056132.8A CN121844699A (zh) 2024-01-10 2024-12-26 出声通道切换方法、终端设备及存储介质

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410044056.0A CN120343752A (zh) 2024-01-10 2024-01-10 出声通道切换方法、终端设备及存储介质
CN202410044056.0 2024-01-10

Publications (1)

Publication Number Publication Date
WO2025148705A1 true WO2025148705A1 (zh) 2025-07-17

Family

ID=96363123

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/142874 Pending WO2025148705A1 (zh) 2024-01-10 2024-12-26 出声通道切换方法、终端设备及存储介质

Country Status (2)

Country Link
CN (2) CN120343752A (zh)
WO (1) WO2025148705A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100151791A1 (en) * 2008-12-15 2010-06-17 Samsung Electronics Co., Ltd. Audio data service provision method and system
CN111818503A (zh) * 2020-09-08 2020-10-23 深圳市汇顶科技股份有限公司 语音通话方法、系统、芯片、电子设备及存储介质
CN115086473A (zh) * 2022-08-19 2022-09-20 荣耀终端有限公司 出声通道选择系统、方法及相关装置
WO2023240443A1 (zh) * 2022-06-14 2023-12-21 北京小米移动软件有限公司 一种蓝牙通信方法、装置及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100151791A1 (en) * 2008-12-15 2010-06-17 Samsung Electronics Co., Ltd. Audio data service provision method and system
CN111818503A (zh) * 2020-09-08 2020-10-23 深圳市汇顶科技股份有限公司 语音通话方法、系统、芯片、电子设备及存储介质
WO2023240443A1 (zh) * 2022-06-14 2023-12-21 北京小米移动软件有限公司 一种蓝牙通信方法、装置及存储介质
CN115086473A (zh) * 2022-08-19 2022-09-20 荣耀终端有限公司 出声通道选择系统、方法及相关装置

Also Published As

Publication number Publication date
CN120343752A (zh) 2025-07-18
CN121844699A (zh) 2026-04-10

Similar Documents

Publication Publication Date Title
US11653398B2 (en) Bluetooth connection method and device
US20250247459A1 (en) Bluetooth Connection Method, Device, and System
US12245179B2 (en) Point-to-multipoint data transmission method and electronic device
CN115175043B (zh) 应用于tws耳机单双耳切换的音频数据传输方法及设备
EP3869817B1 (en) Point to multi-point data transmission method and device
CN114710768B (zh) 一种蓝牙回连方法及相关装置
US12047760B2 (en) Bluetooth communication method and apparatus
WO2020133183A1 (zh) 音频数据的同步方法及设备
CN112913321B (zh) 一种使用蓝牙耳机进行通话的方法、设备及系统
WO2020124581A1 (zh) 一种音频数据传输方法及电子设备
WO2022007848A1 (zh) 一种通话方法、装置和系统
US20240040481A1 (en) Tws headset connection method and device
WO2021233398A1 (zh) 无线音频系统、无线通讯方法及设备
CN114554012A (zh) 来电接听方法、电子设备及存储介质
CN121844699A (zh) 出声通道切换方法、终端设备及存储介质
US20250343853A1 (en) Call control method, related apparatus, and communication system
US20250278238A1 (en) Audio playing control method, related apparatus, and communication system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24916752

Country of ref document: EP

Kind code of ref document: A1