Re: Crackling Noise In Playback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jay and list,

On May 4, 2017 14:39, "Jay Foster" <jay@xxxxxxxxxxx> wrote:

On Thu, May 4, 2017 at 9:23 AM, Jay Foster <jay@xxxxxxxxxxx> wrote:

On Thu, May 4, 2017 at 8:24 AM, Jay Foster <jay@xxxxxxxxxxx> wrote:
I have encountered a strange problem.  About 6 months ago, I added a USB
sound adapter and alsa to an ARM based linux system.  I used aplay to
play wav files successfully.
Now, the playback has a crackling noise in it.  I can not find anything
that has changed.  A few units still play with no noise, but I cannot
determine any difference between them and the ones with the noise.

One odd thing is if I run an application to make the CPU busy while
playing the audio wav file, the noise seems to go away.  Any ideas on
where to look for the root cause?

Jay


I have had a similar experience using an AudioQuest DragonFly and a CuBox i4.  In my case, errors were reported in syslog.  Do you show any errors there?

Do you have any other USB sound cards to try out?
I have tried 3 different USB audio dongles (all C-Media chip based).  No difference.
No messages in /var/log/messages.
I had to put the following in my /etc/asound.conf file to get clean playback when I originally got this working (the CPU is too under powered to do the default rate conversion).

    defaults.pcm.rate_converter "linear"

The noise is also present using 'speakertest -c 2 -t wav'.  What bugs me is that this used to work fine, and still does if I make the CPU busy, which seems counter intuitive.


Hmm. any reason you are doing rate conversions?  Have you tried to play your files with the hw:CARD=???,DEV=??? argument?



--
Chris Hermansen · clhermansen "at" gmail "dot" com

C'est ma façon de parler.
Yes.  Without it, the audio would keep pausing every 0.5 seconds with underruns.  The default rate scaling is too CPU intensive for my platform.  Using the linear rate conversion is what was recommended to me by someone on this list, and seemed to work fine.  Some of the audio is 22050 Hz (mono) which needs to be scaled to 44100 Hz (the card only supports 44100 and 48000 rates.

I am not familiar with the hw:CARD=???,DEV=??? argument.  The aplay man page and --help do not document it.  I did try adding the '-D front' option to aplay and the noise went away (yeah).  I got the PCM name, front, from the output of aplay -L.

Jay
With a bit more testing, I found that the '-D front' only works for two channel audio files, not my mono files.  I have found that '-Dplughw:0' works for both.  Thanks for pointing me there.  I still need the scaling too.

I may well be wrong but I think plughw will take care of applying rate converters for you...

What about converting your files before you play them?


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux