Alsa causes lockup/freeze (link)

Started by golinux, December 14, 2015, 08:29:41 PM

Previous topic - Next topic

golinux

Thought I'd post this link here in case some Linux user has found a fix for this.  I will be seriously disgusted if I have to install pulseaudio:

http://avidemux.org/smif/index.php/topic,16510.msg73115.html#msg73115

golinux

mean

It seems to be a bug in debian only
The call to drain will lock, commenting it out might help you
Line 325 in ADM_deviceALSA.cpp

golinux

Quote from: mean on December 15, 2015, 06:37:43 AM
It seems to be a bug in debian only
The call to drain will lock, commenting it out might help you
Line 325 in ADM_deviceALSA.cpp

Thanks for the suggestion.

I searched for that file and it is not to be found on devuan jessie or debian wheezy.  In fact, there is not one *.cpp file on either system.  What am I missing?

Jan Gruuthuse

When you build from source:
~/avidemux2/avidemux_plugins/ADM_audioDevices/Alsa/ADM_deviceALSA.cpp

golinux

#4
Quote from: Jan Gruuthuse on December 16, 2015, 06:47:21 AM
When you build from source:
~/avidemux2/avidemux_plugins/ADM_audioDevices/Alsa/ADM_deviceALSA.cpp

Thanks for the info.  I thought that was probably the case.  Unfortunately, that's beyond my skillset.  :(  Maybe I could try running avidemux in wine to get around pulseaudio.  But since the new version of avidemux isn't backwards compatible with my previous projects, I don't know how useful it will be to me anyway..  Regardless, I'll be keeping squeeze and wheezy around for any future media work for some time to come.  I've had a great ride with avidemux for years so thank you for that.

*edit* Then there's apulse which hopefully will be replacing pulseaudio in devuan.

golinux

#5
Made some progress.  I downloaded the source and was able to find the file - I guess that whole section dealing with the drain lock needs to be commented out?  It also looks like I need to install dpkg-dev for it to download properly:

root@devuan:/home/xxxxxx/Desktop# apt-get source avidemux
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Need to get 17.4 MB of source archives.
Get:1 http://us.mirror.devuan.org/merged/ jessie/main avidemux 1:2.6.8-dmo8 (dsc) [2,563 B]
Get:2 http://us.mirror.devuan.org/merged/ jessie/main avidemux 1:2.6.8-dmo8 (tar) [17.4 MB]
Get:3 http://us.mirror.devuan.org/merged/ jessie/main avidemux 1:2.6.8-dmo8 (diff) [12.8 kB]
Fetched 17.4 MB in 32s (534 kB/s)                                             
sh: 1: dpkg-source: not found
Unpack command 'dpkg-source -x avidemux_2.6.8-dmo8.dsc' failed.
Check if the 'dpkg-dev' package is installed.
E: Child process failed


Am I on the right track?

Jan Gruuthuse

perhaps you can find some more info here:
http://www.avidemux.org/admWiki/doku.php?id=build:install_2.6 see section Requirement list (debian/ubuntu)

golinux

Quote from: Jan Gruuthuse on December 17, 2015, 05:40:59 AM
perhaps you can find some more info here:
http://www.avidemux.org/admWiki/doku.php?id=build:install_2.6 see section Requirement list (debian/ubuntu)
That looks like it will be helpful.  Thanks.


mean


golinux

Quote from: mean on December 17, 2015, 03:31:20 PM
Just comment one line

Is this correct?  If so, I'll start figuring out how to repackage it.

{
       /* Stop PCM device and drop pending frames */
    snd_pcm_drop(pcm_handle);

    /* Stop PCM device after pending frames have been played */
   /* snd_pcm_drain(pcm_handle);
      if (snd_pcm_close(pcm_handle) < 0)
      {
printf("[Alsa] Troubles closing alsa\n");

      } */
     }
     _init=0;
     return true;
}


Thank you for your patience.

Jan Gruuthuse

If deb package use 1st line, if rpm use 2nd line.
cd ~/avidemux2 && bash bootStrap.bash --deb --with-qt4 --without-gtk --with-cli
cd ~/avidemux2 && bash bootStrap.bash --rpm --with-qt4 --without-gtk --with-cli

mean

just that one
snd_pcm_drain(pcm_handle);

golinux

#12
TYVM.  Can't be clearer than that.  Will report when the deed is done.

golinux

Tried it.  No change.  Still locking up if pa isn't installed. 

mean

Are you sure something else is not taking over the audio device ?