The officially official Devuan Forum!

You are not logged in.

#1 2024-06-27 02:59:54

igorzwx
Member
Registered: 2024-05-06
Posts: 105  

How to rebuild audacious-plugins

Freedom implies the freedom of choice.
What kind of freedom is it, if you have only one sound system installed in your Devuan?

Although the so-called "upstream" tends to restrict the freedom of Linux users, it is not very difficult to compile OSSv4 for Devuan.
Patches can be found in the Arch Linux AUR package oss-git
_https://aur.archlinux.org/packages/oss-git
_https://wiki.archlinux.org/title/Open_Sound_System

If you have two sound cards (e.g. Intel HDA and USB sound card), you can use OSS4 and ALSA simultaneously.
The difference between OSS4 and ALSA is that OSS4 permits the so-called "exclusive mode":

man ossplay | grep virtual -A1
       -R     Disable redirection to virtual mixer engines and sample rate/format conversions. Should not be used un‐
              less absolutely necessary.

The OSS4 plugin for Audacious has an option "Enable exclusive mode to prevent virtual mixing". It is intended for playing high resolution audio files "as they are", without resampling and sound distortions produced by the software mixer (vmix).

Notice, however, that Petrov's fftrate is much better than OSS4 resamplers, so that, OSS4 can be dedicated for playing audio files in "exclusive mode", and ALSA for ordinary desktop usage (playing movies in youtube, video conferencing, etc.)

In a word, Intel HDA codecs support many audio formats:

ossinfo -v9 | grep "HD Audio play front" -A13
HD Audio play front               /dev/oss/oss_hdaudio0/pcm0  (device index 0)
    Legacy device /dev/dsp0
    Caps: TRIGGER MMAP 
    Modes: OUTPUT 
      Out engine  1: 0/HD Audio play front
                     Available for use 
    Input formats (0x00001010):
      AFMT_S16_LE	- 16 bit signed little endian
      AFMT_S32_LE	- 32 bit signed little endian
    Output formats (0x00001010):
      AFMT_S16_LE	- 16 bit signed little endian
      AFMT_S32_LE	- 32 bit signed little endian
    Device handle: PCIa0021458-0000:00:1b.0-au01
    Related mixer dev: 0
    Sample rate source: 0
    Preferred channel configuration: Not indicated
    Supported number of channels (min - max): 2 - 8
    Native sample rates (min - max): 44100 - 192000 (44100,48000,96000,192000)

To enable the OSS4 plugin, you have to rebuild the package "audacious-plugins".
If you are going to compile something, it makes sense to install some tools:

sudo apt install build-essential devscripts command-not-found
mkdir audacious-plugins-rebuild
cd audacious-plugins-rebuild

Download the source code and install build dependencies:

apt-get source audacious-plugins
sudo apt-get build-dep audacious-plugins
ls -1
audacious-plugins-4.2
audacious-plugins_4.2-1.debian.tar.xz
audacious-plugins_4.2-1.dsc
audacious-plugins_4.2.orig.tar.bz2
cd audacious-plugins-4.2

To enable the OSS4 plugin, you have to edit "debian/rules"

cat ./debian/rules | grep oss4 -B2
override_dh_auto_configure:
	dh_auto_configure -- $(additional_confflags) \
		--disable-rpath --enable-gtk --enable-oss4 

You can also edit "changelog":

cat ./debian/changelog | grep 4.2-2 
audacious-plugins (4.2-2) unstable; urgency=medium

Now you can rebuild audacious-plugins:

dpkg-buildpackage -us -uc -b
cd ..
ls -1 | grep .deb
audacious-plugins_4.2-1.debian.tar.xz
audacious-plugins_4.2-2_amd64.deb
audacious-plugins-data_4.2-2_all.deb
audacious-plugins-dbgsym_4.2-2_amd64.deb

Now you can reinstall Audacious:

sudo apt purge audacious audacious-plugins audacious-plugins-data
sudo dpkg -i audacious-plugins_4.2-2_amd64.deb audacious-plugins-data_4.2-2_all.deb
sudo apt install audacious

To prevent upgrade, you can pin them all:

sudo nano /etc/apt/preferences
cat /etc/apt/preferences
Package: audacious
Pin: release *
Pin-Priority: -1

Package: audacious-plugins
Pin: release *
Pin-Priority: -1

Package: audacious-plugins-data
Pin: release *
Pin-Priority: -1
apt-cache policy audacious-plugins-data
audacious-plugins-data:
  Installed: 4.2-2
  Candidate: (none)
  Version table:
 *** 4.2-2 -1
        100 /var/lib/dpkg/status
     4.2-1 -1
        500 http://deb.devuan.org/merged daedalus/main amd64 Packages
apt-cache policy audacious-plugins
audacious-plugins:
  Installed: 4.2-2
  Candidate: (none)
  Version table:
 *** 4.2-2 -1
        100 /var/lib/dpkg/status
     4.2-1+b1 -1
        500 http://deb.devuan.org/merged daedalus/main amd64 Packages
apt-cache policy audacious
audacious:
  Installed: 4.2-1
  Candidate: (none)
  Version table:
 *** 4.2-1 -1
        500 http://deb.devuan.org/merged daedalus/main amd64 Packages
        100 /var/lib/dpkg/status

NOTE: If you want to rebuild a Debian package, which is not available in Devuan repositories
(e.g. _https://launchpad.net/ubuntu/+source/wxmaxima/24.02.1-1build2 ),
you can use these commands:

dpkg-source -x *.dsc
sudo mk-build-deps -i  # it should be executed inside the source directory
dpkg-buildpackage -us -uc -b

Last edited by igorzwx (2024-06-27 12:22:05)

Offline

#2 2024-06-27 12:33:23

stopAI
Member
Registered: 2023-04-04
Posts: 181  

Re: How to rebuild audacious-plugins

And why do you need such an old audio system?

And here you should not forget that you will have to service the system assembled in this way yourself (if security or bug fixes are released). Sure, we can build a deb package, but there's no guarantee it will work....

Offline

#3 2024-06-27 14:07:10

igorzwx
Member
Registered: 2024-05-06
Posts: 105  

Re: How to rebuild audacious-plugins

stopAI wrote:

And why do you need such an old audio system?

Because of sound quality.

stopAI wrote:

Sure, we can build a deb package, but there's no guarantee it will work....

Yes, this is the problem.
OSS4 packages (which work) have been available in Arch Linux repositories since time immemorial.
Debian developers did try to build OSS4 packages for Debian, but they always failed to work.
There were OSS4 packages in Ubuntu repositories. They did not work, but they were easy to install (and difficult to remove).
They are still OSS4 packages in Debian testing, which do not work.
On the other hand, it was not a problem for Ubuntu newbies to compile working OSS4 packages themselves.

The main problem is that an OSS4 driver for your sound card may not be available.

Perhaps, it might be more reasonable to patch Petrov's fftrate for gcc-12 and build deb packages for Devuan.
With Petrov's ALSA plugin, you can get a very good sound quality on a notebook with Intel HDA codec (motherboad).
Moreover, you can use video conferencing apps without PulseAudio. But you have to generate ~/.asoundrc with Petrov's arateconf and use apulse.

Offline

#4 2024-06-27 15:38:41

stopAI
Member
Registered: 2023-04-04
Posts: 181  

Re: How to rebuild audacious-plugins

The OSS audio system is used by freebsd. And it works perfectly and is supported on this operating system. I can confirm that the sound quality through OSS is much better than alsa.

Offline

#5 2024-06-27 15:53:07

igorzwx
Member
Registered: 2024-05-06
Posts: 105  

Re: How to rebuild audacious-plugins

FreeBSD has own fork of OSSv3, but OSSv4 is also available for FreeBSD.

OSS4 now exists mostly as a standalone piece of software, not integrated into the kernel source code. The exception is Solaris and OpenSolaris, which use a fork of OSS4 called Boomer. It combines the OSS4 framework (audio and mixer) together with Sun's earlier SADA (/dev/audio) API.
_https://en.wikipedia.org/wiki/Open_Sound_System#Code

It seems that the main problem of ALSA is crappy resamplers.
That is why, it might be interesting to try Petrov's fftrate.
It is easy to compile _https://dev1galaxy.org/viewtopic.php?id=6644

The default setting for fftrate ALSA plugin can be easily produced with arateconf. They include a software mixer. It might be needed simply because Intel HDA codecs do not have hardware mixers.

There are professional sound cards which have HW mixers, but such cards are very expensive, and they may not have Linux drivers.
_https://en.wikipedia.org/wiki/Merging_Technologies
_https://en.wikipedia.org/wiki/Digital_eXtreme_Definition
ALSA RAVENNA AES67 Linux Driver (Merging Technologies)
_https://www.merging.com/support/downloads#alsa-linux

Since Petrov's fftrate supports DXD format (24bit 352.8 kHz), you can play DXD waves and flacs with Audacious on a notebook with Intel HDA codec (fftrate should be configured for 32bit 192kHz, if you want to have  a good sound quality). DXD music is available on HDtracks.

Last edited by igorzwx (2024-07-06 17:57:05)

Offline

Board footer