WO2021251660A1 - Method for controlling volume of digital earphone, electronic terminal and digital earphone - Google Patents

Method for controlling volume of digital earphone, electronic terminal and digital earphone Download PDF

Info

Publication number
WO2021251660A1
WO2021251660A1 PCT/KR2021/006614 KR2021006614W WO2021251660A1 WO 2021251660 A1 WO2021251660 A1 WO 2021251660A1 KR 2021006614 W KR2021006614 W KR 2021006614W WO 2021251660 A1 WO2021251660 A1 WO 2021251660A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic terminal
gain
audio data
loopback
value
Prior art date
Application number
PCT/KR2021/006614
Other languages
French (fr)
Inventor
Bowu Xiao
Hyoseok NA
Hyunmuk KIM
Original Assignee
Samsung Electronics 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 Samsung Electronics Co., Ltd. filed Critical Samsung Electronics Co., Ltd.
Publication of WO2021251660A1 publication Critical patent/WO2021251660A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Definitions

  • the present disclosure generally relates to the field of electronic technology, and more specifically to a method for controlling volume of a digital earphone, and an electronic terminal and a digital earphone that support the method for controlling the volume.
  • the traditional analog 3.5 mm earphone interface or the traditional analog universal serial bus (USB) earphone interface used on an electronic terminal is being replaced by a digital USB earphone interface.
  • USB universal serial bus
  • the digital USB interface becomes more and more popular as the audio interface used on the electronic terminal.
  • the exemplary embodiments of the present disclosure provide a method for controlling volume of a digital earphone, an electronic terminal and a digital earphone, to overcome at least one of the above defects.
  • a method for controlling volume of a digital earphone may comprise: sending a control instruction and test audio data to a digital earphone in a state of being connected with an electronic terminal; acquiring loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction; and adjusting an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
  • control instruction and the test audio data may be sent in response to one of: detecting that a connection is established between the electronic terminal and the digital earphone; and receiving a volume calibration control instruction.
  • control instruction may comprise a loopback instruction and an audio playback instruction.
  • the loopback instruction may be used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data
  • the audio playback instruction may be used to control the digital earphone to play the test audio data.
  • the loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction may be acquired by one of: receiving the loopback audio data from the digital earphone through the established connection; and collecting, through a microphone of the electronic terminal, the test audio data played by the digital earphone, and determining the collected test audio data as the loopback audio data.
  • the adjusting an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data may comprise: adjusting the audio gain of the electronic terminal based on a comparison result of the volume value of the loopback audio data and a preset volume value, to change the output volume of the digital earphone.
  • the adjusting the audio gain of the electronic terminal may comprise: determining a difference value between the volume value of the loopback audio data and the preset volume value; determining a gain adjustment value corresponding to the difference value; and changing the audio gain of the electronic terminal based on the determined gain adjustment value.
  • the changing the audio gain of the electronic terminal based on the determined gain adjustment value may comprise: determining whether the difference value is greater than zero; controlling, if the difference value is greater than zero, the audio gain of the electronic terminal to decrease by the gain adjustment value, to decrease the output volume of the digital earphone; and controlling, if the difference value is less than zero, the audio gain of the electronic terminal to increase by the gain adjustment value, to increase the output volume of the digital earphone.
  • the adjusting the audio gain of the electronic terminal may comprise: comparing cyclically the volume value of the loopback audio data with the preset volume value, and adjusting the audio gain of the electronic terminal based on a comparison result, wherein in each cycle, when the difference value between the volume value of the loopback audio data and the preset volume value satisfies an adjustment condition, the audio gain of the electronic terminal is controlled to change by a preset change amount, and when the difference value between the volume value of the loopback audio data and the preset volume value does not satisfy the adjustment condition, the cycle is exited.
  • the adjustment condition may comprise a first adjustment condition and a second adjustment condition
  • the first adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is greater than a first preset value
  • the second adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is less than a second preset value
  • the preset change amount may comprise a first preset change amount and a second preset change amount.
  • controlling the audio gain of the electronic terminal to change by the preset change amount may comprise: controlling, if the difference value satisfies the first adjustment condition, the audio gain of the electronic terminal to decrease by the first preset change amount to decrease the output volume of the digital earphone; and controlling, if the difference value satisfies the second adjustment condition, the audio gain of the electronic terminal to increase by the second preset change amount to increase the output volume of the digital earphone.
  • the electronic terminal may store a gain table corresponding to the digital earphone, the gain table may comprise a gain identifier and a plurality of audio gains, and the gain identifier may indicate an audio gain currently used by the electronic terminal.
  • the method may further comprise: updating, after adjusting the audio gain of the electronic terminal, the gain identifier to indicate the adjusted audio gain, to cause the electronic terminal to transmit audio data to the digital earphone based on the updated gain table.
  • an electronic terminal comprising: a first communication interface sending a control instruction and test audio data to a digital earphone in a state of being connected with the digital earphone; and a processor configured to acquire loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction, and adjust an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data to change output volume of the digital earphone.
  • the processor may control the first communication interface to send the control instruction and the test audio data in response to one of following conditions: detecting that a connection is established between the electronic terminal and the digital earphone; and receiving a volume calibration control instruction.
  • control instruction may comprise a loopback instruction and an audio playback instruction.
  • the loopback instruction may be used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data
  • the audio playback instruction may be used to control the digital earphone to play the test audio data.
  • the electronic terminal may further comprise a microphone.
  • the processor may be configured to acquire the loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction by one of: receiving, based on the first communication interface, the loopback audio data from the digital earphone through the established connection; and collecting, through the microphone of the electronic terminal, the test audio data played by the digital earphone, and determining the collected test audio data as the loopback audio data.
  • the processor may be configured to adjust the audio gain of the electronic terminal based on a comparison result of the volume value of the loopback audio data and a preset volume value, to change the output volume of the digital earphone.
  • adjusting the audio gain of the electronic terminal may comprise: determining a difference value between the volume value of the loopback audio data and the preset volume value; determining a gain adjustment value corresponding to the difference value; and changing the audio gain of the electronic terminal based on the determined gain adjustment value.
  • the changing the audio gain of the electronic terminal based on the determined gain adjustment value may comprise: determining whether the difference value is greater than zero; controlling, if the difference value is greater than zero, the audio gain of the electronic terminal to decrease by the gain adjustment value, to decrease the output volume of the digital earphone; and controlling, if the difference value is less than zero, the audio gain of the electronic terminal to increase by the gain adjustment value, to increase the output volume of the digital earphone.
  • the adjusting the audio gain of the electronic terminal may comprise: comparing cyclically the volume value of the loopback audio data with the preset volume value, and adjusting the audio gain of the electronic terminal based on a comparison result.
  • the processor may be configured to perform: controlling the audio gain of the electronic terminal to change by a preset change amount when the difference value between the volume value of the loopback audio data and the preset volume value satisfies an adjustment condition, and exiting the cycle when the difference value between the volume value of the loopback audio data and the preset volume value does not satisfy the adjustment condition.
  • the adjustment condition may comprise a first adjustment condition and a second adjustment condition
  • the first adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is greater than a first preset value
  • the second adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is less than a second preset value.
  • the preset change amount comprises a first preset change amount and a second preset change amount.
  • controlling the audio gain of the electronic terminal to change by a preset change amount comprises: controlling, if the difference value satisfies the first adjustment condition, the audio gain of the electronic terminal to decrease by the first preset change amount to decrease the output volume of the digital earphone; and controlling, if the difference value satisfies the second adjustment condition, the audio gain of the electronic terminal to increase by the second preset change amount to increase the output volume of the digital earphone.
  • the electronic terminal may further comprise a storage module.
  • the storage module is configured to store a gain table corresponding to the digital earphone, the gain table may comprise a gain identifier and a plurality of audio gains, amd the gain identifier may indicate an audio gain currently used by the electronic terminal.
  • the processor may be further configured to: update, after the audio gain of the electronic terminal is adjusted, the gain identifier to indicate the adjusted audio gain, to cause the electronic terminal to transmit audio data to the digital earphone based on the updated gain table.
  • a digital earphone comprising: a second communication interface receiving a control instruction and test audio data from an electronic terminal in a state of being connected with the electronic terminal; and an audio codec playing the test audio data in response to the control instruction received through the second communication interface, and providing loopback audio data to the electronic terminal.
  • control instruction may comprise a loopback instruction.
  • the audio codec may control the digital earphone to enter a loopback mode in response to the loopback instruction, play the test audio data in the loopback mode, and generate the loopback audio data.
  • the second communication interface sends the loopback audio data generated by the audio codec to the electronic terminal through the connection.
  • the digital earphone may further comprise an analog switch, a loudspeaker and a microphone.
  • the analog switch may be selectively connected to the loudspeaker and the microphone.
  • the audio codec may control the analog switch to be closed in response to the loopback instruction, to cause the digital earphone to enter the loopback mode.
  • the loudspeaker and the microphone form an internal loop through the closed analog switch.
  • the digital earphone may further comprise the loudspeaker, and the control instruction may comprise an audio playback instruction.
  • the audio codec may control the loudspeaker to play the test audio data in response to the audio playback instruction, for the electronic terminal to collect the played test audio data.
  • a computer readable storage medium storing a computer program.
  • the computer program When executed by a processor, the computer program implements the above method for controlling volume of a digital earphone.
  • the function of automatically calibrating the volume when the electronic terminal uses different digital earphones is realized.
  • Fig. 1 shows a schematic diagram of an output of volume when an existing electronic terminal uses different digital earphones
  • Fig. 2 shows a flowchart of a method for controlling volume of a digital earphone according to an exemplary embodiment of the present disclosure
  • Fig. 3 shows a schematic diagram of a gain table in an electronic terminal according to an exemplary embodiment of the present disclosure
  • Fig. 4 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to an exemplary embodiment of the present disclosure
  • Fig. 5 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to another exemplary embodiment of the present disclosure
  • Fig. 6 shows a schematic comparison diagram of an audio gain of an electronic terminal before and after an adjustment, according to an exemplary embodiment of the present disclosure.
  • Fig. 7 shows a schematic diagram of an interaction between an electronic terminal and a digital earphone according to an exemplary embodiment of the present disclosure.
  • Fig. 2 shows a flowchart of a method for controlling volume of a digital earphone according to an exemplary embodiment of the present disclosure.
  • step S10 a control instruction and test audio data are sent to a digital earphone in a state of being connected with an electronic terminal.
  • connection mode between the electronic terminal and the digital earphone may adopt a wired connection mode (e.g., the electronic terminal and the digital earphone are connected through a respective digital interface thereof), or may adopt a wireless connection mode (e.g., a Bluetooth connection).
  • a wired connection mode e.g., the electronic terminal and the digital earphone are connected through a respective digital interface thereof
  • a wireless connection mode e.g., a Bluetooth connection
  • both a volume calibration scheme of automatic volume calibration and a volume calibration scheme of manual volume calibration are provided.
  • control instruction and the test audio data may be sent to the digital earphone in the state of being connected with the electronic terminal, when it is detected that a connection is established between the electronic terminal and the digital earphone.
  • the impedance of a CC terminal of a digital interface of the electronic terminal may be detected according to the protocol of a USB device.
  • a predetermined impedance value e.g., 5.1 kiloohms
  • control instruction and the test audio data may be sent to the digital earphone in the state of being connected with the electronic terminal, when a volume calibration control instruction is received.
  • a volume calibration interface may be displayed based on a user's operation on the electronic terminal (e.g., an operation of initiating a volume calibration program).
  • a volume calibration control instruction corresponding to the calibration option is received.
  • step S20 loopback audio data, which is fed back for the test audio data by the digital earphone in response to the control instruction, is acquired.
  • control instruction may include a loopback instruction.
  • the loopback instruction is used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data.
  • the loopback instruction may be sent to the digital earphone, and the digital earphone enters the loopback mode in response to the loopback instruction.
  • the test audio data is sent to the digital earphone, and the digital earphone plays the test audio data in the loopback mode, and generates the loopback audio data.
  • the digital earphone may send the generated loopback audio data to the electronic terminal through the connection established between the electronic terminal and the digital earphone.
  • control instruction may include an audio playback instruction.
  • the audio playback instruction is used to control the digital earphone to play the test audio data.
  • the digital earphone plays the test audio data through a loudspeaker of the digital earphone.
  • test audio data played by the digital earphone may be collected through a microphone of the electronic terminal, and the collected test audio data is determined as the loopback audio data.
  • the method for controlling volume of a digital earphone may further include: displaying prompt information to the user at the electronic terminal, to prompt the user to make the loudspeaker of the digital earphone close to the microphone of the electronic terminal; and then controlling the digital earphone to play the test audio data, to perform a calibration on a volume level of the digital earphone.
  • step S30 an audio gain of the electronic terminal is adjusted based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
  • the volume value of the loopback audio data is used to represent a volume level of the loopback audio data.
  • a gain table corresponding to the digital earphone may be stored in the electronic terminal.
  • a gain table for controlling the output volume of the digital earphone may be stored in the memory of the electronic terminal.
  • the stored gain table may include a gain identifier and a plurality of audio gains, the gain identifier indicating an audio gain currently used by the electronic terminal.
  • the gain identifier is updated to indicate the adjusted audio gain, to cause the electronic terminal to transmit audio data to the digital earphone based on the updated gain table.
  • the level of the output volume of the digital earphone may be controlled by configuring a parameter in the gain table of the electronic terminal.
  • Fig. 3 shows a schematic diagram of a gain table in an electronic terminal according to an exemplary embodiment of the present disclosure.
  • a gain table corresponding to a digital earphone and stored in an electronic terminal includes a plurality of audio gains (e.g., gains -10dB (decibels)-10dB), and further includes a gain identifier (e.g., "in use”).
  • gains -10dB decibels
  • gain identifier e.g., "in use”
  • the audio gain originally used by the electronic terminal is 0dB
  • the audio gain of the electronic terminal is adjusted based on the method for controlling volume of a digital earphone shown in Fig. 1. For example, if the audio gain of the electronic terminal after the adjustment is 4dB, the gain identifier indicating 0dB is updated to indicate the adjusted audio gain 4dB.
  • the electronic terminal After the above calibration for the output volume of the digital earphone, the electronic terminal will subsequently determine the volume of audio data transmitted to the digital earphone, using the audio gain indicated by the gain identifier in the gain table corresponding to the digital earphone.
  • the gain table stored in the electronic terminal may be deleted.
  • the audio gain of the electronic terminal may be adjusted based on a comparison result of a volume value of loopback audio data and a preset volume value, to change the output volume of the digital earphone.
  • the numerical value of the preset volume value may refer to a volume value of which the output volume of the digital earphone can make the user feel comfortable. Those skilled in the art may set the preset volume value according to actual situations.
  • the audio gain of the electronic terminal may be adjusted through an one-time adjustment or a gradual adjustment.
  • Fig. 4 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to an exemplary embodiment of the present disclosure.
  • step S301 a difference value between a volume value of loopback audio data and a preset volume value is determined.
  • step S302 a gain adjustment value corresponding to the difference value between the volume value of the loopback audio data and the preset volume value is determined.
  • a corresponding relationship between a plurality of volume values and a plurality of gain adjustment values may be pre-established.
  • a volume value closest to the difference value is determined based on the pre-established corresponding relationship, and a gain adjustment value corresponding to the closest volume value is determined as the gain adjustment value corresponding to the difference value.
  • a corresponding relationship between a plurality of volume value ranges and a plurality of gain adjustment values may be pre-established.
  • a volume value range to which the difference value belongs may be determined.
  • a gain adjustment value corresponding to the determined volume value range is found through the corresponding relationship, and the found gain adjustment value is determined as the gain adjustment value corresponding to the difference value.
  • the above approach of determining the gain adjustment value is merely an example, and the present disclosure is not limited thereto.
  • the gain adjustment value may also be determined by other means.
  • the gain adjustment value may be determined in an experimental manner as will be described below with reference to Fig. 5.
  • step S303 an audio gain of the electronic terminal is changed based on the determined gain adjustment value.
  • the audio gain of the electronic terminal is controlled to decrease by the gain adjustment value, to decrease the output volume of the digital earphone.
  • the adjusted audio gain is the difference value between the audio gain of the electronic terminal and the gain adjustment value.
  • the audio gain of the electronic terminal is controlled to increase by the gain adjustment value, to increase the output volume of the digital earphone.
  • the adjusted audio gain is the sum value of the audio gain of the electronic terminal and the gain adjustment value.
  • the audio gain of the electronic terminal is not adjusted.
  • the volume value of the loopback audio data may be cyclically compared with the preset volume value, and the audio gain of the electronic terminal may be adjusted based on a comparison result.
  • each cycle it is detected whether the difference value between the volume value of the loopback audio data and the preset volume value satisfies an adjustment condition. If yes, the audio gain of the electronic terminal is controlled to change by a preset change amount to continue to send a control instruction and test audio data at the changed audio gain to the digital earphone. Otherwaise, it does not perform the adjusting and exits the cycle. And then, a current audio gain of the electronic terminal is determined to update the gain table using the current audio gain of the electronic terminal.
  • the adjustment condition may include a first adjustment condition and a second adjustment condition.
  • the first adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is greater than a first preset value
  • the second adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is less than a second preset value.
  • the preset change amount may include a first preset change amount and a second preset change amount.
  • Fig. 5 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to another exemplary embodiment of the present disclosure.
  • step S310 a difference value between a volume value of loopback audio data and a preset volume value is determineed.
  • step S320 it is detected whether the difference value between the volume value of the loopback audio data and the preset volume value satisfies a first adjustment condition. That is, whether the determineed difference value is greater than a first preset value is detected.
  • the first preset value may be a positive value. In other words, the difference value between the volume value of the loopback audio data and the preset volume value satisfying the first adjustment condition indicates that the volume value of the loopback audio data exceeds the preset volume value.
  • step S330 is performed to control the audio gain of the electronic terminal to decrease by a first preset change amount to decrease output volume of a digital earphone.
  • the first preset value may be +1dBFS (dB Full Scale), and the first preset change amount may be +1dB, but the present disclosure is not limited thereto, and those skilled in the art may adjust the numerical value of the first preset value and the numerical value of the first preset change amount as required.
  • the numerical value of the first preset value changes the numerical value of the first preset change amount may also be adjusted correspondingly. For example, as the numerical value of the first preset value increases, the numerical value of the first preset change amount may be increased correspondingly. As the numerical value of the first preset value decreases, the numerical value of the first preset change amount may be reduced correspondingly.
  • a gain table is updated using the changed audio gain of the electronic terminal. For example, a gain identifier in the gain table is updated to indicate the changed audio gain.
  • step S345 the electronic terminal sends a control instruction and test audio data at the changed audio gain to the digital earphone, and obtains loopback audio data fed back for the test audio data at the changed audio gain from the digital earphone.
  • step S345 the electronic terminal returns to perform step S310 based on the loopback audio data obtained in step S345.
  • step S350 is performed to detect whether the difference value between the volume value of the loopback audio data and the preset volume value satisfies a second adjustment condition. That is, whether the determineed difference value is less than a second preset value is detected.
  • the second preset value may be a negative value. In other words, the difference value between the volume value of the loopback audio data and the preset volume value satisfying the second adjustment condition indicates that the volume value of the loopback audio data is less than the preset volume value.
  • step S360 is performed to control the audio gain of the electronic terminal to increase by a second preset change amount to increase the output volume of the digital earphone.
  • the second preset value may be -1dBFS, and the second preset change amount may be +1dB, but the present disclosure is not limited thereto, and those skilled in the art may adjust the numerical value of the second preset value and the numerical value of the second preset change amount as required.
  • the numerical value of the second preset value may also be adjusted correspondingly. For example, as the numerical value of the second preset value increases, the numerical value of the second preset change amount may be increased correspondingly. As the numerical value of the second preset value decreases, the numerical value of the second preset change amount may be reduced correspondingly.
  • step S340 is performed to update the gain table using the changed audio gain of the electronic terminal.
  • step S370 in which a current audio gain of the electronic terminal is determineed to update the gain table using the current audio gain of the electronic terminal and store the gain table is performed.
  • the above approach of adjusting the audio gain of the electronic terminal shown in Fig. 5 is only an example, and the present disclosure is not limited thereto.
  • the audio gain of the electronic terminal may also be adjusted by other means.
  • Fig. 6 shows a schematic comparison diagram of an audio gain of an electronic terminal before and after an adjustment, according to an exemplary embodiment of the present disclosure.
  • Fig. 7 shows a schematic diagram of an interaction between an electronic terminal and a digital earphone according to an exemplary embodiment of the present disclosure.
  • an electronic terminal includes a first communication interface (e.g., a USB connector in the electronic terminal shown in the drawing) and a processor (e.g., an AP processor shown in the drawing).
  • the electronic terminal may further include a storage module (e.g., a memory module), a power management module and a USB processing module.
  • a digital earphone includes a second communication interface (e.g., a USB connector in the digital earphone shown in the drawing) and an audio codec.
  • the first communication interface and the second communication interface may refer to a USB digital interface, for example, a universal serial bus C-type interface, but the present disclosure is not limited thereto, and the communication interfaces may also refer to a USB digital interface of another form.
  • the first communication interface and the second communication interface may also refer to a wireless communication module, for example, a Bluetooth module/WIFI module, but the present disclosure is not limited thereto, and the communication interfaces may also refer to a wireless communication module of another type.
  • the electronic terminal may include, but not limited to, various existing electronic devices having a digital interface, for example, a smartphone, a tablet computer, a smart wearable device, a personal digital assistant, a game console and a video player.
  • the digital earphone may include, but not limited to, various existing wired/wireless earphones having a self-contained audio codec.
  • the first communication interface of the electronic terminal sends a control instruction and test audio data to the digital earphone in a state of being connected with the digital earphone.
  • both a volume calibration scheme of automatic volume calibration and a volume calibration scheme of manual volume calibration are provided.
  • the processor may be configured to control the first communication interface to send the control instruction and the test audio data in response to detecting that a connection is established between the electronic terminal and the digital earphone.
  • the processor may be configured to control the first communication interface to send the control instruction and the test audio data in response to receiving a volume calibration control instruction.
  • the second communication interface of the digital earphone receives the control instruction and the test audio data from the electronic terminal in a state of being connected with the electronic terminal.
  • the audio codec of the digital earphone plays the test audio data in response to the control instruction received through the second communication interface, and provides loopback audio data to the electronic terminal.
  • control instruction may include a loopback instruction.
  • the loopback instruction is used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data.
  • the audio codec controls the digital earphone to enter the loopback mode in response to the loopback instruction, and plays the test audio data in the loopback mode to generate the loopback audio data.
  • the second communication interface sends the loopback audio data generated by the audio codec to the electronic terminal through the connection between the electronic terminal and the digital earphone.
  • the digital earphone may further include an analog switch (i.e., a switch for controlling the loopback mode), a loudspeaker (e.g., a left loudspeaker LEFT and a right loudspeaker RIGHT) and a microphone (MIC).
  • an analog switch i.e., a switch for controlling the loopback mode
  • a loudspeaker e.g., a left loudspeaker LEFT and a right loudspeaker RIGHT
  • MIC microphone
  • the analog switch may be selectively connected to the loudspeaker and the microphone.
  • the analog switch may be provided inside the audio codec, or may be provided outside the audio codec.
  • Fig. 7 shows two arrangements of the analog switch, and those skilled in the art may select the arrangement of the analog switch as required, as long as a loopback loop may be formed inside the digital earphone by controlling the analog switch.
  • the audio codec may control the analog switch to be closed in response to the loopback instruction received through the second communication interface, to cause the digital earphone to enter the loopback mode.
  • the loudspeaker and the microphone form an internal loop through the closed analog switch.
  • the loudspeaker of the digital earphone does not output volume. That is, the volume calibration process described above does not cause discomfort to the ear of the user.
  • control instruction may include an audio playback instruction.
  • the audio playback instruction is used to control the digital earphone to play the test audio data.
  • the audio codec controls the loudspeaker to play the test audio data in response to the audio playback instruction, for the electronic terminal to collect the played test audio data.
  • the microphone of the electronic terminal collects the test audio data played by the loudspeaker of the digital earphone, and determines the collected test audio data as the loopback audio data.
  • the processor of the electronic terminal is configured to adjust an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
  • the method for controlling volume of a digital earphone shown in Fig. 1 is performed in the electronic terminal shown in Fig. 7. That is, the output volume of the digital earphone is changed by adjusting the audio gain of the electronic terminal.
  • the storage module of the electronic terminal may store a gain corresponding to the digital earphone.
  • the stored gain table may include a gain identifier and a plurality of audio gains, the gain identifier indicating an audio gain currently used by the electronic terminal.
  • a computer readable storage medium storing a computer program.
  • the computer readable storage medium stores a computer program, when executed by a processor, causing the processor to perform the above method for controlling volume of a digital earphone.
  • the computer readable recording medium is any data storage apparatus that may store data read out by a computer system. Examples of the computer readable recording medium include a read only memory, a random access memory, a read only optical disk, a magnetic tape, a floppy disk, an optical data storage apparatus, and carrier wave (such as data transmission through the Internet via a wired or wireless transmission path).
  • the output volume of each digital earphone can be in a normal range when the electronic terminal uses different digital earphones, thereby simply and effectively solving the problem that there is a volume abnormality when the electronic terminal uses the digital earphones.
  • the volume calibration for the digital earphone may be realized without additional circuits or accessories.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The present disclosure provides a method for controlling volume of a digital earphone, an electronic terminal and a digital earphone. The method may comprise: sending a control instruction and test audio data to a digital earphone in a state of being connected with an electronic terminal; acquiring loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction; and adjusting an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone. Using the method, the electronic terminal or the digital earphone according to exemplary embodiments of the present disclosure, the problem of volume abnormality, which would be caused by the electronic terminal usingdifferent digital earphones, would be be effectively or partly solved.

Description

METHOD FOR CONTROLLING VOLUME OF DIGITAL EARPHONE, ELECTRONIC TERMINAL AND DIGITAL EARPHONE
The present disclosure generally relates to the field of electronic technology, and more specifically to a method for controlling volume of a digital earphone, and an electronic terminal and a digital earphone that support the method for controlling the volume.
The traditional analog 3.5 mm earphone interface or the traditional analog universal serial bus (USB) earphone interface used on an electronic terminal is being replaced by a digital USB earphone interface. At present, the digital USB interface becomes more and more popular as the audio interface used on the electronic terminal.
Various digital earphones currently available on the market have different gain designs inside their chips due to the use of different digital audio codec chip schemes, which makes the output volume of the digital earphones nonuniform when the various digital earphones are used on the same electronic terminal. That is, the output volume of some of the digital earphones is a normal value, while the output volume of the others of digital earphones is very large or very small (as shown in Fig. 1), which may deteriorate the user's experience and may even lead to an ear injury.
The exemplary embodiments of the present disclosure provide a method for controlling volume of a digital earphone, an electronic terminal and a digital earphone, to overcome at least one of the above defects.
According to an aspect of the exemplary embodiments of the present disclosure, a method for controlling volume of a digital earphone is provided. The method may comprise: sending a control instruction and test audio data to a digital earphone in a state of being connected with an electronic terminal; acquiring loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction; and adjusting an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
Alternatively, the control instruction and the test audio data may be sent in response to one of: detecting that a connection is established between the electronic terminal and the digital earphone; and receiving a volume calibration control instruction.
Alternatively, the control instruction may comprise a loopback instruction and an audio playback instruction. Here, the loopback instruction may be used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data, and the audio playback instruction may be used to control the digital earphone to play the test audio data.
Alternatively, the loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction may be acquired by one of: receiving the loopback audio data from the digital earphone through the established connection; and collecting, through a microphone of the electronic terminal, the test audio data played by the digital earphone, and determining the collected test audio data as the loopback audio data.
Alternatively, the adjusting an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data may comprise: adjusting the audio gain of the electronic terminal based on a comparison result of the volume value of the loopback audio data and a preset volume value, to change the output volume of the digital earphone.
Alternatively, the adjusting the audio gain of the electronic terminal may comprise: determining a difference value between the volume value of the loopback audio data and the preset volume value; determining a gain adjustment value corresponding to the difference value; and changing the audio gain of the electronic terminal based on the determined gain adjustment value.
Alternatively, the changing the audio gain of the electronic terminal based on the determined gain adjustment value may comprise: determining whether the difference value is greater than zero; controlling, if the difference value is greater than zero, the audio gain of the electronic terminal to decrease by the gain adjustment value, to decrease the output volume of the digital earphone; and controlling, if the difference value is less than zero, the audio gain of the electronic terminal to increase by the gain adjustment value, to increase the output volume of the digital earphone.
Alternatively, the adjusting the audio gain of the electronic terminal may comprise: comparing cyclically the volume value of the loopback audio data with the preset volume value, and adjusting the audio gain of the electronic terminal based on a comparison result, wherein in each cycle, when the difference value between the volume value of the loopback audio data and the preset volume value satisfies an adjustment condition, the audio gain of the electronic terminal is controlled to change by a preset change amount, and when the difference value between the volume value of the loopback audio data and the preset volume value does not satisfy the adjustment condition, the cycle is exited.
Alternatively, the adjustment condition may comprise a first adjustment condition and a second adjustment condition, the first adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is greater than a first preset value, and the second adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is less than a second preset value. The preset change amount may comprise a first preset change amount and a second preset change amount. Here, controlling the audio gain of the electronic terminal to change by the preset change amount may comprise: controlling, if the difference value satisfies the first adjustment condition, the audio gain of the electronic terminal to decrease by the first preset change amount to decrease the output volume of the digital earphone; and controlling, if the difference value satisfies the second adjustment condition, the audio gain of the electronic terminal to increase by the second preset change amount to increase the output volume of the digital earphone.
Alternatively, the electronic terminal may store a gain table corresponding to the digital earphone, the gain table may comprise a gain identifier and a plurality of audio gains, and the gain identifier may indicate an audio gain currently used by the electronic terminal. Here, the method may further comprise: updating, after adjusting the audio gain of the electronic terminal, the gain identifier to indicate the adjusted audio gain, to cause the electronic terminal to transmit audio data to the digital earphone based on the updated gain table.
According to another aspect of the exemplary embodiments of the present disclosure, an electronic terminal is provided, the electronic terminal comprising: a first communication interface sending a control instruction and test audio data to a digital earphone in a state of being connected with the digital earphone; and a processor configured to acquire loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction, and adjust an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data to change output volume of the digital earphone.
Alternatively, the processor may control the first communication interface to send the control instruction and the test audio data in response to one of following conditions: detecting that a connection is established between the electronic terminal and the digital earphone; and receiving a volume calibration control instruction.
Alternatively, the control instruction may comprise a loopback instruction and an audio playback instruction. Here, the loopback instruction may be used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data, and the audio playback instruction may be used to control the digital earphone to play the test audio data.
Alternatively, the electronic terminal may further comprise a microphone. Here, the processor may be configured to acquire the loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction by one of: receiving, based on the first communication interface, the loopback audio data from the digital earphone through the established connection; and collecting, through the microphone of the electronic terminal, the test audio data played by the digital earphone, and determining the collected test audio data as the loopback audio data.
Alternatively, the processor may be configured to adjust the audio gain of the electronic terminal based on a comparison result of the volume value of the loopback audio data and a preset volume value, to change the output volume of the digital earphone.
Alternatively, adjusting the audio gain of the electronic terminal may comprise: determining a difference value between the volume value of the loopback audio data and the preset volume value; determining a gain adjustment value corresponding to the difference value; and changing the audio gain of the electronic terminal based on the determined gain adjustment value.
Alternatively, the changing the audio gain of the electronic terminal based on the determined gain adjustment value may comprise: determining whether the difference value is greater than zero; controlling, if the difference value is greater than zero, the audio gain of the electronic terminal to decrease by the gain adjustment value, to decrease the output volume of the digital earphone; and controlling, if the difference value is less than zero, the audio gain of the electronic terminal to increase by the gain adjustment value, to increase the output volume of the digital earphone.
Alternatively, the adjusting the audio gain of the electronic terminal may comprise: comparing cyclically the volume value of the loopback audio data with the preset volume value, and adjusting the audio gain of the electronic terminal based on a comparison result. Here, in each cycle, the processor may be configured to perform: controlling the audio gain of the electronic terminal to change by a preset change amount when the difference value between the volume value of the loopback audio data and the preset volume value satisfies an adjustment condition, and exiting the cycle when the difference value between the volume value of the loopback audio data and the preset volume value does not satisfy the adjustment condition.
Alternatively, the adjustment condition may comprise a first adjustment condition and a second adjustment condition, the first adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is greater than a first preset value, and the second adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is less than a second preset value. The preset change amount comprises a first preset change amount and a second preset change amount. Here, the controlling the audio gain of the electronic terminal to change by a preset change amount comprises: controlling, if the difference value satisfies the first adjustment condition, the audio gain of the electronic terminal to decrease by the first preset change amount to decrease the output volume of the digital earphone; and controlling, if the difference value satisfies the second adjustment condition, the audio gain of the electronic terminal to increase by the second preset change amount to increase the output volume of the digital earphone.
Alternatively, the electronic terminal may further comprise a storage module. The storage module is configured to store a gain table corresponding to the digital earphone, the gain table may comprise a gain identifier and a plurality of audio gains, amd the gain identifier may indicate an audio gain currently used by the electronic terminal. Here, the processor may be further configured to: update, after the audio gain of the electronic terminal is adjusted, the gain identifier to indicate the adjusted audio gain, to cause the electronic terminal to transmit audio data to the digital earphone based on the updated gain table.
According to another aspect of the exemplary embodiments of the present disclosure, a digital earphone is provided, the digital earphone comprising: a second communication interface receiving a control instruction and test audio data from an electronic terminal in a state of being connected with the electronic terminal; and an audio codec playing the test audio data in response to the control instruction received through the second communication interface, and providing loopback audio data to the electronic terminal.
Alternatively, the control instruction may comprise a loopback instruction. Here, the audio codec may control the digital earphone to enter a loopback mode in response to the loopback instruction, play the test audio data in the loopback mode, and generate the loopback audio data. The second communication interface sends the loopback audio data generated by the audio codec to the electronic terminal through the connection.
Alternatively, the digital earphone may further comprise an analog switch, a loudspeaker and a microphone. The analog switch may be selectively connected to the loudspeaker and the microphone. Here, the audio codec may control the analog switch to be closed in response to the loopback instruction, to cause the digital earphone to enter the loopback mode. Here, in the loopback mode, the loudspeaker and the microphone form an internal loop through the closed analog switch.
Alternatively, the digital earphone may further comprise the loudspeaker, and the control instruction may comprise an audio playback instruction. Here, the audio codec may control the loudspeaker to play the test audio data in response to the audio playback instruction, for the electronic terminal to collect the played test audio data.
According to another aspect of the exemplary embodiments of the present disclosure, a computer readable storage medium storing a computer program is provided. When executed by a processor, the computer program implements the above method for controlling volume of a digital earphone.
Using the method for controlling volume of a digital earphone, the electronic terminal and the digital earphone according to the exemplary embodiments of the present disclosure, the function of automatically calibrating the volume when the electronic terminal uses different digital earphones is realized.
In the following description, other aspects and/or advantages of the overall concept of the present disclosure will be partially explained, and some aspects and/or advantages will be clear through the description or may be learned through the implementation of the overall concept of the present disclosure.
Fig. 1 shows a schematic diagram of an output of volume when an existing electronic terminal uses different digital earphones;
Fig. 2 shows a flowchart of a method for controlling volume of a digital earphone according to an exemplary embodiment of the present disclosure;
Fig. 3 shows a schematic diagram of a gain table in an electronic terminal according to an exemplary embodiment of the present disclosure;
Fig. 4 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to an exemplary embodiment of the present disclosure;
Fig. 5 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to another exemplary embodiment of the present disclosure;
Fig. 6 shows a schematic comparison diagram of an audio gain of an electronic terminal before and after an adjustment, according to an exemplary embodiment of the present disclosure; and
Fig. 7 shows a schematic diagram of an interaction between an electronic terminal and a digital earphone according to an exemplary embodiment of the present disclosure.
Reference will now be made in detail to embodiments of the present disclosure, and examples in the embodiments are illustrated in the accompanying drawings, in which all like reference numerals refer to like parts throughout the description. The embodiments will be described below with reference to the accompanying drawings, so as to explain the present disclosure.
Fig. 2 shows a flowchart of a method for controlling volume of a digital earphone according to an exemplary embodiment of the present disclosure.
As shown in Fig. 2, in step S10, a control instruction and test audio data are sent to a digital earphone in a state of being connected with an electronic terminal.
As an example, the connection mode between the electronic terminal and the digital earphone may adopt a wired connection mode (e.g., the electronic terminal and the digital earphone are connected through a respective digital interface thereof), or may adopt a wireless connection mode (e.g., a Bluetooth connection).
In the exemplary embodiments of the present disclosure, both a volume calibration scheme of automatic volume calibration and a volume calibration scheme of manual volume calibration are provided.
In the volume calibration scheme of automatic volume calibration, the control instruction and the test audio data may be sent to the digital earphone in the state of being connected with the electronic terminal, when it is detected that a connection is established between the electronic terminal and the digital earphone.
For example, for the wired connection mode, the impedance of a CC terminal of a digital interface of the electronic terminal may be detected according to the protocol of a USB device. When it is detected that the impedance of the CC terminal reaches a predetermined impedance value (e.g., 5.1 kiloohms), it is determined that the digital earphone is inserted (i.e., the connection with the electronic terminal is established), and the electronic terminal is controlled to enter a digital earphone mode.
In the volume calibration scheme of manual volume calibration, the control instruction and the test audio data may be sent to the digital earphone in the state of being connected with the electronic terminal, when a volume calibration control instruction is received.
For example, after the connection between the digital earphone and the electronic terminal is established, a volume calibration interface may be displayed based on a user's operation on the electronic terminal (e.g., an operation of initiating a volume calibration program). When a selection for a calibration option, which is inputted by the user on the displayed volume calibration interface, is received, a volume calibration control instruction corresponding to the calibration option is received.
In step S20, loopback audio data, which is fed back for the test audio data by the digital earphone in response to the control instruction, is acquired.
In a situation, the control instruction may include a loopback instruction. Here, the loopback instruction is used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data.
For example, the loopback instruction may be sent to the digital earphone, and the digital earphone enters the loopback mode in response to the loopback instruction. The test audio data is sent to the digital earphone, and the digital earphone plays the test audio data in the loopback mode, and generates the loopback audio data.
In this situation, the digital earphone may send the generated loopback audio data to the electronic terminal through the connection established between the electronic terminal and the digital earphone.
In another situation, the control instruction may include an audio playback instruction. Here, the audio playback instruction is used to control the digital earphone to play the test audio data.
That is, in response to the audio playback instruction, the digital earphone plays the test audio data through a loudspeaker of the digital earphone.
In this situation, the test audio data played by the digital earphone may be collected through a microphone of the electronic terminal, and the collected test audio data is determined as the loopback audio data.
The method for controlling volume of a digital earphone according to the exemplary embodiment of the present disclosure may further include: displaying prompt information to the user at the electronic terminal, to prompt the user to make the loudspeaker of the digital earphone close to the microphone of the electronic terminal; and then controlling the digital earphone to play the test audio data, to perform a calibration on a volume level of the digital earphone.
In step S30, an audio gain of the electronic terminal is adjusted based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
Here, the volume value of the loopback audio data is used to represent a volume level of the loopback audio data.
In an example, a gain table corresponding to the digital earphone may be stored in the electronic terminal. For example, a gain table for controlling the output volume of the digital earphone may be stored in the memory of the electronic terminal. As an example, the stored gain table may include a gain identifier and a plurality of audio gains, the gain identifier indicating an audio gain currently used by the electronic terminal.
In this situation, after the audio gain of the electronic terminal is adjusted, the gain identifier is updated to indicate the adjusted audio gain, to cause the electronic terminal to transmit audio data to the digital earphone based on the updated gain table.
According to the method for controlling volume of a digital earphone according to the exemplary embodiment of the present disclosure, the level of the output volume of the digital earphone may be controlled by configuring a parameter in the gain table of the electronic terminal.
Fig. 3 shows a schematic diagram of a gain table in an electronic terminal according to an exemplary embodiment of the present disclosure.
As shown in Fig. 3, a gain table corresponding to a digital earphone and stored in an electronic terminal includes a plurality of audio gains (e.g., gains -10dB (decibels)-10dB), and further includes a gain identifier (e.g., "in use").
In an example, it is assumed that the audio gain originally used by the electronic terminal is 0dB, and the audio gain of the electronic terminal is adjusted based on the method for controlling volume of a digital earphone shown in Fig. 1. For example, if the audio gain of the electronic terminal after the adjustment is 4dB, the gain identifier indicating 0dB is updated to indicate the adjusted audio gain 4dB.
After the above calibration for the output volume of the digital earphone, the electronic terminal will subsequently determine the volume of audio data transmitted to the digital earphone, using the audio gain indicated by the gain identifier in the gain table corresponding to the digital earphone.
Alternatively, if the electronic terminal is disconnected from the digital earphone, the gain table stored in the electronic terminal may be deleted.
In a preferred exemplary embodiment of the present disclosure, the audio gain of the electronic terminal may be adjusted based on a comparison result of a volume value of loopback audio data and a preset volume value, to change the output volume of the digital earphone. Here, the numerical value of the preset volume value may refer to a volume value of which the output volume of the digital earphone can make the user feel comfortable. Those skilled in the art may set the preset volume value according to actual situations.
For example, based on the above comparison result, the audio gain of the electronic terminal may be adjusted through an one-time adjustment or a gradual adjustment.
The process of adjusting the audio gain of the electronic terminal through the one-time adjustment will be introduced below with reference to Fig. 4.
Fig. 4 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to an exemplary embodiment of the present disclosure.
As shown in Fig. 4, in step S301, a difference value between a volume value of loopback audio data and a preset volume value is determined.
In step S302, a gain adjustment value corresponding to the difference value between the volume value of the loopback audio data and the preset volume value is determined.
In an example, a corresponding relationship between a plurality of volume values and a plurality of gain adjustment values may be pre-established. In this situation, a volume value closest to the difference value is determined based on the pre-established corresponding relationship, and a gain adjustment value corresponding to the closest volume value is determined as the gain adjustment value corresponding to the difference value.
In another example, a corresponding relationship between a plurality of volume value ranges and a plurality of gain adjustment values may be pre-established. In this situation, after the difference value between the volume value of the loopback audio data and the preset volume value is determined, a volume value range to which the difference value belongs may be determined. Then, a gain adjustment value corresponding to the determined volume value range is found through the corresponding relationship, and the found gain adjustment value is determined as the gain adjustment value corresponding to the difference value.
It should be understood that the above approach of determining the gain adjustment value is merely an example, and the present disclosure is not limited thereto. The gain adjustment value may also be determined by other means. For example, the gain adjustment value may be determined in an experimental manner as will be described below with reference to Fig. 5.
In step S303, an audio gain of the electronic terminal is changed based on the determined gain adjustment value.
For example, it is determined whether the difference value between the volume value of the loopback audio data and the preset volume value is greater than zero. If the determined difference value is greater than zero, the audio gain of the electronic terminal is controlled to decrease by the gain adjustment value, to decrease the output volume of the digital earphone. At this point, the adjusted audio gain is the difference value between the audio gain of the electronic terminal and the gain adjustment value.
If the determined difference value is less than zero, the audio gain of the electronic terminal is controlled to increase by the gain adjustment value, to increase the output volume of the digital earphone. At this point, the adjusted audio gain is the sum value of the audio gain of the electronic terminal and the gain adjustment value.
If the determined difference value is equal to zero, the audio gain of the electronic terminal is not adjusted.
In the scheme in which the audio gain of the electronic terminal is adjusted through a gradual adjustment, the volume value of the loopback audio data may be cyclically compared with the preset volume value, and the audio gain of the electronic terminal may be adjusted based on a comparison result.
For example, in each cycle, it is detected whether the difference value between the volume value of the loopback audio data and the preset volume value satisfies an adjustment condition. If yes, the audio gain of the electronic terminal is controlled to change by a preset change amount to continue to send a control instruction and test audio data at the changed audio gain to the digital earphone. Otherwaise, it does not perform the adjusting and exits the cycle. And then, a current audio gain of the electronic terminal is determined to update the gain table using the current audio gain of the electronic terminal.
The process of adjusting the audio gain of the electronic terminal through the gradual adjustment will be introduced below with reference to Fig. 5. In this example, the adjustment condition may include a first adjustment condition and a second adjustment condition. The first adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is greater than a first preset value, and the second adjustment condition may indicate that the difference value between the volume value of the loopback audio data and the preset volume value is less than a second preset value. The preset change amount may include a first preset change amount and a second preset change amount.
Fig. 5 shows a flowchart of a step of adjusting an audio gain of an electronic terminal according to another exemplary embodiment of the present disclosure.
As shown in Fig. 5, in step S310, a difference value between a volume value of loopback audio data and a preset volume value is determineed.
In step S320, it is is detected whether the difference value between the volume value of the loopback audio data and the preset volume value satisfies a first adjustment condition. That is, whether the determineed difference value is greater than a first preset value is detected. The first preset value may be a positive value. In other words, the difference value between the volume value of the loopback audio data and the preset volume value satisfying the first adjustment condition indicates that the volume value of the loopback audio data exceeds the preset volume value.
If it is detected that the difference value satisfies the first adjustment condition (i.e., is greater than the first preset value), step S330 is performed to control the audio gain of the electronic terminal to decrease by a first preset change amount to decrease output volume of a digital earphone.
As an example, the first preset value may be +1dBFS (dB Full Scale), and the first preset change amount may be +1dB, but the present disclosure is not limited thereto, and those skilled in the art may adjust the numerical value of the first preset value and the numerical value of the first preset change amount as required. Alternatively, as the numerical value of the first preset value changes, the numerical value of the first preset change amount may also be adjusted correspondingly. For example, as the numerical value of the first preset value increases, the numerical value of the first preset change amount may be increased correspondingly. As the numerical value of the first preset value decreases, the numerical value of the first preset change amount may be reduced correspondingly.
In step S340, a gain table is updated using the changed audio gain of the electronic terminal. For example, a gain identifier in the gain table is updated to indicate the changed audio gain.
After when the gain table is updated in step S340, the electronic terminal performs step S345 in which the electronic terminal sends a control instruction and test audio data at the changed audio gain to the digital earphone, and obtains loopback audio data fed back for the test audio data at the changed audio gain from the digital earphone. After performing step S345, the electronic terminal returns to perform step S310 based on the loopback audio data obtained in step S345.
If it is detected that the difference value does not satisfy the first adjustment condition (i.e., is less than or equal to the first preset value), step S350 is performed to detect whether the difference value between the volume value of the loopback audio data and the preset volume value satisfies a second adjustment condition. That is, whether the determineed difference value is less than a second preset value is detected. The second preset value may be a negative value. In other words, the difference value between the volume value of the loopback audio data and the preset volume value satisfying the second adjustment condition indicates that the volume value of the loopback audio data is less than the preset volume value.
If it is detected that the difference value satisfies the second adjustment condition (i.e., is less than the second preset value), step S360 is performed to control the audio gain of the electronic terminal to increase by a second preset change amount to increase the output volume of the digital earphone.
As an example, the second preset value may be -1dBFS, and the second preset change amount may be +1dB, but the present disclosure is not limited thereto, and those skilled in the art may adjust the numerical value of the second preset value and the numerical value of the second preset change amount as required. Alternatively, as the numerical value of the second preset value changes, the numerical value of the second preset change amount may also be adjusted correspondingly. For example, as the numerical value of the second preset value increases, the numerical value of the second preset change amount may be increased correspondingly. As the numerical value of the second preset value decreases, the numerical value of the second preset change amount may be reduced correspondingly.
At this point, step S340 is performed to update the gain table using the changed audio gain of the electronic terminal.
If it is detected that the difference value does not satisfy the second adjustment condition (i.e., is greater than or equal to the second preset value), step S370 in which a current audio gain of the electronic terminal is determineed to update the gain table using the current audio gain of the electronic terminal and store the gain table is performed.
It should be understood that, in the above process of adjusting the audio gain, whether the first adjustment condition is satisfied is first determined and whether the second adjustment condition is satisfied is then determined. However, the present disclosure is not limited thereto, and it is also possible to first determine whether the second adjustment condition is satisfied, and then determine whether the first adjustment condition is satisfied. In the present disclosure, there is no limitation to the detection order of the first adjustment condition and the second adjustment condition.
In addition, the above approach of adjusting the audio gain of the electronic terminal shown in Fig. 5 is only an example, and the present disclosure is not limited thereto. The audio gain of the electronic terminal may also be adjusted by other means.
Fig. 6 shows a schematic comparison diagram of an audio gain of an electronic terminal before and after an adjustment, according to an exemplary embodiment of the present disclosure.
As may be seen from Fig. 6, when output volume of a digital earphone is smaller, the amplitude of a volume waveform of loopback audio data fed back is small. After volume is automatically calibrated, the volume of the loopback audio data is increased to reach a preset volume value to meet the normal usage needs of a user.
Fig. 7 shows a schematic diagram of an interaction between an electronic terminal and a digital earphone according to an exemplary embodiment of the present disclosure.
As shown in Fig. 7, an electronic terminal according to the exemplary embodiment of the present disclosure includes a first communication interface (e.g., a USB connector in the electronic terminal shown in the drawing) and a processor (e.g., an AP processor shown in the drawing). In addition, the electronic terminal may further include a storage module (e.g., a memory module), a power management module and a USB processing module.
A digital earphone according to the exemplary embodiment of the present disclosure includes a second communication interface (e.g., a USB connector in the digital earphone shown in the drawing) and an audio codec.
It should be understood that in a preferred example, the first communication interface and the second communication interface may refer to a USB digital interface, for example, a universal serial bus C-type interface, but the present disclosure is not limited thereto, and the communication interfaces may also refer to a USB digital interface of another form. In addition, the first communication interface and the second communication interface may also refer to a wireless communication module, for example, a Bluetooth module/WIFI module, but the present disclosure is not limited thereto, and the communication interfaces may also refer to a wireless communication module of another type.
As an example, the electronic terminal may include, but not limited to, various existing electronic devices having a digital interface, for example, a smartphone, a tablet computer, a smart wearable device, a personal digital assistant, a game console and a video player. The digital earphone may include, but not limited to, various existing wired/wireless earphones having a self-contained audio codec.
Specifically, the first communication interface of the electronic terminal sends a control instruction and test audio data to the digital earphone in a state of being connected with the digital earphone.
In the exemplary embodiment of the present disclosure, both a volume calibration scheme of automatic volume calibration and a volume calibration scheme of manual volume calibration are provided.
In the volume calibration scheme of automatic volume calibration, the processor may be configured to control the first communication interface to send the control instruction and the test audio data in response to detecting that a connection is established between the electronic terminal and the digital earphone.
In the volume calibration scheme of manual volume calibration, the processor may be configured to control the first communication interface to send the control instruction and the test audio data in response to receiving a volume calibration control instruction.
The second communication interface of the digital earphone receives the control instruction and the test audio data from the electronic terminal in a state of being connected with the electronic terminal. The audio codec of the digital earphone plays the test audio data in response to the control instruction received through the second communication interface, and provides loopback audio data to the electronic terminal.
In a situation, the control instruction may include a loopback instruction. Here, the loopback instruction is used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data.
That is, the audio codec controls the digital earphone to enter the loopback mode in response to the loopback instruction, and plays the test audio data in the loopback mode to generate the loopback audio data.
In this situation, the second communication interface sends the loopback audio data generated by the audio codec to the electronic terminal through the connection between the electronic terminal and the digital earphone.
Here, the digital earphone according to the exemplary embodiment of the present disclosure may further include an analog switch (i.e., a switch for controlling the loopback mode), a loudspeaker (e.g., a left loudspeaker LEFT and a right loudspeaker RIGHT) and a microphone (MIC). USB audio data received from the electronic terminal is outputted through the loudspeaker of a left/right sound channel, after being processed by the audio codec in the digital earphone.
The analog switch may be selectively connected to the loudspeaker and the microphone. As an example, the analog switch may be provided inside the audio codec, or may be provided outside the audio codec. Fig. 7 shows two arrangements of the analog switch, and those skilled in the art may select the arrangement of the analog switch as required, as long as a loopback loop may be formed inside the digital earphone by controlling the analog switch.
For example, the audio codec may control the analog switch to be closed in response to the loopback instruction received through the second communication interface, to cause the digital earphone to enter the loopback mode. In the loopback mode, the loudspeaker and the microphone form an internal loop through the closed analog switch.
It should be understood that when the digital earphone plays the test audio data in the loopback mode, the loudspeaker of the digital earphone does not output volume. That is, the volume calibration process described above does not cause discomfort to the ear of the user.
In another situation, the control instruction may include an audio playback instruction. Here, the audio playback instruction is used to control the digital earphone to play the test audio data.
That is, the audio codec controls the loudspeaker to play the test audio data in response to the audio playback instruction, for the electronic terminal to collect the played test audio data.
In this situation, the microphone of the electronic terminal collects the test audio data played by the loudspeaker of the digital earphone, and determines the collected test audio data as the loopback audio data.
The processor of the electronic terminal is configured to adjust an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
That is, the method for controlling volume of a digital earphone shown in Fig. 1 is performed in the electronic terminal shown in Fig. 7. That is, the output volume of the digital earphone is changed by adjusting the audio gain of the electronic terminal.
In a preferred example, the storage module of the electronic terminal may store a gain corresponding to the digital earphone. As an example, the stored gain table may include a gain identifier and a plurality of audio gains, the gain identifier indicating an audio gain currently used by the electronic terminal.
It should be understood that, since the process in which the processor adjusts the audio gain of the electronic terminal based on the volume value of the acquired loopback audio data is described in detail in Figs. 1-5, the content of this process will not be repeatedly described in the present disclosure.
According to an exemplary embodiment of the present disclosure, a computer readable storage medium storing a computer program is further provided. The computer readable storage medium stores a computer program, when executed by a processor, causing the processor to perform the above method for controlling volume of a digital earphone. The computer readable recording medium is any data storage apparatus that may store data read out by a computer system. Examples of the computer readable recording medium include a read only memory, a random access memory, a read only optical disk, a magnetic tape, a floppy disk, an optical data storage apparatus, and carrier wave (such as data transmission through the Internet via a wired or wireless transmission path).
Using the method for controlling volume of a digital earphone, the electronic terminal and the digital earphone according to the exemplary embodiments of the present disclosure, the output volume of each digital earphone can be in a normal range when the electronic terminal uses different digital earphones, thereby simply and effectively solving the problem that there is a volume abnormality when the electronic terminal uses the digital earphones.
According to the method for controlling volume of a digital earphone, the electronic terminal and the digital earphone according to the exemplary embodiments of the present disclosure, the volume calibration for the digital earphone may be realized without additional circuits or accessories.
The exemplary embodiments of the present disclosure are described above. It should be understood that the foregoing description is only exemplary and not exhaustive, and that the present disclosure is not limited to the disclosed exemplary embodiments. Without departing from the scope and spirit of the present disclosure, many modifications and alterations are obvious to those of ordinary skill in the art. Therefore, the protection scope of the present disclosure should be subject to the scope of the claims.

Claims (15)

  1. A method for controlling volume of a digital earphone, comprising:
    sending a control instruction and test audio data to a digital earphone connected with an electronic terminal;
    acquiring loopback audio data, which is fed back for the test audio data by the digital earphone in response to the control instruction; and
    adjusting an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
  2. The method according to claim 1, wherein the adjusting comprises:
    adjusting the audio gain of the electronic terminal based on a comparison result of the volume value of the loopback audio data and a preset volume value, to change the output volume of the digital earphone.
  3. The method according to claim 2, wherein the adjusting the audio gain of the electronic terminal comprises:
    determining a difference value between the volume value of the loopback audio data and the preset volume value;
    determining a gain adjustment value corresponding to the difference value; and
    changing the audio gain of the electronic terminal based on the determineed gain adjustment value.
  4. An electronic terminal, comprising:
    a first communication interface configured to send a control instruction and test audio data to a digital earphone connected with the digital earphone; and
    a processor, configured to:
    acquire loopback audio data fed back for the test audio data by the digital earphone in response to the control instruction; and
    adjust an audio gain of the electronic terminal based on a volume value of the acquired loopback audio data, to change output volume of the digital earphone.
  5. The electronic terminal according to claim 4, wherein the processor is configured to control the first communication interface to send the control instruction and the test audio data in response to:
    detecting that a connection is established between the electronic terminal and the digital earphone; and
    receiving a volume calibration control instruction.
  6. The electronic terminal according to claim 4, wherein the control instruction comprises a loopback instruction and an audio playback instruction,
    wherein the loopback instruction is used to control the digital earphone to play the test audio data in a loopback mode, to feed back the loopback audio data, and the audio playback instruction is used to control the digital earphone to play the test audio data.
  7. The electronic terminal according to claim 6, further comprising a microphone,
    wherein the processor is configured to acquire the loopback audio data, which is fed back for the test audio data by the digital earphone in response to the control instruction, by at least one of:
    receiving, based on the first communication interface, the loopback audio data from the digital earphone through the established connection; or
    collecting, through the microphone of the electronic terminal, the test audio data played by the digital earphone, and determining the collected test audio data as the loopback audio data.
  8. The electronic terminal according to claim 4, wherein the processor is configured to adjust the audio gain of the electronic terminal based on a comparison result of the volume value of the loopback audio data and a preset volume value, to change the output volume of the digital earphone.
  9. The electronic terminal according to claim 8, wherein the adjusting of the audio gain of the electronic terminal comprises:
    determining a difference value between the volume value of the loopback audio data and the preset volume value;
    determining a gain adjustment value corresponding to the difference value; and
    changing the audio gain of the electronic terminal based on the determined gain adjustment value.
  10. The electronic terminal according to claim 9, wherein the changing the audio gain of the electronic terminal based on the determined gain adjustment value comprises:
    determining whether the difference value is greater than zero;
    controlling, if the difference value is greater than zero, the audio gain of the electronic terminal to decrease by the gain adjustment value, to decrease the output volume of the digital earphone; and
    controlling, if the difference value is less than zero, the audio gain of the electronic terminal to increase by the gain adjustment value, to increase the output volume of the digital earphone.
  11. The electronic terminal according to claim 8, wherein the adjusting the audio gain of the electronic terminal comprises comparing cyclically the volume value of the loopback audio data with the preset volume value, and adjusting the audio gain of the electronic terminal based on a comparison result,
    wherein in each cycle, the processor is configured to perform:
    controlling the audio gain of the electronic terminal to change by a preset change amount when the difference value between the volume value of the loopback audio data and the preset volume value satisfies an adjustment condition, and exiting the cycle when the difference value between the volume value of the loopback audio data and the preset volume value does not satisfy the adjustment condition.
  12. The electronic terminal according to claim 11, wherein the adjustment condition comprises a first adjustment condition and a second adjustment condition, and the preset change amount comprises a first preset change amount and a second preset change amount, the first adjustment condition indicating that the difference value between the volume value of the loopback audio data and the preset volume value is greater than a first preset value, and the second adjustment condition indicating that the difference value between the volume value of the loopback audio data and the preset volume value is less than a second preset value,
    wherein the controlling the audio gain of the electronic terminal to change by a preset change amount comprises:
    controlling, if the difference value satisfies the first adjustment condition, the audio gain of the electronic terminal to decrease by the first preset change amount to decrease the output volume of the digital earphone; and
    controlling, if the difference value satisfies the second adjustment condition, the audio gain of the electronic terminal to increase by the second preset change amount to increase the output volume of the digital earphone.
  13. The electronic terminal according to claim 4, further comprising a storage module, wherein the storage module is configured to store a gain table corresponding to the digital earphone, and the gain table comprises a gain identifier and a plurality of audio gains, the gain identifier indicating an audio gain currently used by the electronic terminal,
    wherein the processor is further configured to:
    update, after the audio gain of the electronic terminal is adjusted, the gain identifier to indicate the adjusted audio gain, to cause the electronic terminal to transmit audio data to the digital earphone based on the updated gain table.
  14. A digital earphone, comprising:
    a communication interface configured to connect to an electronic terminal and receive a control instruction and test audio data from the electronic terminal, the control instruction comprising a loopback instruction; and
    an audio codec configured to:
    control the digital earphone to enter a loopback mode in response to the loopback instruction; and
    play the test audio data in the loopback mode to generate loopback audio data,
    wherein the communication interface is further configured to send the loopback audio data to the electronic terminal.
  15. A computer readable storage medium for storing a computer program, wherein the computer program is executable by a processor to implement the method for controlling volume of a digital earphone according to any one of claims 1-3.
PCT/KR2021/006614 2020-06-08 2021-05-27 Method for controlling volume of digital earphone, electronic terminal and digital earphone WO2021251660A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010512600.1A CN111666061A (en) 2020-06-08 2020-06-08 Method for controlling volume of digital earphone, electronic terminal and digital earphone
CN202010512600.1 2020-06-08

Publications (1)

Publication Number Publication Date
WO2021251660A1 true WO2021251660A1 (en) 2021-12-16

Family

ID=72385832

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/006614 WO2021251660A1 (en) 2020-06-08 2021-05-27 Method for controlling volume of digital earphone, electronic terminal and digital earphone

Country Status (2)

Country Link
CN (1) CN111666061A (en)
WO (1) WO2021251660A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023231113A1 (en) * 2022-05-30 2023-12-07 歌尔股份有限公司 Volume adjustment method and apparatus, and earphones, electronic device and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113238729B (en) * 2021-04-15 2024-04-30 Oppo广东移动通信有限公司 Headset volume determination method, headset, and computer-readable storage medium
CN113938781A (en) * 2021-08-27 2022-01-14 北京声智科技有限公司 Earphone-based holographic projection method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110191103A1 (en) * 2010-01-29 2011-08-04 Pantech Co., Ltd. Portable terminal to adjust sound output of wireless headset
US20130236023A1 (en) * 2012-03-08 2013-09-12 Harman International Industries, Incorporated System for headphone equalization
US20140064503A1 (en) * 2012-08-30 2014-03-06 Samsung Electronics Co., Ltd. Method and apparatus for controlling audio output
US8761383B2 (en) * 2012-03-30 2014-06-24 Gn Netcom A/S Telephone interface unit and a method of configuring headset system to telephone device
CN111107463A (en) * 2019-12-30 2020-05-05 广州由我科技股份有限公司 Wireless earphone switching method and device, wireless earphone and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4417316B2 (en) * 2005-10-14 2010-02-17 シャープ株式会社 Noise canceling headphones and feedback loop gain variation adjustment method thereof
CN105446697A (en) * 2015-12-31 2016-03-30 广东小天才科技有限公司 Method, device and system for automatically adjusting volume of headset
CN106131731B (en) * 2016-08-11 2022-06-14 歌尔股份有限公司 Processing circuit with monitoring and active noise reduction functions and earphone
CN110333841A (en) * 2019-07-05 2019-10-15 深圳市康冠技术有限公司 Method, audio processing modules, television set and the storage medium of audio output

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110191103A1 (en) * 2010-01-29 2011-08-04 Pantech Co., Ltd. Portable terminal to adjust sound output of wireless headset
US20130236023A1 (en) * 2012-03-08 2013-09-12 Harman International Industries, Incorporated System for headphone equalization
US8761383B2 (en) * 2012-03-30 2014-06-24 Gn Netcom A/S Telephone interface unit and a method of configuring headset system to telephone device
US20140064503A1 (en) * 2012-08-30 2014-03-06 Samsung Electronics Co., Ltd. Method and apparatus for controlling audio output
CN111107463A (en) * 2019-12-30 2020-05-05 广州由我科技股份有限公司 Wireless earphone switching method and device, wireless earphone and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023231113A1 (en) * 2022-05-30 2023-12-07 歌尔股份有限公司 Volume adjustment method and apparatus, and earphones, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN111666061A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
WO2021251660A1 (en) Method for controlling volume of digital earphone, electronic terminal and digital earphone
WO2013162329A1 (en) Apparatus and method for outputting audio
WO2013042968A2 (en) Method for providing a compensation service for characteristics of an audio device using a smart device
WO2014021670A1 (en) Mobile apparatus and control method thereof
WO2018076434A1 (en) Sound signal outputting method and device, and earphone state detecting method and device
WO2020050473A1 (en) Device and method for adaptively controlling preamble in uwb network
WO2014126365A1 (en) Terminal apparatus and method for time synchronization
WO2016159739A1 (en) Hearing aid allowing self-hearing test and fitting, and self-hearing test and fitting system using same
WO2021167387A1 (en) Electronic device and method for controlling audio output thereof
WO2019112357A1 (en) Electronic device for controlling volume level of audio signal on basis of states of multiple speakers
WO2021020686A1 (en) Headset electronic device and electronic device connected thereto
CN105741863B (en) The method and apparatus and mobile terminal that a kind of audio frequency of mobile terminal plays
WO2013187688A1 (en) Method for processing audio signal and audio signal processing apparatus adopting the same
WO2021096307A2 (en) Electronic device for performing communication connection to external electronic device and operation method thereof
WO2021010781A1 (en) Personalized headphone equalization
WO2011055926A2 (en) Apparatus and method for reproducing multi-sound channel contents using dlna in mobile terminal
WO2020048423A1 (en) Audio processing method, terminal, and computer-readable storage medium
WO2019083192A1 (en) Electronic device for determining noise control parameter on basis of network connection information and operating method thereof
WO2017010609A1 (en) Method for eliminating audio feedback and echo in headset, and computer program
WO2020130461A1 (en) Electronic apparatus and control method thereof
WO2016163610A1 (en) Electronic device
WO2019231112A1 (en) Earphone, and device and system for testing same earphone
WO2022191537A1 (en) Electronic device for providing calibration point and operation method thereof
WO2019107973A1 (en) Method and electronic device for processing audio signal on basis of resolution set on basis of volume of audio signal
WO2019004745A1 (en) Device and method for optimizing sound volume on basis of user and environment information

Legal Events

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

Ref document number: 21822826

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21822826

Country of ref document: EP

Kind code of ref document: A1