I would like to help you with this, but need more information.

Is this for output (speaker) or input (microphone)?

By "AndroidResampler", which source file do you mean (full pathname in the 
source code tree)?
(there are a few resamplers so I want to make sure I know which one you are 
talking about)

You mentioned "the default sampling rate in HAL is 8kHz".  Why is that?

Which section of CTSVerifier failed?

By "HD Audio Codec" do you mean a specific codec chip (in which case please 
give the manufacturer and model),
or any generic "high definition" codec?

On Tuesday, June 12, 2012 8:27:47 PM UTC-7, Audi Huang wrote:
>
> Hi all,
>
> We are porting ICS 4.0.3 on an X86 platform with an HD Audio Codec on it.
>
> It has a resampling issue which causes the Glitch test failed when running 
> CTSVerifier.
>
> Because the lowest sampling rate of the audio codec is 44kHz, the default 
> sampling rate in HAL is 8kHz, and CTSVerifier needs 16kHz sample data to 
> analyze, the recording stream needs to process resampling algorithms two 
> times.
>
> First time, the recording stream is resampled by ALSA lib.
>
> It is resample from 48kHz to 8kHz.
>
> We had dumped the raw data from HAL to check the stream data, and the 
> result is good.
>
> Second time, it is resampled by AndroidResampler, from 8kHz to 16kHz.
>
> AndroidResampler handles the stream with a stereo resampling algorithm 
> which is requested by AndroidFlinger, and then treats the resampled data 
> stream as a mono one.
>
> Therefore, it seems cause the mono waveform becomes ugly.
>
> Please refer to the attached waveform pictures in this thread.
>
> The waveform on stereo-waveform.png shows that the two channels has 1 
> sample difference, and the waveform on mono-waveform.png shows that the 
> waveform has the problem when it is treated as a mono stream.
>
> However, CTSVerifier analyzes the stream data as a mono stream, and this 
> waveform will be considered that it has a lot of glitches in it.
>
> So, I have following questions.
>
> Had this issue ever happened on other platforms or your porting 
> experiences?
>
> Is AndroidResampler suitable for all sampling rates?
>
> Is HD Audio Codec suitable for Android, and should we do any modifications 
> to support HD Audio Codec?
>
> How should I check this issue?
>
> Thank you.
> Best regards,
> Audi
>
>  
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to