CN100508057C - Audio playing device and audio playing method - Google Patents

Audio playing device and audio playing method Download PDF

Info

Publication number
CN100508057C
CN100508057C CNB2006101655171A CN200610165517A CN100508057C CN 100508057 C CN100508057 C CN 100508057C CN B2006101655171 A CNB2006101655171 A CN B2006101655171A CN 200610165517 A CN200610165517 A CN 200610165517A CN 100508057 C CN100508057 C CN 100508057C
Authority
CN
China
Prior art keywords
audio
data
audio codec
iis bus
control module
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.)
Expired - Fee Related
Application number
CNB2006101655171A
Other languages
Chinese (zh)
Other versions
CN1988036A (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.)
Vimicro Corp
Original Assignee
Vimicro Corp
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 Vimicro Corp filed Critical Vimicro Corp
Priority to CNB2006101655171A priority Critical patent/CN100508057C/en
Publication of CN1988036A publication Critical patent/CN1988036A/en
Application granted granted Critical
Publication of CN100508057C publication Critical patent/CN100508057C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

This invention discloses an audio play device including a memory module, an EMS memory, a control module, An Audio Codec and a loudspeaker and an IIS bus connecting said control module and the Audio Codec, in which, when playing audio data of single-tracks, the sample rate of the IIS bus interface and the Audio Codec are set to 1/2 of the original sample rate of audio data. This invention also discloses an audio play method for playing audio data of single tracks.

Description

A kind of audio playing apparatus and audio frequency playing method
Technical field
The present invention relates to the voice data process field, particularly a kind of audio playing apparatus and audio frequency playing method.
Technical background
At present, in various mobile communication equipments and mobile multimedia player product, playing back music has become the function of an indispensability.Wherein relevant with playing back music hardware module generally comprises:
1) memory module is used to preserve audio file;
2) internal memory is used for buffered audio data;
3) control module generally promptly refers to CPU, is used to control the correlation module operate as normal, is responsible for the voice data of memory module is read, and is placed in the internal memory; Also comprise the voice data bus interface in this module, by this interface and corresponding data bus, the voice data in the internal memory is transferred to audio codec;
4) audio codec Audio Codec is used for voice data carried out relevant treatment such as digital-to-analog conversion and mixing;
5) loudspeaker is used to play the voice data of handling through Audio Codec.
Usually carry out data transmission with the IIS bus between described control module and the Audio Codec, the IIS bus can be transmitted the data of PCM form.Generally after selecting to play certain audio file, control module can read voice data and put into internal memory from memory module, can obtain the sampling rate of voice data then, and IIS interface and Audio Codec among control module and the Audio Codec are set with this sampling rate.Then, control module can be given external Audio Codec by the IIS bus transfer with voice data from internal memory, is come out by loudspeaker plays after through Audio Codec data being carried out digital-to-analog conversion and waited processing then.
Below data are described in detail through the IIS bus transfer and through the detailed process that Audio Codec handles.
The IIS bus comprises three string lines, is respectively: the data line I of time-sharing multiplex 2SDI/DO, field selection wire (being the track selecting line) I 2SWS and clock signal wire I 2STXCK.Data line wherein is the voice data that comes transmission corresponding sound channel in time-sharing multiplex ground according to the value IIS_WS of track selecting line.As shown in Figure 1, the data of left and right acoustic channels can be separated sequentially to go over from the time-sharing multiplex data line transmission of IIS bus in the dual-channel audio data, as when IIS_WS is 0, and the data of transmission L channel, when IIS_WS is 1, the data of transmission R channel.Audio Codec carries out digital-to-analog conversion to the data of left and right acoustic channels respectively then, carries out hybrid processing then, after loudspeaker plays come out.
Through IIS bus transfer and the variation of data stream frequency f in Audio Codec processing procedure, as shown in Figure 2.
At first, shown in first and second row among Fig. 2, be the PCM formatted data for from internal memory, taking out the data that send to the IIS bus interface, in the drawings with L by CPU n, R nN sampled data representing left and right acoustic channels respectively, other data L N+1, R N+1Deng the implication of representative by that analogy, the left and right acoustic channels sampling rate is the same, is designated as f.
Secondly, when the data of L channel and R channel were transmitted in the IIS bus, the L channel data frequency in the time-sharing multiplex data line in the IIS bus still was f, and the right data frequency also is f, and the overall data transmission rate of IIS bus left and right acoustic channels then is 2f.Shown in the third line among Fig. 2, be marked in the data L on the time-sharing multiplex data line of IIS bus, being transmitted of horizontal line top from L channel n, L N+1Deng, and at the data R from R channel for being transmitted on the time-sharing multiplex data line in the IIS bus below the horizontal line n, R N+1Deng, in fact the data of transmitting on the IIS bus are followed successively by L n, R n, L N+1, R N+1, L N+2, R N+2Deng.
Data are further divided into two-way by Audio Codec and carry out D/A conversion respectively and mix after the IIS bus transfer then.Shown in fourth, fifth row among Fig. 2, after being divided into two-way and carrying out the D/A conversion, the data in the left and right sound channels are with L n' and R n' wait and represent, its frequency is also identical with first and second row among Fig. 2.After when mixing, directly, promptly obtained mixed data with two data additions of left and right acoustic channels, shown in the 6th row among Fig. 2, M n=L n'+R n', its frequency also frequency f with a PCM form left side or R channel is identical.
Because the IIS bus is only supported the transmission of dual-channel audio, so the audio frequency of playing must be a two-channel.When needs transmission monaural audio data, need to convert monophony to two-channel data are transmitted above the IIS bus in the past so.Else if directly by IIS bus transfer monaural audio data, in the transmission course of IIS bus, monaural audio data will be caused under normal sampling rate like this by the going over as the left and right acoustic channels data transmission of order, and the speed of broadcast can be fast again.And monophony need be taken the more internal memory of system to the conversion of two-channel, also need to spend more time.
Summary of the invention
In view of this, when the technical issues that need to address of the present invention are exactly monaural audio data by the IIS bus transfer, the problem that sound channel transfer process committed memory and time are too much.
In order to solve the problems of the technologies described above, the invention provides a kind of audio playing apparatus, comprise memory module, internal memory, control module, Audio Codec, loudspeaker, and the IIS bus that connects described control module and Audio Codec, in control module and Audio Codec, the IIS bus interface is arranged all;
Described memory module is used to preserve audio file;
Described control module is used to control the total system operate as normal, is responsible for the audio file of memory module is read, and after resolving, voice data is placed in the internal memory; Utilize to resolve IIS bus interface and AudioCodec among described control module of information setting such as the channel number that obtains, sampling rate and the described Audio Codec, when described channel number is monophony, IIS bus interface among described control module and the described Audio Codec and the sampling rate of Audio Codec be set to resolve gained the audio data samples rate 1/2; In addition, comprise the IIS bus interface in this module, by this interface and the IIS bus that is attached thereto, the voice data in the described internal memory is transferred to Audio Codec;
Described internal memory is used for the voice data that buffer memory is resolved gained;
Audio Codec carries out relevant treatment such as digital-to-analog conversion and mixing with 1/2 pair of voice data of the audio data samples rate of resolving gained;
Loudspeaker is used to play the voice data of handling through Audio Codec.
Further, described device also comprises decompression module, is used for the monaural audio data of the compressed format of internal memory is de-compressed into to PCM formatted data earlier, sends to the IIS bus interface among the CPU then.
Further, the monaural audio data in the described internal memory is compression forms such as MP3, AMR.
Preferably, described memory module is memory devices such as SD card, mmc card or Nandflash.
Preferably, save as SDRAM in described.
The present invention also provides a kind of audio frequency playing method, comprises the steps:
Obtain audio file, it is resolved form, sample rate f, channel number and the voice data that obtains audio file, preserve described voice data;
Utilize the channel number and the sampling rate of described acquisition that Audio Codec and IIS bus are set, be specially, if monaural audio data then is provided with Audio Codec and IIS bus with 1/2 of f, if dual-channel audio data then is provided with Audio Codec and IIS bus for f;
Come out for Audio Codec by loudspeaker plays through processing such as digital-to-analog conversion and mixing back by the IIS bus transfer described monaural audio data.
Further,, then de-compress into formatted data earlier, send to the IIS bus interface among the CPU then into PCM if the monaural audio data in the internal memory is a packed data.
Further, described packed data is MP3, formatted datas such as AMR.
The present invention obtains its sampling rate earlier before playing monaural audio data, and with half of sample rates values IIS bus and Audio Codec is set.In playing process, adopt the IIS bus that monaural audio data directly is transferred to Audio Codec, Audio Codec passes through loudspeaker plays after then with the sampling rate of half voice data being handled.Use the present invention, do not need to convert monaural audio data to two-channel, just can give Audio Codec by the IIS bus transfer, and normally play back data.
Description of drawings
Fig. 1 is an IIS bus timing synoptic diagram;
Fig. 2 for dual-channel audio data in the prior art by the IIS bus transfer, handle and the data frequency that mixes changes synoptic diagram by Audio Codec;
Fig. 3 is apparatus of the present invention connection diagram;
Fig. 4 for monaural audio data of the present invention by the IIS bus transfer, handle and the data frequency that mixes changes synoptic diagram by Audio Codec;
Fig. 5 is the inventive method process flow diagram.
Embodiment
When utilizing IIS bus transfer monaural audio data, way commonly used is to convert monaural audio data to dual-channel audio data, plays back according to original sampling rate then.And core concept of the present invention is with 1/2 sampling rate Audio Codec and IIS bus interface to be set, and directly transmits monaural audio data by the IIS bus then, makes Audio Codec carry out data processing with 1/2 sampling rate.Thereby need not convert monophony to dual-channel audio data, can realize can normal play through IIS bus transfer and the monaural audio data after Audio Codec handles.
Below in conjunction with accompanying drawing, describe device and method of the present invention in detail.
As shown in Figure 3, apparatus of the present invention and prior art are similar, comprising: memory module, internal memory, control module, Audio Codec, loudspeaker, adopt the IIS bus to carry out data transmission between control module and the Audio Codec.Below each module is made simple introduction.
Wherein, described memory module is used to preserve audio file, comprises information such as voice data and sample rate f thereof, channel number, file layout in the audio file.In this example, suppose to have the audio file A of a PCM form to be stored in the memory module.
Described control module as CPU, is used to control the total system operate as normal, and be responsible for the audio file A in the memory module is read, resolve information and voice datas such as obtaining sample rate f, channel number, establishing the sampling rate that obtains at this is 44.1KHz, and is monophony.Then voice data is placed in the internal memory; And IIS bus interface and Audio Codec are provided with according to channel number and sampling rate.Described setting to the IIS bus interface comprises the setting to IIS bus interface (not shown) among control module and the Audio Codec; Described setting to Audio Codec comprises single two-channel setting, the sampling rate setting to Audio Codec, other is provided with that to be provided with etc. as volume be not concern main points of the present invention to Audio Codec, do not repeat them here, when Audio Codec and IIS bus interface thereof are set, can use the control bus iic bus.Described setting is specially: if learn that by channel number voice data is a monaural audio data, then before playing audio-fequency data, IIS bus and Audio Codec as described in control module is provided with as half 44.1KHz/2 of 44.1KHz with the monaural audio data sample rate f.Utilize then the IIS bus with the audio data transmission in the internal memory in Audio Codec.
Described internal memory is used for the voice data that the buffer memory control module is sent here.
Described Audio Codec carries out digital-to-analog conversion with sampling rate 44.1KHz/2 to voice data, and data such as are mixed at relevant treatment.
Described loudspeaker is used to play the voice data of handling through Audio Codec, and loudspeaker can comprise audio output apparatus such as earphone or audio amplifier.
Through above-mentioned control module to after being provided with of IIS bus and Audio Codec, when playing audio-fequency data, data frequency changes as shown in Figure 4, the first line display monaural audio data is still with L n, L N+1Deng each sampled point of expression, its sampling rate is 44.1KHz.By IIS bus transfer monaural audio data the time, monaural audio data can be separated to be used as the left and right acoustic channels data and transmit in the past, because when before transmission the IIS bus interface being set, sampling rate reduces by half, thereby cause frequency at IIS bus transmitting data to become original half.Shown in second row among Fig. 4, the L of horizontal line top n, L N+2, L N+4Etc. data is the data of transmitting on the IIS bus L channel, and L N+1, L N+3, L N+5Then be that R channel by the IIS bus transmits.During Audio Codec deal with data, also handle, shown in third and fourth row among Fig. 4,, be respectively L ' for Audio Codec is divided into data after left and right sides two-way carries out digital-to-analog conversion by the sampling rate of f/2 n, L ' N+2, L ' N+4Deng, another road is L ' n, L ' N+3, L ' N+5Etc. data, as seen from the figure, the frequency of every circuit-switched data has been reduced to half of former monaural audio data frequency.When Audio Codec blended data, the voice data that is divided into two halves originally is mixed into complete monaural audio data, at this moment M then n=L ' N+L ' N+1, M N+2=L ' N+2L ' N+3..., other M value is by that analogy.The frequency of M is f/2 in fact, and promptly former relatively monophonic audio signal data volume is a half, but for people's ear, this does not influence the effect of the sound that receives, and therefore can accept the sound that this sound is normal play.
The memory module of described storing audio files can be SD card, mmc card, memory devices such as Nandflash.The internal memory that is used for buffered audio data all is SDRAM usually.
In addition, if monaural audio data is a compressed format, as MP3, AMR etc., then also should comprise a decompression module in apparatus of the present invention, be connected with control module, under the control of control module, the data in the internal memory de-compressed into to PCM data earlier, send to the IIS bus interface in the control module then.If data are not compressed, just directly give IIS bus interface.
As shown in Figure 6, audio frequency playing method of the present invention may further comprise the steps:
100 obtain audio file, and it is resolved form, sample rate f, channel number and the voice data that obtains audio file, preserve described voice data;
At first need to read audio file and it is resolved, therefrom obtain form, sample rate f, channel number and the voice data etc. of audio file.At this, the audio file of establishing in this example is PCM, and its sampling rate is 44.1KHz, is monaural audio data.Simultaneously voice data is preserved.
200 utilize the channel number and the sampling rate that obtain in the step 100 that Audio Codec and IIS bus are set.In this step, according to the relevant information of obtaining in the step 100 IIS bus and Audio Codec are provided with; Be specially,, then IIS bus and AudioCodec be set with f1/2 if monophony and sampling rate are f1; If two-channel and sampling rate are f2, then IIS bus and Audio Codec are set with f2;
At this, because in this example be monaural audio data, so be that 44.1KHz/2 is provided with IIS bus and Audio Codec with 1/2 of its sampling rate;
300 pass through processing backs such as digital-to-analog conversion and mixing for Audio Codec by the IIS bus transfer described monaural audio data is come out by loudspeaker plays.
Use this method, voice data by in the process of IIS bus transfer and in decoding the time, the existing narration in aforementioned means of mixed Change of Data Stream, can be with reference to content shown in the accompanying drawing 4.
In addition, monaural audio data is if compressed format, such as MP3, and AMR etc., then needing to decompress earlier converts into the PCM data to, be sent to the IIS bus interface among the CPU then.If data are not compressed, just directly give IIS bus interface.
In the present invention, we are after using IIS bus transfer monaural audio data, sampling rate is reduced to original half, be actually the sampling rate that has reduced former voice data, though can make the quality of sound that certain loss is arranged like this, but can play back normally by enable voice, and do not need monaural audio data to convert dual-channel audio data to.At some tonequality being required is not that too strict application is of great use, such as playing voice, speech sound etc.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement etc., all should be included within protection scope of the present invention.

Claims (8)

1, a kind of audio playing apparatus, it is characterized in that, comprise memory module, internal memory, control module, AudioCodec, loudspeaker, and the IIS bus that connects described control module and Audio Codec, in control module and Audio Codec, the IIS bus interface is arranged all;
Described memory module is used to preserve audio file;
Described control module is used to control the total system operate as normal, is responsible for the audio file of memory module is read, and after resolving, voice data is placed in the internal memory; Channel number, the sampling rate of utilizing parsing to obtain is provided with IIS bus interface and the Audio Codec among described control module and the described Audio Codec, when described channel number is monophony, IIS bus interface among described control module and the described Audio Codec and the sampling rate of Audio Codec be set to resolve gained the audio data samples rate 1/2; In addition, comprise the IIS bus interface in the described control module, by IIS bus interface in the described control module and the IIS bus that is attached thereto, the voice data in the described internal memory is transferred to Audio Codec;
Described internal memory is used for the voice data that buffer memory is resolved gained;
Audio Codec carries out digital-to-analog conversion and mixing with 1/2 pair of voice data of the audio data samples rate of resolving gained;
Loudspeaker is used to play the voice data of handling through Audio Codec.
2, device according to claim 1 is characterized in that, also comprises decompression module, is used for the monaural audio data of the compressed format of internal memory is de-compressed into the formatted data into PCM earlier, sends to the IIS bus interface in the control module then.
3, device according to claim 2 is characterized in that, the monaural audio data in the described internal memory is MP3, AMR compressed format.
4, device according to claim 1 is characterized in that, described memory module is SD card, mmc card or Nandflash memory device.
5, device according to claim 1 is characterized in that, saves as SDRAM in described.
6, a kind of audio frequency playing method is characterized in that, comprises the steps:
Obtain audio file, it is resolved form, sample rate f, channel number and the voice data that obtains audio file, preserve described voice data;
Utilize the channel number and the sampling rate that obtain that Audio Codec and IIS bus are set, be specially, if monaural audio data then is provided with Audio Codec and IIS bus with 1/2 of f, if dual-channel audio data then is provided with Audio Codec and IIS bus with f;
Come out by loudspeaker plays after giving Audio Codec through digital-to-analog conversion and hybrid processing by the IIS bus transfer the described monaural audio data.
7, method according to claim 6 is characterized in that, if the monaural audio data in the internal memory is a packed data, then de-compresses into to PCM formatted data earlier, sends to the IIS bus interface in the control module then.
8, method according to claim 7 is characterized in that, described packed data is MP3, the AMR formatted data.
CNB2006101655171A 2006-12-21 2006-12-21 Audio playing device and audio playing method Expired - Fee Related CN100508057C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101655171A CN100508057C (en) 2006-12-21 2006-12-21 Audio playing device and audio playing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101655171A CN100508057C (en) 2006-12-21 2006-12-21 Audio playing device and audio playing method

Publications (2)

Publication Number Publication Date
CN1988036A CN1988036A (en) 2007-06-27
CN100508057C true CN100508057C (en) 2009-07-01

Family

ID=38184791

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101655171A Expired - Fee Related CN100508057C (en) 2006-12-21 2006-12-21 Audio playing device and audio playing method

Country Status (1)

Country Link
CN (1) CN100508057C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364417B (en) * 2008-09-17 2011-05-25 青岛海信移动通信技术股份有限公司 Audio fast playing method and apparatus
CN105472509B (en) * 2015-12-30 2019-08-16 深圳Tcl数字技术有限公司 Audio signal sending, receiving method and device

Also Published As

Publication number Publication date
CN1988036A (en) 2007-06-27

Similar Documents

Publication Publication Date Title
US11109138B2 (en) Data transmission method and system, and bluetooth headphone
CN101079265B (en) Voice signal processing system
CN101151659B (en) Multi-channel audio coder, device, method and decoder, device and method
US20070150082A1 (en) Method, mechanism, implementation, and system of real time listen-sing-record STAR karaoke entertainment (STAR "Sing Through And Record")
JPWO2005081229A1 (en) Audio encoder and audio decoder
CN104113384A (en) Main control system of vehicle-mounted broadcasting equipment
CN100508057C (en) Audio playing device and audio playing method
CN112218019B (en) Audio data transmission method and device
CN105959438A (en) Processing method and system for audio multi-channel output loudspeaker and mobile phone
CN102917141B (en) A kind of method of testing of evaluating voice quality, Apparatus and system
CN104468991A (en) Mobile terminal and voice frequency receiving and sending method thereof
CN103475979A (en) Vocal accompaniment system reducing playback audio delay and method for reducing playback audio delay
CN107547984A (en) A kind of audio-frequency inputting method and audio output system based on intelligent terminal
WO2015131591A1 (en) Audio signal output method, device, terminal and system
CN107507617A (en) A kind of system and method realized DSD audios and solved firmly
US11696075B2 (en) Optimized audio forwarding
CN207692037U (en) The lossless language play back system of onboard instruments low cost
CN102867514B (en) A kind of sound mixing method and device sound mixing
CN111445742B (en) Vocal music teaching system based on distance education system
JP2008119442A (en) Audio device-compatible robot terminal capable of playing multimedia contents file having motion data
CN107251121A (en) Information provider unit, terminal installation, information providing system and information providing method
CN104954942A (en) Signal input device and method for echo cancellation
KR20080009004A (en) Data recording apparatus, data recording method, and data recording program
KR20110049083A (en) Portable multimedia apparatus, audio reproducing apparatus and audio system for reproducing digital audio signal
CN215818639U (en) Time delay compensation system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090701

Termination date: 20111221