Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crackling microphone #10

Open
riddicc opened this issue May 8, 2020 · 5 comments
Open

crackling microphone #10

riddicc opened this issue May 8, 2020 · 5 comments

Comments

@riddicc
Copy link

riddicc commented May 8, 2020

Hi!

When I send a 800Hz sine wave with rate 12345 to pcm.outmic and
when I arecord from pcm.micend at rate 8000 with 1 channel (/etc/asound.conf),
then I get a lot of tiny little gaps (see attachment) and a lot of messages like "overrun!!! (at least 0.014 ms long)" (the "ms" vary from 0.008 to 0.043; and arecord continues to record) and sometimes even this error: "arecord: xrun:1672: read/write error, state = RUNNING" (it causes arecord to terminate).

  1. speaker-test -D outmic -t sine -f 800 -c2 -r 12345

  2. arecord -D micend -r 8000 -c 1 -f S16_LE /tmp/bla.wav

twinkle makes even bigger gaps, when I let it use pcm.micend as microphone...
But with hw:Generic,0,0 as mic device twinkle works fine...
LubosD/twinkle#207

"samplerate_best" and "samplerate_order" seems to make it worse...

How can I fix that?

Thx.

Bye.

audacity screenshot

@riddicc
Copy link
Author

riddicc commented May 8, 2020

with some more plug-plugins (/etc/asound.conf) it works nicely... giggle :) w00t
-arne

@riddicc riddicc closed this as completed May 8, 2020
@riddicc riddicc reopened this May 9, 2020
@riddicc
Copy link
Author

riddicc commented May 9, 2020

oops...
now the gaps are gone, when I use pcm.micend, but there is permanent noise and there are echoes that are not in hw:Generic,0,0...

in the log file i found this:

ALSA capture buffer settings.
Rate = 8000 frames/sec
Frame size = 2 bytes
Periods = 8
Period size = 682 bytes
Buffer size = 5456 bytes
Can pause: no

seems like the period_size is funny...

-arne

@riddicc
Copy link
Author

riddicc commented May 9, 2020

when I change the rate value in pcm.micnat from 48000 to 44100 plug:micnat sounds much better...
now it is just the pcm.micmul, that does not work so good...
but that is possibly caused by some other mistake in asound.conf...
-arne

@riddicc riddicc closed this as completed May 9, 2020
@riddicc riddicc reopened this May 9, 2020
@riddicc
Copy link
Author

riddicc commented May 9, 2020

  1. it seems like pcm.micnat still has some extra crackling... but it is acceptable...
  2. but: pcm.micmul stays bad...
  3. and: skype does not like to use pcm.default, if it points to plug:micnat with the asym plugin...

how can i fix it without using pulseaudio, which twinkle does not support?

-arne

@riddicc
Copy link
Author

riddicc commented May 9, 2020

is it possible, that pcm.micnat crackles, because:
the alsa-clock is different from the HD-Audio Generic clock?

if yes: how can i fix it without writing my own program, that reads from hw:Generic,0,0 at its native rate and injects at system-clock-48kHz to pcm.outmic?

-arne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant