CN113126948A - Audio playing method and related equipment - Google Patents

Audio playing method and related equipment Download PDF

Info

Publication number
CN113126948A
CN113126948A CN201911404807.0A CN201911404807A CN113126948A CN 113126948 A CN113126948 A CN 113126948A CN 201911404807 A CN201911404807 A CN 201911404807A CN 113126948 A CN113126948 A CN 113126948A
Authority
CN
China
Prior art keywords
audio
audio stream
stream
capability
capabilities
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.)
Granted
Application number
CN201911404807.0A
Other languages
Chinese (zh)
Other versions
CN113126948B (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911404807.0A priority Critical patent/CN113126948B/en
Priority to CN202111555399.6A priority patent/CN114398020A/en
Publication of CN113126948A publication Critical patent/CN113126948A/en
Application granted granted Critical
Publication of CN113126948B publication Critical patent/CN113126948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the invention discloses an audio playing method and related equipment. The method comprises the following steps: the method comprises the steps that a first device obtains audio capability of a second device; converting the first audio stream into a second audio stream according to the audio capabilities; and sending the second audio stream to the second device, wherein the second audio stream is used for audio playing of the second device. By adopting the embodiment of the invention, the audio playing effect can be improved.

Description

Audio playing method and related equipment
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to an audio playing method and a related device.
Background
When the Android mobile phone is used for multi-device networking, the remote device is usually used as an output device for audio playing, so that resources of the mobile phone and the remote device are shared, and the audio experience of a user is improved. However, since distributed remote devices are very different, many low-cost remote devices do not support audio resampling capability or can only use playing of some fixed audio parameters, and in this case, audio playing of these remote devices may not be compatible, resulting in poor audio playing effect in a multi-device networking scenario.
Disclosure of Invention
The embodiment of the invention provides an audio playing method and related equipment, which improve the quality and effect of audio playing.
In a first aspect, an embodiment of the present invention provides an audio playing method, including: the method comprises the steps that a first device obtains audio capability of a second device; converting the first audio stream into a second audio stream according to the audio capabilities; and sending a second audio stream to the second device, wherein the second audio stream is used for audio playing of the second device. The audio stream is processed according to the differentiated audio capacity of the second device, so that the processed audio stream can meet the playing requirement of the second device, and the quality and the effect of the audio are improved.
In one possible design, the audio capabilities include target audio parameters; and the first equipment converts the first audio stream into a second audio stream corresponding to the target audio parameter. The audio stream is processed according to the target audio parameter, so that the processed audio stream can meet the playing requirement of the second device, and the quality and the effect of the audio are improved.
In another possible design, the audio capability includes a target audio parameter corresponding to each of a plurality of audio types; the method comprises the steps that a first device obtains an audio type of a first audio stream; the first audio stream is converted into a second audio stream according to the audio type. The audio stream is processed according to the target audio parameter corresponding to each audio type, so that the processed audio stream can meet the playing requirement of the second device, and the quality and the effect of the audio are improved.
In another possible design, the audio capabilities include audio codec capabilities; when the second device supports audio coding and decoding, the first device converts the first audio stream into a second audio stream in a compression coding mode; when the second device does not support audio codec, the first device converts the first audio stream into a second audio stream by pulse code modulation. Whether the audio stream is coded or not is determined according to the audio coding and decoding capacity, so that the audio stream can be normally played.
In another possible design, the audio capability includes a networking connection; when the networking connection mode is wireless connection, the first device converts the first audio stream into the second audio stream through a compression coding mode. In the wireless connection mode, the data flow is reduced by a compression coding mode, so that the wireless bandwidth resources are effectively utilized. When the networking connection mode is wired connection, the first device converts the first audio stream into the second audio stream through pulse code modulation. Under the wired connection mode, the device has sufficient bandwidth, and the audio quality is guaranteed through pulse code modulation.
In another possible design, the audio capability includes an audio codec capability and a networking connection mode; when the second device supports audio coding and decoding and the networking connection mode is wireless connection, the first device converts the first audio stream into the second audio stream in a compression coding mode, and reduces data flow through the compression coding mode, so that wireless bandwidth resources are effectively utilized. And when the second equipment does not support audio coding and decoding and the networking connection mode is wireless connection, the first equipment converts the first audio stream into a second audio stream through pulse code modulation.
In another possible design, the audio capability includes a resampling capability; if the second device does not support audio resampling, the first device performs conversion of the first audio stream into the second audio stream according to the audio capability.
In another possible design, the first device sends a request message to the second device, the request message requesting audio capabilities of the second device.
In a second aspect, an embodiment of the present invention provides an audio playing method, including: the second device sends audio capability to the first device, the audio capability being used for the first device to convert the first audio stream into a second audio stream; receiving a second audio stream sent by the first equipment; and performing audio playing on the second audio stream. The audio stream is processed according to the differentiated audio capacity of the second device, so that the processed audio stream can meet the playing requirement of the second device, and the quality and the effect of the audio are improved.
In one possible design, the second device receives a request message sent by the first device, the request message requesting audio capabilities of the second device.
In another possible design, the audio capability includes at least one of a target audio parameter, an audio codec capability, and a networking connection.
In a third aspect, an embodiment of the present application provides an audio playing apparatus, where the audio playing apparatus is configured to implement the method and the function performed by the first device in the first aspect, and the audio playing apparatus is implemented by hardware/software, where the hardware/software includes modules corresponding to the functions.
In a fourth aspect, the present application provides an audio playing apparatus, where the audio playing apparatus is configured to implement the method and the function performed by the second device in the second aspect, and the audio playing apparatus is implemented by hardware/software, where the hardware/software includes modules corresponding to the functions.
In a fifth aspect, an embodiment of the present application provides a first device, including: a processor, a memory and a communication bus, wherein the communication bus is used for realizing the connection communication between the processor and the memory, and the processor executes the program stored in the memory for realizing the steps of the first aspect.
In one possible design, the first device provided in the present application may include a module corresponding to the behavior of the first device in the design for performing the method described above. The modules may be software and/or hardware.
In a sixth aspect, an embodiment of the present application provides a second device, including: the system comprises a processor, a memory and a communication bus, wherein the communication bus is used for realizing connection communication between the processor and the memory, and the processor executes a program stored in the memory for realizing the steps provided by the second aspect.
In one possible design, the second device provided in the present application may include a module corresponding to the behavior of the second device in the design for performing the method described above. The modules may be software and/or hardware.
In a seventh aspect, the present application provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the method of the above aspects to be performed.
In an eighth aspect, the present application provides a computer program product containing instructions which, when run on a computer, cause the method of the above aspects to be performed.
In a ninth aspect, the present application provides a chip comprising a processor to retrieve from a memory and execute instructions stored in the memory.
In a tenth aspect, the present application provides a communication system comprising at least one first device and at least one second device, wherein the first device performs the method and functions performed by the first device in the first aspect, and the second device performs the method and functions performed by the second device in the second aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present invention, the drawings required to be used in the embodiments or the background art of the present invention will be described below.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of an audio transmission method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another audio transmission method provided in the embodiment of the present application;
fig. 4 is a schematic flowchart of an audio playing method provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an audio playing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another audio playing apparatus provided in the embodiment of the present application;
fig. 7 is a schematic structural diagram of a first device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a second apparatus according to an embodiment of the present application.
Detailed Description
The embodiments of the present invention will be described below with reference to the drawings.
The first device and the second device in the embodiment of the present application may be the electronic device 100 shown in fig. 1. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. 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, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (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.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an 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 alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
As shown in fig. 2, fig. 2 is a schematic flowchart of an audio transmission method according to an embodiment of the present application. When the first device is used for multi-device networking, the remote second device is usually used as an audio playing output device, so that resource sharing between the first device and the remote second device is achieved, wherein the second device can be a virtual device. In this scenario, an audio stream is first generated at a first device and transmitted to a Hardware Abstraction Layer (HAL). Then, the HAL performs audio coding compression on the audio stream or uses Pulse Code Modulation (PCM) to transmit the audio stream to the remote second device through the network, and after receiving the audio stream, the remote second device outputs the audio stream through the audio playing device of the second device and performs audio playing, thereby completing the virtual sharing of the audio from the first device to the audio playing of the remote second device.
As also shown in fig. 3, fig. 3 is a schematic flowchart of another audio transmission method provided in the embodiment of the present application. The application program of the first device plays different types of audio (such as call audio, alert tone, ringtone, music, etc.), the Android system plays audio streams to the HAL layer, before sending to the HAL, the Android system resamples the different audio streams to convert the different audio streams into audio streams with fixed audio parameters (such as sampling rate, sampling precision, channel number), the HAL layer receives the audio streams with the fixed audio parameters, then performs audio coding compression on the converted audio streams or processes the audio streams into a PCM format, transmits the PCM format to the remote second device through the network, and the remote second device receives the audio streams and then outputs and plays the audio streams through the audio playing device of the device.
In a multi-device networking scenario, when an HAL layer is used to virtualize an audio stream to a remote device for playing, an Android system of a first device can only process the audio stream by using fixed audio parameters (such as sampling rate, sampling accuracy, and channel number), and when a remote second device plays different audio types (such as call audio, alert tone, ringtone, music, and the like), can only use the fixed audio parameters. Since distributed remote devices are very different, many low-cost second devices do not support audio resampling capability, for example, low-end internet of things (IOT) devices only support the most basic playing function, depending on the hardware cost. As another example, for a particular audio type (e.g., call audio, alert tone, ring tone, music, etc.), only fixed audio parameters may be used for playback (such as older Linux car machines). In this case, the audio playing of the remote second device may not be compatible, which may cause an audio playing effect in a multi-device networking scenario, and affect the user experience. In order to solve the above technical problem, embodiments of the present application provide the following solutions.
As shown in fig. 4, fig. 4 is a schematic flowchart of an audio playing method provided in an embodiment of the present application. The steps in the embodiments of the present application include:
s401, the first device obtains the audio capability of the second device.
In a specific implementation, in a multi-device networking scenario, a first device may obtain an audio capability of a second device through a discovery connection protocol. The audio capability comprises at least one of a target audio parameter, an audio coding and decoding capability and a networking connection mode. The target audio parameters may include a sampling rate, a number of channels, a sampling precision, and the like. The audio codec capability may include the second device supporting audio codec or the second device not supporting audio codec. For example, the audio codec may be Advanced Audio Coding (AAC) or sound coding (OPUS). The networking connection mode may include a wired connection and a wireless connection.
Further, the audio capability may include a target audio parameter corresponding to each of the plurality of audio types. The plurality of audio types includes, among others, alert tones, call audio, and media audio. For example, the audio capabilities may include the following information: for the prompt tone, the sampling rate is 16K, the sampling precision is 16bit, and a single sound channel is formed; for the call audio, the sampling rate is 8K, the sampling precision is 16bit, and a single sound channel is formed; for media audio, sample rate 48K, sample precision 16bit, binaural.
Optionally, after establishing a connection with the second device, if it is required to use the remote second device as an audio playing output device, the first device may send a request message to the second device, where the request message is used to request the audio capability of the second device. And after receiving the request message of the first device, the second device feeds back the audio capability of the second device to the first device. If the first device does not receive the audio capability within the preset time range, the first device may resend the request message to the second device until receiving the audio capability fed back by the second device.
S402, the first device converts the first audio stream into a second audio stream according to the audio capacity. The method comprises the following several optional modes:
in a first alternative, the audio capabilities comprise target audio parameters; and the first equipment converts the first audio stream into a second audio stream corresponding to the target audio parameter. For example, if the first device uses audio parameters of sampling rate 48K, sampling precision 16bit, two channels, and the target audio parameters fed back by the second device include sampling rate 16K, sampling precision 16bit, single channel. Therefore, the first audio stream with 48K sampling rate and 16bit sampling precision and two channels needs to be converted into a second audio stream with 16K sampling precision and 16bit and single channel.
In a second alternative, the audio capability includes a target audio parameter corresponding to each of a plurality of audio types; the first device acquires the audio type of the first audio stream; converting the first audio stream into the second audio stream according to the audio type.
For example, if the first device uses audio parameters of sampling rate 48K, sampling precision 16bit, two channels, the second device supports alert tones (sampling rate 16K, sampling precision 16bit, mono), talk audio (sampling rate 48K, sampling precision 16bit, mono), media audio (sampling rate 48K, sampling precision 16bit, two channels). For the cue tone, the sampling rate of 48K, the sampling precision of 16bit, and the first audio stream of the two channels may be resampled to obtain the second audio stream of the single channel with the sampling rate of 16K and the sampling precision of 16 bit. For the call audio, resampling the sampling rate 48K, the sampling precision 16bit and the first audio stream of the double-track to obtain a second audio stream of the single-track with the sampling rate 48K and the sampling precision 16 bit. For media audio, the first audio stream does not need to be resampled, since the audio parameters used by the first device are the same as the target audio parameters supported by the second device, and the second audio stream is the same as the first audio stream.
In a third alternative, the audio capability comprises an audio codec capability; when the second device supports audio coding and decoding, the first device converts the first audio stream into the second audio stream in a compression coding mode; the first device converts the first audio stream into the second audio stream by pulse code modulation when the second device does not support audio codec. For example, the second device supports AAC codec, the first device may AAC encode the first audio stream to obtain a second audio stream, and the second device ACC decodes the second audio stream after receiving the second audio stream.
In a fourth optional mode, the audio capability includes a networking connection mode between the first device and the second device; when the networking connection mode is wireless connection (for example, WIFI wireless mode 2.4G), the first device converts the first audio stream into the second audio stream through a compression coding mode. In the wireless connection mode, the data flow is reduced by a compression coding mode, so that the wireless bandwidth resources are effectively utilized. When the networking connection mode is wired connection, the first device converts the first audio stream into the second audio stream through pulse code modulation. Under the wired connection mode, the device has sufficient bandwidth, and the audio quality is guaranteed through pulse code modulation.
In a fourth optional manner, the audio capability includes an audio codec capability and a networking connection manner. When the second device supports audio coding and decoding and the networking connection mode is wireless connection, the first device converts the first audio stream into the second audio stream in a compression coding mode; and when the second equipment does not support audio coding and decoding and the networking connection mode is wireless connection, the first equipment converts the first audio stream into the second audio stream through pulse code modulation. When the networking connection mode is wired connection, the first audio stream can be converted into the second audio stream through pulse code modulation regardless of whether the second device supports audio coding and decoding.
In a fifth optional manner, the audio capability includes a target audio parameter, an audio encoding and decoding capability, and a networking connection manner. The first device may convert the first audio stream into the second audio stream according to the target audio parameter, the audio codec capability, and the networking connection method. For example, if the first device uses audio parameters of sampling rate 48K, sampling precision 16bit, two channels, and the target audio parameters fed back by the second device include sampling rate 16K, sampling precision 16bit, single channel. And the second device supports audio coding and decoding, and the networking connection mode between the first device and the second device is wireless connection. The first device may resample the first audio stream with a sampling rate of 48K, a sampling precision of 16bit, and a binaural, and ACC encode to obtain a second audio stream with a sampling precision of 16K, 16bit, and a monophonic.
It should be noted that the target audio parameter, the audio encoding and decoding capability, and the networking connection mode may be combined arbitrarily, and the first device may convert the first audio stream into the second audio stream according to the audio capability obtained by any combination. For specific implementation, reference may be made to the above embodiments, which are not described herein again.
Optionally, the audio capability includes a resampling capability, and if the second device does not support audio resampling, the first device performs the step of converting the first audio stream into the second audio stream according to the audio capability. If the second device supports audio resampling, the first device may send the first audio stream to the second device without processing the first audio stream. Optionally, if the second device supports audio resampling, the first device may also convert the first audio stream into a second audio stream, and send the second audio stream to the second device for audio playing.
S403, the first device sends the second audio stream to the second device, where the second audio stream is used for audio playing by the second device.
In a specific implementation, in a process of sending a second audio stream to a second device by a first device, the second device may perform audio playing on the received second audio stream until the second audio stream is completely played. It should be noted that, if the second audio stream sent by the first device is an encoded audio stream, after receiving the second audio stream, the second device needs to decode the second audio stream and then perform audio playing.
In the embodiment of the application, under a multi-device networking scene, the requirement for audio playing of a remote second device can be reduced, so that the multi-device networking device is more diversified, the second device can be accessed by supporting basic discovery connection and basic audio playing capability, and audio playing can be completed under the condition that the second device does not support audio resampling or audio coding and decoding capability. Moreover, the computational power of the first device can be fully utilized, and the audio stream is processed according to the differentiated audio capability of the second device, so that the processed audio stream can meet the playing requirement of the second device, and the quality and the effect of the audio are improved.
As shown in fig. 5, fig. 5 is a schematic structural diagram of an audio playing apparatus according to an embodiment of the present application. The device in the embodiment of the application comprises:
an obtaining module 501, configured to obtain an audio capability of a second device;
a processing module 502, configured to convert the first audio stream into a second audio stream according to the audio capability;
a sending module 503, configured to send the second audio stream to the second device, where the second audio stream is used for audio playing by the second device.
Optionally, the audio capability includes a target audio parameter;
the processing module 502 is further configured to convert the first audio stream into a second audio stream corresponding to the target audio parameter.
Optionally, the audio capability includes a target audio parameter corresponding to each of multiple audio types;
the processing module 502 is further configured to obtain an audio type of the first audio stream; converting the first audio stream into the second audio stream according to the audio type.
Optionally, the audio capability includes an audio codec capability;
the processing module 502 is further configured to convert the first audio stream into the second audio stream in a compression coding manner when the second device supports audio coding and decoding; converting the first audio stream to the second audio stream by pulse code modulation when the second device does not support audio codec.
Optionally, the audio capability includes a networking connection mode;
the processing module 502 is further configured to, when the networking connection mode is a wireless connection, convert the first audio stream into the second audio stream by the first device in a compression coding mode; when the networking connection mode is wired connection, the first device converts the first audio stream into the second audio stream through pulse code modulation.
Optionally, the audio capability includes an audio encoding and decoding capability and a networking connection mode;
the processing module 502 is further configured to convert the first audio stream into the second audio stream in a compression coding manner when the second device supports audio coding and decoding and the networking connection manner is wireless connection; and when the second equipment does not support audio coding and decoding and the networking connection mode is wireless connection, converting the first audio stream into the second audio stream through pulse code modulation.
Optionally, the audio capability includes a resampling capability;
the processing module 502 is further configured to execute the step of converting the first audio stream into the second audio stream according to the audio capability if the second device does not support audio resampling.
Optionally, the sending module 503 is further configured to send a request message to the second device, where the request message is used to request the audio capability of the second device.
It should be noted that the implementation of each module may also correspond to the corresponding description of the method embodiment shown in fig. 4, and execute the method and the function executed by the first device in the foregoing embodiment.
As shown in fig. 6, fig. 6 is a schematic structural diagram of another audio playing apparatus provided in the embodiment of the present application. The device in the embodiment of the application comprises:
a sending module 601, configured to send an audio capability to a first device, where the audio capability is used for the first device to convert the first audio stream into a second audio stream;
a receiving module 602, configured to receive the second audio stream sent by the first device;
the processing module 603 is configured to perform audio playing on the second audio stream.
Optionally, the receiving module 602 is further configured to receive a request message sent by the first device, where the request message is used to request the audio capability of the second device.
The audio capability comprises at least one of a target audio parameter, an audio coding and decoding capability and a networking connection mode.
It should be noted that the implementation of each module may also correspond to the corresponding description of the method embodiment shown in fig. 4, and execute the method and the function executed by the second device in the foregoing embodiment.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a first device according to an embodiment of the present disclosure. As shown in fig. 7, the first device may include: at least one processor 701, at least one communication interface 702, at least one memory 703 and at least one communication bus 704.
The processor 701 may be, among other things, a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, transistor logic, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, a digital signal processor and a microprocessor, or the like. The communication bus 704 may be a peripheral component interconnect standard PCI bus or an extended industry standard architecture EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus. A communication bus 704 is used to enable communications among the components. In this embodiment, the communication interface 702 of the device in this application is used for performing signaling or data communication with other node devices. The memory 703 may include a volatile memory such as a nonvolatile dynamic random access memory (NVRAM), a phase change random access memory (PRAM), a Magnetoresistive Random Access Memory (MRAM), and the like, and may further include a nonvolatile memory such as at least one magnetic disk memory device, an electrically erasable programmable read-only memory (EEPROM), a flash memory device such as a NOR flash memory (NOR flash memory) or a NAND flash memory (EEPROM), a semiconductor device such as a Solid State Disk (SSD), and the like. The memory 703 may optionally be at least one memory device located remotely from the processor 701. A set of program codes may optionally be stored in the memory 703 and the processor 701 may optionally execute the program executed in the memory 703.
Acquiring the audio capability of the second device;
converting the first audio stream into a second audio stream according to the audio capabilities;
and sending the second audio stream to the second device, wherein the second audio stream is used for audio playing of the second device.
Optionally, the processor 701 is further configured to perform the following operations:
and converting the first audio stream into a second audio stream corresponding to the target audio parameter.
Optionally, the processor 701 is further configured to perform the following operations:
converting the first audio stream into a second audio stream according to the audio capabilities comprises:
acquiring the audio type of the first audio stream;
converting the first audio stream into the second audio stream according to the audio type.
Optionally, the processor 701 is further configured to perform the following operations:
when the second device supports audio coding and decoding, converting the first audio stream into the second audio stream in a compression coding mode;
converting the first audio stream to the second audio stream by pulse code modulation when the second device does not support audio codec.
Optionally, the processor 701 is further configured to perform the following operations:
when the networking connection mode is wireless connection, converting the first audio stream into the second audio stream in a compression coding mode;
and when the networking connection mode is wired connection, converting the first audio stream into the second audio stream through pulse code modulation.
Optionally, the processor 701 is further configured to perform the following operations:
when the second device supports audio coding and decoding and the networking connection mode is wireless connection, converting the first audio stream into the second audio stream in a compression coding mode;
and when the second equipment does not support audio coding and decoding and the networking connection mode is wireless connection, the first equipment converts the first audio stream into the second audio stream through pulse code modulation.
Optionally, the processor 701 is further configured to perform the following operations:
and if the second device does not support audio resampling, executing the step of converting the first audio stream into the second audio stream according to the audio capability.
Optionally, the processor 701 is further configured to perform the following operations:
sending a request message to the second device, the request message requesting the audio capabilities of the second device.
Further, the processor may cooperate with the memory and the communication interface to perform the operations of the first device in the embodiments of the above application.
Please refer to fig. 8, fig. 8 is a schematic structural diagram of a second apparatus according to an embodiment of the present disclosure. As shown, the second device may include: at least one processor 801, at least one communication interface 802, at least one memory 803, and at least one communication bus 804.
The processor 801 may be, among other things, various types of processors as previously mentioned. The communication bus 804 may be a peripheral component interconnect standard PCI bus or an extended industry standard architecture EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but this is not intended to represent only one bus or type of bus. A communication bus 804 is used to enable communications among the components. In this embodiment, the communication interface 802 of the device in this application is used for performing signaling or data communication with other node devices. The memory 803 may be various types of memory as previously mentioned. The memory 803 may optionally be at least one memory device located remotely from the processor 801 as previously described. A set of program codes is stored in the memory 803 and the processor 801 executes the programs in the memory 803.
Transmitting, to a first device, an audio capability for the first device to convert the first audio stream into a second audio stream;
receiving the second audio stream transmitted by the first device;
and performing audio playing on the second audio stream.
Optionally, the processor 801 is further configured to perform the following operations:
receiving a request message sent by the first device, wherein the request message is used for requesting the audio capability of the second device.
The audio capability comprises at least one of a target audio parameter, an audio coding and decoding capability and a networking connection mode.
Further, the processor may cooperate with the memory and the communication interface to perform the operations of the second device in the embodiments of the above application.
An embodiment of the present application further provides a chip system, where the chip system includes a processor and an interface, and the processor is configured to support the first device or the second device to implement the functions involved in any of the foregoing embodiments, for example, to generate or process data and/or information involved in the foregoing methods. The interface is used for receiving or transmitting data and/or information involved in the above method. In one possible design, the system-on-chip may further include a memory for the necessary program instructions and data for the first device or the second device. The chip system may be constituted by a chip, or may include a chip and other discrete devices.
Embodiments of the present application further provide a processor, coupled to the memory, for performing any of the methods and functions related to the first device or the second device in any of the above embodiments.
Embodiments of the present application also provide a computer program product containing instructions, which when executed on a computer, cause the computer to perform any of the methods and functions related to the first device or the second device in any of the above embodiments.
The embodiments of the present application further provide an apparatus for performing any method and function related to the first device or the second device in any of the foregoing embodiments.
An embodiment of the present application further provides a communication system, where the system includes at least one first device and at least one second device involved in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above-mentioned embodiments further explain the objects, technical solutions and advantages of the present application in detail. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (26)

1. An audio playing method, comprising:
the method comprises the steps that a first device obtains audio capability of a second device;
the first device converts the first audio stream into a second audio stream according to the audio capability;
and the first equipment sends the second audio stream to the second equipment, and the second audio stream is used for audio playing of the second equipment.
2. The method of claim 1, wherein the audio capability comprises a target audio parameter; the second device converting the first audio stream into a second audio stream according to the audio capabilities comprises:
and the first equipment converts the first audio stream into a second audio stream corresponding to the target audio parameter.
3. The method of claim 1 or 2, wherein the audio capabilities comprise target audio parameters corresponding to each of a plurality of audio types;
the first device converting the first audio stream into the second audio stream according to the audio capabilities comprises:
the first device acquires the audio type of the first audio stream;
the first device converts the first audio stream into the second audio stream according to the audio type.
4. The method of any of claims 1-3, wherein the audio capabilities comprise audio codec capabilities; the second device converting the first audio stream into a second audio stream according to the audio capabilities comprises:
when the second device supports audio coding and decoding, the first device converts the first audio stream into the second audio stream in a compression coding mode;
the first device converts the first audio stream into the second audio stream by pulse code modulation when the second device does not support audio codec.
5. The method of any of claims 1-3, wherein the audio capabilities include a networking connectivity means; the second device converting the first audio stream into a second audio stream according to the audio capabilities comprises:
when the networking connection mode is wireless connection, the first device converts the first audio stream into the second audio stream in a compression coding mode;
when the networking connection mode is wired connection, the first device converts the first audio stream into the second audio stream through pulse code modulation.
6. The method of any one of claims 1-3, wherein the audio capabilities include audio codec capabilities and networking connectivity; the second device converting the first audio stream into a second audio stream according to the audio capabilities comprises:
when the second device supports audio coding and decoding and the networking connection mode is wireless connection, the first device converts the first audio stream into the second audio stream in a compression coding mode;
and when the second equipment does not support audio coding and decoding and the networking connection mode is wireless connection, the first equipment converts the first audio stream into the second audio stream through pulse code modulation.
7. The method of any of claims 1-6, wherein the audio capability comprises a resampling capability; the second device converting the first audio stream into a second audio stream according to the audio capabilities comprises:
and if the second equipment does not support audio resampling, the first equipment executes the step of converting the first audio stream into the second audio stream according to the audio capacity.
8. The method of any one of claims 1-7, further comprising:
the first device sends a request message to the second device, the request message requesting the audio capabilities of the second device.
9. An audio playing method, comprising:
the second device sending an audio capability to the first device, the audio capability being used for the first device to convert the first audio stream into a second audio stream;
the second device receives the second audio stream sent by the first device;
and the second device performs audio playing on the second audio stream.
10. The method of claim 9, wherein the method further comprises:
and the second equipment receives a request message sent by the first equipment, wherein the request message is used for requesting the audio capability of the second equipment.
11. The method according to claim 9 or 10, wherein the audio capabilities comprise at least one of target audio parameters, audio codec capabilities and networking connectivity.
12. An audio playback apparatus, comprising:
the acquisition module is used for acquiring the audio capability of the second equipment;
the processing module is used for converting the first audio stream into a second audio stream according to the audio capacity;
and the sending module is used for sending the second audio stream to the second device, and the second audio stream is used for audio playing of the second device.
13. The apparatus of claim 12, wherein the audio capability comprises a target audio parameter;
the processing module is further configured to convert the first audio stream into a second audio stream corresponding to the target audio parameter.
14. The apparatus of claim 12 or 13, wherein the audio capabilities comprise target audio parameters corresponding to each of a plurality of audio types;
the processing module is further configured to obtain an audio type of the first audio stream; converting the first audio stream into the second audio stream according to the audio type.
15. The apparatus of any of claims 12-14, wherein the audio capabilities comprise audio codec capabilities;
the processing module is further configured to convert the first audio stream into the second audio stream in a compression coding manner when the second device supports audio coding and decoding; converting the first audio stream to the second audio stream by pulse code modulation when the second device does not support audio codec.
16. The apparatus of any of claims 12-14, wherein the audio capabilities comprise a networking connectivity means;
the processing module is further configured to, when the networking connection mode is wireless connection, convert the first audio stream into the second audio stream by the first device in a compression coding mode; when the networking connection mode is wired connection, the first device converts the first audio stream into the second audio stream through pulse code modulation.
17. The apparatus of any one of claims 12-14, wherein the audio capabilities include audio codec capabilities and networking connectivity;
the processing module is further configured to convert the first audio stream into the second audio stream in a compression coding manner when the second device supports audio coding and decoding and the networking connection manner is wireless connection; and when the second equipment does not support audio coding and decoding and the networking connection mode is wireless connection, converting the first audio stream into the second audio stream through pulse code modulation.
18. The apparatus of any of claims 12-17, wherein the audio capability comprises a resampling capability;
the processing module is further configured to execute the step of converting the first audio stream into the second audio stream according to the audio capability if the second device does not support audio resampling.
19. The apparatus of any one of claims 12-18,
the sending module is further configured to send a request message to the second device, where the request message is used to request the audio capability of the second device.
20. An audio playback apparatus, comprising:
a sending module, configured to send an audio capability to a first device, where the audio capability is used for the first device to convert the first audio stream into a second audio stream;
a receiving module, configured to receive the second audio stream sent by the first device;
and the processing module is used for carrying out audio playing on the second audio stream.
21. The apparatus of claim 20,
the receiving module is further configured to receive a request message sent by the first device, where the request message is used to request the audio capability of the second device.
22. The apparatus according to claim 20 or 21, wherein the audio capabilities comprise at least one of target audio parameters, audio codec capabilities and networking connectivity.
23. A first device, comprising: a memory for storing program code, a communication bus, and a processor for invoking the program code for performing the method of any of claims 1-8.
24. A second apparatus, comprising: a memory for storing program code, a communication bus, and a processor for invoking the program code for performing the method of any of claims 9-11.
25. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-11.
26. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 11.
CN201911404807.0A 2019-12-30 2019-12-30 Audio playing method and related equipment Active CN113126948B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911404807.0A CN113126948B (en) 2019-12-30 2019-12-30 Audio playing method and related equipment
CN202111555399.6A CN114398020A (en) 2019-12-30 2019-12-30 Audio playing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911404807.0A CN113126948B (en) 2019-12-30 2019-12-30 Audio playing method and related equipment

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202111555399.6A Division CN114398020A (en) 2019-12-30 2019-12-30 Audio playing method and related equipment

Publications (2)

Publication Number Publication Date
CN113126948A true CN113126948A (en) 2021-07-16
CN113126948B CN113126948B (en) 2023-09-01

Family

ID=76768571

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202111555399.6A Pending CN114398020A (en) 2019-12-30 2019-12-30 Audio playing method and related equipment
CN201911404807.0A Active CN113126948B (en) 2019-12-30 2019-12-30 Audio playing method and related equipment

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202111555399.6A Pending CN114398020A (en) 2019-12-30 2019-12-30 Audio playing method and related equipment

Country Status (1)

Country Link
CN (2) CN114398020A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135532A (en) * 2023-04-28 2023-11-28 荣耀终端有限公司 Audio data processing method, device and storage medium
WO2024094069A1 (en) * 2022-11-02 2024-05-10 华为技术有限公司 Audio playback method and electronic device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117692886A (en) * 2022-08-30 2024-03-12 Oppo广东移动通信有限公司 Device connection method, device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120281965A1 (en) * 2011-05-02 2012-11-08 Hunt Neil D L-cut stream startup
US20160080896A1 (en) * 2014-09-11 2016-03-17 Lg Electronics Inc. Method and apparatus for transmitting and receiving audio stream in wireless communication system
US20170163955A1 (en) * 2015-12-03 2017-06-08 Le Holdings (Beijing) Co., Ltd. Method and device for playing video
CN110166820A (en) * 2019-05-10 2019-08-23 华为技术有限公司 Playback method, terminal and the device of audio-video
CN110543289A (en) * 2019-08-02 2019-12-06 华为技术有限公司 Method for controlling volume and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014051403A1 (en) * 2012-09-28 2014-04-03 Samsung Electronics Co., Ltd. Method and system for streaming multimedia content in a wireless fidelity display network environment
KR101657914B1 (en) * 2012-12-12 2016-09-19 후아웨이 디바이스 컴퍼니 리미티드 Method and terminal for sharing media stream
WO2017045127A1 (en) * 2015-09-15 2017-03-23 华为技术有限公司 Method and system for adjusting media adaptive parameter, and related device
CN108600503B (en) * 2018-03-07 2021-08-17 北京小米移动软件有限公司 Voice call control method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120281965A1 (en) * 2011-05-02 2012-11-08 Hunt Neil D L-cut stream startup
US20160080896A1 (en) * 2014-09-11 2016-03-17 Lg Electronics Inc. Method and apparatus for transmitting and receiving audio stream in wireless communication system
US20170163955A1 (en) * 2015-12-03 2017-06-08 Le Holdings (Beijing) Co., Ltd. Method and device for playing video
CN110166820A (en) * 2019-05-10 2019-08-23 华为技术有限公司 Playback method, terminal and the device of audio-video
CN110543289A (en) * 2019-08-02 2019-12-06 华为技术有限公司 Method for controlling volume and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024094069A1 (en) * 2022-11-02 2024-05-10 华为技术有限公司 Audio playback method and electronic device
CN117135532A (en) * 2023-04-28 2023-11-28 荣耀终端有限公司 Audio data processing method, device and storage medium
CN117135532B (en) * 2023-04-28 2024-06-14 荣耀终端有限公司 Audio data processing method, device and storage medium

Also Published As

Publication number Publication date
CN113126948B (en) 2023-09-01
CN114398020A (en) 2022-04-26

Similar Documents

Publication Publication Date Title
CN110347269B (en) Empty mouse mode realization method and related equipment
CN114726946A (en) Method for automatically switching Bluetooth audio coding modes and electronic equipment
CN113923230B (en) Data synchronization method, electronic device, and computer-readable storage medium
CN110557740A (en) Electronic equipment control method and electronic equipment
CN113722058A (en) Resource calling method and electronic equipment
CN113126948B (en) Audio playing method and related equipment
CN112312366A (en) Method, electronic equipment and system for realizing functions through NFC (near field communication) tag
CN111343326A (en) Method and related device for acquiring test log
CN113973398A (en) Wireless network connection method, electronic equipment and chip system
CN113490291B (en) Data downloading method and device and terminal equipment
CN114880251A (en) Access method and access device of storage unit and terminal equipment
CN113596919B (en) Data downloading method and device and terminal equipment
CN115514844A (en) Volume adjusting method, electronic equipment and system
CN114915721A (en) Method for establishing connection and electronic equipment
CN110806994B (en) Signal transmission method and device
CN114554012A (en) Incoming call answering method, electronic equipment and storage medium
CN109285563B (en) Voice data processing method and device in online translation process
CN115119336B (en) Earphone connection system, earphone connection method, earphone, electronic device and readable storage medium
CN112469012A (en) Bluetooth communication method and related device
CN113901485B (en) Application program loading method, electronic device and storage medium
CN110798893A (en) Method for solving coexistence interference and electronic equipment
WO2022170854A1 (en) Video call method and related device
CN115706755A (en) Echo cancellation method, electronic device, and storage medium
CN114116610A (en) Method, device, electronic equipment and medium for acquiring storage information
CN114125805B (en) Bluetooth reconnection method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant