WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: alsa aplay with underrun and distortion  (Read 519 times)

Offline bukashka

  • WikiUser
  • *
  • Posts: 18
alsa aplay with underrun and distortion
« on: September 01, 2018, 09:29:02 AM »
Hello! I have a problem with playing wav file with aplay utility. On modern hardware (with Intel sound) there is underrun and noise production. When I use virtual machine (with poor performance) all is ok. My attempts to change buffer size and other parameters of aplay get nothing. Is anybody can help me in understanding what is wrong with aplay on modern hardware or recommend other way to play wav file in tinycore? I use TCL5.2 in my project.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9879
Re: alsa aplay with underrun and distortion
« Reply #1 on: September 01, 2018, 10:03:23 AM »
Please try a more recent release. Like everything else, sound drivers improve.
The only barriers that can stop you are the ones you create yourself.

Offline bukashka

  • WikiUser
  • *
  • Posts: 18
Re: alsa aplay with underrun and distortion
« Reply #2 on: September 02, 2018, 05:00:30 AM »
This is quite difficult for me for a number of reasons. I thought playing a sound was a pretty simple operation and there had to be some implicit way to make it easier, didn't it? By the way, do I understand correctly that I can use OSS instead of ALSA for playing WAV? What is the difference between them?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10197
Re: alsa aplay with underrun and distortion
« Reply #3 on: September 02, 2018, 06:17:42 AM »
It's possible with intel hardware that you need graphics-KERNEL loaded before you load alsa-config, which should in turn be loaded before alsa.

It's also possible that you need the boot code "intel_iommu=igfx_off"

Offline Pats

  • Sr. Member
  • ****
  • Posts: 266
Re: alsa aplay with underrun and distortion
« Reply #4 on: September 02, 2018, 07:25:32 AM »
Quote by bukashka :
Quote
...By the way, do I understand correctly that I can use OSS instead of ALSA for playing WAV? What is the difference between them?..
.To expain in very simple way , prvsly OSS was a closed source app and available on Linux and Windoz platform. ALSA is a linux only software. To fix some shortfalls ALSA was created. But I think now OSS is also free and OSource.
ALSA can be divided in 3 parts :
1) Kernel drivers which provides API link to other 2 parts.
2) Other API is used by developers to communicate with ALSA 
3) Another part can be used as  a link btw first 2 APIs to produce sound with many diff softwares using ALSA API interface.
.. ALSA excells in sound mixing area and also allows sound mixing disabling option with optional sound mixing outside Kernel.
.. ALSA supports many more sound cards and interfaces which OSS upto v3.x were lacking in those times and hence ALSA was and still popular due to its support right from Kernel level.
... But problem with ALSA was it was  not available on other OS platforms including Win,Solaris, Mac etc.  But from OSS v4.x onward OSS has improved a lot and now is outside Kernel level and also some what difficult for API developers.
 ... I may be missing some recent developments in both ALSA and OSS , as I am out of touch in sound experiments recently  now.
But to be frank I was comfortable with OSS as it was simple to setup for a simple use of playing mp3s.
..If I remember correctly , in older versions of TCLs , curaga had provided a self-content OSS extnsion without any dependency , which was superb ! :)

Offline bukashka

  • WikiUser
  • *
  • Posts: 18
Re: alsa aplay with underrun and distortion
« Reply #5 on: September 02, 2018, 08:03:24 AM »
Curaga, thanks for your reply. Do you mean that in onboot.LST Xvesa.tcs (in my case) should be earlier than alza.tcz? I checked and found that it is, or do I misunderstand what video-KERNEL is? Just after Xvesa.tcz is xf86-video-vesa.tcz and most of the extensions are related to the video I can`t find.
Pats, thank you for explanation of OSS and alsa relation! Tomorrow I try to use OSS..

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6003
Re: alsa aplay with underrun and distortion
« Reply #6 on: September 02, 2018, 10:34:31 AM »
Hi bukashka
Quote
... or do I misunderstand what video-KERNEL is? ...
I think you do. It was  Juanito  and he suggest you might need  graphics-KERNEL. That would be one of the following:
Code: [Select]
graphics-3.8.10-tinycore64.tcz
graphics-3.8.10-tinycore.tcz
graphics-3.8.13-tinycore64.tcz
graphics-3.8.13-tinycore.tcz
Pick the one that matches your  kernel version  and architecture.

aus9

  • Guest
Re: alsa aplay with underrun and distortion
« Reply #7 on: September 02, 2018, 10:34:47 PM »
bukashka

Quote
This is quite difficult for me for a number of reasons
  What would be the main reason you can not download the latest and try it might help?

2) In the OSS wiki you may note that  some person has said

Quote
under OSS versus ALSA

If you need to play high quality sound files –> ALSA
If you have a Intel device, that needs a tweak –> ALSA


http://wiki.tinycorelinux.net/wiki:sound_setup_using_oss

hint  there is a reason why that was written about 5 years ago......because its generally true.

3) It does not hurt to name your hardware please

eg ISA card make X model Y revision number Z (if applicable)
eg PCI card make etc etc

and post a snippet of what Linux sees such as from the terminal command
Code: [Select]
dmesg
4) Altho its not the wiki.....ISA cards also are affected by bios settings more so that Alsa devices.....because we can do more configs to alsa devices than OSS devices....hint  alsa is generally better ....oops I have already said that  ;)