CN117135603A - Device and method for transmitting audio data and Bluetooth device - Google Patents

Device and method for transmitting audio data and Bluetooth device Download PDF

Info

Publication number
CN117135603A
CN117135603A CN202310980526.XA CN202310980526A CN117135603A CN 117135603 A CN117135603 A CN 117135603A CN 202310980526 A CN202310980526 A CN 202310980526A CN 117135603 A CN117135603 A CN 117135603A
Authority
CN
China
Prior art keywords
bluetooth
bluetooth chip
audio data
chip
unit
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
CN202310980526.XA
Other languages
Chinese (zh)
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.)
Hefei Yirui Communication Technology Co Ltd
Original Assignee
Hefei Yirui Communication Technology 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 Hefei Yirui Communication Technology Co Ltd filed Critical Hefei Yirui Communication Technology Co Ltd
Priority to CN202310980526.XA priority Critical patent/CN117135603A/en
Publication of CN117135603A publication Critical patent/CN117135603A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/14Direct-mode setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

An apparatus and method for transmitting audio data, and a Bluetooth device are provided. The apparatus for transmitting audio data includes: the audio unit is used for playing out audio data; the first Bluetooth chip is used for being connected with the first Bluetooth device in a wireless mode; the second Bluetooth chip is used for being connected with a second Bluetooth device in a wireless mode, and the second Bluetooth device is used for playing audio data in a playing mode; the control unit is connected with the first Bluetooth chip and the second Bluetooth chip and is used for executing the following operations: controlling the first Bluetooth chip and the audio unit to be connected and the first Bluetooth chip and the second Bluetooth chip to be disconnected in response to an instruction of playing the audio data by the audio unit; and in response to an instruction for playing the audio data by using the second Bluetooth device, controlling the first Bluetooth chip and the audio unit to be disconnected and controlling the first Bluetooth chip and the second Bluetooth chip to be connected. The embodiment of the application is beneficial to meeting the privacy requirement of the user.

Description

Device and method for transmitting audio data and Bluetooth device
Technical Field
The embodiment of the application relates to the technical field of Bluetooth, in particular to a device and a method for transmitting audio data and Bluetooth equipment.
Background
With the development of bluetooth technology, the phenomenon of implementing data transmission through bluetooth technology is very common in a variety of terminal devices. Current vehicle systems only support bluetooth only and are typically configured in slave roles. When the mobile phone is connected to the car phone through Bluetooth, the Bluetooth earphone cannot be connected at the same time, and all sound can only be played through the car phone loudspeaker. If a private telephone comes in at this time, the driver cannot use the Bluetooth headset to talk, the privacy of the driver cannot be protected, and the requirement of wearing the Bluetooth headset to listen to music cannot be met. If the mobile phone is to be connected with the Bluetooth headset, the connection with the car phone needs to be disconnected, and then the Bluetooth headset is connected, so that the mobile phone is very inconvenient, and particularly in the driving process, if the operation is performed, a great potential safety hazard exists.
Disclosure of Invention
The embodiment of the application provides a device and a method for transmitting audio data and Bluetooth equipment. Various aspects of embodiments of the application are described below.
In a first aspect, there is provided an apparatus for transmitting audio data, comprising: the audio unit is used for playing out audio data; the first Bluetooth chip is used for being connected with the first Bluetooth device in a wireless mode; the second Bluetooth chip is used for being connected with a second Bluetooth device in a wireless mode, and the second Bluetooth device is used for internally placing the audio data; the control unit is connected with the first Bluetooth chip and the second Bluetooth chip and is used for executing the following operations: controlling the first Bluetooth chip and the audio unit to be connected and the first Bluetooth chip and the second Bluetooth chip to be disconnected in response to an instruction of playing the audio data by the audio unit; and in response to an instruction for playing the audio data by using the second Bluetooth device, controlling the first Bluetooth chip and the audio unit to be disconnected and controlling the first Bluetooth chip and the second Bluetooth chip to be connected.
In some possible implementations, the apparatus includes: the switch unit is connected with the audio unit, the first Bluetooth chip and the second Bluetooth chip, and when the switch unit is in a first state, the first Bluetooth chip and the audio unit are connected, and the first Bluetooth chip and the second Bluetooth chip are disconnected; when the switch unit is in a second state, the first Bluetooth chip and the audio unit are disconnected, and the first Bluetooth chip and the second Bluetooth chip are connected; the control unit is connected with the switch unit and used for controlling the working state of the switch unit.
In some possible implementations, the first bluetooth chip is configured as a slave role, the second bluetooth chip is configured as a master role, and when the switch unit is in the second state, a transmission channel is established between the first bluetooth chip and the second bluetooth chip, and the transmission channel is used for forwarding the audio data transmitted between the first bluetooth chip and the first bluetooth device, and/or is used for forwarding the audio data transmitted between the second bluetooth chip and the second bluetooth device.
In some possible implementations, the audio data includes at least one of: telephone data, music data.
In some possible implementations, the device for transmitting audio data is applied to a car set, the first bluetooth device is a mobile phone, and the second bluetooth device is a bluetooth headset.
In a second aspect, there is provided a method of transmitting audio data, applied to an apparatus for transmitting audio data, the apparatus comprising: the audio unit is used for playing out audio data; the first Bluetooth chip is used for being connected with the first Bluetooth device in a wireless mode; the second Bluetooth chip is used for being connected with a second Bluetooth device in a wireless mode, and the second Bluetooth device is used for internally placing the audio data; the control unit is connected with the first Bluetooth chip and the second Bluetooth chip; the method comprises the following steps: controlling the first Bluetooth chip and the audio unit to be connected and the first Bluetooth chip and the second Bluetooth chip to be disconnected in response to an instruction of playing the audio data by the audio unit; and in response to an instruction for playing the audio data by using the second Bluetooth device, controlling the first Bluetooth chip and the audio unit to be disconnected and controlling the first Bluetooth chip and the second Bluetooth chip to be connected.
In some possible implementations, the means for transmitting audio data includes: the switch unit is connected with the audio unit, the first Bluetooth chip and the second Bluetooth chip, and when the switch unit is in a first state, the first Bluetooth chip and the audio unit are connected, and the first Bluetooth chip and the second Bluetooth chip are disconnected; when the switch unit is in a second state, the first Bluetooth chip and the audio unit are in disconnection, and the first Bluetooth chip and the second Bluetooth chip are connected; the method comprises the following steps: controlling the switch unit to be in the first state in response to an instruction to play the audio data by using the audio unit; and controlling the switch unit to be in the second state in response to an instruction for playing the audio data by using the second Bluetooth device.
In some possible implementations, the first bluetooth chip is configured as a slave role and the second bluetooth chip is configured as a master role, the method comprising: when the switch unit is in the second state, a transmission channel is established between the first Bluetooth chip and the second Bluetooth chip, and the transmission channel is used for forwarding the audio data transmitted between the first Bluetooth chip and the first Bluetooth device and/or forwarding the audio data transmitted between the second Bluetooth chip and the second Bluetooth device.
In some possible implementations, before controlling the switching unit to be in the second state in response to an instruction to play the audio data with the second bluetooth device, the method includes: and detecting that the second Bluetooth chip and the second Bluetooth device have established Bluetooth communication connection.
In a third aspect, a bluetooth device is provided, comprising an apparatus for transmitting audio data as described in the first aspect.
In a fourth aspect, there is provided a non-transitory computer readable storage medium having stored thereon a computer program for performing the method according to the second aspect.
In a fifth aspect, there is provided a computer program product comprising instructions for performing the method of the second aspect.
In the embodiment of the application, the device for transmitting the audio data comprises two Bluetooth chips, and the two Bluetooth chips can work simultaneously, so that the device can support to be connected with the external first Bluetooth device and the external second Bluetooth device simultaneously. According to the application scene, the built-in audio unit can be switched to externally play audio data, and the second Bluetooth device can also be used to internally play audio data. The embodiment of the application is beneficial to conveniently switching the audio data played by the inner-playing and outer-playing loudspeakers, and meets the privacy requirement of protecting users.
Drawings
Fig. 1 is a schematic connection diagram of a bluetooth model of a vehicle unit provided in the related art.
Fig. 2 is a schematic diagram of an apparatus for transmitting audio data according to an embodiment of the present application.
Fig. 3 is a schematic diagram of the composition of one possible implementation of the apparatus of fig. 2.
Fig. 4 is a flowchart of a method for transmitting audio data according to an embodiment of the present application.
Fig. 5 is a flow diagram of one possible implementation of the method of fig. 4.
Fig. 6 is a schematic diagram of constituent units/partial constituent units of a bluetooth device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments.
In order to facilitate understanding of the technical scheme provided by the embodiment of the present application, first, application scenarios and possibly related technical terms of the embodiment of the present application are described.
Bluetooth is a radio technology supporting short-range communication of devices, and can realize wireless information exchange among a plurality of electronic devices supporting Bluetooth transmission, so that data transmission among the electronic devices is quicker and more efficient. Bluetooth operates in the worldwide standard 2.4GHz ISM (i.e., industrial, scientific, medical) band, using the IEEE802.15 protocol. With the development of bluetooth technology, the phenomenon of implementing data transmission through bluetooth technology is very common in a variety of electronic devices. For example, after people establish bluetooth connection with the bluetooth headset through the mobile phone, audio data can be played through the bluetooth headset, and data interaction is achieved. Bluetooth technology may include: basic data rate/enhanced data rate (BR/EDR), bluetooth low energy (bluetooth low energy, BLE) technology.
The throughput of classical bluetooth BR/EDR exceeds 2Mbps, and is suitable for high quality audio bitstreams or other applications requiring maintenance of higher bandwidth connections. For example, bluetooth headsets listen to music using the classical bluetooth advanced audio transfer protocol (advanced audio distribution profile, A2 DP), and bluetooth telephones using the classical bluetooth Hands Free Protocol (HFP). In some occasions, BLE is a new transmission technology in the bluetooth field, which brings low power consumption, low cost, high quality and low delay wireless service to people. For example, the cell phone connection to a smart watch is mostly BLE.
In bluetooth technology, for an electronic device based on bluetooth technology, a device that first puts forward a communication requirement is called a master device (master), and the master device is called a master role or a client (client); devices that communicate passively are called slave devices (slave), either slave devices or slave roles, servers (servers). For example, a cell phone bluetooth protocol stack is typically a master role and a bluetooth headset is a slave role. To transfer bluetooth telephone and bluetooth music data between two bluetooth devices, one must be master and the other set to slave.
In the embodiment of the application, the master device and the slave device can be called as Bluetooth devices, and the Bluetooth devices can be Bluetooth mobile phones, bluetooth handrings, bluetooth sound boxes, bluetooth headphones and terminal devices supporting Bluetooth functions. The terminal devices may include, but are not limited to, personal digital assistants (personal digital assistant, PDA), tablet computers, handheld computers, printers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computer, UMPC), netbooks, cellular phones, wearable devices (e.g., smart watches), augmented reality (augmented reality, AR) devices, virtual Reality (VR) devices, MP4 players, car sets, smart home devices, and the like, terminals having bluetooth connection functions. For example, the slave device may be a notebook computer, a television, an air conditioner, a refrigerator, a car set, or the like having a bluetooth communication function.
With the wider and wider application of the internet of things and the rising of the internet of vehicles, the functions of the cabin system are increasingly abundant. Vehicle Bluetooth is an in-vehicle wireless hands-free system based on Bluetooth technology. The mobile phone Bluetooth is connected with the car phone Bluetooth, and if the mobile phone shows that the connection is successful, the car phone buttons or voice on the vehicle can be used for dialing. When the driver connects to the car machine using the mobile phone, all audio data (music played by the mobile phone, telephone, etc.) can be played through the speaker (horn) of the car machine. During normal running of the vehicle, the Bluetooth technology is used for connecting with the mobile phone to carry out hands-free conversation, so that the effects of freeing hands and reducing traffic hidden trouble can be achieved.
Current vehicle systems (e.g., android) support only single bluetooth and are typically configured as slave roles. The Bluetooth headset is also configured into a slave role, the mobile phone is configured into a Bluetooth master role, and the mobile phone cannot be connected with the car phone and the Bluetooth headset at the same time.
Fig. 1 is a schematic connection diagram of a bluetooth model of a vehicle unit provided in the related art. As shown in fig. 1, the bluetooth communication system 100 may include: a cell phone 110 and a car phone 120.
The vehicle 120 includes a vehicle horn 121 and a bluetooth chip 122. Since there is only one slave character's bluetooth chip 122, the car machine 120 can only connect with the mobile phone 110, and cannot connect with the bluetooth headset 130 at the same time. The audio of the handset 110 (bluetooth music, bluetooth phone) can only be played through the car horn 121.
Therefore, when the mobile phone is connected to the car phone through Bluetooth, the Bluetooth earphone cannot be connected at the same time, and all sound can only be played through the car phone loudspeaker. If a private telephone comes in at this time, the driver cannot use the Bluetooth headset to talk, the privacy of the driver cannot be protected, and the requirement of wearing the Bluetooth headset to listen to music cannot be met. In addition, if the mobile phone is to be connected with the Bluetooth headset, the connection with the car phone needs to be disconnected, and then the Bluetooth headset is connected, so that the mobile phone is inconvenient. Particularly during driving, if this operation is performed, there is a great safety hazard.
It should be noted that, in the above-mentioned bluetooth audio data playing of mobile phones and car phones, the problem that the user privacy cannot be guaranteed is only an example, and the embodiment of the application can be applied to audio data playing between bluetooth devices, and any type of scene that the user privacy cannot be guaranteed.
Therefore, how to develop a technical solution for audio data playback between bluetooth devices that helps to protect user privacy is a problem to be solved.
Based on this, an embodiment of the present application proposes an apparatus for transmitting audio data. Fig. 2 is a schematic diagram of an apparatus for transmitting audio data according to an embodiment of the present application. An embodiment of the present application will be described in detail with reference to fig. 2. As shown in fig. 2, the apparatus 200 for transmitting audio data includes: an audio unit 210, a first bluetooth chip 220, a second bluetooth chip 230, and a control unit 240.
The audio unit 210 is used for playing out audio data. For example, the audio unit 210 may be a loud speaker (horn). In some embodiments, the audio unit 210 may input and output audio, and the audio unit 210 may include a loud speaker and a microphone.
The first bluetooth chip 220 is used for wirelessly connecting with a first bluetooth device. The first bluetooth device may be a source of audio data, for example, the first bluetooth device may be a mobile phone, a terminal device with bluetooth functionality. The Bluetooth chip or the Bluetooth communication module refers to a chip basic circuit set integrating Bluetooth functions and is used for wireless network communication. The first bluetooth chip 220 may establish a bluetooth connection with the first bluetooth device.
The second bluetooth chip 230 is used for wirelessly connecting with a second bluetooth device, and the second bluetooth device is used for internally playing audio data. The second bluetooth device may have an loud speaker, typically having a power less than the power of the loud speaker, which plays a sound having a decibel less than the decibel of the loud speaker. The second bluetooth chip 230 may establish a bluetooth connection with a second bluetooth device.
In some embodiments, the apparatus 200 may include a plurality of bluetooth chips. The second bluetooth chip 230 may be any bluetooth chip different from the first bluetooth chip 220 among a plurality of bluetooth chips.
The control unit 240 is connected to the first bluetooth chip 220 and the second bluetooth chip 230, and is configured to perform the following operations:
in response to an instruction to play audio data using the audio unit 210, the first bluetooth chip 220 and the audio unit 210 are controlled to be turned on, and the first bluetooth chip 220 and the second bluetooth chip 230 are controlled to be turned off; in response to an instruction to play audio data using the second bluetooth device, the first bluetooth chip 220 and the audio unit 210 are controlled to be disconnected, and the first bluetooth chip 220 and the second bluetooth chip 230 are controlled to be turned on.
In some implementations, the control unit 240 may be a processor. The processor may be a general-purpose processor including a central processor, a micro-control unit, a network processor, or other conventional processor. But may be a special purpose processor including a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
In some implementations, the apparatus 200 may include a switching unit connected to the audio unit 210, the first bluetooth chip 220, and the second bluetooth chip 230. When the switch unit is in the first state, the first bluetooth chip 220 and the audio unit 210 are turned on, and the first bluetooth chip 220 and the second bluetooth chip 230 are turned off; when the switching unit is in the second state, the first bluetooth chip 220 and the audio unit 210 are disconnected, and the first bluetooth chip 220 and the second bluetooth chip 230 are turned on.
There are a number of implementations of the switching unit. For example, the switching unit may include a single pole double throw switch, the fixed end of which is connected to the first bluetooth chip 220, and the movable end of which is connected to the second bluetooth chip 230 and the audio unit 210, respectively. The control unit 240 is connected to the switching unit for controlling the operation state of the switching unit.
In some implementations, the first bluetooth chip 220 is configured as a slave role and the second bluetooth chip 230 is configured as a master role. The first bluetooth device may be a master role, and the first bluetooth device and the first bluetooth chip 220 form a master role and a slave role, so that bluetooth communication can be performed. The second bluetooth device may be a slave role, and the second bluetooth chip 230 and the second bluetooth device form a master role and a slave role, and may perform bluetooth communication. When the switch unit is in the second state, a transmission channel is established between the first bluetooth chip 220 and the second bluetooth chip 230. The transmission channel is used for forwarding audio data transmitted between the first bluetooth chip 220 and the first bluetooth device, and/or is used for forwarding audio data transmitted between the second bluetooth chip 230 and the second bluetooth device.
In some implementations, the audio unit includes a microphone for inputting audio data. The audio data includes at least one of: telephone data, music data.
In some implementations, the apparatus for transmitting audio data may be applied to a car set, a bluetooth sound, a first bluetooth device may be a mobile phone, and a second bluetooth device may be a bluetooth headset. The vehicle is also called a driving computer, an intelligent central control, a vehicle navigation and the like. The car body is generally a product provided with a car Bluetooth, a multimedia playing system, a driving assistance system, and the like. The operating system of the first bluetooth device and the vehicle may be, for example, an android, iOS or hong-mong system, etc.
In the embodiment of the application, the device for transmitting the audio data comprises two Bluetooth chips, and the two Bluetooth chips can work simultaneously, so that the device can support to be connected with the external first Bluetooth device and the external second Bluetooth device simultaneously. According to the application scene, the built-in audio unit can be switched to externally play audio data, and the second Bluetooth device can also be used to internally play audio data. The embodiment of the application is beneficial to conveniently switching the audio data played by the inner-playing and outer-playing loudspeakers, and meets the privacy requirement of protecting users.
The apparatus for transmitting audio data according to the embodiments of the present application will be further described below with reference to some possible implementation manners of the embodiments of the present application.
Fig. 3 is a schematic diagram of the composition of one possible implementation of the apparatus of fig. 2. The apparatus of fig. 3 is applied to a car machine, or the apparatus of fig. 3 is a car machine. An exemplary description will be given below with the first bluetooth device as a mobile phone and the second bluetooth device as a headset. The car machine contains two bluetooth chips, and one bluetooth chip is used for connecting the cell-phone, and another bluetooth chip is used for connecting bluetooth headset. As shown in fig. 3, the bluetooth communication system 300 may include: a mobile phone 310, a car phone 320 and a Bluetooth headset 330.
The car machine 320 may include: an audio unit 321, a first bluetooth chip 322, a second bluetooth chip 323, a Digital Signal Processor (DSP) 324, and a control unit (not shown).
The audio unit 321 may comprise a loud speaker and a microphone. The loud speaker is used for playing audio data, and the microphone is used for inputting the audio data.
The first bluetooth chip 322 is used for bluetooth connection with the handset 310.
The second bluetooth chip 323 is used for bluetooth connection with the bluetooth headset 330. The bluetooth headset 330 has a speaker for audio data to be played. The playing decibels of the inner speaker are typically smaller than those of the outer speaker. The bluetooth headset 330 may be, for example, a true wireless stereo (true wireless stereo, TWS) bluetooth headset.
The digital signal processor 324 is connected to the first bluetooth chip 322, and is configured to perform digital-to-analog conversion on an audio data signal transmitted by the first bluetooth chip 322, and then send the audio data signal to an loud speaker of the audio unit 321, and perform analog-to-digital processing on an input signal of a microphone of the audio unit 321, and then transmit the processed audio data signal to the first bluetooth chip 322.
The first bluetooth chip 322 is configured as a slave role and the second bluetooth chip 323 is configured as a master role. The mobile phone 310 may be a master role, and the mobile phone 310 and the first bluetooth chip 322 form a master role and a slave role, so that bluetooth communication can be performed. The bluetooth headset 330 may be a slave role, and the second bluetooth chip 323 and the bluetooth headset 330 form a master role and a slave role, so that bluetooth communication can be performed. The transmission channel between the first bluetooth chip 322 and the second bluetooth chip 323 has a forwarding function, and can forward audio data transmitted between the first bluetooth chip 322 and the mobile phone 310, and/or forward audio data transmitted between the second bluetooth chip 323 and the bluetooth headset 330.
The vehicle 320 may include a switching unit (not shown in fig. 3). The switching unit may be, for example, a function switch designed on the vehicle-machine interface. The switching unit is connected to the audio unit 321, the first bluetooth chip 322, and the second bluetooth chip 323. When the switch unit is in the first state, the first bluetooth chip 322 and the audio unit 321 are turned on, and the first bluetooth chip 322 and the second bluetooth chip 323 are disconnected; when the switching unit is in the second state, the first bluetooth chip 322 and the audio unit 321 are disconnected, and the first bluetooth chip 322 and the second bluetooth chip 323 are turned on.
The control unit is connected with the switch unit and used for controlling the working state of the switch unit. The control unit performs the following operations: in response to an instruction to play audio data using the audio unit 321, the control switch unit is in a first state; in response to an instruction to play audio data using the bluetooth headset 330, the switching unit is controlled to be in the second state. The audio data includes telephone data, music data, voice call data (e.g., micro-message call data).
The car set 320 may also include built-in car set audio 325. The car audio 325 may include, for example, car music, navigational broadcasts, alert tones, etc. The car audio 325 may play audio data through a loud speaker of the audio unit 321. The car audio 325 may also play audio data through the second bluetooth chip 323 using the bluetooth headset 330.
As shown in fig. 3, the solid line indicates the flow direction of audio data when the car machine 320 is connected to the bluetooth headset 330 and the bluetooth data forwarding function is turned on. The dashed line indicates the flow direction of audio data when the car machine is not connected to the bluetooth headset or connected to the bluetooth headset 330 but the bluetooth data forwarding function is not turned on. The dash-dot line indicates the data flow of car audio when the handset 310 is not connected. The audio data of the single arrow is unidirectional data, and may be music data, for example. The audio data of the double arrow is bidirectional data, and may be, for example, telephone data or voice call data.
The operation of the vehicle in fig. 3 is generally as follows:
the cellular phone 310 and the bluetooth headset 330 may be simultaneously connected to the car phone 320, and transmit audio data to the first bluetooth chip 322 when the cellular phone 310 makes/receives a call, and plays music. If an instruction to play audio data using the bluetooth headset 330 is received, the control unit controls the switching unit to be in the second state. The control unit may be turned on or off by software control. If the switch unit can be a function switch designed on the vehicle-machine interface, the control unit can control the state of the function switch. In this state, the first bluetooth chip 322 and the second bluetooth chip 323 establish a data forwarding channel, so that audio data can be transmitted to the bluetooth headset 330 through the second bluetooth chip 323, and the flow of the audio data is shown by the solid line in fig. 3. So that the user (driver) can directly receive the audio data of the mobile phone 310 through the bluetooth headset 330 on the basis that the bluetooth connection does not need to be switched.
Before audio data is played using the bluetooth headset 330, it is detected that the second bluetooth chip 323 has established a bluetooth communication connection with the bluetooth headset 330. If the car set 320 is not connected to the Bluetooth headset 330, the audio data of the mobile phone 310 is automatically played from the horn of the car set. If the car set 320 is connected with the bluetooth headset 330, but the forwarding function between the first bluetooth chip 322 and the second bluetooth chip 323 is not started, the audio data of the mobile phone is also automatically played from the speaker of the car set. The flow of audio data is shown by the dashed lines in fig. 3.
Therefore, according to the scene requirement, the audio data of the mobile phone can be controlled to be played from the car horn or from the Bluetooth earphone.
In the embodiment of the application, a Bluetooth chip is added to the vehicle hardware to form a double Bluetooth system. The car machine can be connected with the Bluetooth headset and the mobile phone at the same time, and the software between the two Bluetooth chips realizes a data forwarding function. According to the application scene, the audio data can be externally played by a built-in loudspeaker of the vehicle machine, and the audio data can also be switched to be played by a Bluetooth earphone. The embodiment of the application is beneficial to meeting the requirement that a user can switch to wearing the Bluetooth headset to listen to music at any time, and is beneficial to meeting the privacy requirement of the user. The Bluetooth earphone is connected again without disconnecting the connection with the vehicle machine, so that potential safety hazards caused by the operation in the driving process can be eliminated.
The device embodiments of the present application are described above in detail in connection with fig. 1 to 3, and the method embodiments of the present application are described below in detail in connection with fig. 4 and 5. It is to be understood that the description of the method embodiments corresponds to the description of the device embodiments, and that parts not described in detail can therefore be seen in the preceding device embodiments.
Fig. 4 is a flowchart of a method for transmitting audio data according to an embodiment of the present application. The method of fig. 4 is applied to an apparatus for transmitting audio data, the apparatus comprising: the audio unit is used for playing out audio data; the first Bluetooth chip is used for being connected with the first Bluetooth device in a wireless mode; the second Bluetooth chip is used for being connected with a second Bluetooth device in a wireless mode, and the second Bluetooth device is used for playing audio data in a playing mode; and the control unit is connected with the first Bluetooth chip and the second Bluetooth chip. As shown in fig. 4, the method of transmitting audio data may mainly include steps S410 to S420, which are described in detail below.
It should be noted that, the sequence number of each step in the embodiment of the present application does not mean the sequence of execution sequence, and the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
In step S410, in response to an instruction to play audio data using the audio unit, the first bluetooth chip and the audio unit are controlled to be turned on, and the first bluetooth chip and the second bluetooth chip are controlled to be turned off.
In step S420, in response to an instruction to play audio data using the second bluetooth device, the first bluetooth chip and the audio unit are controlled to be disconnected, and the first bluetooth chip and the second bluetooth chip are turned on.
In some implementations, the means for transmitting audio data includes a switching unit. The switch unit is connected with the audio unit, the first Bluetooth chip and the second Bluetooth chip, when the switch unit is in a first state, the first Bluetooth chip and the audio unit are connected, and the first Bluetooth chip and the second Bluetooth chip are disconnected; when the switch unit is in the second state, the first Bluetooth chip and the audio unit are in disconnection, and the first Bluetooth chip and the second Bluetooth chip are connected. The method of the embodiment of the application comprises the following steps: in response to an instruction to play audio data by the audio unit, controlling the switch unit to be in a first state; and controlling the switch unit to be in a second state in response to an instruction for playing the audio data by using the second Bluetooth device.
In some implementations, the first bluetooth chip and the second bluetooth chip are configured in different bluetooth protocol roles. In some embodiments, the first bluetooth chip is configured as a slave role, forming a bluetooth communication pair with a first bluetooth device configured as a master role; the second bluetooth chip is configured as a master persona and forms a bluetooth communication pair with a second bluetooth device configured as a slave persona. When the switch unit is in the second state, a transmission channel is established between the first Bluetooth chip and the second Bluetooth chip, and the transmission channel is used for forwarding audio data transmitted between the first Bluetooth chip and the first Bluetooth device and/or forwarding audio data transmitted between the second Bluetooth chip and the second Bluetooth device.
In some implementations, before controlling the switch unit to be in the second state in response to an instruction to play audio data with the second bluetooth device, the method includes: and detecting that the second Bluetooth chip and the second Bluetooth device have established Bluetooth communication connection.
In some implementations, the audio unit includes a microphone. The audio data includes at least one of: telephone data, music data, voice call data.
In some implementations, the device for transmitting audio data may be a car set or a bluetooth sound, the first bluetooth device is a mobile phone, and the second bluetooth device is a bluetooth headset.
In the embodiment of the application, the device for transmitting the audio data comprises two Bluetooth chips, and the two Bluetooth chips can work simultaneously, so that the device can support to be connected with the external first Bluetooth device and the external second Bluetooth device simultaneously. According to the application scene, the audio data can be externally played by adopting a built-in audio unit, and the audio data can be switched to be internally played by adopting second Bluetooth equipment. The embodiment of the application is beneficial to meeting the privacy requirement of the user.
Fig. 5 is a flow diagram of one possible implementation of the method of fig. 4. A method for transmitting audio data according to an embodiment of the present application will be described in detail with reference to fig. 5, and the method is applied to a vehicle (including a device for transmitting audio data) as shown in fig. 3. In the embodiment of the application, the vehicle machine comprises two Bluetooth chips at a hardware level, and a software level is developed through a software function. Taking an Android system as an example, an Android Bluetooth protocol stack and an Android Bluetooth architecture are modified, so that two Bluetooth chips can work simultaneously, and the vehicle-mounted device can support to connect a mobile phone and a Bluetooth headset simultaneously. The data forwarding function is realized between the two Bluetooth chips through software development, so that the mobile phone audio data (Bluetooth phones and Bluetooth music) can be forwarded to the earphone through the car machine. Specifically, as shown in fig. 5, the method of transmitting audio data may mainly include steps S510 to S5100, which are described in detail below.
In step S510, android (Android) chips of the vehicle are connected with 2 bluetooth chips (i.e. bluetooth communication modules) through serial ports and an audio bus (I2S) interface built in an integrated circuit.
In step S520, an Android driver is developed, and a corresponding driver application is generated for each bluetooth chip.
In step S530, the Android system starts 2 bluetooth HAL processes (Android. Hardware. Blue@1.0-service), and can distinguish the two processes by different names. The HAL process is used for carrying out man-machine interaction (human-computer interaction, HCI) instruction and data interaction with the Bluetooth chip.
The hardware abstraction layer (hardware abstraction layer, HAL) defines, among other things, a standard interface for implementation by the hardware vendor that allows the Android system to override the implementation of the underlying drivers.
In step S540, the Android Framework (Framework) is transplanted with two bluetooth protocol stacks for implementing bluetooth functions independently. The two sets of bluetooth protocol stacks are respectively configured into a master role and a slave role. And the protocol stacks are customized to enable the protocol stacks to transmit audio data between the two protocol stacks, so that Bluetooth data forwarding service is realized.
In step S550, the bluetooth system service is customized so that it can support two bluetooth concurrent uses at the same time. The bluetooth protocol stack interface may be invoked downwards and a control interface provided upwards to the application layer.
The driving design and software configuration work of the two Bluetooth chips in the vehicle are completed through the steps.
In step S560, after the Android car machine device is started, two bluetooth chips are loaded and initialized, and the mobile phone is connected to the car machine bluetooth.
In step S570, it is confirmed whether the car machine is connected to the bluetooth headset. If it is detected that the car machine is connected with the Bluetooth headset, step S590 is entered; otherwise, step S580 is entered.
In step S580, the bluetooth music and phone data of the mobile phone are still played through the speaker of the car phone.
When the car machine is not connected with the Bluetooth headset or the Bluetooth data forwarding service (namely, the first state of the switch unit) is not started, the Bluetooth music and the telephone data of the mobile phone are still played through the car machine loudspeaker.
In step S590, it is determined whether the bluetooth data forwarding service is turned on, i.e., the operating state of the switching unit is determined. If the bluetooth data forwarding service is turned on, step S5100 is entered; otherwise, step S580 is entered.
In step S5100, when the vehicle is connected to the bluetooth headset and the bluetooth data forwarding service is turned on, bluetooth music and phone data of the mobile phone are played through the bluetooth headset.
According to the application scene, the embodiment of the application can adopt the built-in loudspeaker of the vehicle to externally broadcast audio data, and can also switch to adopt the built-in Bluetooth earphone to broadcast audio data. The embodiment of the application is beneficial to meeting the privacy requirement of protecting users and meeting the requirement that users can switch to wearing Bluetooth headphones to listen to music at any time. The Bluetooth earphone is connected again without disconnecting the connection with the vehicle machine, so that potential safety hazards caused by the operation in the driving process can be eliminated.
Fig. 6 is a schematic diagram of a component unit/a part of a bluetooth device according to an embodiment of the present application. As shown in fig. 6, the terminal device 600 comprises means 610 for transmitting audio data as described in any of the foregoing. The bluetooth device 600 may be used to implement the method of transmitting audio data described in the method embodiments described above.
Embodiments of the application also provide a chip comprising a processor configured to perform a method as described in any of the preceding.
Embodiments of the present application also provide a non-transitory computer readable storage medium having stored thereon a computer program for performing a method as described in any of the foregoing.
It should be understood that the vehicle in the embodiment of the present application may be a vehicle system of any vehicle. The vehicle may be a wheeled vehicle or work equipment on land. The vehicle may be a motor vehicle, which may be a motor vehicle for passengers traveling on a road, or a motor vehicle for transporting articles, and a vehicle for performing a project work. Vehicles may include wheelbarrows, two-wheeled vehicles, such as two-wheeled electric vehicles, motorcycles, and multi-wheeled vehicles. The vehicles can be buses and trucks, the buses can be private cars, buses and business cars, and the buses can also be soft-seat cars, hard-sleeping cars, soft-sleeping cars, dining cars, luggage cars, postal cars and the like. The truck can be a flat car, an open car, a box car, a tank car, a thermal insulation car and the like. The vehicle can also be a special vehicle, such as a banknote carrier. The vehicle in the embodiment of the application can be a vehicle driven by traditional energy, such as a vehicle driven by gasoline, diesel oil and natural gas as power sources, or a vehicle driven by new energy, such as an electric vehicle, a hydrogen energy vehicle and the like. The embodiment of the application is not particularly limited as to the type of vehicle.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any other combination. 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, produces a flow or function in accordance with embodiments of the present disclosure, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a machine-readable storage medium or transmitted from one machine-readable storage medium to another machine-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The machine-readable storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more servers, data centers, etc. integrated with the available medium. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The foregoing is merely specific embodiments of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it is intended to cover the scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (13)

1. An apparatus for transmitting audio data, comprising:
the audio unit is used for playing out audio data;
the first Bluetooth chip is used for being connected with the first Bluetooth device in a wireless mode;
The second Bluetooth chip is used for being connected with a second Bluetooth device in a wireless mode, and the second Bluetooth device is used for internally placing the audio data;
the control unit is connected with the first Bluetooth chip and the second Bluetooth chip and is used for executing the following operations:
controlling the first Bluetooth chip and the audio unit to be connected and the first Bluetooth chip and the second Bluetooth chip to be disconnected in response to an instruction of playing the audio data by the audio unit;
and in response to an instruction for playing the audio data by using the second Bluetooth device, controlling the first Bluetooth chip and the audio unit to be disconnected and controlling the first Bluetooth chip and the second Bluetooth chip to be connected.
2. The apparatus according to claim 1, characterized by comprising:
the switch unit is connected with the audio unit, the first Bluetooth chip and the second Bluetooth chip, and when the switch unit is in a first state, the first Bluetooth chip and the audio unit are connected, and the first Bluetooth chip and the second Bluetooth chip are disconnected; when the switch unit is in a second state, the first Bluetooth chip and the audio unit are disconnected, and the first Bluetooth chip and the second Bluetooth chip are connected;
The control unit is connected with the switch unit and used for controlling the working state of the switch unit.
3. The apparatus according to claim 2, wherein the first bluetooth chip is configured as a slave role, the second bluetooth chip is configured as a master role, and a transmission channel is established between the first bluetooth chip and the second bluetooth chip when the switch unit is in the second state, the transmission channel being used for forwarding the audio data transmitted between the first bluetooth chip and the first bluetooth device, and/or for forwarding the audio data transmitted between the second bluetooth chip and the second bluetooth device.
4. The apparatus of claim 1, wherein the audio unit comprises a microphone and the audio data comprises at least any one of:
telephone data, music data.
5. The apparatus according to any one of claims 1-4, wherein the apparatus for transmitting audio data is applied to a car set, the first bluetooth device is a mobile phone, and the second bluetooth device is a bluetooth headset.
6. A method of transmitting audio data, characterized by being applied to an apparatus for transmitting audio data, the apparatus for transmitting audio data comprising:
The audio unit is used for playing out audio data;
the first Bluetooth chip is used for being connected with the first Bluetooth device in a wireless mode;
the second Bluetooth chip is used for being connected with a second Bluetooth device in a wireless mode, and the second Bluetooth device is used for internally placing the audio data;
the control unit is connected with the first Bluetooth chip and the second Bluetooth chip;
the method comprises the following steps:
controlling the first Bluetooth chip and the audio unit to be connected and the first Bluetooth chip and the second Bluetooth chip to be disconnected in response to an instruction of playing the audio data by the audio unit;
and in response to an instruction for playing the audio data by using the second Bluetooth device, controlling the first Bluetooth chip and the audio unit to be disconnected and controlling the first Bluetooth chip and the second Bluetooth chip to be connected.
7. The method of claim 6, wherein the means for transmitting audio data comprises:
the switch unit is connected with the audio unit, the first Bluetooth chip and the second Bluetooth chip, and when the switch unit is in a first state, the first Bluetooth chip and the audio unit are connected, and the first Bluetooth chip and the second Bluetooth chip are disconnected; when the switch unit is in a second state, the first Bluetooth chip and the audio unit are in disconnection, and the first Bluetooth chip and the second Bluetooth chip are connected;
The method comprises the following steps:
controlling the switch unit to be in the first state in response to an instruction to play the audio data by using the audio unit;
and controlling the switch unit to be in the second state in response to an instruction for playing the audio data by using the second Bluetooth device.
8. The method of claim 7, wherein prior to controlling the switching unit to be in the second state in response to an instruction to play the audio data with the second bluetooth device, the method comprises:
and detecting that the second Bluetooth chip and the second Bluetooth device have established Bluetooth communication connection.
9. The method according to claim 7, wherein the first bluetooth chip is configured as a slave role, the second bluetooth chip is configured as a master role, and a transmission channel is established between the first bluetooth chip and the second bluetooth chip when the switch unit is in the second state, the transmission channel being used for forwarding the audio data transmitted between the first bluetooth chip and the first bluetooth device, and/or for forwarding the audio data transmitted between the second bluetooth chip and the second bluetooth device.
10. The method of claim 6, wherein the audio unit comprises a microphone and the audio data comprises at least one of:
telephone data, music data.
11. The method according to any of claims 6-10, wherein the first bluetooth device is a mobile phone and the second bluetooth device is a bluetooth headset.
12. A bluetooth device comprising means for transmitting audio data according to any of claims 1-5.
13. A non-transitory computer readable storage medium, characterized in that it has stored thereon a computer program for implementing the method according to any of claims 6-11 when executed.
CN202310980526.XA 2023-08-04 2023-08-04 Device and method for transmitting audio data and Bluetooth device Pending CN117135603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310980526.XA CN117135603A (en) 2023-08-04 2023-08-04 Device and method for transmitting audio data and Bluetooth device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310980526.XA CN117135603A (en) 2023-08-04 2023-08-04 Device and method for transmitting audio data and Bluetooth device

Publications (1)

Publication Number Publication Date
CN117135603A true CN117135603A (en) 2023-11-28

Family

ID=88853666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310980526.XA Pending CN117135603A (en) 2023-08-04 2023-08-04 Device and method for transmitting audio data and Bluetooth device

Country Status (1)

Country Link
CN (1) CN117135603A (en)

Similar Documents

Publication Publication Date Title
CN201623861U (en) Multifunctional vehicle-mounted terminal and vehicle-mounted terminal system
CN101911661B (en) Wireless headset having fm transmitter
US20070140187A1 (en) System and method for handling simultaneous interaction of multiple wireless devices in a vehicle
JP3116881U (en) Bluetooth module sound source input / output device
CN101663828B (en) Wireless handset and wireless headset with wireless transceiver
US20100048133A1 (en) Audio data flow input/output method and system
CN202352339U (en) Vehicle-mounted sound system
US20080032664A1 (en) Handheld apparatus with detachable audio device
CN103391121A (en) Method for pairing and connecting multiple devices and Bluetooth device
CN201177970Y (en) Vehicle-mounted multimedia audio and video apparatus
US8265711B2 (en) Data processing system and method for in-vehicle short range wireless communication network
CN101668060A (en) Vehicle-mounted multimedia with voice dialing function and dialing method thereof
US8825115B2 (en) Handoff from public to private mode for communications
JP2006352799A (en) Radio communication equipment and method, and mobile information processing apparatus
CN113225716A (en) Vehicle-mounted karaoke realization method, system, equipment and storage medium
CN103546422B (en) Vehicular screen multiplexing system, application method thereof and multimedia interaction system
US20060044120A1 (en) Car audio system and method combining with MP3 player
CN110316113A (en) Vehicle-mounted multimedia terminal and its call method, vehicle mounted multimedia phone system and vehicle
US20070182592A1 (en) Vehicle communication device
CN106888147B (en) Vehicle-mounted instant messaging hands-free system
CN103401986A (en) Implementation method and wireless headset system for enhancing vehicle communication privacy
CN209402694U (en) A kind of on-vehicle Bluetooth earphone connection structure and device
CN200981505Y (en) Vehicle mounted communication device connector
CN117135603A (en) Device and method for transmitting audio data and Bluetooth device
JP2007013617A (en) On-vehicle radio unit

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