CN107506212B - Method for dynamically loading sound card drive on real-time operating system - Google Patents

Method for dynamically loading sound card drive on real-time operating system Download PDF

Info

Publication number
CN107506212B
CN107506212B CN201710751264.4A CN201710751264A CN107506212B CN 107506212 B CN107506212 B CN 107506212B CN 201710751264 A CN201710751264 A CN 201710751264A CN 107506212 B CN107506212 B CN 107506212B
Authority
CN
China
Prior art keywords
sound card
digital signal
entering
multimedia digital
driver
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
CN201710751264.4A
Other languages
Chinese (zh)
Other versions
CN107506212A (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.)
Beijing Acoinfo Technology Co ltd
Original Assignee
Beijing Acoinfo Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Acoinfo Technology Co ltd filed Critical Beijing Acoinfo Technology Co ltd
Priority to CN201710751264.4A priority Critical patent/CN107506212B/en
Publication of CN107506212A publication Critical patent/CN107506212A/en
Application granted granted Critical
Publication of CN107506212B publication Critical patent/CN107506212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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/44594Unloading

Abstract

The invention relates to a method for dynamically loading a sound card driver on a real-time operating system. A method for dynamically loading a sound card driver on a real-time operating system comprises the following steps: (1) registering the codec driver of the multimedia digital signal, and then entering the step (2); (2) inquiring the matched sound card controller in the active sound card controller table, if the matched sound card controller is found, entering the step (3), otherwise, ending the operation; (3) checking whether multimedia digital signal codec hardware exists or not, if not, ending the operation, otherwise, entering the step (4); (4) initializing a codec driver of the multimedia digital signal, and then entering the step (5); (5) starting the multimedia digital signal codec and then ending the operation.

Description

Method for dynamically loading sound card drive on real-time operating system
Technical Field
The invention relates to a method for dynamically loading a sound card driver on a real-time operating system.
Background
A real-time operating system (RTOS) is an operating system that can accept and process external events or data at a sufficiently fast rate, and the results of the processing can control the production process or respond to the processing system quickly within a specified time, schedule all available resources to complete real-time tasks, and control all real-time tasks to run in coordination. Providing timely response and high reliability are main features.
The most common way to load a sound card driver in a real-time operating system is static loading. Static loading is to compile a driver program directly into a kernel, and load automatically along with system startup, but the static loading has the following disadvantages:
a. the debugging is inconvenient, the kernel needs to be recompiled every time one place is modified, and the efficiency is low;
b. the adoption of more static loading drives can result in large kernel capacity and waste of storage space.
Disclosure of Invention
The purpose of the invention is as follows: the invention improves the problems existing in the prior art, namely the invention discloses a method for dynamically loading a sound card driver on a real-time operating system. The dynamic loading adopted by the method utilizes the characteristic of modularization, the kernel module can be added after the real-time operating system is started, and the module is unloaded when the module is not needed.
The technical scheme is as follows: a method for dynamically loading a sound card driver on a real-time operating system comprises the following steps:
(1) registering the codec driver of the multimedia digital signal, and then entering the step (2);
(2) inquiring the matched sound card controller in the active sound card controller table, if the matched sound card controller is found, entering the step (3), otherwise, ending the operation;
(3) checking whether multimedia digital signal codec hardware exists or not, if not, ending the operation, otherwise, entering the step (4);
(4) initializing a codec driver of the multimedia digital signal, and then entering the step (5);
(5) starting the multimedia digital signal codec and then ending the operation.
A method for dynamically loading a sound card driver on a real-time operating system comprises the following steps:
(1) registering the sound card controller drive, and then entering the step (2);
(2) checking whether the hardware of the sound card controller exists or not, if not, ending the operation, otherwise, entering the step (3);
(3) initializing a sound card controller, and then entering the step (4);
(4) inquiring hardware information of all multimedia digital signal codecs on the sound card controller, and then entering the step (5);
(5) checking whether multimedia digital signal codec hardware exists, if not, ending the operation, otherwise, entering the step (6);
(6) checking whether the drive of the multimedia digital signal codec is registered, if not, ending the operation, otherwise, entering the step (7);
(7) inquiring and matching a driver in a registry of the multimedia digital signal codec, and entering the step (8);
(8) checking whether a driving program corresponding to the multimedia digital signal codec hardware is found, if not, ending the operation, otherwise, entering the step (9);
(9) initializing a codec driver of the multimedia digital signal, and then entering step (10);
(10) and starting the multimedia digital signal codec and finishing the operation.
Has the advantages that: the method for dynamically loading the sound card driver on the real-time operating system disclosed by the invention has the following beneficial effects:
1. by utilizing the dynamic loading characteristic of the kernel module, a plurality of sound card drivers with different standards can be preloaded at the same time;
2. the method can dynamically support new hardware, and the kernel does not need to be recompiled when the hardware is replaced;
3. the device can be loaded and unloaded, so that the debugging of the driver is facilitated, and meanwhile, the kernel can be kept in a small size, so that the transplantation is facilitated.
Drawings
FIG. 1 is a schematic diagram of the connection between a sound card controller and a codec;
FIG. 2 is a flow chart of a method for dynamically loading a sound card driver on a real-time operating system in accordance with the present disclosure;
FIG. 3 is a flow chart of another method for dynamically loading a sound card driver on a real-time operating system according to the present disclosure.
The specific implementation mode is as follows:
the following describes in detail specific embodiments of the present invention.
The method disclosed by the method supports sound cards using various Audio standards, including but not limited to the specifications of AC' 97, HD Audio, I2S and the like.
The real-time operating system manages and maintains data structures of the sound card controller and the codec of the multimedia digital signal, and the data structures include but are not limited to a linked list, a queue and the like. The data structure is called sound card controller register and multimedia digital signal coder register.
As shown in fig. 1, a plurality of sound card controllers can be hung on the CPU, and the sound card controllers are connected with a plurality of codecs through buses. Therefore, when the sound card driver is loaded, a sound card controller driver and a multimedia digital signal codec driver need to be installed. The two drives are installed without any order. Therefore, the method has two modes of dynamically loading the sound card driver. Two specific examples are described below.
Detailed description of the preferred embodiment 1
As shown in fig. 2, a method for dynamically loading a sound card driver on a real-time operating system includes the following steps:
(1) registering the codec driver of the multimedia digital signal, and then entering the step (2);
(2) inquiring the matched sound card controller in the active sound card controller table, if the matched sound card controller is found, entering the step (3), otherwise, ending the operation;
(3) checking whether multimedia digital signal codec hardware exists or not, if not, ending the operation, otherwise, entering the step (4);
(4) initializing a codec driver of the multimedia digital signal, and then entering the step (5);
(5) starting the multimedia digital signal codec and then ending the operation.
Specific example 2
As shown in fig. 3, a method for dynamically loading a sound card driver on a real-time operating system includes the following steps:
(1) registering the sound card controller drive, and then entering the step (2);
(2) checking whether the hardware of the sound card controller exists or not, if not, ending the operation, otherwise, entering the step (3);
(3) initializing a sound card controller, and then entering the step (4);
(4) inquiring hardware information of all multimedia digital codecs on the sound card controller, and then entering the step (5);
(5) checking whether multimedia digital codec hardware exists or not, if not, ending the operation, otherwise, entering the step (6);
(6) checking whether the drive of the multimedia digital codec is registered, if not, ending the operation, otherwise, entering the step (7);
(7) inquiring and matching a driver in a registry of the multimedia digital codec, and entering the step (8);
(8) checking whether a driving program corresponding to the multimedia digital codec hardware is found, if not, ending the operation, otherwise, entering the step (9);
(9) initializing a codec driver of the multimedia digital signal, and then entering step (10);
(10) and starting the multimedia digital signal codec and finishing the operation.
The embodiments of the present invention have been described in detail. However, the present invention is not limited to the above-described embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the spirit of the present invention.

Claims (2)

1. A method for dynamically loading sound card driver on real-time operating system features that the real-time operating system manages and maintains the data structures of sound card controller and multimedia digital signal coder, CPU has multiple sound card controllers connected to it via bus, said data structures are sound card controller register and multimedia digital signal coder register, when loading sound card driver, the sound card controller driver and multimedia digital signal coder driver need to be installed, said two drivers can be installed without sequentially and simultaneously installing sound card drivers with different standards, dynamic loading is used to add kernel module after the real-time operating system is started, when not needed, the module is unloaded to dynamically support new hardware, when replacing hardware, the kernel is not needed to be recompiled, and it can be loaded and unloaded, the debugging of the driver is facilitated, and meanwhile, the kernel is kept small in size and is convenient to transplant; the method comprises the following steps:
(1) registering the codec driver of the multimedia digital signal, and then entering the step (2);
(2) inquiring the matched sound card controller in the active sound card controller table, if the matched sound card controller is found, entering the step (3), otherwise, ending the operation;
(3) checking whether multimedia digital signal codec hardware exists or not, if not, ending the operation, otherwise, entering the step (4);
(4) initializing a codec driver of the multimedia digital signal, and then entering the step (5);
(5) starting the multimedia digital signal codec and then ending the operation.
2. A method for dynamically loading sound card driver on real-time operating system features that the real-time operating system manages and maintains the data structures of sound card controller and multimedia digital signal coder, CPU has multiple sound card controllers connected to it via bus, said data structures are sound card controller register and multimedia digital signal coder register, when loading sound card driver, the sound card controller driver and multimedia digital signal coder driver need to be installed, said two drivers can be installed without sequentially and simultaneously installing sound card drivers with different standards, dynamic loading is used to add kernel module after the real-time operating system is started, when not needed, the module is unloaded to dynamically support new hardware, when replacing hardware, the kernel is not needed to be recompiled, and it can be loaded and unloaded, the debugging of the driver is facilitated, and meanwhile, the kernel is kept small in size and is convenient to transplant; the method comprises the following steps:
(1) registering the sound card controller drive, and then entering the step (2);
(2) checking whether the hardware of the sound card controller exists or not, if not, ending the operation, otherwise, entering the step (3);
(3) initializing a sound card controller, and then entering the step (4);
(4) inquiring hardware information of all multimedia digital signal codecs on the sound card controller, and then entering the step (5);
(5) checking whether multimedia digital signal codec hardware exists, if not, ending the operation, otherwise, entering the step (6);
(6) checking whether the drive of the multimedia digital signal codec is registered, if not, ending the operation, otherwise, entering the step (7);
(7) inquiring and matching a driver in a registry of the multimedia digital signal codec, and entering the step (8);
(8) checking whether a driving program corresponding to the multimedia digital signal codec hardware is found, if not, ending the operation, otherwise, entering the step (9);
(9) initializing a codec driver of the multimedia digital signal, and then entering step (10);
(10) and starting the multimedia digital signal codec and finishing the operation.
CN201710751264.4A 2017-08-28 2017-08-28 Method for dynamically loading sound card drive on real-time operating system Active CN107506212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710751264.4A CN107506212B (en) 2017-08-28 2017-08-28 Method for dynamically loading sound card drive on real-time operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710751264.4A CN107506212B (en) 2017-08-28 2017-08-28 Method for dynamically loading sound card drive on real-time operating system

Publications (2)

Publication Number Publication Date
CN107506212A CN107506212A (en) 2017-12-22
CN107506212B true CN107506212B (en) 2021-08-17

Family

ID=60693771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710751264.4A Active CN107506212B (en) 2017-08-28 2017-08-28 Method for dynamically loading sound card drive on real-time operating system

Country Status (1)

Country Link
CN (1) CN107506212B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988249A (en) * 2021-03-23 2021-06-18 上海摩勤智能技术有限公司 Method and device for creating sound card, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512335A (en) * 2002-12-31 2004-07-14 北京科泰世纪科技有限公司 Drive method based on structure operation system dynamic equipment
CN102082969A (en) * 2010-10-29 2011-06-01 广东星海数字家庭产业技术研究院有限公司 External Bluetooth equipment driving system for set-top box
CN103942078A (en) * 2014-04-30 2014-07-23 华为技术有限公司 Method for loading driver and embedded device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512335A (en) * 2002-12-31 2004-07-14 北京科泰世纪科技有限公司 Drive method based on structure operation system dynamic equipment
CN102082969A (en) * 2010-10-29 2011-06-01 广东星海数字家庭产业技术研究院有限公司 External Bluetooth equipment driving system for set-top box
CN103942078A (en) * 2014-04-30 2014-07-23 华为技术有限公司 Method for loading driver and embedded device

Also Published As

Publication number Publication date
CN107506212A (en) 2017-12-22

Similar Documents

Publication Publication Date Title
US10877766B2 (en) Embedded scheduling of hardware resources for hardware acceleration
JP5911892B2 (en) Multistage resume from hibernate
US8261284B2 (en) Fast context switching using virtual cpus
US8972699B2 (en) Multicore interface with dynamic task management capability and task loading and offloading method thereof
US20110246988A1 (en) Hypervisor for starting a virtual machine
US7996722B2 (en) Method for debugging a hang condition in a process without affecting the process state
US20130086571A1 (en) Dynamically Updating Firmware In A Computing System
CN1189828C (en) Pattern controller and power supply management method used in pattern controller
US7606973B2 (en) System and method for pervasive computing with a portable non-volatile memory device
US20120144146A1 (en) Memory management using both full hardware compression and hardware-assisted software compression
US11875145B2 (en) Virtual machine update while keeping devices attached to the virtual machine
US11366679B2 (en) Guest operating system wake-up method, device, electronic apparatus, and readable medium
CN107506212B (en) Method for dynamically loading sound card drive on real-time operating system
US20040225874A1 (en) Method for reduced BIOS boot time
US20050071692A1 (en) Method and system for operating system quiescent state
CN102141915A (en) Equipment real-time control method based on RTLinux
CN113961370A (en) Method, device, server and storage medium for communication between BMC and BIOS
CN113377566A (en) UEFI (unified extensible firmware interface) -based server starting method and device and storage medium
CN111930502A (en) Server management method, device, equipment and storage medium
CN112783562B (en) Display equipment selection method and device
US20220398083A1 (en) Providing system updates in automotive contexts
CN114860349B (en) Data loading method, device, equipment and medium
US20080016264A1 (en) Method and system for handling user-defined interrupt request
CN117408061A (en) Whole vehicle model simulation performance optimization system and computer device
CN117408060A (en) Whole vehicle model simulation performance optimization method, storage medium and electronic equipment

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