CN106933529B - Method and system for providing audio service - Google Patents

Method and system for providing audio service Download PDF

Info

Publication number
CN106933529B
CN106933529B CN201710059297.2A CN201710059297A CN106933529B CN 106933529 B CN106933529 B CN 106933529B CN 201710059297 A CN201710059297 A CN 201710059297A CN 106933529 B CN106933529 B CN 106933529B
Authority
CN
China
Prior art keywords
audio
service
pulseaudio
hal
new
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
CN201710059297.2A
Other languages
Chinese (zh)
Other versions
CN106933529A (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.)
Yuanxin Information Technology Group Co.,Ltd.
Original Assignee
Beijing Yuanxin Science and 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 Yuanxin Science and Technology Co Ltd filed Critical Beijing Yuanxin Science and Technology Co Ltd
Priority to CN201710059297.2A priority Critical patent/CN106933529B/en
Publication of CN106933529A publication Critical patent/CN106933529A/en
Application granted granted Critical
Publication of CN106933529B publication Critical patent/CN106933529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • 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
    • G06F9/44526Plug-ins; Add-ons
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72433User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a method and a system for providing audio service, wherein the method comprises the following steps: separating a logic part interacting with a modem in an Audio hardware abstraction layer Audio Hal of the mobile terminal to obtain a transplanted Audio Hal; packing the transplanted Audio Hal into an Audio Hal plug-in; integrating the Audio Hal plug-in into a pulseAudio service to obtain a new pulseAudio service, so that the new pulseAudio service can automatically call the Audio Hal plug-in after being started; and using the new PulseAudio audio service as the audio service of the mobile terminal. The invention can make the PulseAudio be used in the mobile phone equipment, thus the audio service of the mobile phone can have the advantages of PulseAudio.

Description

Method and system for providing audio service
Technical Field
The present application relates to the field of processing of electrical digital data, and more particularly, to a method and system for providing audio services.
Background
With the rise of smart phones, mobile phones have become essential in daily life. Most current mobile phone manufacturers adopt hardware platforms based on ARM architecture and Android mobile phone operating systems. The audio service adopted by the Android mobile phone system is audioflex (name of Android audio service) implemented by the Android mobile phone system. However, based on the prior art, audiolinger can only run in the Android system based on the Bionic (name of function library) function library. Compared with other mainstream audio services, the method has the obvious defects of forced resampling, high system resource occupancy rate, high delay and the like.
PulseAudio is a cross-platform audio service with network work functions developed by the freedesktop project group (freedesktop is a project devoted to interoperability and underlying technology sharing between the desktop environments of Linux and other Unix-like X windowing systems), which can run on operating systems such as Linux, BSD, MacOS X, and Windows. However, PulseAudio cannot directly replace Android Audio flinger, because handset manufacturers provide their own Audio Hal layers, and there are Audio path logic operation parts related to phones in the Audio Hal layers, PulseAudio cannot cross the Audio Hal layers to control Modem modems, so PulseAudio cannot handle phone operations and the like.
Therefore, the audio service with higher efficiency and more functions is realized on the mobile phone equipment, and the use experience of the user can be greatly improved.
Disclosure of Invention
In order to overcome the defects in the prior art, the technical problem to be solved by the invention is to provide a method and a system for providing audio service, which enable PulseAudio to be used in mobile phone equipment, and can control the logic processing of a mobile phone telephone while performing normal operation of playing a recording.
In order to solve the above technical problem, the method for providing an audio service of the present invention includes:
separating a logic part interacting with a modem in an Audio hardware abstraction layer Audio Hal of the mobile terminal to obtain a transplanted Audio Hal;
packing the transplanted Audio Hal into an Audio Hal plug-in;
integrating the Audio Hal plug-in into a pulseAudio service to obtain a new pulseAudio service, so that the new pulseAudio service can automatically call the Audio Hal plug-in after being started;
and using the new PulseAudio audio service as the audio service of the mobile terminal.
As an improvement of the method of the present invention, the separating a logic part interacting with a modem in an Audio hardware abstraction layer Audio Hal of the mobile terminal to obtain the transplanted Audio Hal includes: cutting off an Audio data transmission part and an Audio channel control part in the Audio Hal of the mobile terminal, and reserving a voice communication part; replacing all interface functions calling a TinyAlsa library in the reserved voice call part with interface functions calling an Alsalib library; and recompiling the voice call part processed in the previous step by using the glibc function library to obtain the transplanted Audio Hal.
As another improvement of the method of the present invention, the method further comprises: the new PulseAudio audio service calls down the standard ALSA library.
As a further improvement of the method of the present invention, the method further comprises: the new PulseAudio audio service calls the ASOC layer further down.
As a still further improvement of the method of the present invention, the method further comprises: the new PulseAudio service further calls the Audio Driver down.
To solve the above technical problem, the system for providing audio service of the present invention comprises:
the separation module is used for separating a logic part interacted with the modem in the Audio hardware abstraction layer Audio Hal of the mobile terminal to obtain a transplanted Audio Hal;
a packaging module for packaging the transplanted Audio Hal into an Audio Hal plug-in;
an integration module, configured to integrate the Audio Hal plugin into a PulseAudio service to obtain a new PulseAudio service, so that the new PulseAudio service automatically calls the Audio Hal plugin after being started;
and the using module is used for using the new PulseAudio audio service as the audio service of the mobile terminal.
As an improvement of the system of the present invention, the separation module comprises: the cutting submodule is used for cutting off an Audio data transmission part and an Audio channel control part in the Audio Hal of the mobile terminal and reserving a voice communication part; the replacing submodule is used for replacing all interface functions calling the TinyAlsa library in the reserved voice call part with the interface functions calling the Alsalib library; and the compiling submodule is used for recompiling the voice call part processed in the previous step by using the glibc function library to obtain the transplanted Audio Hal.
As another improvement of the system of the present invention, the system further comprises: and the first calling module is used for enabling the new PulseAudio audio service to call a standard ALSA library downwards.
As a further improvement of the system of the present invention, the system further comprises: and the second calling module is used for enabling the new PulseAudio audio service to further call the ASOC layer downwards.
As a still further improvement of the system of the present invention, the system further comprises: and the third calling module is used for enabling the new PulseAudio service to further call an Audio Driver downwards.
To solve the above technical problem, the tangible computer readable medium of the present invention includes a computer program code for executing the above method of providing an audio service.
To solve the above technical problem, the present invention provides an apparatus, comprising at least one processor; and at least one memory including computer program code, the at least one memory and the computer program code configured to, with the at least one processor, cause the apparatus to perform at least some of the steps of the method of providing audio services of the present invention.
According to the invention, by integrating the Audio Hal into the pulseAudio, the pulseAudio can indirectly operate the Modem, so that the pulseAudio can control the logic processing of the mobile phone. Meanwhile, the PluseAudio still performs normal recording playing operation on the downward operation hardware through the ALSA. Therefore, the PulseAudio can run on the mobile phone equipment, more efficient and multifunctional audio service is realized, and the use experience of a user is better improved.
Other features and advantages of the present invention will become more apparent from the detailed description of the embodiments of the present invention when taken in conjunction with the accompanying drawings.
Drawings
FIG. 1 is a flow chart of an embodiment of a method according to the present invention.
FIG. 2 is a schematic diagram of an embodiment of a system according to the present invention.
For the sake of clarity, the figures are schematic and simplified drawings, which only show details which are necessary for understanding the invention and other details are omitted.
Detailed Description
Embodiments and examples of the present invention will be described in detail below with reference to the accompanying drawings.
The scope of applicability of the present invention will become apparent from the detailed description given hereinafter. It should be understood, however, that the detailed description and the specific examples, while indicating preferred embodiments of the invention, are given by way of illustration only.
At present, the audio architecture of the Android mobile phone is as follows: the AudioFlinger Audio service calls down the Audio Hal Layer (the Hal is called Hardware Abstraction Layer, Hardware Abstraction Layer), the Audio Hal will communicate with the Modem in a manner of sending AT commands (AT is Modem command language), and AT the same time, the Audio Hal Layer will call down TinyAlsa (function library of Google Audio), and then call down the ASOC framework (ALSA System on Chip (advanced Linux Sound architecture) refers to advanced Linux Sound architecture)), and finally call to the Audio driver Layer (Audio driver).
The audio architecture on a personal computer is: the pulseaudio Audio service calls the alsa library down, then calls the ASOC framework down, and finally calls the Audio Driver.
The invention provides a solution method which adopts an audio hardware platform support based on an ALSA framework and uses pulseAudio as audio service.
The steps of an embodiment of the method for providing an audio service according to the present invention will be described in detail with reference to the flowchart shown in fig. 1.
In step S102, a logic part interacting with a modem in an Audio hardware abstraction layer Audio Hal of a mobile terminal such as a mobile phone is separated to obtain a ported Audio Hal. The Android Audio Hal layer mainly comprises three parts: the voice communication system comprises an audio data transmission part, an audio channel control part and a voice communication part, wherein the voice communication part is a logic part interacting with a modem. According to one embodiment, the transplanted Audio Hal is obtained by: cutting off an Audio data transmission part and an Audio channel control part in the Audio Hal of the mobile terminal, and reserving a voice communication part; replacing all interface functions calling a TinyAlsa library in the reserved voice call part with interface functions calling an Alsalib library; and recompiling the voice call part processed in the previous step by using the glibc function library to obtain the transplanted Audio Hal.
In step S104, the ported Audio Hal is packaged into an Audio Hal plug-in.
In step S106, the Audio Hal plugin is integrated into the PulseAudio service to obtain a new PulseAudio service, so that the new PulseAudio service automatically calls the Audio Hal plugin after being started.
In step S108, the new PulseAudio audio service is used as the audio service of the mobile terminal, instead of the previous AudioFlinger audio service.
According to an embodiment of the method of the present invention, the method further comprises: the new PulseAudio service calls down the standard ALSA library, then calls down the ASOC layer further, and then calls down the Audio Driver further.
The invention transplants the logic part of interaction with Modem in the Audio Hal layer provided by the mobile phone equipment manufacturer to be used as a plug-in of pulseAudio to operate, and then the Audio Hal can call the standard ALSA library downwards without calling the TinyAlsa library. Meanwhile, the Audio Hal layer still uses the AT command to perform interactive communication with the modem to complete the telephone-related logical processing. Then calls Audio Driver down again by calling ASOC layer. Therefore, the PulseAudio can be used in the mobile phone equipment, and the audio service of the mobile phone equipment has the advantage of the PulseAudio.
Fig. 2 is a schematic structural diagram illustrating an embodiment of a system for providing an audio service according to the present invention, the system including: a separation module 202, configured to separate a logic portion of an Audio hardware abstraction layer Audio Hal of the mobile terminal, where the logic portion interacts with a modem, to obtain a transplanted Audio Hal; a packaging module 204, configured to package the transplanted Audio Hal into an Audio Hal plug-in; an integration module 206, configured to integrate the Audio Hal plugin into a PulseAudio service to obtain a new PulseAudio service, so that the new PulseAudio service automatically calls the Audio Hal plugin after being started; a using module 208, configured to use the new PulseAudio audio service as an audio service of the mobile terminal; a first calling module 210, configured to enable the new PulseAudio audio service to call a standard ALSA library downward; a second calling module 212, configured to enable the new PulseAudio audio service to further call the ASOC layer downward; a third calling module 214, configured to enable the new PulseAudio service to further call down an audio driver AudioDriver. Wherein the separation module 202 comprises: the cutting submodule is used for cutting off an Audio data transmission part and an Audio channel control part in the Audio Hal of the mobile terminal and reserving a voice communication part; the replacing submodule is used for replacing all interface functions calling the TinyAlsa library in the reserved voice call part with the interface functions calling the Alsalib library; and the compiling submodule is used for recompiling the voice call part processed in the previous step by using the glibc function library to obtain the transplanted Audio Hal.
The particular features, structures, or characteristics of the various embodiments described herein may be combined as suitable in one or more embodiments of the invention. Additionally, in some cases, the order of steps depicted in the flowcharts and/or in the pipelined process may be modified, as appropriate, and need not be performed exactly in the order depicted. In addition, various aspects of the invention may be implemented using software, hardware, firmware, or a combination thereof, and/or other computer implemented modules or devices that perform the described functions. Software implementations of the present invention may include executable code stored in a computer readable medium and executed by one or more processors. The computer readable medium may include a computer hard drive, ROM, RAM, flash memory, portable computer storage media such as CD-ROM, DVD-ROM, flash drives, and/or other devices, for example, having a Universal Serial Bus (USB) interface, and/or any other suitable tangible or non-transitory computer readable medium or computer memory on which executable code may be stored and executed by a processor. The present invention may be used in conjunction with any suitable operating system.
As used herein, the singular forms "a", "an" and "the" include plural references (i.e., have the meaning "at least one"), unless the context clearly dictates otherwise. It will be further understood that the terms "has," "includes" and/or "including," when used in this specification, specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
The foregoing describes some preferred embodiments of the present invention, but it should be emphasized that the invention is not limited to these embodiments, but can be implemented in other ways within the scope of the inventive subject matter. Various changes and modifications of the present invention can be made by those skilled in the art without departing from the spirit and scope of the present invention, and these changes and modifications still fall within the scope of the present invention.

Claims (8)

1. A method of providing audio services, the method comprising:
cutting off an Audio data transmission part and an Audio access control part in an Audio hardware abstraction layer Audio Hal of the mobile terminal, and reserving a voice call part;
replacing all interface functions calling a TinyAlsa library in the reserved voice call part with interface functions calling an Alsalib library;
recompiling the voice call part processed in the previous step by using a glibc function library to obtain the transplanted AudioHal;
packing the transplanted Audio Hal into an Audio Hal plug-in;
integrating the Audio Hal plug-in into a pulseAudio service to obtain a new pulseAudio service, so that the new pulseAudio service can automatically call the Audio Hal plug-in after being started;
and using the new PulseAudio audio service as the audio service of the mobile terminal.
2. The method of claim 1, further comprising:
the new PulseAudio audio service calls down the standard ALSA library.
3. The method of claim 2, further comprising:
the new PulseAudio audio service calls the ASOC layer further down.
4. The method of claim 3, further comprising:
the new PulseAudio service further calls the Audio Driver down.
5. A system for providing audio services, the system comprising:
the cutting module is used for cutting off an Audio data transmission part and an Audio access control part in an Audio hardware abstraction layer Audio Hal of the mobile terminal and reserving a voice communication part;
the replacing module is used for replacing all interface functions calling the TinyAlsa library in the reserved voice call part with the interface functions calling the Alsalib library;
the compiling module is used for recompiling the voice call part processed in the previous step by using the glibc function library to obtain the transplanted Audio Hal;
a packaging module for packaging the transplanted Audio Hal into an Audio Hal plug-in;
an integration module, configured to integrate the Audio Hal plugin into a PulseAudio service to obtain a new PulseAudio service, so that the new PulseAudio service automatically calls the Audio Hal plugin after being started;
and the using module is used for using the new PulseAudio audio service as the audio service of the mobile terminal.
6. The system of claim 5, further comprising:
and the first calling module is used for enabling the new PulseAudio audio service to call a standard ALSA library downwards.
7. The system of claim 6, further comprising:
and the second calling module is used for enabling the new PulseAudio audio service to further call the ASOC layer downwards.
8. The system of claim 7, further comprising:
and the third calling module is used for enabling the new PulseAudio service to further call an Audio Driver downwards.
CN201710059297.2A 2017-01-24 2017-01-24 Method and system for providing audio service Active CN106933529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710059297.2A CN106933529B (en) 2017-01-24 2017-01-24 Method and system for providing audio service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710059297.2A CN106933529B (en) 2017-01-24 2017-01-24 Method and system for providing audio service

Publications (2)

Publication Number Publication Date
CN106933529A CN106933529A (en) 2017-07-07
CN106933529B true CN106933529B (en) 2020-05-12

Family

ID=59423988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710059297.2A Active CN106933529B (en) 2017-01-24 2017-01-24 Method and system for providing audio service

Country Status (1)

Country Link
CN (1) CN106933529B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559199A (en) * 2019-09-24 2021-03-26 中兴通讯股份有限公司 Device and method for controlling android Bluetooth in glibc environment and terminal equipment
CN110780962B (en) * 2019-10-15 2022-02-01 四川长虹电器股份有限公司 Application window title bar and window control display method in X window manager
CN112910829B (en) * 2019-12-04 2022-05-17 海信集团有限公司 Audio sharing method, device and system
CN111916092A (en) * 2020-07-30 2020-11-10 山东超越数控电子股份有限公司 Qemu virtual machine remote audio transmission method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007977A (en) * 2014-06-09 2014-08-27 威盛电子股份有限公司 Electronic device and audio playing method
CN106155625A (en) * 2016-07-06 2016-11-23 北京元心科技有限公司 A kind of audio frequency adaptation method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007977A (en) * 2014-06-09 2014-08-27 威盛电子股份有限公司 Electronic device and audio playing method
CN106155625A (en) * 2016-07-06 2016-11-23 北京元心科技有限公司 A kind of audio frequency adaptation method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Ad hoc网络环境下基于嵌入式Linux平台的语音视频传输的研究与实现;赵奕;《中国优秀硕士学位论文全文数据库 信息科技辑》;20131115(第11期);全文 *

Also Published As

Publication number Publication date
CN106933529A (en) 2017-07-07

Similar Documents

Publication Publication Date Title
CN106933529B (en) Method and system for providing audio service
CN104754536A (en) Method and system for realizing communication between different languages
CN103440866B (en) The method of executing the task according to call-information and mobile terminal
CN104050966A (en) Voice interaction method of terminal equipment and terminal equipment employing voice interaction method
CN107018228B (en) Voice control system, voice processing method and terminal equipment
CN103491256B (en) Communication processing method and terminal device
CN103220392B (en) A kind of method of automatic recording, device and mobile terminal
CN111813724B (en) HIDL interface adapting system, method, corresponding equipment and storage medium
EP3051782A1 (en) Method and system for sending contact information in call process
CN103167120A (en) System and method for quickly looking up contacts in mobile phone calling process
EP3078022B1 (en) Multi-path audio processing
CN105791557A (en) Automatic VoLTE function switching method and system
US20120169534A1 (en) Optimizing performance of multiple location based service applications that are running either alone or simultaneously on a wireless device
US8863121B2 (en) Method and terminal for loading picture resources by JAVA virtual machine
CN110035167A (en) The way of recording and relevant apparatus
CN109246161B (en) Scheduling method and device of controller and computer readable storage medium
CN105635497A (en) Terminal call transfer method and call transfer terminal
CN116319689A (en) IVVR video interaction realization method, system and storage medium based on HTML5
US20150312411A1 (en) Method for directing a phone call to a web-based menu access point via a passive telephone access point
CN110113494B (en) Recording method and related device
KR101748039B1 (en) Sampling rate conversion method and system for efficient voice call
CN114300007A (en) WebRTC-based audio and video recording method and device
CN105740009B (en) Version upgrading method and terminal device
US20160088033A1 (en) Electronic device and method for establishing conference call
US20160019040A1 (en) Method for automatically converting android application to tizen installable package

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210202

Address after: 101300 room 153, 1 / F, building 17, 16 Caixiang East Road, Nancai Town, Shunyi District, Beijing

Patentee after: Yuanxin Information Technology Group Co.,Ltd.

Address before: 100176 room 2222, building D, building 33, 99 Kechuang 14th Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Patentee before: BEIJING YUANXIN SCIENCE & TECHNOLOGY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20170707

Assignee: Beijing Yuanxin Junsheng Technology Co.,Ltd.

Assignor: Yuanxin Information Technology Group Co.,Ltd.

Contract record no.: X2021110000018

Denomination of invention: Method and system of providing audio service

Granted publication date: 20200512

License type: Common License

Record date: 20210531