From: Andreas Rumpler <andreas.rumpler@audivo.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: Noise Problem with rate convert plugins
Date: Mon, 16 Jul 2007 16:25:58 +0200 [thread overview]
Message-ID: <469B7FF6.7030309@audivo.com> (raw)
In-Reply-To: <s5hfy3tn3n1.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 3616 bytes --]
Dear Takashi,
Thanks for your response. I've tried the patch. It's seems be better
now. But something seems still to be wrong.
At the start of the playback a short sequence seems to be outputed
twice. Please have a look at the attached screenshot from my oszi. The
screenshot shows playback of a sine with 440Hz.
The length of the sequence outputed twice is different for every
samplerate conversion factor. If I go from 8kHz to 48kHz, it's 2.6
millisec long. If I go from 22.025kHz to 48kHz, it's 900 microsec long.
So it seems to be a fixed count of samples.
Regards
Andreas
Takashi Iwai schrieb:
>At Wed, 11 Jul 2007 17:41:21 +0200,
>Andreas Rumpler wrote:
>
>
>>Hello,
>>
>>I'm new to this list.I hope someone could help me with a problem
>>concerning the samplerate converter plugins of the alsa driver.
>>
>>Firstly some facts about my application.
>>
>>- Envy24 (VT1270) pci audio chip on a custom mainboard
>>- playback of sounds/music with different sample rates from 8kHz to
>>48kHz (sample rate of the files)
>>- the hardware (Envy24 chip) must always run with 44.1kHz or 48kHz
>>(selectable by user), because the audio is outputed by a DAC and SPDIF
>>and the SPDIF clock must not be changed according to the sample rate of
>>the files.
>>- Kernel is 2.6.22 and alsa is 1.0.14
>>
>>So I'm using the samplerate (libsample rate based) plugin from the
>>alsa-plugin package. Generaly it works very good.
>>
>>My problem is:
>>Every time a playback is started a short plop noise is heard. The noise
>>is on analog and SPDIF output. If I don't use the samplerate converter
>>the noise is not heard at all. So it comes definitely from the rate
>>converter plugin, I think. Changing the quality level of the plugin
>>don't solve the problem.
>>
>>
>
>Could you try the patch below for alsa-plugins?
>
>
>
>
>>I've also switched to the new Speex rate
>>converter plugin. With this plugin there is no noise at the start of
>>playback. But here I have trouble with awful noise at some rate
>>conversions (6kHz(source) -> 48kHz(output); 11.025kHz -> 44.1kHz;
>>22.05kHz -> 44.1kHz). So it's even worse than using the libsamplerate
>>plugin. Finaly I've tried the libavcodec plugin, which is the worst
>>according to noise.
>>
>>
>
>I can confirm the noise (like flanger effect) at 11025 -> 44100
>conversion, too, but no at others.
>Since 11024 -> 44100 works fine, it appears specific to quater or so.
>
>
>Takashi
>
>diff -r 83b528a8ca2e rate/rate_samplerate.c
>--- a/rate/rate_samplerate.c Mon Jun 04 15:23:44 2007 +0200
>+++ b/rate/rate_samplerate.c Thu Jul 12 15:36:38 2007 +0200
>@@ -116,6 +116,7 @@ static void pcm_src_convert_s16(void *ob
> const int16_t *src, unsigned int src_frames)
> {
> struct rate_src *rate = obj;
>+ unsigned int ofs;
>
> rate->data.input_frames = src_frames;
> rate->data.output_frames = dst_frames;
>@@ -123,7 +124,12 @@ static void pcm_src_convert_s16(void *ob
>
> src_short_to_float_array(src, rate->src_buf, src_frames * rate->channels);
> src_process(rate->state, &rate->data);
>- src_float_to_short_array(rate->dst_buf, dst, dst_frames * rate->channels);
>+ if (rate->data.output_frames_gen < dst_frames)
>+ ofs = dst_frames - rate->data.output_frames_gen;
>+ else
>+ ofs = 0;
>+ src_float_to_short_array(rate->dst_buf, dst + ofs * rate->channels,
>+ rate->data.output_frames_gen * rate->channels);
> }
>
> static void pcm_src_close(void *obj)
>_______________________________________________
>Alsa-devel mailing list
>Alsa-devel@alsa-project.org
>http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
>
>
[-- Attachment #2: Tek00001.gif --]
[-- Type: image/gif, Size: 18809 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2007-07-16 14:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 15:41 Noise Problem with rate convert plugins Andreas Rumpler
2007-07-12 13:38 ` Takashi Iwai
2007-07-16 14:25 ` Andreas Rumpler [this message]
2007-07-20 15:08 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=469B7FF6.7030309@audivo.com \
--to=andreas.rumpler@audivo.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.