WO2022222292A1 - Power amplifier adaptation method, terminal device, storage medium and computer program product - Google Patents

Power amplifier adaptation method, terminal device, storage medium and computer program product Download PDF

Info

Publication number
WO2022222292A1
WO2022222292A1 PCT/CN2021/107981 CN2021107981W WO2022222292A1 WO 2022222292 A1 WO2022222292 A1 WO 2022222292A1 CN 2021107981 W CN2021107981 W CN 2021107981W WO 2022222292 A1 WO2022222292 A1 WO 2022222292A1
Authority
WO
WIPO (PCT)
Prior art keywords
power amplifier
terminal device
file
initialization
adaptation
Prior art date
Application number
PCT/CN2021/107981
Other languages
French (fr)
Chinese (zh)
Inventor
马连群
Original Assignee
深圳创维-Rgb电子有限公司
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 深圳创维-Rgb电子有限公司 filed Critical 深圳创维-Rgb电子有限公司
Publication of WO2022222292A1 publication Critical patent/WO2022222292A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Definitions

  • the present application relates to the technical field of power amplifier adaptation, and in particular, to a power amplifier adaptation method, a terminal device, a storage medium, and a computer program product.
  • TV products are not only for functions, but also for experience, including picture quality and sound quality.
  • sound quality if it is necessary to improve the sound quality, it is fundamentally necessary to adapt to a power amplifier with higher performance.
  • some TV products not only adapt to one power amplifier, but also adapt to multiple power amplifiers, or even Adapt to a variety of power amplifiers, including subwoofer amplifiers, etc.
  • the way of adapting power amplifiers in TV software is to directly rely on the underlying driver software, and initialize different power amplifiers according to different movement-models.
  • the software to adapt the power amplifier according to the movement and the model it is bound to add a lot of macro definitions to distinguish them, which not only increases the redundancy of the code, but also is not conducive to maintenance.
  • the main purpose of this application is to propose a power amplifier adaptation method, terminal equipment, storage medium and computer program product, aiming to solve the problem of complicated power amplifier software adaptation work, improve power amplifier adaptation compatibility and efficiency, and improve code consistency.
  • an embodiment of the present application provides a power amplifier adaptation method, the method includes the following steps:
  • the power amplifier configuration parameters are transmitted to the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
  • the method further includes:
  • the step of acquiring power amplifier configuration parameters adapted to the terminal device includes:
  • the power amplifier configuration file is parsed, and power amplifier configuration parameters adapted to the terminal device are obtained from the power amplifier configuration file.
  • the step of acquiring the power amplifier configuration parameters adapted to the terminal device when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, before the step of acquiring the power amplifier configuration parameters adapted to the terminal device further includes:
  • the corresponding power amplifier configuration parameters are configured for the cores or models of different terminal devices, and the power amplifier configuration file is generated.
  • the step of generating the power amplifier configuration file further includes:
  • the step of calling a preset power amplifier configuration file includes:
  • the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
  • the power amplifier configuration parameters include one or more of the following: power amplifier type, I2C bus ID where the power amplifier hardware is located, power amplifier device address, power amplifier reset pin, power amplifier initialization bin file storage path; and/or all The power amplifier configuration file is an ini file.
  • the power amplifier is a single power amplifier, or multiple power amplifiers of the same type, or multiple power amplifiers of different types.
  • an embodiment of the present application also proposes a terminal device, where the terminal device includes a memory, a processor, and a power amplifier adaptation program stored on the processor, when the power amplifier adaptation program is called by the processor Perform the steps of the method as described above.
  • the embodiment of the present application further proposes a computer-readable storage medium, where a power amplifier adaptation program is stored on the computer-readable storage medium, and the power amplifier adaptation program executes the above-mentioned when called by the processor. steps of the method.
  • an embodiment of the present application further proposes a computer program product, the computer program product includes a power amplifier adaptation program, and the power amplifier adaptation program executes the steps of the above-mentioned method when the power amplifier adaptation program is called by a processor.
  • the power amplifier adaptation method, terminal device, storage medium, and computer program product proposed in the embodiments of the present application acquire power amplifier configuration parameters adapted to the terminal device when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device;
  • the power amplifier configuration parameters are passed into the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
  • the power amplifier configuration parameters enable different core-models to perform different power-amplifier initialization operations, which solves the problem of complicated adaptation of the current power-amplifier software, and is compatible with different core-models under the condition that the operation codes such as power-amplifier initialization are common. Equipped with different power amplifiers, which simplifies the steps of adapting power amplifiers for different movement-models, improves the efficiency of power amplifier adaptation, improves code consistency and quality, and unifies the adaptation specifications of different power amplifiers.
  • Fig. 1 is the functional module schematic diagram of the power amplifier adaptation terminal equipment of the present application
  • FIG. 2 is a schematic flowchart of the first embodiment of the power amplifier adaptation method of the present application
  • FIG. 3 is a schematic flowchart of the second embodiment of the power amplifier adaptation method of the present application.
  • FIG. 4 is a schematic flowchart of a third embodiment of a power amplifier adaptation method of the present application.
  • FIG. 5 is a schematic diagram of a refinement process of an embodiment of a power amplifier adaptation method of the present application.
  • the main solutions of the embodiments of the present application are: when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device, obtain power amplifier configuration parameters adapted to the terminal device; and transmit the power amplifier configuration parameters to the terminal device, and write the corresponding power amplifier address, and perform power amplifier initialization operation on the terminal device.
  • the matching power amplifier configuration parameters can be input to the terminal device, so as to realize different core-models.
  • Perform the initialization operation of different power amplifiers which solves the problem of complicated adaptation of the current power amplifier software.
  • the operation codes such as power amplifier initialization are common
  • it is compatible with different cores - models can be adapted to different power amplifiers, thus simplifying different cores.
  • the steps of adapting the model to the power amplifier improve the efficiency of the power amplifier adaptation, improve the code consistency and quality, and unify the adaptation specifications of different power amplifiers
  • ini file ini is the abbreviation of English " initialization " (initialization).
  • the ini file format is an informal standard for configuration files on some platforms or software, consisting of sections and keys, and is commonly used in Microsoft Windows operating systems.
  • the file extension of this configuration file is mostly ini, and the ini file is used to initialize or set parameters for the operating system or a specific program.
  • mute/unmute mute/unmute.
  • the embodiments of the present application consider that, in the existing related solutions, the way of adapting the power amplifier in terms of TV software is to directly rely on the underlying driver software, and initialize different power amplifiers according to different core-models.
  • the software to adapt the power amplifier according to the movement and the model it is bound to add a lot of macro definitions to distinguish them, which not only increases the redundancy of the code, but also is not conducive to maintenance.
  • the solutions proposed in the embodiments of the present application can solve the problem of complicated adaptation of the current power amplifier software.
  • Under the condition of ensuring that the operation codes such as power amplifier initialization are common it is compatible with different cores and models to adapt to different power amplifiers, and at the same time, it simplifies the different The steps of the movement-model adaptation of the power amplifier, improve the efficiency of the power amplifier adaptation, and improve the code consistency.
  • the power amplifier adaptation mainly involves parameters such as the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier initialization bin file path and other parameters.
  • the actual power amplifier adaptation of the core-model, and the correct parameters can be passed in to complete the correct initialization of the power amplifier.
  • the present application can complete the work of adapting different core-models to different power amplifiers with the least amount of work under the condition of ensuring the consistency of the software codes, which not only improves the work efficiency, but also improves the quality of the software codes, unifying the different Amplifier adaptation specification.
  • FIG. 1 is a schematic diagram of functional modules of a power amplifier adapted to a terminal device of the present application.
  • the power amplifier adaptation terminal device may be an electronic device such as a TV set, a computer, etc. that realizes the power amplification effect.
  • a TV set is used as an example.
  • the power amplifier adaptation terminal device includes at least an output module 110, a processor 120, a memory 130, a communication module 140, and the like.
  • the memory 130 stores an operating system and a power amplifier adaptation program; the output module 110 may be a display screen, a speaker, and the like.
  • the communication module 140 may include a WIFI module, a Bluetooth module, etc., and communicate with an external device or a server through the communication module 140 .
  • the power amplifier configuration parameters are transmitted to the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
  • the power amplifier configuration file is parsed, and power amplifier configuration parameters adapted to the terminal device are obtained from the power amplifier configuration file.
  • the corresponding power amplifier configuration parameters are configured for the cores or models of different terminal devices, and the power amplifier configuration file is generated.
  • the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
  • the power amplifier configuration parameters adapted to the terminal device are obtained; the power amplifier configuration parameters are transmitted to the terminal device, and Write the corresponding power amplifier address, and perform the power amplifier initialization operation on the terminal device.
  • the corresponding power amplifier configuration parameters can be imported to the terminal device, so that different cores and models can be used for different power amplifiers.
  • the initialization operation solves the complicated problem of the current power amplifier software adaptation work. In the case of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with different core-models to adapt to different power amplifiers, thus simplifying the adaptation of different core-models.
  • the steps of matching power amplifiers improve the efficiency of power amplifier adaptation, improve code consistency and quality, and unify different power amplifier adaptation specifications.
  • the first embodiment of the present application proposes a power amplifier adaptation method, and the power amplifier adaptation method includes:
  • Step S10 when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, acquiring power amplifier configuration parameters adapted to the terminal device;
  • the terminal device in this embodiment includes, but is not limited to, electronic devices configured with power amplifiers, such as a television, a computer, and a music player.
  • a television is used as an example, but this does not constitute a limitation.
  • the terminal device When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the terminal device acquires power amplifier configuration parameters adapted to the terminal device.
  • the power amplifier configuration parameters include one or more parameters in the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the storage path of the power amplifier initialization data bin file.
  • the terminal device may be adapted to a single power amplifier, or multiple power amplifiers of the same type, or multiple power amplifiers of different types.
  • the solution of this embodiment mainly solves the problem of complicated adaptation of the existing power amplifier software. Under the condition of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with the core-model of different terminal equipment, and can be adapted to different power amplifiers, while simplifying different types of power amplifiers.
  • the steps of the movement-model adaptation of the power amplifier can improve the efficiency of the power amplifier adaptation and improve the consistency of the software code.
  • the power amplifier adaptation mainly involves the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, the power amplifier initialization bin file path and other parameters.
  • the parameters can be based on the actual power amplifier adaptation of different cores and models, and the correct parameters can be imported to complete the correct initialization of the power amplifier. In this way, it is possible to complete the work of adapting different core-models to different power amplifiers with the least amount of work under the condition that the software codes are consistent, which not only improves work efficiency, but also improves the quality of software codes and unifies different power amplifiers.
  • Adaptation specification is based on the actual power amplifier adaptation of different cores and models, and the correct parameters can be imported to complete the correct initialization of the power amplifier.
  • this embodiment mainly solves the problem that when different cores and models are initializing different power amplifiers, the related parameters of the power amplifier can be passed in, and then the software will send the corresponding power amplifier address according to the type of parameters passed in. Write the correct data, and then complete the operations such as stage initialization.
  • the power amplifier configuration parameters can be written into different configuration files in advance, and then the software can parse the configuration files to obtain the correct power amplifier configuration parameters, and then initialize the corresponding power amplifiers.
  • the parameters of the power amplifier can be stored in the ini file, and the relevant parameters can be obtained by parsing the ini file through software, so as to realize the operation of the power amplifier.
  • parse the power amplifier configuration file and obtain the power amplifier type suitable for the terminal device, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization bin file path from the power amplifier configuration file. and other power amplifier configuration parameters.
  • Step S20 the power amplifier configuration parameters are transferred to the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
  • the power amplifier configuration parameters such as the power amplifier type suitable for the terminal device, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, the power amplifier initialization bin file path and other power amplifier configuration parameters
  • the power amplifier configuration parameters are passed in the terminal device, and write the corresponding power amplifier address, and perform the power amplifier initialization operation on the terminal device.
  • the corresponding power amplifier configuration parameters can be configured for the cores or models of different terminal devices in advance.
  • the power amplifier configuration parameters such as the I2C bus ID where the hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization bin file path are transferred to the terminal device, and the corresponding power amplifier address is written to perform the power amplifier initialization operation on the terminal device.
  • the corresponding power amplifier configuration parameters can be configured for the cores or models of different terminal equipment, and a power amplifier configuration file can be generated, that is, the power amplifier type, the I2C bus ID where the power amplifier hardware is located, and the power amplifier device address can be configured. , power amplifier reset pin, power amplifier initialization bin file path and other power amplifier configuration parameters, according to the movement or model of different terminal equipment to configure the corresponding power amplifier configuration file.
  • the power amplifier configuration file can be loaded, and the power amplifier configuration file can be compiled to the system-specified path of the terminal device;
  • the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
  • the power amplifier configuration parameters adapted to the terminal device are obtained; the power amplifier configuration parameters are transmitted to the terminal device, and Write the corresponding power amplifier address, and perform the power amplifier initialization operation on the terminal device.
  • the corresponding power amplifier configuration parameters can be imported to the terminal device, so that different cores and models can be used for different power amplifiers.
  • the initialization operation solves the complicated problem of the current power amplifier software adaptation work. In the case of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with different core-models to adapt to different power amplifiers, thus simplifying the adaptation of different core-models.
  • the steps of matching power amplifiers improve the efficiency of power amplifier adaptation, improve code consistency and quality, and unify different power amplifier adaptation specifications.
  • a second embodiment of the present application proposes a power amplifier adaptation method. Based on the embodiment shown in FIG. 2 , the power amplifier adaptation method further includes:
  • Step S30 in response to the power amplifier control instruction for controlling the power amplifier of the terminal device, write fixed power amplifier data information to the mute control pin designated by the power amplifier device of the terminal device, so as to perform a power amplifier control operation on the terminal device.
  • a power amplifier control operation can be performed on the terminal device, for example, a Mute/UnMute operation is performed, and fixed data information is written to the Mute control pin designated by the power amplifier device of the terminal device. , in order to realize the power amplifier Mute/UnMute control operation.
  • the power amplifier configuration parameters adapted to the terminal device are obtained; the power amplifier configuration parameters are transmitted to the terminal device, and Write a corresponding power amplifier address, and perform a power amplifier initialization operation on the terminal device; in response to a power amplifier control instruction for performing power amplifier control on the terminal device, write a fixed power amplifier to the mute control pin designated by the power amplifier device of the terminal device data information to perform power amplifier control operation on the terminal device.
  • the scheme can transmit the power amplifier configuration parameters that are adapted to it to the terminal device, so as to realize the initialization operation of different power amplifiers for different cores and models, which solves the complicated problem of the current power amplifier software adaptation work.
  • common operation codes such as power amplifier initialization
  • it is compatible with different core models and different power amplifiers, which simplifies the steps of adapting power amplifiers between different core models and models, improves power amplifier adaptation efficiency, and improves code consistency. and quality, and unify the adaptation specifications of different power amplifiers.
  • a third embodiment of the present application proposes a method for adapting a power amplifier.
  • the power amplifier adaptation method further includes:
  • Step S101 configure corresponding power amplifier configuration parameters for the cores or models of different terminal devices, and generate the power amplifier configuration file.
  • Step S102 loading the power amplifier configuration file, and compiling the power amplifier configuration file to a system-specified path of the terminal device;
  • step S10 when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, invoking a preset power amplifier configuration file includes:
  • Step S100 when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device, calling the power amplifier configuration file from a system-specified path of the terminal device to parse the power amplifier configuration file.
  • the power amplifier adaptation mainly involves the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, the power amplifier initialization bin file path and other parameters.
  • the software is initializing the power amplifier, only It is necessary to ensure that the above parameters can be correctly initialized by inputting the correct parameters according to the actual power amplifier adaptation of different cores and models. In this way, it is possible to complete the work of adapting different core-models to different power amplifiers with the least amount of work under the condition that the software codes are consistent, which not only improves work efficiency, but also improves the quality of software codes and unifies different power amplifiers.
  • Adaptation specification is the software initializing the power amplifier.
  • This embodiment mainly solves the problem that when different core-models are initializing different power amplifiers, the related parameters of the power amplifier can be passed in, and then the software will write the correct data to the corresponding power amplifier address according to the type of parameters passed in. Then, operations such as the power amplifier initialization are completed.
  • the corresponding power amplifier configuration parameters can be configured for the cores or models of different terminal devices, and a power amplifier configuration file can be generated, that is, the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the Power amplifier configuration parameters, such as power amplifier device address, power amplifier reset pin, and power amplifier initialization bin file path, are configured into corresponding power amplifier configuration files according to the movement or model of different terminal equipment.
  • the power amplifier configuration file can be loaded, and the power amplifier configuration file can be compiled to the system-specified path of the terminal device;
  • the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
  • the power amplifier configuration parameters can be written into different configuration files in advance, and then the software can parse the configuration files to obtain the correct power amplifier configuration parameters, and then perform operations such as initialization of the corresponding power amplifier.
  • the power amplifier configuration file is an ini file.
  • the configuration parameters of the power amplifier can be stored in the ini file, and the relevant parameters can be obtained by parsing the ini file through software, so as to realize the operation of the power amplifier.
  • parse the power amplifier configuration file and obtain the power amplifier type suitable for the terminal device, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization bin file path from the power amplifier configuration file. Wait for the power amplifier configuration parameters, and perform power amplifier initialization operation on the terminal equipment.
  • FIG. 5 is a detailed flow chart of the power amplifier control in this embodiment, and the system control architecture mainly involves the upper and lower calling modules of the power amplifier control module.
  • the SKYHAL_AMP module parses the content of the power amplifier ini configuration file, and then continues to operate the corresponding power amplifier driver of the SkyHal Common Amp module according to the configuration information.
  • the power amplifier adaptation method in this embodiment is common to all platforms. This method is simple in configuration, common in software codes, and easy to maintain. The advantages of this method can be better reflected when the same platform needs to be adapted to multiple power amplifiers or multiple power amplifiers. And the implementation process is shown in the power amplifier control flow chart in Figure 5, and the specific process is as follows:
  • the configuration content mainly includes the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization data bin storage path according to the hardware circuit diagram.
  • the ini configuration file varies according to the actual functional requirements of different products, for example, it can be a single power amplifier, multiple power amplifiers of the same type, or multiple power amplifiers of different types;
  • the ini amplifier configuration file will compile the amp.ini file to the specified path when the software is compiled and integrated. This path is different for different machines with different screens. In this embodiment, the path of the amp.ini is obtained through the software. , in order to perform normal parsing of the amp.ini configuration file;
  • S3 Parse the amp.ini file.
  • the software obtains the correct information of the power amplifier configuration by matching the name strings of different configuration items in the amp.ini, so that the correct data information can be written into the power amplifier later;
  • S4 Initialize the power amplifier operation. According to the relevant configuration information obtained by parsing the ini power amplifier configuration file, write all the data information in the bin file to the corresponding address, and complete the power amplifier initialization operation.
  • the written data is mainly written through I2C;
  • the solution of this embodiment mainly obtains the configuration information related to the power amplifier by parsing the ini power amplifier configuration file, including the power amplifier type, device address, I2C bus ID and other information, and writes the correct data information to the specified address through the I2C read and write operation.
  • the solution of this embodiment can meet the requirements of adapting multiple or even multiple power amplifiers for different cores and models only by changing the configuration parameters in the ini file.
  • the software compatible with the power amplifier adaptation of different movement-models, but also compatible with the power amplifier adaptation of different solution platforms (such as HISI, MTK, Amlogic, etc.)
  • the first-level power amplifier operation interface can be encapsulated below the layer, thereby realizing the standardization and unity of the code.
  • the solution of this embodiment is applicable to all relevant platforms to perform power amplifier related operations, and the software operates the corresponding power amplifier by parsing the configuration content of the ini file.
  • This method can not only be applied to power amplifier adaptation, but also can be used in different TV lighting effects, such as breathing light effects, flickering effects, etc. All requirements can be configured through ini files.
  • the software uses the same set of codes to achieve differentiated requirements management through ini file configuration. This solution is not only conducive to software code maintenance, but also makes the adaptation of customized functions easier.
  • the solution in this embodiment mainly optimizes and improves the software design, improves code versatility and inheritability, improves software maintainability, and simplifies power amplifier adaptation work.
  • the power amplifier adaptation work of different products can be realized only by modifying the information of different configuration items of the power amplifier ini file, thereby realizing the self-adaptation of the power amplifier adaptation.
  • an embodiment of the present application also proposes a terminal device, where the terminal device includes a memory, a processor, and a power amplifier adaptation program stored on the processor, when the power amplifier adaptation program is called by the processor
  • the terminal device includes a memory, a processor, and a power amplifier adaptation program stored on the processor, when the power amplifier adaptation program is called by the processor
  • an embodiment of the present application also proposes a computer-readable storage medium, where a power amplifier adaptation program is stored on the computer-readable storage medium, and when the power amplifier adaptation program is called by a processor, the above-mentioned embodiment is executed.
  • a power amplifier adaptation program is stored on the computer-readable storage medium, and when the power amplifier adaptation program is called by a processor, the above-mentioned embodiment is executed.
  • an embodiment of the present application also proposes a computer program product, where the computer program product includes a power amplifier adaptation program, and when the power amplifier adaptation program is invoked by a processor, the steps of the methods described in the above embodiments are executed, and the functions of the power amplifier adaptation program are executed.
  • the computer program product includes a power amplifier adaptation program, and when the power amplifier adaptation program is invoked by a processor, the steps of the methods described in the above embodiments are executed, and the functions of the power amplifier adaptation program are executed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Amplifiers (AREA)

Abstract

Disclosed in the present application are a power amplifier adaptation method, a terminal device, a storage medium and a computer program product. The method comprises: when a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device is received, acquiring a power amplifier configuration parameter adapted to the terminal device; and transmitting the power amplifier configuration parameter to the terminal device, writing same into a corresponding power amplifier address, and performing the power amplifier initialization operation on the terminal device.

Description

功放适配方法、终端设备、存储介质及计算机程序产品Power amplifier adaptation method, terminal device, storage medium and computer program product
本申请要求于2021年4月23日申请的、申请号为202110442380.4的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with application number 202110442380.4 filed on April 23, 2021, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及功放适配技术领域,尤其涉及一种功放适配方法、终端设备、存储介质及计算机程序产品。The present application relates to the technical field of power amplifier adaptation, and in particular, to a power amplifier adaptation method, a terminal device, a storage medium, and a computer program product.
背景技术Background technique
随着生活水平的提高,人们对生活刚需产品的要求也逐渐提升,例如电视机产品不仅仅只是针对功能,在体验感方面要求也不断提升,包括画质和音质。在音质方面,若需要提升音质效果,从根本上需要适配性能较高的功放,部分电视机产品为了提升音质效果和性能,不仅仅只适配一个功放,有些会适配多个功放,甚至适配多种功放,包括重低音功放等。With the improvement of living standards, people's requirements for products that are just needed in life are gradually increasing. For example, TV products are not only for functions, but also for experience, including picture quality and sound quality. In terms of sound quality, if it is necessary to improve the sound quality, it is fundamentally necessary to adapt to a power amplifier with higher performance. In order to improve the sound quality and performance, some TV products not only adapt to one power amplifier, but also adapt to multiple power amplifiers, or even Adapt to a variety of power amplifiers, including subwoofer amplifiers, etc.
目前,电视机软件方面适配功放的方式是直接依赖底层驱动软件,根据不同的机芯-机型,初始化不同的功放。然而,在软件中根据机芯-机型做功放适配,势必会增加很多宏定义来加以区分,这样不仅增加了代码的冗余性,而且不利于维护。At present, the way of adapting power amplifiers in TV software is to directly rely on the underlying driver software, and initialize different power amplifiers according to different movement-models. However, in the software to adapt the power amplifier according to the movement and the model, it is bound to add a lot of macro definitions to distinguish them, which not only increases the redundancy of the code, but also is not conducive to maintenance.
技术问题technical problem
本申请的主要目的在于提出一种功放适配方法、终端设备、存储介质及计算机程序产品,旨在解决功放软件适配工作繁杂的问题,提升功放适配兼容性及效率,提高代码一致性。The main purpose of this application is to propose a power amplifier adaptation method, terminal equipment, storage medium and computer program product, aiming to solve the problem of complicated power amplifier software adaptation work, improve power amplifier adaptation compatibility and efficiency, and improve code consistency.
技术解决方案technical solutions
为实现上述目的,本申请实施例提供一种功放适配方法,所述方法包括以下步骤:To achieve the above purpose, an embodiment of the present application provides a power amplifier adaptation method, the method includes the following steps:
在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, acquiring power amplifier configuration parameters adapted to the terminal device;
将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作。The power amplifier configuration parameters are transmitted to the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
在一实施例中,所述方法还包括:In one embodiment, the method further includes:
响应对所述终端设备进行功放控制的功放控制指令,向所述终端设备的功放器件指定的静音控制引脚写入固定的功放数据信息,以对所述终端设备进行功放控制操作。In response to the power amplifier control instruction for controlling the power amplifier of the terminal device, write fixed power amplifier data information to the mute control pin designated by the power amplifier device of the terminal device, so as to perform the power amplifier control operation on the terminal device.
在一实施例中,所述在接收到对终端设备的功放进行初始化的功放初始化指令时,获取与所述终端设备适配的功放配置参数的步骤包括:In an embodiment, when receiving a power amplifier initialization instruction for initializing a power amplifier of a terminal device, the step of acquiring power amplifier configuration parameters adapted to the terminal device includes:
在接收到对终端设备进行功放初始化操作的功放初始化指令时,调用预设的功放配置文件;When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, call the preset power amplifier configuration file;
解析所述功放配置文件,从所述功放配置文件中获取与所述终端设备适配的功放配置参数。The power amplifier configuration file is parsed, and power amplifier configuration parameters adapted to the terminal device are obtained from the power amplifier configuration file.
在一实施例中,所述在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数的步骤之前还包括:In an embodiment, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, before the step of acquiring the power amplifier configuration parameters adapted to the terminal device further includes:
为不同的终端设备的机芯或机型配置对应的功放配置参数,生成所述功放配置文件。The corresponding power amplifier configuration parameters are configured for the cores or models of different terminal devices, and the power amplifier configuration file is generated.
在一实施例中,所述为不同的终端设备的机芯或机型配置对应的功放配置参数,生成所述功放配置文件的步骤之后还包括:In one embodiment, after configuring the corresponding power amplifier configuration parameters for the cores or models of different terminal devices, the step of generating the power amplifier configuration file further includes:
加载所述功放配置文件,将所述功放配置文件编译到所述终端设备的系统指定路径;Loading the power amplifier configuration file, and compiling the power amplifier configuration file to the system-specified path of the terminal device;
所述在接收到对终端设备进行功放初始化操作的功放初始化指令时,调用预设的功放配置文件的步骤包括:When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the step of calling a preset power amplifier configuration file includes:
在接收到对终端设备进行功放初始化操作的功放初始化指令时,从所述终端设备的系统指定路径调用所述功放配置文件,以对所述功放配置文件进行解析。When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
在一实施例中,所述功放配置参数包括以下一种或多种:功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚,功放初始化bin文件存放路径;和/或所述功放配置文件为ini文件。In one embodiment, the power amplifier configuration parameters include one or more of the following: power amplifier type, I2C bus ID where the power amplifier hardware is located, power amplifier device address, power amplifier reset pin, power amplifier initialization bin file storage path; and/or all The power amplifier configuration file is an ini file.
在一实施例中,所述功放为单个功放、或者多个相同类型的功放、或者多个不同类型的功放。In an embodiment, the power amplifier is a single power amplifier, or multiple power amplifiers of the same type, or multiple power amplifiers of different types.
此外,本申请实施例还提出一种终端设备,所述终端设备包括存储器、处理器、以及存储在所述处理器上的功放适配程序,所述功放适配程序被所述处理器调用时执行如上所述的方法的步骤。In addition, an embodiment of the present application also proposes a terminal device, where the terminal device includes a memory, a processor, and a power amplifier adaptation program stored on the processor, when the power amplifier adaptation program is called by the processor Perform the steps of the method as described above.
为实现上述目的,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有功放适配程序,所述功放适配程序被处理器调用时执行如上所述的方法的步骤。In order to achieve the above purpose, the embodiment of the present application further proposes a computer-readable storage medium, where a power amplifier adaptation program is stored on the computer-readable storage medium, and the power amplifier adaptation program executes the above-mentioned when called by the processor. steps of the method.
为实现上述目的,本申请实施例还提出一种计算机程序产品,所述计算机程序产品包括功放适配程序,所述功放适配程序被处理器调用时执行如上所述的方法的步骤。In order to achieve the above object, an embodiment of the present application further proposes a computer program product, the computer program product includes a power amplifier adaptation program, and the power amplifier adaptation program executes the steps of the above-mentioned method when the power amplifier adaptation program is called by a processor.
有益效果beneficial effect
本申请实施例提出的功放适配方法、终端设备、存储介质及计算机程序产品,在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作,该方案在进行功放初始化时,可以向终端设备传入与之适配的功放配置参数,实现不同机芯-机型进行不同功放初始化操作,解决了目前功放软件适配工作繁杂的问题,在确保功放初始化等操作代码通用的情况下,兼容不同机芯-机型可以适配不同的功放,从而简化了不同机芯-机型适配功放的步骤,提升了功放适配效率,提高了代码一致性和质量,统一了不同功放适配规范。The power amplifier adaptation method, terminal device, storage medium, and computer program product proposed in the embodiments of the present application acquire power amplifier configuration parameters adapted to the terminal device when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device; The power amplifier configuration parameters are passed into the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device. The power amplifier configuration parameters enable different core-models to perform different power-amplifier initialization operations, which solves the problem of complicated adaptation of the current power-amplifier software, and is compatible with different core-models under the condition that the operation codes such as power-amplifier initialization are common. Equipped with different power amplifiers, which simplifies the steps of adapting power amplifiers for different movement-models, improves the efficiency of power amplifier adaptation, improves code consistency and quality, and unifies the adaptation specifications of different power amplifiers.
附图说明Description of drawings
图1是本申请功放适配终端设备的功能模块示意图;Fig. 1 is the functional module schematic diagram of the power amplifier adaptation terminal equipment of the present application;
图2是本申请功放适配方法第一实施例的流程示意图;FIG. 2 is a schematic flowchart of the first embodiment of the power amplifier adaptation method of the present application;
图3是本申请功放适配方法第二实施例的流程示意图;3 is a schematic flowchart of the second embodiment of the power amplifier adaptation method of the present application;
图4是本申请功放适配方法第三实施例的流程示意图;4 is a schematic flowchart of a third embodiment of a power amplifier adaptation method of the present application;
图5是本申请功放适配方法实施例的细化流程示意图。FIG. 5 is a schematic diagram of a refinement process of an embodiment of a power amplifier adaptation method of the present application.
本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional features and advantages of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.
本发明的实施方式Embodiments of the present invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请实施例的主要解决方案是:在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作,该方案在进行功放初始化时,可以向终端设备传入与之适配的功放配置参数,实现不同机芯-机型进行不同功放初始化操作,解决了目前功放软件适配工作繁杂的问题,在确保功放初始化等操作代码通用的情况下,兼容不同机芯-机型可以适配不同的功放,从而简化了不同机芯-机型适配功放的步骤,提升了功放适配效率,提高了代码一致性和质量,统一了不同功放适配规范The main solutions of the embodiments of the present application are: when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device, obtain power amplifier configuration parameters adapted to the terminal device; and transmit the power amplifier configuration parameters to the terminal device, and write the corresponding power amplifier address, and perform power amplifier initialization operation on the terminal device. In this scheme, when the power amplifier is initialized, the matching power amplifier configuration parameters can be input to the terminal device, so as to realize different core-models. Perform the initialization operation of different power amplifiers, which solves the problem of complicated adaptation of the current power amplifier software. In the case of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with different cores - models can be adapted to different power amplifiers, thus simplifying different cores. -The steps of adapting the model to the power amplifier improve the efficiency of the power amplifier adaptation, improve the code consistency and quality, and unify the adaptation specifications of different power amplifiers
本申请实施例涉及的技术术语:Technical terms involved in the embodiments of this application:
ini文件,ini是英文“ initialization”(初始化)的缩写。ini文件格式是某些平台或软件上的配置文件的非正式标准,以节(section)和键(key)构成,常用于微软Windows操作系统中。这种配置文件的文件扩展名多为ini,ini文件被用来对操作系统或特定程序初始化或进行参数设置。 ini file, ini is the abbreviation of English " initialization " (initialization). The ini file format is an informal standard for configuration files on some platforms or software, consisting of sections and keys, and is commonly used in Microsoft Windows operating systems. The file extension of this configuration file is mostly ini, and the ini file is used to initialize or set parameters for the operating system or a specific program.
mute/unmute:静音/取消静音。mute/unmute: mute/unmute.
本申请实施例考虑到,现有相关方案中,电视机软件方面适配功放的方式是直接依赖底层驱动软件,根据不同的机芯-机型,初始化不同的功放。然而,在软件中根据机芯-机型做功放适配,势必会增加很多宏定义来加以区分,这样不仅增加了代码的冗余性,而且不利于维护。The embodiments of the present application consider that, in the existing related solutions, the way of adapting the power amplifier in terms of TV software is to directly rely on the underlying driver software, and initialize different power amplifiers according to different core-models. However, in the software to adapt the power amplifier according to the movement and the model, it is bound to add a lot of macro definitions to distinguish them, which not only increases the redundancy of the code, but also is not conducive to maintenance.
因此,本申请实施例提出解决方案,可以解决目前功放软件适配工作繁杂的问题,在确保功放初始化等操作代码通用的情况下,兼容不同机芯-机型适配不同的功放,同时简化不同机芯-机型适配功放的步骤,提升功放适配效率,提高代码一致性。Therefore, the solutions proposed in the embodiments of the present application can solve the problem of complicated adaptation of the current power amplifier software. Under the condition of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with different cores and models to adapt to different power amplifiers, and at the same time, it simplifies the different The steps of the movement-model adaptation of the power amplifier, improve the efficiency of the power amplifier adaptation, and improve the code consistency.
其中,功放适配主要涉及功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放初始化bin文件路径等等参数,本申请方案通过软件进行功放初始化时,只需要确保上述参数可以根据不同机芯-机型实际功放适配情况,传入正确的参数,即可完成功放正确初始化。如此,本申请可以在确保软件代码一致的情况下,以最少工作量完成不同机芯-机型适配不同功放的工作,不仅仅提升了工作效率,同时也提高了软件代码质量,统一了不同功放适配规范。Among them, the power amplifier adaptation mainly involves parameters such as the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier initialization bin file path and other parameters. The actual power amplifier adaptation of the core-model, and the correct parameters can be passed in to complete the correct initialization of the power amplifier. In this way, the present application can complete the work of adapting different core-models to different power amplifiers with the least amount of work under the condition of ensuring the consistency of the software codes, which not only improves the work efficiency, but also improves the quality of the software codes, unifying the different Amplifier adaptation specification.
具体地,参照图1,图1为本申请功放适配终端设备的功能模块示意图。该功放适配终端设备可以为电视机、电脑等实现功放效果的电子设备,本实施例以电视机进行举例。Specifically, referring to FIG. 1 , FIG. 1 is a schematic diagram of functional modules of a power amplifier adapted to a terminal device of the present application. The power amplifier adaptation terminal device may be an electronic device such as a TV set, a computer, etc. that realizes the power amplification effect. In this embodiment, a TV set is used as an example.
在本实施例中,该功放适配终端设备至少包括输出模块110、处理器120、存储器130、以及通信模块140等。In this embodiment, the power amplifier adaptation terminal device includes at least an output module 110, a processor 120, a memory 130, a communication module 140, and the like.
存储器130中存储有操作系统以及功放适配程序;输出模块110可为显示屏、扬声器等。通信模块140可以包括WIFI模块以及蓝牙模块等,通过通信模块140与外部设备或服务器进行通信。The memory 130 stores an operating system and a power amplifier adaptation program; the output module 110 may be a display screen, a speaker, and the like. The communication module 140 may include a WIFI module, a Bluetooth module, etc., and communicate with an external device or a server through the communication module 140 .
其中,作为一种实施例方式,存储器130中的功放适配程序被处理器执行时实现以下步骤:Wherein, as an embodiment, when the power amplifier adaptation program in the memory 130 is executed by the processor, the following steps are implemented:
在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, acquiring power amplifier configuration parameters adapted to the terminal device;
将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作。The power amplifier configuration parameters are transmitted to the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
进一步地,存储器130中的功放适配程序被处理器执行时还实现以下步骤:Further, when the power amplifier adaptation program in the memory 130 is executed by the processor, the following steps are also implemented:
响应对所述终端设备进行功放控制的功放控制指令,向所述终端设备的功放器件指定的静音控制引脚写入固定的功放数据信息,以对所述终端设备进行功放控制操作。In response to the power amplifier control instruction for controlling the power amplifier of the terminal device, write fixed power amplifier data information to the mute control pin designated by the power amplifier device of the terminal device, so as to perform the power amplifier control operation on the terminal device.
进一步地,存储器130中的功放适配程序被处理器执行时还实现以下步骤:Further, when the power amplifier adaptation program in the memory 130 is executed by the processor, the following steps are also implemented:
在接收到对终端设备进行功放初始化操作的功放初始化指令时,调用预设的功放配置文件;When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, call the preset power amplifier configuration file;
解析所述功放配置文件,从所述功放配置文件中获取与所述终端设备适配的功放配置参数。The power amplifier configuration file is parsed, and power amplifier configuration parameters adapted to the terminal device are obtained from the power amplifier configuration file.
进一步地,存储器130中的功放适配程序被处理器执行时还实现以下步骤:Further, when the power amplifier adaptation program in the memory 130 is executed by the processor, the following steps are also implemented:
为不同的终端设备的机芯或机型配置对应的功放配置参数,生成所述功放配置文件。The corresponding power amplifier configuration parameters are configured for the cores or models of different terminal devices, and the power amplifier configuration file is generated.
进一步地,存储器130中的功放适配程序被处理器执行时还实现以下步骤:Further, when the power amplifier adaptation program in the memory 130 is executed by the processor, the following steps are also implemented:
加载所述功放配置文件,将所述功放配置文件编译到所述终端设备的系统指定路径;Loading the power amplifier configuration file, and compiling the power amplifier configuration file to the system-specified path of the terminal device;
在接收到对终端设备进行功放初始化操作的功放初始化指令时,从所述终端设备的系统指定路径调用所述功放配置文件,以对所述功放配置文件进行解析。When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
本实施例通过上述方案,在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作,该方案在进行功放初始化时,可以向终端设备传入与之适配的功放配置参数,实现不同机芯-机型进行不同功放初始化操作,解决了目前功放软件适配工作繁杂的问题,在确保功放初始化等操作代码通用的情况下,兼容不同机芯-机型适配不同的功放,从而简化了不同机芯-机型适配功放的步骤,提升了功放适配效率,提高了代码一致性和质量,统一了不同功放适配规范。In this embodiment, through the above solution, when a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device is received, the power amplifier configuration parameters adapted to the terminal device are obtained; the power amplifier configuration parameters are transmitted to the terminal device, and Write the corresponding power amplifier address, and perform the power amplifier initialization operation on the terminal device. In this scheme, when the power amplifier is initialized, the corresponding power amplifier configuration parameters can be imported to the terminal device, so that different cores and models can be used for different power amplifiers. The initialization operation solves the complicated problem of the current power amplifier software adaptation work. In the case of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with different core-models to adapt to different power amplifiers, thus simplifying the adaptation of different core-models. The steps of matching power amplifiers improve the efficiency of power amplifier adaptation, improve code consistency and quality, and unify different power amplifier adaptation specifications.
基于上述终端设备架构,提出本申请功放适配方法实施例。Based on the above-mentioned terminal device architecture, an embodiment of the power amplifier adaptation method of the present application is proposed.
具体地,如图2所示,本申请第一实施例提出一种功放适配方法,该功放适配方法包括:Specifically, as shown in FIG. 2 , the first embodiment of the present application proposes a power amplifier adaptation method, and the power amplifier adaptation method includes:
步骤S10,在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;Step S10, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, acquiring power amplifier configuration parameters adapted to the terminal device;
其中,本实施例终端设备包括但不限于电视机、电脑、音乐播放器等配置功放的电子设备,本实施例以电视机进行举例,但并不对此构成限制。The terminal device in this embodiment includes, but is not limited to, electronic devices configured with power amplifiers, such as a television, a computer, and a music player. In this embodiment, a television is used as an example, but this does not constitute a limitation.
在终端设备上安装功放适配应用软件,在需要对终端设备进行功放初始化操作时,在终端设备的放适配应用软件上触发功放初始化指令。Install the power amplifier adaptation application software on the terminal device, and trigger the power amplifier initialization instruction on the amplifier adaptation application software of the terminal device when the power amplifier initialization operation needs to be performed on the terminal device.
终端设备在接收到对该终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数。When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the terminal device acquires power amplifier configuration parameters adapted to the terminal device.
其中,功放配置参数包括功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化数据bin文件存放路径中的一种或多种参数。The power amplifier configuration parameters include one or more parameters in the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the storage path of the power amplifier initialization data bin file.
其中,终端设备可以适配单个功放、或者多个相同类型的功放、或者多个不同类型的功放。The terminal device may be adapted to a single power amplifier, or multiple power amplifiers of the same type, or multiple power amplifiers of different types.
本实施例方案主要解决现有功放软件适配工作繁杂的问题,在确保功放初始化等操作代码通用的情况下,兼容不同终端设备的机芯-机型,可以适配不同的功放,同时简化不同机芯-机型适配功放的步骤,提升功放适配效率,也提高软件代码一致性。The solution of this embodiment mainly solves the problem of complicated adaptation of the existing power amplifier software. Under the condition of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with the core-model of different terminal equipment, and can be adapted to different power amplifiers, while simplifying different types of power amplifiers. The steps of the movement-model adaptation of the power amplifier can improve the efficiency of the power amplifier adaptation and improve the consistency of the software code.
如前所述,功放适配主要涉及功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等等参数,软件在做功放初始化时,只需要确保上述参数可以根据不同机芯-机型实际功放适配情况,传入正确的参数,即可完成功放正确初始化。如此,则可以在确保软件代码一致的情况下,以最少工作量完成不同机芯-机型适配不同功放的工作,不仅仅提升了工作效率,同时也提高了软件代码质量,统一了不同功放适配规范。As mentioned above, the power amplifier adaptation mainly involves the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, the power amplifier initialization bin file path and other parameters. When the software initializes the power amplifier, it only needs to ensure the above parameters. The parameters can be based on the actual power amplifier adaptation of different cores and models, and the correct parameters can be imported to complete the correct initialization of the power amplifier. In this way, it is possible to complete the work of adapting different core-models to different power amplifiers with the least amount of work under the condition that the software codes are consistent, which not only improves work efficiency, but also improves the quality of software codes and unifies different power amplifiers. Adaptation specification.
结合以上的设计思路,本实施例主要解决不同机芯-机型在做不同功放初始化时,可以传入与之匹配的功放相关参数,然后软件会根据传入的参数类型,向对应的功放地址写入正确的数据,进而完成功放初始化等操作。Combining the above design ideas, this embodiment mainly solves the problem that when different cores and models are initializing different power amplifiers, the related parameters of the power amplifier can be passed in, and then the software will send the corresponding power amplifier address according to the type of parameters passed in. Write the correct data, and then complete the operations such as stage initialization.
在传入功放配置参数时,可以预先将功放配置参数写入不同的配置文件,然后通过软件解析配置文件来获取正确的功放配置参数,进而对相应的功放进行初始化等操作。When the power amplifier configuration parameters are passed in, the power amplifier configuration parameters can be written into different configuration files in advance, and then the software can parse the configuration files to obtain the correct power amplifier configuration parameters, and then initialize the corresponding power amplifiers.
作为一种实施方式,在本实施例方案中,可以将功放参数存放到ini文件里面,通过软件解析ini文件来获取相关参数,实现对功放进行操作。As an implementation manner, in the solution of this embodiment, the parameters of the power amplifier can be stored in the ini file, and the relevant parameters can be obtained by parsing the ini file through software, so as to realize the operation of the power amplifier.
具体地,在接收到对终端设备进行功放初始化操作的功放初始化指令时,调用预设的功放配置文件;Specifically, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, calling a preset power amplifier configuration file;
然后,解析所述功放配置文件,从所述功放配置文件中获取与所述终端设备适配的功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等功放配置参数。Then, parse the power amplifier configuration file, and obtain the power amplifier type suitable for the terminal device, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization bin file path from the power amplifier configuration file. and other power amplifier configuration parameters.
步骤S20,将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作。Step S20, the power amplifier configuration parameters are transferred to the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
在获取到与所述终端设备适配的功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等功放配置参数后,将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作。After obtaining the power amplifier configuration parameters such as the power amplifier type suitable for the terminal device, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, the power amplifier initialization bin file path and other power amplifier configuration parameters, the power amplifier configuration parameters are passed in the terminal device, and write the corresponding power amplifier address, and perform the power amplifier initialization operation on the terminal device.
具体地,作为一种实施例方式,可以预先为不同的终端设备的机芯或机型配置对应的功放配置参数,在进行功放初始化操作时,将与所述终端设备适配的功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作。Specifically, as an embodiment, the corresponding power amplifier configuration parameters can be configured for the cores or models of different terminal devices in advance. The power amplifier configuration parameters such as the I2C bus ID where the hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization bin file path are transferred to the terminal device, and the corresponding power amplifier address is written to perform the power amplifier initialization operation on the terminal device.
作为另一种实施例方式,可以为不同的终端设备的机芯或机型配置对应的功放配置参数,并生成功放配置文件,即可以将功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等功放配置参数,根据不同的终端设备的机芯或机型配置成相应的功放配置文件。As another embodiment, the corresponding power amplifier configuration parameters can be configured for the cores or models of different terminal equipment, and a power amplifier configuration file can be generated, that is, the power amplifier type, the I2C bus ID where the power amplifier hardware is located, and the power amplifier device address can be configured. , power amplifier reset pin, power amplifier initialization bin file path and other power amplifier configuration parameters, according to the movement or model of different terminal equipment to configure the corresponding power amplifier configuration file.
然后,可以加载所述功放配置文件,将所述功放配置文件编译到所述终端设备的系统指定路径;Then, the power amplifier configuration file can be loaded, and the power amplifier configuration file can be compiled to the system-specified path of the terminal device;
在接收到对终端设备进行功放初始化操作的功放初始化指令时,从所述终端设备的系统指定路径调用所述功放配置文件,以对所述功放配置文件进行解析。When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
本实施例通过上述方案,在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作,该方案在进行功放初始化时,可以向终端设备传入与之适配的功放配置参数,实现不同机芯-机型进行不同功放初始化操作,解决了目前功放软件适配工作繁杂的问题,在确保功放初始化等操作代码通用的情况下,兼容不同机芯-机型适配不同的功放,从而简化了不同机芯-机型适配功放的步骤,提升了功放适配效率,提高了代码一致性和质量,统一了不同功放适配规范。In this embodiment, through the above solution, when a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device is received, the power amplifier configuration parameters adapted to the terminal device are obtained; the power amplifier configuration parameters are transmitted to the terminal device, and Write the corresponding power amplifier address, and perform the power amplifier initialization operation on the terminal device. In this scheme, when the power amplifier is initialized, the corresponding power amplifier configuration parameters can be imported to the terminal device, so that different cores and models can be used for different power amplifiers. The initialization operation solves the complicated problem of the current power amplifier software adaptation work. In the case of ensuring that the operation codes such as power amplifier initialization are common, it is compatible with different core-models to adapt to different power amplifiers, thus simplifying the adaptation of different core-models. The steps of matching power amplifiers improve the efficiency of power amplifier adaptation, improve code consistency and quality, and unify different power amplifier adaptation specifications.
如图3所示,本申请第二实施例提出一种功放适配方法,基于上述图2所示的实施例,该功放适配方法还包括:As shown in FIG. 3 , a second embodiment of the present application proposes a power amplifier adaptation method. Based on the embodiment shown in FIG. 2 , the power amplifier adaptation method further includes:
步骤S30,响应对所述终端设备进行功放控制的功放控制指令,向所述终端设备的功放器件指定的静音控制引脚写入固定的功放数据信息,以对所述终端设备进行功放控制操作。Step S30, in response to the power amplifier control instruction for controlling the power amplifier of the terminal device, write fixed power amplifier data information to the mute control pin designated by the power amplifier device of the terminal device, so as to perform a power amplifier control operation on the terminal device.
具体地,在完成对终端设备的功放初始化操作后,可以对所述终端设备进行功放控制操作,比如进行Mute/UnMute操作,向终端设备的功放器件指定的Mute控制引脚写入固定的数据信息,以实现功放Mute/UnMute控制操作。Specifically, after the power amplifier initialization operation on the terminal device is completed, a power amplifier control operation can be performed on the terminal device, for example, a Mute/UnMute operation is performed, and fixed data information is written to the Mute control pin designated by the power amplifier device of the terminal device. , in order to realize the power amplifier Mute/UnMute control operation.
本实施例通过上述方案,在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作;响应对所述终端设备进行功放控制的功放控制指令,向所述终端设备的功放器件指定的静音控制引脚写入固定的功放数据信息,以对所述终端设备进行功放控制操作。该方案在进行功放初始化时,可以向终端设备传入与之适配的功放配置参数,实现不同机芯-机型进行不同功放初始化操作,解决了目前功放软件适配工作繁杂的问题,在确保功放初始化等操作代码通用的情况下,兼容不同机芯-机型适配不同的功放,从而简化了不同机芯-机型适配功放的步骤,提升了功放适配效率,提高了代码一致性和质量,统一了不同功放适配规范。In this embodiment, through the above solution, when a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device is received, the power amplifier configuration parameters adapted to the terminal device are obtained; the power amplifier configuration parameters are transmitted to the terminal device, and Write a corresponding power amplifier address, and perform a power amplifier initialization operation on the terminal device; in response to a power amplifier control instruction for performing power amplifier control on the terminal device, write a fixed power amplifier to the mute control pin designated by the power amplifier device of the terminal device data information to perform power amplifier control operation on the terminal device. When initializing the power amplifier, the scheme can transmit the power amplifier configuration parameters that are adapted to it to the terminal device, so as to realize the initialization operation of different power amplifiers for different cores and models, which solves the complicated problem of the current power amplifier software adaptation work. In the case of common operation codes such as power amplifier initialization, it is compatible with different core models and different power amplifiers, which simplifies the steps of adapting power amplifiers between different core models and models, improves power amplifier adaptation efficiency, and improves code consistency. and quality, and unify the adaptation specifications of different power amplifiers.
如图4所示,本申请第三实施例提出一种功放适配方法,基于上述图3所示的实施例,在上述步骤S10,在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数之前,该功放适配方法还包括:As shown in FIG. 4 , a third embodiment of the present application proposes a method for adapting a power amplifier. Based on the embodiment shown in FIG. 3 , in the above step S10 , when a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device is received , before acquiring the power amplifier configuration parameters adapted to the terminal device, the power amplifier adaptation method further includes:
步骤S101,为不同的终端设备的机芯或机型配置对应的功放配置参数,生成所述功放配置文件。Step S101 , configure corresponding power amplifier configuration parameters for the cores or models of different terminal devices, and generate the power amplifier configuration file.
步骤S102,加载所述功放配置文件,将所述功放配置文件编译到所述终端设备的系统指定路径;Step S102, loading the power amplifier configuration file, and compiling the power amplifier configuration file to a system-specified path of the terminal device;
所述步骤S10,在接收到对终端设备进行功放初始化操作的功放初始化指令时,调用预设的功放配置文件包括:In the step S10, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, invoking a preset power amplifier configuration file includes:
步骤S100,在接收到对终端设备进行功放初始化操作的功放初始化指令时,从所述终端设备的系统指定路径调用所述功放配置文件,以对所述功放配置文件进行解析。Step S100, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on a terminal device, calling the power amplifier configuration file from a system-specified path of the terminal device to parse the power amplifier configuration file.
具体地,如前所述,功放适配主要涉及功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等等参数,软件在做功放初始化时,只需要确保上述参数可以根据不同机芯-机型实际功放适配情况,传入正确的参数,即可完成功放正确初始化。如此,则可以在确保软件代码一致的情况下,以最少工作量完成不同机芯-机型适配不同功放的工作,不仅仅提升了工作效率,同时也提高了软件代码质量,统一了不同功放适配规范。Specifically, as mentioned above, the power amplifier adaptation mainly involves the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, the power amplifier initialization bin file path and other parameters. When the software is initializing the power amplifier, only It is necessary to ensure that the above parameters can be correctly initialized by inputting the correct parameters according to the actual power amplifier adaptation of different cores and models. In this way, it is possible to complete the work of adapting different core-models to different power amplifiers with the least amount of work under the condition that the software codes are consistent, which not only improves work efficiency, but also improves the quality of software codes and unifies different power amplifiers. Adaptation specification.
本实施例主要解决不同机芯-机型在做不同功放初始化时,可以传入与之匹配的功放相关参数,然后软件会根据传入的参数类型,向对应的功放地址写入正确的数据,进而完成功放初始化等操作。This embodiment mainly solves the problem that when different core-models are initializing different power amplifiers, the related parameters of the power amplifier can be passed in, and then the software will write the correct data to the corresponding power amplifier address according to the type of parameters passed in. Then, operations such as the power amplifier initialization are completed.
具体实现时,作为一种实施例方式,可以为不同的终端设备的机芯或机型配置对应的功放配置参数,并生成功放配置文件,即可以将功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等功放配置参数,根据不同的终端设备的机芯或机型配置成相应的功放配置文件。In specific implementation, as an embodiment, the corresponding power amplifier configuration parameters can be configured for the cores or models of different terminal devices, and a power amplifier configuration file can be generated, that is, the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the Power amplifier configuration parameters, such as power amplifier device address, power amplifier reset pin, and power amplifier initialization bin file path, are configured into corresponding power amplifier configuration files according to the movement or model of different terminal equipment.
然后,可以加载所述功放配置文件,将所述功放配置文件编译到所述终端设备的系统指定路径;Then, the power amplifier configuration file can be loaded, and the power amplifier configuration file can be compiled to the system-specified path of the terminal device;
在接收到对终端设备进行功放初始化操作的功放初始化指令时,从所述终端设备的系统指定路径调用所述功放配置文件,以对所述功放配置文件进行解析。When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
因此,在传入功放配置参数时,可以预先将功放配置参数写入不同的配置文件,然后通过软件解析配置文件来获取正确的功放配置参数,进而对相应的功放进行初始化等操作。Therefore, when the power amplifier configuration parameters are passed in, the power amplifier configuration parameters can be written into different configuration files in advance, and then the software can parse the configuration files to obtain the correct power amplifier configuration parameters, and then perform operations such as initialization of the corresponding power amplifier.
其中,所述功放配置文件为ini文件。Wherein, the power amplifier configuration file is an ini file.
作为一种实施方式,可以将功放配置参数存放到ini文件里面,通过软件解析ini文件来获取相关参数,实现对功放进行操作。As an implementation manner, the configuration parameters of the power amplifier can be stored in the ini file, and the relevant parameters can be obtained by parsing the ini file through software, so as to realize the operation of the power amplifier.
具体地,在接收到对终端设备进行功放初始化操作的功放初始化指令时,从所述终端设备的系统指定路径调用所述功放配置文件;Specifically, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, calling the power amplifier configuration file from the system-specified path of the terminal device;
然后,解析所述功放配置文件,从所述功放配置文件中获取与所述终端设备适配的功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件路径等功放配置参数,对终端设备进行功放初始化操作。Then, parse the power amplifier configuration file, and obtain the power amplifier type suitable for the terminal device, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization bin file path from the power amplifier configuration file. Wait for the power amplifier configuration parameters, and perform power amplifier initialization operation on the terminal equipment.
以下以电视机及功放配置文件为ini文件,实现电视机适配对应的功放配置参数为例,对本实施例方案进行详细阐述:Taking the TV and power amplifier configuration files as ini files as an example to realize the power amplifier configuration parameters corresponding to TV adaptation, the solution of this embodiment will be described in detail below:
参照图5所示,图5为本实施例功放控制细化流程图,系统控制架构主要涉及功放控制模块的上下调用模块。由应用层向下调用,在SKYHAL_AMP模块解析功放ini配置文件内容,然后根据配置信息向下继续操作SkyHal Common Amp模块的相应功放驱动。Referring to FIG. 5 , FIG. 5 is a detailed flow chart of the power amplifier control in this embodiment, and the system control architecture mainly involves the upper and lower calling modules of the power amplifier control module. Called down by the application layer, the SKYHAL_AMP module parses the content of the power amplifier ini configuration file, and then continues to operate the corresponding power amplifier driver of the SkyHal Common Amp module according to the configuration information.
本实施例功放适配方法通用于所有平台,此方式配置简单、软件代码通用、便于维护,针对同一平台需要适配多个功放或者多种功放的情况更加能够体现此方法的优势,其实现方法及实现过程具体如图5功放控制流程图所示,具体过程如下:The power amplifier adaptation method in this embodiment is common to all platforms. This method is simple in configuration, common in software codes, and easy to maintain. The advantages of this method can be better reflected when the same platform needs to be adapted to multiple power amplifiers or multiple power amplifiers. And the implementation process is shown in the power amplifier control flow chart in Figure 5, and the specific process is as follows:
S1:配置amp.ini文件,得到ini功放配置文件,配置内容根据硬件电路图主要包括功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化数据bin存放路径等,功放ini配置文件根据不同产品的实际功能需求存在差异,例如可以是单个功放、多个相同类型功放或者多个不同类型功放等;S1: Configure the amp.ini file to get the ini power amplifier configuration file. The configuration content mainly includes the power amplifier type, the I2C bus ID where the power amplifier hardware is located, the power amplifier device address, the power amplifier reset pin, and the power amplifier initialization data bin storage path according to the hardware circuit diagram. The ini configuration file varies according to the actual functional requirements of different products, for example, it can be a single power amplifier, multiple power amplifiers of the same type, or multiple power amplifiers of different types;
S2:加载amp.ini文件,ini功放配置文件会在软件编译集成的时候将amp.ini文件编译到指定路径,不同的机器配屏此路径不同,本实施例通过软件来获取amp.ini的路径,以便进行amp.ini配置文件的正常解析;S2: Load the amp.ini file. The ini amplifier configuration file will compile the amp.ini file to the specified path when the software is compiled and integrated. This path is different for different machines with different screens. In this embodiment, the path of the amp.ini is obtained through the software. , in order to perform normal parsing of the amp.ini configuration file;
S3:解析amp.ini文件,软件通过匹配amp.ini内不同配置项的名称字符串,获取功放配置的正确信息,以便后续向功放里面写入正确的数据信息;S3: Parse the amp.ini file. The software obtains the correct information of the power amplifier configuration by matching the name strings of different configuration items in the amp.ini, so that the correct data information can be written into the power amplifier later;
S4:初始化功放操作,根据解析ini功放配置文件获取到的相关配置信息,向对应地址内写入bin文件里面的全部数据信息,完成功放初始化操作,写入数据主要是通过I2C来写入;S4: Initialize the power amplifier operation. According to the relevant configuration information obtained by parsing the ini power amplifier configuration file, write all the data information in the bin file to the corresponding address, and complete the power amplifier initialization operation. The written data is mainly written through I2C;
S5:Mute/UnMute操作,向功放器件指定的Mute控制引脚写入固定的数据信息,以实现功放Mute/UnMute控制操作。S5: Mute/UnMute operation, write fixed data information to the Mute control pin designated by the power amplifier device to realize the power amplifier Mute/UnMute control operation.
本实施例方案主要通过解析ini功放配置文件获取功放相关的配置信息,包含功放类型、器件地址、I2C总线ID等信息,向指定的地址内通过I2C读写操作,写入正确的数据信息,以实现功放初始化、Mute、UnMute等操作,实现功放控制。The solution of this embodiment mainly obtains the configuration information related to the power amplifier by parsing the ini power amplifier configuration file, including the power amplifier type, device address, I2C bus ID and other information, and writes the correct data information to the specified address through the I2C read and write operation. Implement power amplifier initialization, Mute, UnMute and other operations to achieve power amplifier control.
相比现有技术,本实施例方案,仅通过改变ini文件里面的配置参数,即可实现不同机芯-机型适配多个甚至多种功放的需求。不仅在软件上面兼容了不同机芯-机型的功放适配,而且可以兼容不同方案平台(例如:HISI、MTK和Amlogic等)的功放适配,无需底层驱动做功放相关操作,仅需要在应用层下面封装一级功放操作接口即可,从而实现了代码的规范化和统一性。Compared with the prior art, the solution of this embodiment can meet the requirements of adapting multiple or even multiple power amplifiers for different cores and models only by changing the configuration parameters in the ini file. Not only is the software compatible with the power amplifier adaptation of different movement-models, but also compatible with the power amplifier adaptation of different solution platforms (such as HISI, MTK, Amlogic, etc.) The first-level power amplifier operation interface can be encapsulated below the layer, thereby realizing the standardization and unity of the code.
需要说明的是,本实施例方案适用所有相关平台进行功放相关操作,通过解析ini文件的配置内容,软件对相应功放进行操作。通过解析ini文件进行软件功能差异化适配以实现软件通用性,此方法不仅可以适用于功放适配,在不同电视机灯效功能上也可以使用,例如呼吸灯效果、闪烁效果等等客制化需求,都可以通过ini文件进行配置,软件使用同一套代码,通过ini文件配置实现差异化需求管理。该方案不仅利于软件代码维护,而且客制化功能适配工作更加简单。It should be noted that the solution of this embodiment is applicable to all relevant platforms to perform power amplifier related operations, and the software operates the corresponding power amplifier by parsing the configuration content of the ini file. Differentiated adaptation of software functions by parsing ini files to achieve software versatility. This method can not only be applied to power amplifier adaptation, but also can be used in different TV lighting effects, such as breathing light effects, flickering effects, etc. All requirements can be configured through ini files. The software uses the same set of codes to achieve differentiated requirements management through ini file configuration. This solution is not only conducive to software code maintenance, but also makes the adaptation of customized functions easier.
此外,本实施例方案主要针对软件设计进行优化和改善,提升了代码通用性和可继承性,提升了软件的维护性,同时简化功放适配工作。在确保功放软件控制代码统一的情况下,仅通过修改功放ini文件不同配置项信息来实现不同产品的功放适配工作,进而实现功放适配的自适应。In addition, the solution in this embodiment mainly optimizes and improves the software design, improves code versatility and inheritability, improves software maintainability, and simplifies power amplifier adaptation work. Under the condition of ensuring that the power amplifier software control codes are unified, the power amplifier adaptation work of different products can be realized only by modifying the information of different configuration items of the power amplifier ini file, thereby realizing the self-adaptation of the power amplifier adaptation.
此外,本申请实施例还提出一种终端设备,所述终端设备包括存储器、处理器、以及存储在所述处理器上的功放适配程序,所述功放适配程序被所述处理器调用时执行如上述实施例所述的方法的步骤,其功能原理,请参照上述各实施例,在此不再赘述。In addition, an embodiment of the present application also proposes a terminal device, where the terminal device includes a memory, a processor, and a power amplifier adaptation program stored on the processor, when the power amplifier adaptation program is called by the processor For the steps of executing the method described in the foregoing embodiments, and the functional principles thereof, please refer to the foregoing embodiments, which will not be repeated here.
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有功放适配程序,所述功放适配程序被处理器调用时执行如上述实施例所述的方法的步骤,其功能原理,请参照上述各实施例,在此不再赘述。In addition, an embodiment of the present application also proposes a computer-readable storage medium, where a power amplifier adaptation program is stored on the computer-readable storage medium, and when the power amplifier adaptation program is called by a processor, the above-mentioned embodiment is executed. For the steps of the method and the functional principle thereof, please refer to the above-mentioned embodiments, which will not be repeated here.
此外,本申请实施例还提出一种计算机程序产品,所述计算机程序产品包括功放适配程序,所述功放适配程序被处理器调用时执行如上述实施例所述的方法的步骤,其功能原理,请参照上述各实施例,在此不再赘述。In addition, an embodiment of the present application also proposes a computer program product, where the computer program product includes a power amplifier adaptation program, and when the power amplifier adaptation program is invoked by a processor, the steps of the methods described in the above embodiments are executed, and the functions of the power amplifier adaptation program are executed. For the principle, please refer to the above-mentioned embodiments, which will not be repeated here.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present application, or directly or indirectly applied in other related technical fields , are similarly included within the scope of patent protection of this application.

Claims (13)

  1. 一种功放适配方法,其中,所述方法包括以下步骤:A power amplifier adaptation method, wherein the method comprises the following steps:
    在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数;When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, acquiring power amplifier configuration parameters adapted to the terminal device;
    将所述功放配置参数传入所述终端设备,并写入对应的功放地址,对所述终端设备进行功放初始化操作。The power amplifier configuration parameters are transmitted to the terminal device, and the corresponding power amplifier address is written, and the power amplifier initialization operation is performed on the terminal device.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1, wherein the method further comprises:
    响应对所述终端设备进行功放控制的功放控制指令,向所述终端设备的功放器件指定的静音控制引脚写入固定的功放数据信息,以对所述终端设备进行功放控制操作。In response to the power amplifier control instruction for controlling the power amplifier of the terminal device, write fixed power amplifier data information to the mute control pin designated by the power amplifier device of the terminal device, so as to perform the power amplifier control operation on the terminal device.
  3. 根据权利要求1所述的方法,其中,所述在接收到对终端设备的功放进行初始化的功放初始化指令时,获取与所述终端设备适配的功放配置参数的步骤包括:The method according to claim 1, wherein, when receiving a power amplifier initialization instruction for initializing a power amplifier of a terminal device, the step of acquiring power amplifier configuration parameters adapted to the terminal device comprises:
    在接收到对终端设备进行功放初始化操作的功放初始化指令时,调用预设的功放配置文件;When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, call the preset power amplifier configuration file;
    解析所述功放配置文件,从所述功放配置文件中获取与所述终端设备适配的功放配置参数。The power amplifier configuration file is parsed, and power amplifier configuration parameters adapted to the terminal device are obtained from the power amplifier configuration file.
  4. 根据权利要求3所述的方法,其中,所述在接收到对终端设备进行功放初始化操作的功放初始化指令时,获取与所述终端设备适配的功放配置参数的步骤之前还包括:The method according to claim 3, wherein, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, before the step of acquiring the power amplifier configuration parameters adapted to the terminal device, the step further comprises:
    为不同的终端设备的机芯或机型配置对应的功放配置参数,生成所述功放配置文件。The corresponding power amplifier configuration parameters are configured for the cores or models of different terminal devices, and the power amplifier configuration file is generated.
  5. 根据权利要求4所述的方法,其中,所述为不同的终端设备的机芯或机型配置对应的功放配置参数,生成所述功放配置文件的步骤之后还包括:The method according to claim 4, wherein the step of configuring the corresponding power amplifier configuration parameters for the movements or models of different terminal devices, the step of generating the power amplifier configuration file further comprises:
    加载所述功放配置文件,将所述功放配置文件编译到所述终端设备的系统指定路径。Loading the power amplifier configuration file, and compiling the power amplifier configuration file to the system-specified path of the terminal device.
  6. 根据权利要求5所述的方法,其中,所述在接收到对终端设备进行功放初始化操作的功放初始化指令时,调用预设的功放配置文件的步骤包括:The method according to claim 5, wherein, when receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the step of calling a preset power amplifier configuration file comprises:
    在接收到对终端设备进行功放初始化操作的功放初始化指令时,从所述终端设备的系统指定路径调用所述功放配置文件,以对所述功放配置文件进行解析。When receiving a power amplifier initialization instruction for performing a power amplifier initialization operation on the terminal device, the power amplifier configuration file is called from the system-specified path of the terminal device to parse the power amplifier configuration file.
  7. 根据权利要求3所述的方法,其中,所述功放配置参数包括以下一种或多种:功放类型、功放硬件所在的I2C总线ID、功放器件地址、功放复位引脚、功放初始化bin文件存放路径。The method according to claim 3, wherein the power amplifier configuration parameters include one or more of the following: power amplifier type, I2C bus ID where power amplifier hardware is located, power amplifier device address, power amplifier reset pin, power amplifier initialization bin file storage path .
  8. 根据权利要求3所述的方法,其中,所述功放配置文件为ini文件。The method of claim 3, wherein the power amplifier configuration file is an ini file.
  9. 根据权利要求8所述的方法,其中,所述方法还包括:The method of claim 8, wherein the method further comprises:
    将功放的参数信息写入amp.ini文件,配置所述amp.ini文件;Write the parameter information of the power amplifier into the amp.ini file, and configure the amp.ini file;
    将所述amp.ini文件编译到指定路径,加载所述amp.ini文件;Compile the amp.ini file to the specified path, and load the amp.ini file;
    解析所述amp.ini文件,获得功放的相关配置信息;Parse the amp.ini file to obtain the relevant configuration information of the power amplifier;
    根据所述功放的相关配置信息,向对应地址内写入bin文件里面的全部数据信息,完成功放初始化操作;以及According to the relevant configuration information of the power amplifier, write all the data information in the bin file to the corresponding address, and complete the power amplifier initialization operation; and
    向功放器件指定的Mute控制引脚写入固定的数据信息,以实现功放Mute/UnMute控制操作。Write fixed data information to the Mute control pin specified by the power amplifier device to realize the power amplifier Mute/UnMute control operation.
  10. 根据权利要求4所述的方法,其中,所述功放为单个功放、或者多个相同类型的功放、或者多个不同类型的功放。The method according to claim 4, wherein the power amplifier is a single power amplifier, or multiple power amplifiers of the same type, or multiple power amplifiers of different types.
  11. 一种终端设备,其中,所述终端设备包括存储器、处理器、以及存储在所述处理器上的功放适配程序,所述功放适配程序被所述处理器调用时执行如权利要求1至10任意一项所述的方法的步骤。A terminal device, wherein the terminal device includes a memory, a processor, and a power amplifier adaptation program stored on the processor, and the power amplifier adaptation program is called by the processor to execute the steps according to claims 1 to 1. 10. The steps of any one of the methods.
  12. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有功放适配程序,所述功放适配程序被处理器调用时执行如权利要求1至10任意一项所述的方法的步骤。A computer-readable storage medium, wherein a power amplifier adaptation program is stored on the computer-readable storage medium, and when the power amplifier adaptation program is called by a processor, the method according to any one of claims 1 to 10 is executed A step of.
  13. 一种计算机程序产品,其中,所述计算机程序产品包括功放适配程序,所述功放适配程序被处理器调用时执行如权利要求1至10任意一项所述的方法的步骤。A computer program product, wherein the computer program product includes a power amplifier adaptation program, and when the power amplifier adaptation program is invoked by a processor, the steps of the method according to any one of claims 1 to 10 are executed.
PCT/CN2021/107981 2021-04-23 2021-07-22 Power amplifier adaptation method, terminal device, storage medium and computer program product WO2022222292A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110442380.4A CN113076144A (en) 2021-04-23 2021-04-23 Power amplifier adaptation method, terminal device, storage medium and computer program product
CN202110442380.4 2021-04-23

Publications (1)

Publication Number Publication Date
WO2022222292A1 true WO2022222292A1 (en) 2022-10-27

Family

ID=76618482

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/107981 WO2022222292A1 (en) 2021-04-23 2021-07-22 Power amplifier adaptation method, terminal device, storage medium and computer program product

Country Status (2)

Country Link
CN (1) CN113076144A (en)
WO (1) WO2022222292A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115665350A (en) * 2022-10-28 2023-01-31 四川长虹电器股份有限公司 Processing method for adapting intelligent television software to multiple digital power amplifier hardware platforms

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076144A (en) * 2021-04-23 2021-07-06 深圳创维-Rgb电子有限公司 Power amplifier adaptation method, terminal device, storage medium and computer program product
CN113590208A (en) * 2021-09-26 2021-11-02 广州朗国电子科技股份有限公司 Method and system for changing terminal digital power amplifier driving parameters and electronic equipment
CN114090093B (en) * 2021-11-30 2024-02-06 深圳创维-Rgb电子有限公司 Tuner adaptive method, apparatus, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070009108A1 (en) * 2005-07-07 2007-01-11 Furge Kenneth C Update system for an audio amplifier
CN104994459A (en) * 2015-06-17 2015-10-21 Tcl海外电子(惠州)有限公司 Terminal digital power amplifier configuration method and device
CN105338448A (en) * 2015-11-18 2016-02-17 深圳创维-Rgb电子有限公司 Sound control method and device
CN110502283A (en) * 2019-08-19 2019-11-26 深圳大趋智能科技有限公司 A kind of product peripheral hardware compatibility method and system
CN111935622A (en) * 2020-08-03 2020-11-13 深圳创维-Rgb电子有限公司 Debugging method, device, equipment and storage medium for electronic equipment with digital power amplifier
CN113076144A (en) * 2021-04-23 2021-07-06 深圳创维-Rgb电子有限公司 Power amplifier adaptation method, terminal device, storage medium and computer program product

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5326934B2 (en) * 2009-01-23 2013-10-30 株式会社Jvcケンウッド Electronics
CN103916732A (en) * 2012-12-31 2014-07-09 广州励丰文化科技股份有限公司 Control method for active integrated loudspeaker box provided with multi-digital signal processor system
CN105812919A (en) * 2014-12-30 2016-07-27 深圳Tcl数字技术有限公司 Audio frequency multi-power amplifier processing method and audio frequency multi-power amplifier processing device
KR20180072389A (en) * 2016-12-21 2018-06-29 삼성전자주식회사 Method for providing content corresponding to an accessory and electronic device thereof
US10867603B2 (en) * 2018-10-24 2020-12-15 Sony Corporation Audio-video reproduction device setup using interview-based voice control
CN110545576B (en) * 2019-09-24 2024-02-23 京信网络系统股份有限公司 Power amplifier module, power adjustment method and remote radio unit
CN111949323A (en) * 2020-08-31 2020-11-17 深圳市欧瑞博科技股份有限公司 Intelligent device awakening optimization method and device, intelligent device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070009108A1 (en) * 2005-07-07 2007-01-11 Furge Kenneth C Update system for an audio amplifier
CN104994459A (en) * 2015-06-17 2015-10-21 Tcl海外电子(惠州)有限公司 Terminal digital power amplifier configuration method and device
CN105338448A (en) * 2015-11-18 2016-02-17 深圳创维-Rgb电子有限公司 Sound control method and device
CN110502283A (en) * 2019-08-19 2019-11-26 深圳大趋智能科技有限公司 A kind of product peripheral hardware compatibility method and system
CN111935622A (en) * 2020-08-03 2020-11-13 深圳创维-Rgb电子有限公司 Debugging method, device, equipment and storage medium for electronic equipment with digital power amplifier
CN113076144A (en) * 2021-04-23 2021-07-06 深圳创维-Rgb电子有限公司 Power amplifier adaptation method, terminal device, storage medium and computer program product

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115665350A (en) * 2022-10-28 2023-01-31 四川长虹电器股份有限公司 Processing method for adapting intelligent television software to multiple digital power amplifier hardware platforms

Also Published As

Publication number Publication date
CN113076144A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
WO2022222292A1 (en) Power amplifier adaptation method, terminal device, storage medium and computer program product
US20040083015A1 (en) System for multimedia rendering in a portable device
WO2010091623A1 (en) Apparatus and method for dynamically generating application program interface
CA2511916A1 (en) System and method of building wireless component applications
US7290263B1 (en) Method and system for a scriptable command line interface
CN107947981A (en) A kind of network device management method and device
WO2021052054A1 (en) Method for plug-in implementation and system for plug-in implementation
CN114461478A (en) Simulator, drive test method, electronic device, and computer-readable storage medium
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
EP4352613A1 (en) Interoperability bridge for application hosts
WO2024055757A1 (en) Automatic hardware resource configuration method, device and system for driver, and medium
KR20220016704A (en) Method for installing application and electronic device supporting the same
RU2316907C2 (en) System for reproduction of multimedia in portable device
KR102188685B1 (en) Apparatas and method for generating application packages
CN112559264B (en) Simulation test method for realizing FPGA (field programmable Gate array) universal serial port by verification platform based on UVM (Universal verification Module)
US20130132600A1 (en) Apparatus and method of a portable terminal for performing communication with a device supporting media transfer protocol
WO2022001317A1 (en) Chip simulation method, apparatus and system, and device and storage medium
CN110399040B (en) Multi-mode interaction method, user terminal equipment, server and system
WO2021057351A1 (en) Apparatus and method for controlling android bluetooth in glibc environment, and terminal device
CN111970349A (en) Communication system, method, device, equipment and medium based on remote procedure call
CN111290746A (en) Object access method, device, equipment and storage medium
TWI413387B (en) Wireless communication unit and method of running code therein
WO2022083477A1 (en) Method for developing mvvm architecture-based application, and terminal
CN114168226A (en) Method for decoding data structure and related device
US20230179480A1 (en) Method and apparatus for remote customization of function, device, and storage medium

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: 21937516

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE