Display device and method for adjusting Bluetooth A2DP code setting

文档序号:70673 发布日期:2021-10-01 浏览:33次 中文

阅读说明:本技术 显示设备及调节蓝牙a2dp编码设置的方法 (Display device and method for adjusting Bluetooth A2DP code setting ) 是由 萧维廷 于 2017-08-14 设计创作,主要内容包括:本申请提供一种显示设备及调节蓝牙A2DP编码设置的方法。所述设备包括:WiFi模块;处理模块,被配置为在所述AVDTP链路处于初始化状态时或所述AVDTP链路初始化之后发生所述WiFi模块状态变化事件时,确定所述WiFi模块的状态参数;根据所述WiFi模块的状态参数,确定与所述WiFi模块的状态参数匹配的编码设置;发送模块,被配置为将所述编码设置发送给与所述显示设备连接的接收端设备。可保证显示设备的编码设置始终能够适应WiFi干扰程度,以降低WiFi信号对传输数据的干扰,避免在存在WiFi干扰时因编码设置不当造成的音质问题。(The application provides a display device and a method for adjusting Bluetooth A2DP code setting. The apparatus comprises: a WiFi module; a processing module configured to determine a status parameter of the WiFi module when the AVDTP link is in an initialized state or the WiFi module status change event occurs after the AVDTP link is initialized; determining the code setting matched with the state parameter of the WiFi module according to the state parameter of the WiFi module; a transmitting module configured to transmit the encoding setting to a receiving end device connected to the display device. Can guarantee that display device's code setting can adapt to wiFi degree of interference all the time to reduce the interference of wiFi signal to transmission data, avoid setting up the improper tone quality problem that causes because of the code when there is wiFi to disturb.)

1. A display device, comprising:

a WiFi module;

a processing module configured to determine a status parameter of the WiFi module when the AVDTP link is in an initialized state or the WiFi module status change event occurs after the AVDTP link is initialized; wherein the WiFi module state change event comprises: the method comprises the following steps that a WiFi module is turned on, the WiFi module is turned off, a 2.4GHz router is connected with the WiFi module, the 2.4GHz disconnection router is disconnected with the WiFi module, the WiFi module starts to scan a 2.4GHz channel, and the WiFi module finishes scanning the 2.4GHz channel;

determining the code setting matched with the state parameter of the WiFi module according to the state parameter of the WiFi module;

a transmitting module configured to transmit the encoding setting to a receiving end device connected to the display device.

2. The display device of claim 1, wherein the processing module is further configured to:

determining an enabling strategy of the display equipment according to the current state of the AVDTP link; wherein the enabling policy comprises: enabling immediately, enabling when the display device enters an adjustable opportunity;

the sending module is further configured to:

and sending the code setting to receiving end equipment connected with the display equipment according to the enabling strategy.

3. The display device of claim 2, wherein the state of the AVDTP link comprises: initializing a state, setting a finished non-playing state and a playing state;

the processing module is further configured to:

when the current state of the AVDTP link is an initialization state or a setting completion non-playing state, determining that the starting strategy of the display setting is immediately started;

when the current state of the AVDTP link is a playing state, determining that the starting strategy of the display setting is enabled when the display device enters an adjustable state.

4. The display device of claim 3, wherein the processing module is further configured to:

monitoring a track switching event of AVRCP application or a parameter switching event from playing to pause, and determining that the display equipment enters an adjustable state;

wherein the adjustable state comprises a track switching state or a play pause state.

5. The display device of claim 3, wherein the processing module is further configured to:

when the enabling strategy is determined to be enabled when the display equipment enters the adjustable opportunity, the state of the AVDTP link is firstly adjusted to be a setting-finished non-playing state, and then the coding setting is sent to the receiving end equipment;

and then adjusting the state of the AVDTP link to be a playing state, and further playing music by using the reset coding setting.

6. The display device of claim 1, wherein the processing module is further configured to:

determining an interference degree value corresponding to the current state parameter of the WiFi module according to the corresponding relation between the state parameter of the WiFi module and different interference degree values;

and selecting the code setting matched with the interference degree value as the code setting matched with the current state parameter of the WiFi module of the display equipment.

7. The display device of claim 6, wherein the status parameters of the WiFi module comprise: the on-off state of the WiFi module, the connection state of the WiFi module, the antenna state of the WiFi module and the default code rate of the WiFi module;

the interference degree value corresponding to the current state parameter of the WiFi module = the interference degree value corresponding to the switch state of the WiFi module and the interference degree value corresponding to the antenna state of the WiFi module (the interference degree value corresponding to the connection state of the WiFi module + the interference degree value corresponding to the default code rate of the WiFi module).

8. The display device of claim 6, wherein the processing module is further configured to:

if the interference degree value is smaller than or equal to a first preset threshold value, determining that the current first coding format of the display device is a coding format matched with the current state parameter of the WiFi module, selecting a coding parameter corresponding to the interference degree value from coding parameters corresponding to the first coding formats supported by both the display device and the receiving terminal device, and determining that the selected coding parameter is a coding parameter matched with the current state parameter of the WiFi module;

if the interference degree value is greater than a first preset threshold value, selecting a second coding format with the highest priority from the coding formats supported by the display device and the receiving terminal device, determining that the second coding format is a coding format matched with the current state parameter of the WiFi module, selecting a coding parameter corresponding to the interference degree value from the coding parameters corresponding to the second coding formats supported by the display device and the receiving terminal device, and determining that the selected coding parameter is a coding parameter matched with the current state parameter of the WiFi module.

9. The display device of claim 1, wherein the processing module is further configured to:

before determining the code setting matched with the state parameter of the WiFi module according to the state parameter of the WiFi module, judging whether code information supported by receiving end equipment connected with the display equipment is stored or not; if not, acquiring the coding information supported by the receiving terminal equipment.

10. The display device of claim 9, wherein the processing module is further configured to:

when a WiFi module state change event occurs after the AVDTP link is initialized, comparing the interference degree value with a stored interference degree value after determining the interference degree value corresponding to the state parameter of the current WiFi module;

if the interference degree value and the stored interference degree value belong to the same interference degree grade, determining that the current code setting of the source end equipment is matched with the current state parameter of the WiFi module;

and if the interference degree value and the stored interference degree value do not belong to the same interference degree grade, determining the code setting matched with the current state parameter of the WiFi module for the source end equipment.

11. A method of adjusting bluetooth A2DP encoding settings, the method comprising:

when the AVDTP link is in an initialization state or the WiFi module state change event occurs after the AVDTP link is initialized, determining the state parameters of the WiFi module; wherein the WiFi module state change event comprises: the method comprises the following steps that a WiFi module is turned on, the WiFi module is turned off, a 2.4GHz router is connected with the WiFi module, the 2.4GHz disconnection router is disconnected with the WiFi module, the WiFi module starts to scan a 2.4GHz channel, and the WiFi module finishes scanning the 2.4GHz channel;

determining the code setting matched with the state parameter of the WiFi module according to the state parameter of the WiFi module;

and sending the code setting to a receiving end device connected with the display device.

Technical Field

The application relates to the technical field of wireless communication, in particular to a display device and a method for adjusting the setting of Bluetooth A2DP (Advanced Distribution Profile, A2DP for short) codes.

Background

Bluetooth technology is a wireless communication technology operating in a 2.4GHz band, and the advent of bluetooth technology has enabled users to listen to music through bluetooth technology. The realization principle is as follows: after a Source device (Source, abbreviated as SRC, for example, may be a smart television) and a receiver device (Sink, abbreviated as SNK, for example, may be a bluetooth speaker) establish an AVDTP (Audio/video Distribution Transport Protocol, abbreviated as AVDTP) link, the Source device encodes Audio data, then sends the Audio data to the receiver device through the AVDTP link established between the two devices, and the receiver device decodes and plays the Audio data after receiving the Audio data. When playing music through bluetooth technology, the code setting of source end equipment is especially important for guaranteeing high-quality tone quality.

Currently, a source device generally determines a coding setting according to the following method, which includes: and acquiring coding information supported by the receiving end equipment, and selecting high-sound-quality coding setting (low distortion rate and high code rate) as the current coding setting from the coding information supported by both the source end equipment and the receiving end equipment.

However, when encoding audio files using a high quality encoding setting, a longer over-the-air transmission time in the 2.4GHz band is required in order to deliver the A2DP audio packets for the same amount of playback time. As a result, tone quality problems (pitch, noise, distortion) are more likely to occur in the presence of WiFi signal interference in the 2.4GHz band.

Disclosure of Invention

In view of this, the present application provides a method and an apparatus for adjusting the encoding setting of bluetooth A2DP, so as to solve the problem of sound quality caused by improper encoding setting when there is WiFi signal interference in the 2.4GHz band in the existing method.

A first aspect of the present application provides a method for adjusting bluetooth A2DP encoding settings, where the method is applied to a source device, and the method includes:

when an AVDTP link is in an initialization state or a WiFi module state change event occurs after the AVDTP link is initialized, determining encoding setting matched with the current state parameters of a WiFi module of the source end equipment for the source end equipment;

determining an enabling strategy of the coding setting according to the current state of the AVDTP link;

and starting the code setting by adopting the starting strategy, and sending the code setting to receiving end equipment connected with the source end equipment when the code setting is started.

A second aspect of the present application provides an apparatus for adjusting bluetooth A2DP encoding settings, the apparatus being applied to a source device, the apparatus comprising: a processing module and a sending module, wherein,

the processing module is configured to determine, for the source end device, a code setting that matches a current state parameter of a WiFi module of the source end device when an AVDTP link is in an initialization state or a WiFi module state change event occurs after the AVDTP link is initialized;

the processing module is further configured to determine an enabling policy of the coding setting according to the current state of the AVDTP link, and enable the coding setting by using the enabling policy

And the sending module is used for sending the code setting to receiving end equipment connected with the source end equipment when the code setting is started.

In a third aspect, the present application provides a display device comprising:

a WiFi module; a processing module configured to determine a status parameter of the WiFi module when the AVDTP link is in an initialized state or the WiFi module status change event occurs after the AVDTP link is initialized; wherein the WiFi module state change event comprises: the method comprises the following steps that a WiFi module is turned on, the WiFi module is turned off, a 2.4GHz router is connected with the WiFi module, the 2.4GHz disconnection router is disconnected with the WiFi module, the WiFi module starts to scan a 2.4GHz channel, and the WiFi module finishes scanning the 2.4GHz channel; determining the code setting matched with the state parameter of the WiFi module according to the state parameter of the WiFi module; a transmitting module configured to transmit the encoding setting to a receiving end device connected to the display device.

In a fourth aspect, the present application provides a method of adjusting bluetooth A2DP encoding settings, the method comprising:

when the AVDTP link is in an initialization state or the WiFi module state change event occurs after the AVDTP link is initialized, determining the state parameters of the WiFi module; wherein the WiFi module state change event comprises: the method comprises the following steps that a WiFi module is turned on, the WiFi module is turned off, a 2.4GHz router is connected with the WiFi module, the 2.4GHz disconnection router is disconnected with the WiFi module, the WiFi module starts to scan a 2.4GHz channel, and the WiFi module finishes scanning the 2.4GHz channel; determining the code setting matched with the state parameter of the WiFi module according to the state parameter of the WiFi module; and sending the code setting to a receiving end device connected with the display device.

According to the display device and the method for adjusting the Bluetooth A2DP code setting, when an AVDTP link is in an initialization state or a WiFi module state change event occurs after the AVDTP link is initialized, the code setting matched with the current state parameters of the WiFi module of the source device is determined for the source device, the starting strategy of the code setting is determined according to the current state of the AVDTP link, the code setting is started by adopting the starting strategy, and the code setting is sent to a receiving terminal device connected with the source device when the code setting is started. Like this, can guarantee that the coding equipment of source end equipment can adapt to wiFi interference degree all the time to reduce the interference of wiFi signal to transmission data, avoid setting up the tone quality problem that the improper caused because of the code when having the wiFi and disturb. In addition, by determining the starting strategy of the code setting and further adopting the determined starting strategy to start the code setting, seamless adjustment can be realized so as to reduce the influence on a user caused by adjusting the code setting.

Drawings

Fig. 1 is a schematic application scenario diagram of the method and apparatus for adjusting bluetooth A2DP encoding settings provided in the present application;

FIG. 2 is a flowchart of a first embodiment of a method for adjusting the encoding settings of Bluetooth A2DP according to the present application;

FIG. 3 is a flowchart of a second embodiment of a method for adjusting the Bluetooth A2DP encoding settings according to the present application;

FIG. 4 is a flowchart of a third embodiment of a method for adjusting the Bluetooth A2DP encoding settings according to the present application;

FIG. 5 is a flowchart of a fourth embodiment of the method for adjusting the encoding settings of Bluetooth A2DP according to the present application;

fig. 6 is a schematic structural diagram of a first embodiment of the apparatus for adjusting bluetooth A2DP encoding settings according to the present application.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.

The application provides a method and a device for adjusting Bluetooth A2DP code setting, which are used for solving the problem of tone quality caused by improper code setting when WiFi signals of 2.4GHz frequency bands interfere in the existing method.

Fig. 1 is a schematic application scenario diagram of the method and apparatus for adjusting bluetooth A2DP encoding settings provided in the present application. Referring to fig. 1, the method and apparatus for adjusting bluetooth A2DP code setting provided by the present application are applied to a source device in the scenario shown in fig. 1, where the source device may be a smart phone, a smart television, or the like. Correspondingly, in fig. 1, the receiving end device may be a bluetooth speaker, a bluetooth headset, or the like.

The technical solutions of the present application are described in detail below with specific embodiments, which may be combined with each other, and the same or similar concepts may not be described in detail in some embodiments.

Fig. 2 is a flowchart of a first embodiment of a method for adjusting bluetooth A2DP encoding settings according to the present application. This embodiment relates to a specific method of adjusting the bluetooth A2DP encoding settings. The execution subject of the embodiment may be a device which adjusts the bluetooth A2DP encoding setting alone or a source device integrated with a device which adjusts the bluetooth A2DP encoding setting, and the following description will take the execution subject as an example of a source device integrated with a device which adjusts the bluetooth A2DP encoding setting. Referring to fig. 2, the method provided in this embodiment may include the following steps:

s101, when an AVDTP link is in an initialization state or a WiFi module state change event occurs after the AVDTP link is initialized, determining encoding setting matched with the current state parameters of the WiFi module of the source end equipment for the source end equipment.

It should be noted that, in this step, when the AVDTP link is in the initialization state or a WiFi module state change event occurs after the AVDTP link is initialized, the encoding device that matches the WiFi module current state parameter of the source device is determined for the source device, so that it can be ensured that the encoding device of the source device can always adapt to the WiFi interference degree, so as to reduce interference of the WiFi signal on transmission data.

Specifically, the AVDTP link refers to an AVDTP link between a source device and a sink device connected to the source device. In addition, the WiFi module state change event includes the WiFi module being turned on, the WiFi module being turned off, the WiFi module being connected to the 2.4GHz router, the WiFi module being disconnected from the 2.4GHz disconnection router, the WiFi module beginning to scan the 2.4GHz channel, and the WiFi module ending to scan the 2.4GHz channel.

In this step, when the AVDTP link is in the initialized state or a WiFi module state change event occurs after the AVDTP link is initialized, a code setting matching the current state parameter of the WiFi module is determined for the source device. Specifically, the encoding setting matched with the current state parameter of the WiFi module may be determined for the source device according to a method that, when the current state parameter of the WiFi module represents that the current WiFi interference degree of the source device is higher, an encoding setting that requires a shorter air transmission time for the same source audio time amount is selected from the encoding settings supported by both the source device and the receiving device as the encoding setting matched with the current state parameter of the WiFi module. Specific implementation methods and implementation principles for determining the code setting matching with the current status parameter of the WiFi module for the source device will be described in detail in the following embodiments, and will not be described herein again.

S102, determining the enabling strategy of the coding setting according to the current state of the AVDTP link.

Specifically, the states of the AVDTP link include an initialization state, a setting-completed unplayed state, and a play state. In addition, the source device records the status of the AVDTP link in real time, and can read the current status of the AVDTP link from the source device. In this step, the enabling policy of the encoding setting is determined according to the current state of the AVDTP link.

Optionally, in a possible implementation manner of the present application, in this step, if the current state of the AVDTP link is an initialization state or a setting-completed non-play state, it is determined that the enabling policy of the coding setting is to be immediately enabled; and if the current state of the AVDTP link is the playing state, determining that the enabling strategy set by the code is enabled when the source end equipment enters the adjustable state.

For example, when the AVDTP link is in the initialization state, after determining the encoding setting matched with the current state parameter of the WiFi module for the source device, at this time, the AVDTP link is in the initialization state, and it is determined that the activation policy of the encoding setting is immediately activated. For another example, after determining the code setting matching the current state parameter of the WiFi module for the source device when the WiFi module state change event occurs after the AVDTP link is initialized, at this time, if the source device is playing music, that is, the AVDTP link is in a playing state, it is determined that the enabling policy set by the code is enabled when the source device enters an adjustable time. It should be noted that, when the AVDTP link is in the play state, the start policy of the coding setting is set to be started when the source device enters the adjustable state, so that the coding setting is started when the source device enters the adjustable state, which can reduce the impact on the user and implement seamless handover.

Specifically, the adjustable state includes a track switching state or a play pause state. In specific implementation, the source device needs to monitor two events applied from AVRCP: EVENT _ TRACK _ CHANGED (TRACK switch EVENT) and EVENT _ playlist _ STATUS _ CHANGED (parameter switch EVENT from play to pause), when these two EVENTs are monitored, it is characterized that the source device enters an adjustable state.

And S103, enabling the code setting by adopting the enabling strategy, and sending the code setting to receiving end equipment connected with the source end equipment when the code setting is enabled.

Specifically, when the code setting matching the current status parameter of the WiFi module and the enabling policy of the code setting are determined through steps S101 and S102, in this step, the code setting is enabled by using the enabling policy, and when the code setting is enabled, the code setting is sent to the receiving end device connected to the source end device. For example, when the enabling policy is immediately enabled, the encoding setting is immediately enabled and sent to the receiving end device, so that the receiving end device reconfigures the encoding setting of the local end according to the received encoding setting.

For another example, when the enabling policy is to be enabled when the source device enters the adjustable state, in this case, in combination with the above description, when the source device monitors a track switching event or a parameter switching event from playing to pause (when the source device monitors the event, the source device is characterized to enter the adjustable state), the encoding setting is enabled, and the encoding setting is sent to the receiving device. It should be noted that, at this time, before the source device sends the encoding setting to the sink device, the source device may first adjust the state of the AVDTP link to a set non-played state, then send the encoding setting to the sink device, then adjust the state of the AVDTP link to a played state, and then play music using the reset encoding setting.

In the method provided by this embodiment, when an AVDTP link is in an initialized state or a WiFi module state change event occurs after the AVDTP link is initialized, a code setting that matches a current state parameter of a WiFi module of a source device is determined for the source device, an enabling policy of the code setting is determined according to a current state of the AVDTP link, the code setting is enabled by using the enabling policy, and the code setting is sent to a receiving end device connected to the source device when the code setting is enabled. Like this, can guarantee that the coding equipment of source end equipment can adapt to wiFi interference degree all the time to reduce the interference of wiFi signal to transmission data, avoid setting up the tone quality problem that the improper caused because of the code when having the wiFi and disturb. In addition, by determining the starting strategy of the code setting and further adopting the determined starting strategy to start the code setting, seamless adjustment can be realized so as to reduce the influence on a user caused by adjusting the code setting.

Fig. 3 is a flowchart of a second embodiment of the method for adjusting the bluetooth A2DP encoding setting according to the present application. The present embodiment relates to a specific process of determining, for a source device, a code setting that matches a current status parameter of a WiFi module. Referring to fig. 3, based on the above embodiment, in the method provided in this embodiment, step S101 specifically includes:

s201, determining an interference degree value corresponding to the current state parameter of the WiFi module of the source end device.

Specifically, the status parameters of the WiFi module of the source device include: the WiFi module is in a switch state, the WiFi module is in a connection state, the WiFi module is in an antenna state, and the WiFi module is in a default code rate. In this step, an interference degree value corresponding to the current state parameter of the WiFi module of the source device may be determined according to the current state parameter of the WiFi module of the source device and a correspondence between different state parameters and different interference degree values. It should be noted that the interference degree value corresponding to the current state parameter of the WiFi module of the source device is an interference degree value corresponding to the switching state of the WiFi module and an interference degree value corresponding to the antenna state of the WiFi module (the interference degree value corresponding to the connection state of the WiFi module + the interference degree value corresponding to the default code rate of the WiFi module). For example, in one possible implementation manner of the present application, the correspondence between different state parameters and different interference level values is shown in table 1:

TABLE 1 correspondence of different state parameters to different interference level values

A specific example is given below to describe in detail the specific implementation of this step. For example, in one possible implementation manner of the present application, the current status parameters of the WiFi module of the source device are shown in table 2, at this time, according to table 1, it is determined that the interference degree value corresponding to the on-off state of the WiFi module is 1, the interference degree value corresponding to the antenna state of the WiFi module is 1, the interference degree value corresponding to the connection state of the WiFi module is 4, the interference degree value corresponding to the default code rate of the WiFi module is 2, further, an interference degree value corresponding to the current state parameter of the WiFi module of the source device is an interference degree value corresponding to the on-off state of the WiFi module and an interference degree value corresponding to the antenna state of the WiFi module (an interference degree value corresponding to the connection state of the WiFi module + an interference degree value corresponding to the default code rate of the WiFi module), thus, it is determined that the interference level value corresponding to the current status parameter of the WiFi module of the source device is equal to 6. It should be noted that, as can be seen from table 1, when the state parameter of the WiFi module of the source device changes, the interference degree value corresponding to the current state parameter of the WiFi module of the source device changes from 0 to 16.

Table 2 current status parameters of WiFi module of source end device

Switch state of WiFi module Opening device
Connection state of WiFi module In the process of connecting the 2.4GHz router
Antenna status of WiFi Module Antenna not shared by Bluetooth module
Default code rate for WiFi module 12M

S202, if the interference degree value is less than or equal to a first preset threshold, determining that the current first coding format of the source device is a coding format matched with the current state parameter of the WiFi module, and selecting a coding parameter corresponding to the interference degree value from coding parameters corresponding to the first coding formats supported by both the source device and the receiving device, and determining that the selected coding parameter is a coding parameter matched with the current state parameter of the WiFi module.

Before describing the specific implementation process of this step, the encoding information supported by the source device and the sink device is briefly described. Specifically, for a Low-Density parity codes (LDAC) encoding format, the relevant protocol specifies that the source device and the sink device must simultaneously support an LDAC quality priority mode, an LDAC normal mode, and an LDAC connection priority mode; for the APT-X coding format, the related protocol stipulates that the source end equipment and the receiving end equipment must support APT-X simultaneously, and in addition, the source end equipment and the receiving end equipment can also support APT-X HD or APT-X low delay; for the AAC (Advanced Audio Coding, AAC for short) encoding format, the related protocol specifies that the source device and the sink device must support sampling rates of 48KHz and 44.1KHz, and in addition, the source device and the sink device may also support a sampling rate of 32 KHz.

Further, after introducing the coding information supported by the source device and the sink device, a specific implementation process of this step is described in detail below.

Specifically, the first preset threshold is determined according to actual needs. In this embodiment, the specific value of the first preset threshold is not limited. For example, in one possible implementation, the first preset threshold is 10.

It should be noted that, when the determined interference degree value is less than or equal to a first preset threshold, at this time, it is determined that the current first encoding format of the source device is the encoding format matched with the current state parameter of the WiFi module. For example, the current first encoding format of the source device is an LDAC encoding format, and at this time, the LDAC encoding format is determined to be an encoding format matched with the current state parameter of the WiFi module. Further, after the encoding format is determined, the encoding parameters may be determined according to a method that selects the encoding parameters corresponding to the interference degree value from the encoding parameters corresponding to the first encoding format supported by both the source device and the receiving device, and determines that the selected encoding parameters are the encoding parameters matched with the current state parameters of the WiFi module. In a specific implementation, according to a selection rule of coding parameters, the coding parameters corresponding to the interference degree value may be selected from the coding parameters corresponding to the first coding format supported by both the source device and the sink device. For example, in an embodiment of the present application, the encoding parameter corresponding to the interference level value may be selected from the encoding parameters corresponding to the first encoding format supported by both the source device and the sink device according to the encoding parameter selection rule shown in table 3.

Table 3 selection rules for coding parameters

With reference to the above example, that is, the determined interference level value is 6, the current first coding format of the source device is an LDAC coding format, and at this time, the interference level value is smaller than the first preset threshold, the LDAC coding format is determined to be a coding format matched with the current state parameter of the WiFi module, further, for example, in this embodiment, both the source device and the receiving device support an LDAC quality priority mode, an LDAC normal mode, and an LDAC connectivity priority mode, at this time, according to table 3, the coding parameter corresponding to the determined interference level value is selected to be the LDAC normal mode, and at this time, the LDAC normal mode is determined to be a coding parameter matched with the current state parameter of the WiFi module. For another example, if the current first encoding format of the source device is the SBC encoding format, at this time, the SBC encoding format is determined to be the encoding format matched with the current state parameter of the WiFi module, and further, referring to table 3, in the sampling rate and bitpool value corresponding to the SBC encoding format both supported by the source device and the receiving device, the middle sampling rate and the middle bitpool value are selected as the encoding parameters matched with the current state parameter of the WiFi module. For example, the source device and the sink device both support a sampling rate of 32KHZ to 48KHZ and a bitpool value of 33 to 51. At this time, the sampling rate is 44.1KHZ, the bitpool value is 33, and the sampling rate 44.1KHZ, bitpool 33 are determined as the encoding parameters matched with the current state parameters of the WiFi module.

For another example, in an embodiment, the determined interference level value is 4, the current first coding format of the source device is an APT-X coding format, at this time, the APT-X coding format is determined to be a coding format matched with the current state parameter of the WiFi module, and further, referring to table 3, if both the source device and the receiving device support APT-X HD, the APT-X HD is determined to be a coding parameter matched with the current state parameter of the WiFi module. If the source device and the receiving device do not support APT-X HD, it is determined that APT-X is a coding parameter that matches the current state parameter of the WiFi module (for example, in an embodiment, coding parameters corresponding to APT-X coding formats supported by both the source device and the receiving device are APT-X HD and APT-X, APT low latency, at this time, it is determined that APT-X HD is a coding parameter that matches the current state parameter of the WiFi module).

S203, if the interference degree value is greater than a first preset threshold, selecting a second coding format with a highest priority from the coding formats supported by the source device and the receiving device, determining that the second coding format is a coding format matched with the current state parameter of the WiFi module, and selecting a coding parameter corresponding to the interference degree value from the coding parameters corresponding to the second coding formats supported by the source device and the receiving device, and determining that the selected coding parameter is a coding parameter matched with the current state parameter of the WiFi module.

Specifically, the encoding formats are, in order from high to low according to the priority: APT-X encoding format, LDAC encoding format, AAC encoding format, SBC encoding format. In this step, if the interference degree value is greater than a first preset threshold, a second coding format with the highest priority is selected from the coding formats supported by both the source end device and the receiving end device, and the second coding format is determined to be a coding format matched with the current state parameter of the WiFi module. For example, in an embodiment, the encoding formats supported by the source device and the sink device include an AAC encoding format, an SBC encoding format, and an LDAC encoding format, at this time, the encoding format with the highest priority in the encoding formats supported by the source device and the sink device is the LDAC encoding format, and at this time, the LDAC encoding format is determined to be the encoding format matched with the current state parameter of the WiFi module. Further, after the encoding format is determined, the encoding parameters are determined according to the selection rule of the encoding parameters shown in table 3, so that the encoding parameters LDAC connectivity priority mode are determined to be the encoding parameters matching the current state parameters of the WiFi module.

For another example, in another embodiment, the encoding formats supported by both the source device and the sink device include an APT-X encoding format and an AAC encoding format, and at this time, the APT-X encoding format is determined to be the encoding format matched with the current state parameter of the WiFi module. Further, if the coding parameters corresponding to the APT-X coding format supported by both the source device and the sink device include APT-X low latency and APT-X, then according to table 3, selecting the APT-X low latency as the coding parameter matched with the current state parameter of the WiFi module. In addition, if the source device and the receiving device both support the APT-X coding format and the corresponding coding parameter is only APT-X, at this time, the APT-X is selected as the coding parameter matched with the current state parameter of the WiFi module. For another example, in another embodiment, if it is determined that the AAC encoding format is an encoding format matched with the current state parameters of the WiFi module, at this time, if both the source device and the sink device support a sampling rate of 32KHz, the sampling rate of 32 is selected, and if not, the sampling rate of 44.1KHz is selected. Further, for example, in another embodiment, if it is determined that the SBC encoding format is the encoding format matched with the current state parameter of the WiFi module, at this time, the minimum sampling rate and the minimum bitpool value are selected as the encoding parameter matched with the current state parameter of the WiFi module from the sampling rate and the bitpool value supported by both the source device and the receiving device. For example, in one embodiment, the source device and the sink device both support a sampling rate of 32KHZ to 48KHZ and a bitpool value of 33 to 51. At this time, the sampling rate of 32KHZ and bitpool value 33 are selected as encoding parameters matched with the current state parameters of the WiFi module.

The method provided by the embodiment provides a specific method for determining the code setting matched with the current state parameter of the WiFi module for the source end device, and the method provided by the embodiment can determine the code setting matched with the current state parameter of the WiFi module for the source end device, so that the coding device of the source end device can adapt to the WiFi interference degree all the time, the interference of WiFi signals on transmission data is reduced, and the problem of tone quality caused by improper code setting when WiFi interference exists is avoided.

Fig. 4 is a flowchart of a third embodiment of the method for adjusting the bluetooth A2DP encoding setting according to the present application. Referring to fig. 4, on the basis of the foregoing embodiment, in the method provided in this embodiment, before determining, for the source device, the code setting matched with the current state parameter of the WiFi module of the source device, the method further includes:

s301, judging whether the coding information supported by the receiving terminal device connected with the source terminal device is stored.

Specifically, whether the coding information supported by the receiving end device is stored can be judged according to the identifier of the receiving end device.

And S302, if not, acquiring the coding information supported by the receiving terminal equipment.

Specifically, in this step, the encoding information supported by the receiving end device may be obtained by sending a request to the receiving end device.

In the method provided by this embodiment, by determining whether the coding information supported by the sink device connected to the source device is stored, when it is determined that the coding information supported by the sink device is not stored, the coding information supported by the sink device is obtained. Therefore, the source end device can be ensured to store the coding information of the receiving end device, and the coding setting matched with the current state parameter of the WiFi module can be determined for the source end device according to the coding information supported by the source end device and the coding information supported by the receiving end device.

Fig. 5 is a flowchart of a fourth embodiment of the method for adjusting the bluetooth A2DP encoding setting according to the present application. Referring to fig. 5, on the basis of the foregoing embodiment, after determining an interference degree value corresponding to a current state parameter of a WiFi module of a source device when a WiFi module state change event occurs after an AVDTP link is initialized, the method provided in this embodiment may further include:

s401, if the interference degree value and the stored interference degree value belong to the same interference degree grade, determining that the current code setting of the source end equipment is matched with the current state parameter of the WiFi module.

Specifically, the interference level is pre-divided according to the interference level value, for example, in one embodiment, when the interference level value is [ 05 ], the interference level is defined as level one; when the interference level value is at (510), defining the interference level as level two; when the interference level value is (1016), the interference level is specified to be level three, it should be noted that the stored interference level value is the interference level value determined at the time of AVTDP initialization, for example, in one embodiment, the stored interference level value is 3, and when a WiFi module status change event occurs after AVDTP link initialization, the determined interference level value is 4, at which point the determined interference level value is of the same interference level as the stored interference level value, e.g., the stored interference level value is 3, when a WiFi module state change event occurs after the AVDTP link is initialized, the determined interference degree value is 8, and at the moment, the determined interference degree value and the stored interference degree value do not belong to the same interference degree grade.

Specifically, if the determined interference degree value and the stored interference degree value belong to the same interference degree level, at this time, it is considered that the current code setting can adapt to the current WiFi interference degree, and it is determined that the current code setting of the source end device is the code setting matched with the current state parameter of the WiFi module.

S402, if the interference degree value and the stored interference degree value do not belong to the same interference degree grade, determining the code setting matched with the current state parameter of the WiFi module for the source end equipment.

Specifically, if the determined interference degree value and the stored interference degree value do not belong to the same interference degree level, at this time, it is considered that the current code setting cannot adapt to the current WiFi interference degree, and at this time, the code setting matched with the current state parameter of the WiFi module needs to be determined for the source end device. That is, the source device determines the coding setting matching the current status parameter of the WiFi module according to the method described in the second embodiment.

In the method provided in this embodiment, when a WiFi module state change event occurs after an AVDTP link is initialized, after determining an interference degree value corresponding to a current state parameter of a WiFi module of a source device, if the interference degree value and a stored interference degree value belong to a same interference degree class, determining that a current code of the source device is set to a code setting matched with the current state parameter of the WiFi module, and if the interference degree value and the stored interference degree value do not belong to the same interference degree class, determining, for the source device, a code setting matched with the current state parameter of the WiFi module of the source device. In this way, computational resources may be saved.

Fig. 6 is a schematic structural diagram of a first embodiment of the apparatus for adjusting bluetooth A2DP encoding settings according to the present application. The apparatus can be implemented by software, hardware or a combination of software and hardware. Referring to fig. 6, the apparatus provided in this embodiment includes: a processing module 100 and a sending module 200, wherein,

the processing module 100 is configured to determine, for the source device, a coding setting that matches a current state parameter of a WiFi module of the source device when an AVDTP link is in an initialization state or a WiFi module state change event occurs after the AVDTP link is initialized;

the processing module 100 is further configured to determine an enabling policy of the coding setting according to the current state of the AVDTP link, and enable the coding setting by using the enabling policy

The sending module 200 is configured to send the code setting to a receiving end device connected to the source end device when the code setting is enabled.

The apparatus of this embodiment may execute the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.

Further, the processing module 100 is specifically configured to execute the following steps:

determining an interference degree value corresponding to the current state parameter of the WiFi module of the source end device;

if the interference degree value is smaller than or equal to a first preset threshold value, determining that the current first coding format of the source end device is a coding format matched with the current state parameter of the WiFi module, selecting a coding parameter corresponding to the interference degree value from coding parameters corresponding to the first coding formats supported by both the source end device and the receiving end device, and determining that the selected coding parameter is a coding parameter matched with the current state parameter of the WiFi module;

if the interference degree value is greater than a first preset threshold value, selecting a second coding format with the highest priority from the coding formats supported by the source end device and the receiving end device, determining that the second coding format is a coding format matched with the current state parameter of the WiFi module, selecting a coding parameter corresponding to the interference degree value from the coding parameters corresponding to the second coding formats supported by the source end device and the receiving end device, and determining that the selected coding parameter is a coding parameter matched with the current state parameter of the WiFi module.

The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.

Further, the processing module 100 is specifically configured to determine that the start policy set by the coding is immediately started when the current state of the AVDTP link is an initialization state or a setting-completed non-play state, and determine that the start policy set by the coding is started when the source device enters an adjustable state when the current state of the AVDTP link is a play state.

Further, referring to fig. 6, the apparatus of the present embodiment may further include a determining module 300 and an obtaining module 400, wherein,

the determining module 300 is configured to determine whether coding information supported by a receiving end device connected to the source device is stored before the processing module 100 determines, for the source device, a coding setting that matches a current state parameter of a WiFi module of the source device;

the obtaining module 400 is configured to obtain the coding information supported by the receiving end device when the determining module 300 determines that the coding information supported by the receiving end device connected to the source end device is not stored.

Further, the processing module 100 is further configured to, when a WiFi module state change event occurs after the AVDTP link is initialized, after the processing module determines an interference level value corresponding to a current state parameter of a WiFi module of the source device, when the interference level value and the stored interference level value belong to the same interference level, determine that a current code of the source device is set to a code setting matched with the current state parameter of the WiFi module, and when the interference level value and the stored interference level value do not belong to the same interference level, determine, for the source device, a code setting matched with the current state parameter of the WiFi module.

Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.

Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种数字音频处理方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类