CN112000376B - Multi-path mute control method, equipment and storage medium based on android system - Google Patents

Multi-path mute control method, equipment and storage medium based on android system Download PDF

Info

Publication number
CN112000376B
CN112000376B CN202010743068.4A CN202010743068A CN112000376B CN 112000376 B CN112000376 B CN 112000376B CN 202010743068 A CN202010743068 A CN 202010743068A CN 112000376 B CN112000376 B CN 112000376B
Authority
CN
China
Prior art keywords
file
audio equipment
instruction value
file node
mute
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010743068.4A
Other languages
Chinese (zh)
Other versions
CN112000376A (en
Inventor
张博昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhiwei Intelligent Software Development Co ltd
Original Assignee
Shenzhen Zhiwei Intelligent Software Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhiwei Intelligent Software Development Co ltd filed Critical Shenzhen Zhiwei Intelligent Software Development Co ltd
Priority to CN202010743068.4A priority Critical patent/CN112000376B/en
Publication of CN112000376A publication Critical patent/CN112000376A/en
Application granted granted Critical
Publication of CN112000376B publication Critical patent/CN112000376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)

Abstract

The invention relates to a multipath mute control method, equipment and storage medium based on an android system, which comprises the following steps: s1, creating file nodes corresponding to different audio equipment control instructions input by an upper application system at the bottom layer of the system; s2, selecting audio equipment at a UI interface of the system, and inputting an instruction to write an instruction value into a file node; s3, after the dynamic writing instruction value of the file node, the kernel of the system writes the corresponding instruction value into a register of the audio equipment chip through the running program to control the mute or play of the audio equipment. According to the invention, the file node is created at the bottom layer of the system, then the instruction is dynamically input at the UI interface of the system and the instruction value is written into the file node, and then the corresponding instruction value is written into the chip of the audio equipment through the file node in the system kernel, so that the output of the audio is controlled, and the problem that the equipment cannot be specified in the system in a mute mode is solved.

Description

Multi-path mute control method, equipment and storage medium based on android system
Technical Field
The invention relates to the field of control of audio equipment, in particular to a multichannel mute control method, equipment and storage medium based on an android system.
Background
Android (android) is an operating system based on free and open source code of the Linux kernel (not containing GNU components), which is mainly used for mobile devices such as smartphones and tablet computers, and is led and developed by Google corporation and open cell phone alliance in the united states. With the development of technology, products using android are more and more, and the products are widely operated in various fields of various industries, and the technology, performance, reliability and the like of the products tend to be stable. In the field of industrial control and commercial display, android products are usually connected to multiple display devices, such as HDMI, DP, LVDS, etc., at the same time, and there are limitations that the sound output of these devices is usually simultaneous, and sometimes the user cannot realize the sound output only by the designated display device.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a multichannel mute control method, equipment and a storage medium based on an android system.
The technical scheme adopted for solving the technical problems is as follows: a multi-channel mute control method based on an android system comprises the following steps:
s1, creating file nodes corresponding to different audio equipment control instructions input by an upper application system at the bottom layer of a system, wherein at least two file nodes are created, and the two file nodes are mute file nodes corresponding to HDMI audio equipment and non HDMI audio equipment;
s2, selecting audio equipment at a UI interface of the system, and inputting an instruction to write an instruction value into a file node, wherein the instruction value is dynamically written into registers of a conversion chip of the HDMI audio equipment and a codec decoding chip of the non-HDMI audio equipment; the HDMI audio device dynamically writes the command value in the register by running hdmitx_writei2c_byte (reg_tx_clk_ctrl0, b_tx_auto_over_sample_clock_b_tx_ext_256 fs 0x 01), and the non-HDMI audio device dynamically writes the command value in the register by running snd_soc_write (RT 5616_codec, RT5616_hp_vol, val);
s3, after the instruction value is written into the file node, the kernel of the system writes the corresponding instruction value into a register of the audio equipment chip through the running program to control mute or play of the audio equipment.
Preferably, the instruction value is 1 or 0.
Preferably, the creating and writing of the file node sequentially go through the following steps, a1, creating a file node folder; b1, creating file nodes; c1, writing a file node operation function; d1, operating the file node.
An electronic device comprising a memory for storing a computer program; and the processor is used for realizing the steps of the multi-path mute control method based on the android system when executing the computer program.
A computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of the android system based multi-way muting control method as set forth in any one of the preceding claims.
The invention has the beneficial effects that: the invention creates the file node at the bottom layer of the system by running the program, selects the audio equipment at the UI interface of the system, writes the instruction value into the file node after inputting the instruction according to the requirement, and then writes the corresponding instruction value into the chip of the audio equipment at the system kernel through the file node, thereby controlling the output of the audio.
Drawings
FIG. 1 is a schematic block diagram of the method of the present invention;
FIG. 2 is a schematic diagram of the operation of an embodiment of the present invention;
FIG. 3 is a schematic diagram of an electronic device according to an embodiment of the present invention;
Detailed Description
For the purpose of illustrating more clearly the objects, technical solutions and advantages of embodiments of the present invention, the present invention will be further described with reference to the accompanying drawings and embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by a person skilled in the art without any inventive effort, are intended to be within the scope of the present invention, based on the embodiments of the present invention.
The embodiment of the invention is shown in fig. 1 and 2, and the multichannel mute control method based on the android system comprises the following steps:
s1, creating a file node which receives control instructions of different audio devices input by an upper application system at the bottom layer of a system, wherein the bottom layer, namely a kernel, provides basic system functions based on the architecture of an android, the upper layer, namely a top layer, is an application program of the android, the file node is created at the bottom layer of the system, namely after the upper application system inputs corresponding instructions, the file node at the bottom layer of the system receives the instructions, and correspondingly writes instruction values representing the instructions into the file node, wherein the instruction values are represented by 1 or 0, namely 1 can be used for representing mute or play, the corresponding 0 represents play or mute, namely when one audio device is selected to mute, the corresponding instruction value can be represented by 1 or 0, and the instruction values transmitted by the audio device to be played at the moment are corresponding to 0 or 1; selectively performing multi-channel mute control on the multi-channel audio through the control of different instructions;
s2, selecting audio equipment at a UI interface of the system, inputting an instruction to write an instruction value into a file node, so that the UI interface of the system can be intuitively and rapidly controlled to realize multi-channel mute control, learning the audio equipment at the UI interface and inputting the instruction, such as a mute instruction, namely forming a mute service in the system, wherein the instruction value has a logical instruction value corresponding to the instruction, the instruction value is transmitted to a bottom layer of the system by an upper application system of the system, and the instruction value is written into the file node by an operation function through a corresponding instruction program at the bottom layer;
s3, after the command value is written into the file node, the kernel of the system writes the corresponding command value into the register of the audio equipment chip through the running program to control the mute or play of the audio equipment, so that a control system is formed among the UI interface of the system, the kernel of the system and the audio equipment, the command value written into the file node is written into the register of the chip of the kernel audio equipment through system call at the bottom layer of the system, the output of the multi-path audio equipment can be controlled through the UI interface of the system, the mute or play control of different paths of audio equipment under the same state is realized, one path or multiple paths of audio is controlled according to the specification, and the problem that the equipment cannot be muted in the system is solved.
Further, as shown in fig. 2, at least two file nodes are created, the two file nodes are mute file nodes corresponding to an HDMI audio device and a non-HDMI audio device, the HDMI audio device is a device using an HDMI interface, the non-HDMI audio device is a device not using an HDMI interface, such as a headset, a speaker, etc., the corresponding file nodes may be/sys/class/it 66121-audio/unit and/sys/class/rt 5616-audio/unit, and it is convenient to set the file nodes corresponding to the two audio devices to control their audio devices respectively. Because the HDMI audio devices are controlled by the HDMI conversion chip, the non-HDMI audio devices are controlled by the codec decoding chip, the chips corresponding to the written command values are the HDMI conversion chip and the codec decoding chip, the function of the command values which are dynamically written into registers of the conversion chip of the HDMI audio device and the codec decoding chip of the non-HDMI audio device is to store binary codes, the function is composed of a trigger with a storage function, the trigger with the storage function can trigger and control the corresponding audio devices, and the command values written into the registers are different according to different commands, so that different operation control is realized. The HDMI audio device dynamically writes the command value in the register by running hdmitx_writei2c_byte (reg_tx_clk_ctrl0, b_tx_auto_over_sample_clock_b_tx_ext_256 fs 0x 01) and the non-HDMI audio device dynamically writes the command value in the register by running snd_soc_write (RT 5616_codec, RT5616_hp_vol, val).
Further improvements, the creation and writing of the file node goes through the following steps in turn,
a1, creating a file node folder, e.g.,
struct proc_dir_entry*proc_test_dir;
proc_test_dir=proc_mkdir("proc_test",NULL);
proc_test: folder name
NULL: parent folder pointer, NULL indicates that proc_test is under proc folder;
b1, creating file nodes, e.g.,
proc_create("proc_gpio",S_IRUGO|S_IWUSR,proc_test_dir,&proc_gpio_fops);
printk("proc_create proc_gpio_fops\n");
proc_gpio: file name
IRUGO|S_IWUSR: file rights
proc_test_dir: parent folder pointer, representing proc_gpio under proc_test folder proc_gpio_fops: operating a function;
c1, writing file node operation functions, such as,
specific examples of the operation functions are as follows:
the specific content in the operation function is filled in according to the requirement.
d1, operating the file node, writing the file node through a corresponding instruction or operation function, and writing the instruction value of the audio equipment through the file node, so as to realize the operation of the audio equipment.
The invention also provides an electronic device as shown in fig. 3, comprising a memory 1 for storing a computer program 10; a processor 2, configured to implement the steps of the android system-based multi-path mute control method according to any one of the preceding claims when executing the computer program. The computer readable storage medium has stored therein a computer program which when executed by a processor implements the steps of the android system based multi-way muting control method as claimed in any preceding claim, including a Random Access Memory (RAM), a memory, a Read Only Memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art capable of carrying computer program code.
It will be understood that modifications and variations will be apparent to those skilled in the art from the foregoing description, and it is intended that all such modifications and variations be included within the scope of the following claims.

Claims (5)

1. A multipath mute control method based on an android system is characterized by comprising the following steps of: the method comprises the following steps:
s1, creating file nodes corresponding to different audio equipment control instructions input by an upper application system at the bottom layer of a system, wherein at least two file nodes are created, and the two file nodes are mute file nodes corresponding to HDMI audio equipment and non HDMI audio equipment;
s2, selecting audio equipment at a UI interface of the system, and inputting an instruction to dynamically write an instruction value into a file node; the instruction value is dynamically written into registers of a conversion chip of the HDMI audio device and a codec decoding chip of the non-HDMI audio device; the HDMI audio device dynamically writes the command value in the register by running hdmitx_writei2c_byte (reg_tx_clk_ctrl0, b_tx_auto_over_sample_clock_b_tx_ext_256 fs 0x 01), and the non-HDMI audio device dynamically writes the command value in the register by running snd_soc_write (RT 5616_codec, RT5616_hp_vol, val);
s3, after the instruction value is written into the file node, the kernel of the system writes the corresponding instruction value into a register of the audio equipment chip through the running program to control mute or play of the audio equipment.
2. The android system-based multi-channel mute control method according to claim 1, wherein the method is characterized in that: the instruction value is 1 or 0.
3. The android system-based multi-channel mute control method according to claim 1, wherein the method is characterized in that: the creation and writing of the file node sequentially go through the following steps of a1, creating a file node folder;
b1, creating file nodes; c1, writing a file node operation function; d1, operating the file node.
4. An electronic device, characterized by: comprising a memory for storing a computer program; a processor for implementing the steps of the android system-based multi-way mute control method according to any one of claims 1 to 3 when executing the computer program.
5. A computer-readable storage medium, characterized by: the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the android system-based multi-way mute control method as claimed in any one of claims 1 to 3.
CN202010743068.4A 2020-07-29 2020-07-29 Multi-path mute control method, equipment and storage medium based on android system Active CN112000376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010743068.4A CN112000376B (en) 2020-07-29 2020-07-29 Multi-path mute control method, equipment and storage medium based on android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010743068.4A CN112000376B (en) 2020-07-29 2020-07-29 Multi-path mute control method, equipment and storage medium based on android system

Publications (2)

Publication Number Publication Date
CN112000376A CN112000376A (en) 2020-11-27
CN112000376B true CN112000376B (en) 2023-12-26

Family

ID=73463492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010743068.4A Active CN112000376B (en) 2020-07-29 2020-07-29 Multi-path mute control method, equipment and storage medium based on android system

Country Status (1)

Country Link
CN (1) CN112000376B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093760A (en) * 2013-01-11 2013-05-08 广东欧珀移动通信有限公司 Voice frequency parameter debugging method
CN106488363A (en) * 2016-09-29 2017-03-08 Tcl通力电子(惠州)有限公司 Sound channel distribution method and device of audio output system
WO2017054379A1 (en) * 2015-09-28 2017-04-06 青岛海信电器股份有限公司 Audio data processing method, apparatus and system
CN107463369A (en) * 2017-06-30 2017-12-12 北京北信源软件股份有限公司 The access device control method and device of a kind of virtual desktop
CN109151566A (en) * 2018-09-30 2019-01-04 Oppo广东移动通信有限公司 Audio frequency playing method, device, electronic equipment and computer-readable medium
CN110221805A (en) * 2019-06-13 2019-09-10 上海航盛实业有限公司 Audio frequency playing method, system, terminal and storage medium
CN111124833A (en) * 2019-12-25 2020-05-08 浪潮商用机器有限公司 Method, device, equipment and storage medium for controlling gpio port
CN111277881A (en) * 2019-12-04 2020-06-12 海信视像科技股份有限公司 Control method for audio data stream output in display equipment and display equipment
CN111343498A (en) * 2020-03-10 2020-06-26 海信视像科技股份有限公司 Mute control method and device and smart television

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093760A (en) * 2013-01-11 2013-05-08 广东欧珀移动通信有限公司 Voice frequency parameter debugging method
WO2017054379A1 (en) * 2015-09-28 2017-04-06 青岛海信电器股份有限公司 Audio data processing method, apparatus and system
CN106488363A (en) * 2016-09-29 2017-03-08 Tcl通力电子(惠州)有限公司 Sound channel distribution method and device of audio output system
CN107463369A (en) * 2017-06-30 2017-12-12 北京北信源软件股份有限公司 The access device control method and device of a kind of virtual desktop
CN109151566A (en) * 2018-09-30 2019-01-04 Oppo广东移动通信有限公司 Audio frequency playing method, device, electronic equipment and computer-readable medium
CN110221805A (en) * 2019-06-13 2019-09-10 上海航盛实业有限公司 Audio frequency playing method, system, terminal and storage medium
CN111277881A (en) * 2019-12-04 2020-06-12 海信视像科技股份有限公司 Control method for audio data stream output in display equipment and display equipment
CN111124833A (en) * 2019-12-25 2020-05-08 浪潮商用机器有限公司 Method, device, equipment and storage medium for controlling gpio port
CN111343498A (en) * 2020-03-10 2020-06-26 海信视像科技股份有限公司 Mute control method and device and smart television

Also Published As

Publication number Publication date
CN112000376A (en) 2020-11-27

Similar Documents

Publication Publication Date Title
US11113226B2 (en) Firmware burning apparatus and system
US20080186960A1 (en) System and method of controlling media streams in an electronic device
TWI506527B (en) Dynamic interpretation of user input in a portable electronic device
JP2010283719A (en) Mute control of microphone
KR20140111448A (en) Method and apparatus for copy and paste in electronic device
US20090228831A1 (en) Customization of user interface elements
WO2021110133A1 (en) Control operation method and electronic device
KR20160013207A (en) Multiple concurrent audio modes
WO2021135284A1 (en) Thick-provisioned volume creating method and apparatus, electronic device, and storage medium
CN113282271A (en) Audio processing method and device for android application on Linux platform
CN113553024A (en) Volume configuration method of split screen window, storage medium and terminal equipment
CN114168114A (en) Operator registration method, device and equipment
US20070262952A1 (en) Mapping pointing device messages to media player functions
CN108604331B (en) Information reminding method and mobile device
US20070174821A1 (en) Script-based object adaptation
CN112000376B (en) Multi-path mute control method, equipment and storage medium based on android system
CN107015805B (en) Method and device for configuring external sound card
JP4796131B2 (en) Method, electronic device and computer-readable recording medium for data management in an electronic device in response to user instructions by writing and / or audible sound
TW202127336A (en) Data presention and payment methods, apparatuses, and devices, and medium
CN115981751A (en) Near memory computing system, near memory computing method, device, medium and equipment
CN115033520B (en) IIC data transmission method and device, singlechip equipment and storage medium
US20020143844A1 (en) Computer system with two operating systems
WO2022068370A1 (en) Terminal-use minus-2 screen interface display method, apparatus, terminal, and medium
CN113687751A (en) Agent control device, agent control method, and non-transitory recording medium
CN113687879B (en) Interaction method and device for cross-platform framework and platform interaction library

Legal Events

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