diff --git a/.gitignore b/.gitignore index 0adcd05..28fa539 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ -/alsa-plugins-1.*.tar.bz2 +alsa-plugins-1.0.21.tar.bz2 +alsa-plugins-1.0.22.tar.bz2 +/alsa-tools-1.0.24.tar.bz2 +/alsa-plugins-1.0.24.tar.bz2 +/alsa-plugins-1.0.25.tar.bz2 +/alsa-plugins-1.0.26.tar.bz2 diff --git a/alsa-git.patch b/alsa-git.patch deleted file mode 100644 index e69de29..0000000 diff --git a/alsa-plugins.spec b/alsa-plugins.spec index 8230da3..471465c 100644 --- a/alsa-plugins.spec +++ b/alsa-plugins.spec @@ -1,26 +1,32 @@ %if 0%{?rhel} -%bcond_with avtp -%bcond_with jack -%bcond_with ffmpeg +%define with_jack 0 %else -%bcond_without avtp -%bcond_without jack -%bcond_without ffmpeg +%define with_jack 1 %endif Name: alsa-plugins -Version: 1.2.12 -Release: 6%{?dist} +Version: 1.0.26 +Release: 1%{?dist} Summary: The Advanced Linux Sound Architecture (ALSA) Plugins -# All packages are LGPL-2.1-or-later with the exception of samplerate -# which is GPL-2.0-or-later, pph plugin is BSD-3-Clause licensed -License: GPL-2.0-or-later and LGPL-2.1-or-later and BSD-3-Clause +# All packages are LGPLv2+ with the exception of samplerate which is GPLv2+ +# pph plugin is BSD-like licensed +License: GPLv2+ and LGPLv2+ and BSD +Group: System Environment/Libraries URL: http://www.alsa-project.org/ Source0: ftp://ftp.alsa-project.org/pub/plugins/%{name}-%{version}.tar.bz2 -Patch0: alsa-git.patch +%if 0%{?with_jack} +Source1: jack.conf +%endif +Source2: pcm-oss.conf +Source3: speex.conf +Source4: samplerate.conf +Source5: upmix.conf +Source6: vdownmix.conf +Source7: pulse-default.conf +Source8: arcamav.conf +Source9: maemo.conf +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: autoconf automake libtool -BuildRequires: make BuildRequires: alsa-lib-devel %description @@ -29,13 +35,14 @@ functionality to the Linux operating system. This package includes plugins for ALSA. -%if %{with jack} +%if 0%{?with_jack} %package jack -Recommends: jack-audio-connection-kit +Requires: alsa-utils +Requires: jack-audio-connection-kit BuildRequires: jack-audio-connection-kit-devel Summary: Jack PCM output plugin for ALSA -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description jack This plugin converts the ALSA API over JACK (Jack Audio Connection Kit, http://jackit.sf.net) API. ALSA native applications can work @@ -44,9 +51,11 @@ This plugin provides the PCM type "jack" %endif %package oss +Requires: alsa-utils +BuildRequires: alsa-lib-devel Summary: Oss PCM output plugin for ALSA -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description oss This plugin converts the ALSA API over OSS API. With this plugin, ALSA native apps can run on OSS drivers. @@ -54,11 +63,12 @@ ALSA native apps can run on OSS drivers. This plugin provides the PCM type "oss". %package pulseaudio -Recommends: pulseaudio-daemon -BuildRequires: pulseaudio-libs-devel +Requires: alsa-utils +Requires: pulseaudio +BuildRequires: pulseaudio-lib-devel Summary: Alsa to PulseAudio backend -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description pulseaudio This plugin allows any program that uses the ALSA API to access a PulseAudio sound daemon. In other words, native ALSA applications can play and record @@ -66,29 +76,32 @@ sound across a network. There are two plugins in the suite, one for PCM and one for mixer control. %package samplerate +Requires: alsa-utils BuildRequires: libsamplerate-devel Summary: External rate converter plugin for ALSA -License: GPL-2.0-or-later - +Group: System Environment/Libraries +License: GPLv2+ %description samplerate This plugin is an external rate converter using libsamplerate by Erik de Castro Lopo. %package upmix +Requires: alsa-utils BuildRequires: libsamplerate-devel Summary: Upmixer channel expander plugin for ALSA -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description upmix The upmix plugin is an easy-to-use plugin for upmixing to 4 or 6-channel stream. The number of channels to be expanded is determined by the slave PCM or explicitly via channel option. %package vdownmix +Requires: alsa-utils BuildRequires: libsamplerate-devel Summary: Downmixer to stereo plugin for ALSA -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description vdownmix The vdownmix plugin is a downmixer from 4-6 channels to 2-channel stereo headphone output. This plugin processes the input signals with @@ -97,141 +110,113 @@ surround". %package usbstream Summary: USB stream plugin for ALSA -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description usbstream The usbstream plugin is for snd-usb-us122l driver. It converts PCM stream to USB specific stream. %package arcamav Summary: Arcam AV amplifier plugin for ALSA -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description arcamav This plugin exposes the controls for an Arcam AV amplifier (see: http://www.arcam.co.uk/) as an ALSA mixer device. %package speex -Requires: speex speexdsp -BuildRequires: speex-devel speexdsp-devel +Requires: speex +BuildRequires: speex-devel Summary: Rate Converter Plugin Using Speex Resampler -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description speex The rate plugin is an external rate converter using the Speex resampler (aka Public Parrot Hack) by Jean-Marc Valin. The pcm plugin provides pre-processing of a mono stream like denoise using libspeex DSP API. %package maemo +BuildRequires: alsa-lib-devel = %{version} BuildRequires: dbus-devel Summary: Maemo plugin for ALSA -License: LGPL-2.1-or-later - +Group: System Environment/Libraries +License: LGPLv2+ %description maemo This plugin converts the ALSA API over PCM task nodes protocol. In this way, ALSA native applications can run over DSP Gateway and use DSP PCM task nodes. -%if %{with avtp} -%package avtp -BuildRequires: libavtp-devel -Summary: Audio Video Transport Protocol (AVTP) plugin for ALSA -License: LGPL-2.1-or-later - -%description avtp -This plugin supports Audio Video Transport Protocol (AVTP) as specified in -IEEE 1722-2016 spec. AVTP is part of the Audio/Video Broadcast using TSN. -%endif - -%if %{with ffmpeg} -%package a52 -BuildRequires: ffmpeg-free-devel -Obsoletes: alsa-plugins-freeworld-a52 <= %{version}-%{release} -Summary: A52 output plugin for ALSA using libavcodec -License: LGPL-2.1-or-later - -%description a52 -This plugin converts S16 linear format to A52 compressed stream and -send to an SPDIF output. It requires libavcodec for encoding the -audio stream. - -%package lavrate -BuildRequires: ffmpeg-free-devel -Obsoletes: alsa-plugins-freeworld-lavrate <= %{version}-%{release} -Summary: Rate converter plugin for ALSA using libavcodec -License: LGPL-2.1-or-later - -%description lavrate -The plugin uses ffmpeg audio resample library to convert audio rates. -%endif - %prep -%autosetup -n %{name}-%{version}%{?prever} -p1 +%setup -q -n %{name}-%{version}%{?prever} %build -autoreconf -vif %configure --disable-static \ --with-speex=lib \ --enable-maemo-plugin \ --enable-maemo-resource-manager -%make_build +make %{?_smp_mflags} %install -%make_install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT -mv %{buildroot}%{_sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example \ - %{buildroot}%{_sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf +install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/alsa/pcm +%if 0%{?with_jack} +install -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_sysconfdir}/alsa/pcm +%endif +install -m 644 %SOURCE2 \ + %SOURCE3 \ + %SOURCE4 \ + %SOURCE5 \ + %SOURCE6 \ + %SOURCE8 \ + %SOURCE9 \ + ${RPM_BUILD_ROOT}%{_sysconfdir}/alsa/pcm +# pulseaudio configuration file +install -m 644 %SOURCE7 \ + ${RPM_BUILD_ROOT}%{_sysconfdir}/alsa -find %{buildroot} -name "*.la" -delete +rm ${RPM_BUILD_ROOT}%{_datadir}/alsa/alsa.conf.d/50-pulseaudio.conf +rm ${RPM_BUILD_ROOT}%{_datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example +find $RPM_BUILD_ROOT -name "*.la" -exec rm {} \; -%if %{with jack} +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%if 0%{?with_jack} %files jack -%license COPYING COPYING.GPL -%doc doc/README-jack -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-jack.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/50-jack.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/README-jack +%dir %{_sysconfdir}/alsa/pcm +%config(noreplace) %{_sysconfdir}/alsa/pcm/jack.conf %{_libdir}/alsa-lib/libasound_module_pcm_jack.so %endif %files oss -%license COPYING COPYING.GPL -%doc doc/README-pcm-oss -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-oss.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/50-oss.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/README-pcm-oss +%dir %{_sysconfdir}/alsa/pcm +%config(noreplace) %{_sysconfdir}/alsa/pcm/pcm-oss.conf %{_libdir}/alsa-lib/libasound_module_ctl_oss.so %{_libdir}/alsa-lib/libasound_module_pcm_oss.so %files pulseaudio -%license COPYING COPYING.GPL -%doc doc/README-pulse -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/README-pulse +%config(noreplace) %{_sysconfdir}/alsa/pulse-default.conf %{_libdir}/alsa-lib/libasound_module_pcm_pulse.so %{_libdir}/alsa-lib/libasound_module_ctl_pulse.so %{_libdir}/alsa-lib/libasound_module_conf_pulse.so -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-pulseaudio.conf -%config(noreplace) %{_sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/50-pulseaudio.conf %files samplerate -%license COPYING COPYING.GPL -%doc doc/samplerate.txt -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/10-samplerate.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/10-samplerate.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/samplerate.txt +%dir %{_sysconfdir}/alsa/pcm +%config(noreplace) %{_sysconfdir}/alsa/pcm/samplerate.conf %{_libdir}/alsa-lib/libasound_module_rate_samplerate.so %{_libdir}/alsa-lib/libasound_module_rate_samplerate_best.so %{_libdir}/alsa-lib/libasound_module_rate_samplerate_linear.so @@ -239,314 +224,61 @@ find %{buildroot} -name "*.la" -delete %{_libdir}/alsa-lib/libasound_module_rate_samplerate_order.so %files upmix -%license COPYING COPYING.GPL -%doc doc/upmix.txt -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/60-upmix.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/60-upmix.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/upmix.txt +%dir %{_sysconfdir}/alsa/pcm +%config(noreplace) %{_sysconfdir}/alsa/pcm/upmix.conf %{_libdir}/alsa-lib/libasound_module_pcm_upmix.so %files vdownmix -%license COPYING COPYING.GPL -%doc doc/vdownmix.txt -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/60-vdownmix.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/60-vdownmix.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/vdownmix.txt +%dir %{_sysconfdir}/alsa/pcm +%config(noreplace) %{_sysconfdir}/alsa/pcm/vdownmix.conf %{_libdir}/alsa-lib/libasound_module_pcm_vdownmix.so %files usbstream -%license COPYING COPYING.GPL -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/98-usb-stream.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/98-usb-stream.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL %{_libdir}/alsa-lib/libasound_module_pcm_usb_stream.so %files arcamav -%license COPYING COPYING.GPL -%doc doc/README-arcam-av -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/README-arcam-av +%config(noreplace) %{_sysconfdir}/alsa/pcm/arcamav.conf %{_libdir}/alsa-lib/libasound_module_ctl_arcam_av.so %files speex -%license COPYING COPYING.GPL -%doc doc/speexdsp.txt doc/speexrate.txt -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/10-speexrate.conf -%config(noreplace) %{_sysconfdir}/alsa/conf.d/60-speex.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/10-speexrate.conf -%{_datadir}/alsa/alsa.conf.d/60-speex.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/speexdsp.txt doc/speexrate.txt +%config(noreplace) %{_sysconfdir}/alsa/pcm/speex.conf %{_libdir}/alsa-lib/libasound_module_pcm_speex.so %{_libdir}/alsa-lib/libasound_module_rate_speexrate.so %{_libdir}/alsa-lib/libasound_module_rate_speexrate_best.so %{_libdir}/alsa-lib/libasound_module_rate_speexrate_medium.so %files maemo -%license COPYING COPYING.GPL -%doc doc/README-maemo -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/98-maemo.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/98-maemo.conf -%dir %{_libdir}/alsa-lib +%defattr(-,root,root,-) +%doc COPYING COPYING.GPL doc/README-maemo +%config(noreplace) %{_sysconfdir}/alsa/pcm/maemo.conf %{_libdir}/alsa-lib/libasound_module_ctl_dsp_ctl.so %{_libdir}/alsa-lib/libasound_module_pcm_alsa_dsp.so -%if %{with avtp} -%files avtp -%license COPYING COPYING.GPL -%{_libdir}/alsa-lib/libasound_module_pcm_aaf.so -%endif - -%if %{with ffmpeg} -%files a52 -%license COPYING COPYING.GPL -%doc doc/a52.txt -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/60-a52-encoder.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/60-a52-encoder.conf -%dir %{_libdir}/alsa-lib -%{_libdir}/alsa-lib/libasound_module_pcm_a52.so - -%files lavrate -%license COPYING COPYING.GPL -%doc doc/lavrate.txt -%dir %{_sysconfdir}/alsa -%dir %{_sysconfdir}/alsa/conf.d -%config(noreplace) %{_sysconfdir}/alsa/conf.d/10-rate-lav.conf -%dir %{_datadir}/alsa/alsa.conf.d -%{_datadir}/alsa/alsa.conf.d/10-rate-lav.conf -%dir %{_libdir}/alsa-lib -%{_libdir}/alsa-lib/libasound_module_rate_lavrate.so -%{_libdir}/alsa-lib/libasound_module_rate_lavrate_fast.so -%{_libdir}/alsa-lib/libasound_module_rate_lavrate_faster.so -%{_libdir}/alsa-lib/libasound_module_rate_lavrate_high.so -%{_libdir}/alsa-lib/libasound_module_rate_lavrate_higher.so -%endif %changelog -* Wed Oct 01 2025 Dominik Mierzejewski - 1.2.12-6 -- Rebuilt for FFmpeg 8 - -* Wed Jul 23 2025 Fedora Release Engineering - 1.2.12-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Jan 16 2025 Fedora Release Engineering - 1.2.12-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Sep 23 2024 Fabio Valentini - 1.2.12-3 -- Rebuild for ffmpeg 7 - -* Wed Jul 17 2024 Fedora Release Engineering - 1.2.12-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Jun 11 2024 Jaroslav Kysela - 1.2.12-1 -- Updated to 1.2.12 - -* Mon Jan 22 2024 Fedora Release Engineering - 1.2.7.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 19 2024 Fedora Release Engineering - 1.2.7.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Aug 25 2023 Yaakov Selkowitz - 1.2.7.1-8 -- Disable avtp plugin in RHEL builds - -* Wed Jul 19 2023 Fedora Release Engineering - 1.2.7.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 6 2023 Jaroslav Kysela - 1.2.7.1-6 -- change to SPDX licenses - -* Sun Mar 12 2023 Neal Gompa - 1.2.7.1-5 -- Rebuild for ffmpeg 6.0 - -* Mon Mar 6 2023 Jaroslav Kysela - 1.2.7.1-4 -- Enable avtp plugin - Peter Robinson -- Enable a52 and lavrate plugins - Yaakov Selkowitz -- Remove or soften excess dependendencies - Yaakov Selkowitz -- CI test & RHEL cleanups - -* Wed Jan 18 2023 Fedora Release Engineering - 1.2.7.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Jul 20 2022 Fedora Release Engineering - 1.2.7.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Jun 17 2022 Jaroslav Kysela - 1.2.7.1-1 -- Updated to 1.2.7.1 - -* Wed Jan 19 2022 Fedora Release Engineering - 1.2.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Mon Dec 6 2021 Jaroslav Kysela - 1.2.6-1 -- Updated to 1.2.6 - -* Wed Jul 21 2021 Fedora Release Engineering - 1.2.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Sun May 30 2021 Jaroslav Kysela - 1.2.5-1 -- Updated to 1.2.5 -- Modernize the spec file (Neal Gompa) - -* Tue Jan 26 2021 Fedora Release Engineering - 1.2.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Jan 04 2021 Rex Dieter - 1.2.2-4 -- -pulseaudio: Requires: pulseaudio-daemon - -* Fri Jul 31 2020 Fedora Release Engineering - 1.2.2-3 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Jul 27 2020 Fedora Release Engineering - 1.2.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Feb 19 2020 Jaroslav Kysela - 1.2.2-1 -- Updated to 1.2.2 - -* Tue Jan 28 2020 Fedora Release Engineering - 1.2.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Nov 13 2019 Jaroslav Kysela - 1.2.1-1 -- Updated to 1.2.1 - -* Tue Aug 20 2019 Gwyn Ciesla - 1.1.9-3 -- macroize %%{_sysconfdir}. - -* Wed Jul 24 2019 Fedora Release Engineering - 1.1.9-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri May 10 2019 Jaroslav Kysela - 1.1.9-1 -- Updated to 1.1.9 - -* Thu Jan 31 2019 Fedora Release Engineering - 1.1.8-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Jan 7 2019 Jaroslav Kysela - 1.1.8-1 -- Updated to 1.1.8 - -* Wed Oct 24 2018 Jaroslav Kysela - 1.1.7-2 -- Updated to 1.1.7 - -* Thu Jul 12 2018 Fedora Release Engineering - 1.1.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Apr 16 2018 Jaroslav Kysela - 1.1.6-3 -- /etc/alsa/conf.d contains symlinks to /usr/share/alsa/alsa.conf.d templates - -* Wed Apr 04 2018 Jaroslav Kysela - 1.1.6-2 -- Changed the add-on config directory to /etc/alsa/conf.d -- Changed the config files - -* Tue Apr 03 2018 Jaroslav Kysela - 1.1.6-1 -- Updated to 1.1.6 - -* Sun Feb 25 2018 Ralf Corsépius - 1.1.5-3 -- Let plugin packages own %%{_libdir}/alsa-lib (RHBZ#1548865) - -* Wed Feb 07 2018 Fedora Release Engineering - 1.1.5-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Nov 14 2017 Jaroslav Kysela - 1.1.5-1 -- Updated to 1.1.5 - -* Wed Aug 02 2017 Fedora Release Engineering - 1.1.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.1.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue May 16 2017 Jaroslav Kysela - 1.1.4-1 -- Updated to 1.1.4 - -* Fri Feb 10 2017 Fedora Release Engineering - 1.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Mar 31 2016 Jaroslav Kysela - 1.1.1-1 -- Updated to 1.1.1 - -* Wed Feb 03 2016 Fedora Release Engineering - 1.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Oct 27 2015 Jaroslav Kysela - 1.1.0-1 -- Updated to 1.1.0 - -* Tue Jun 16 2015 Fedora Release Engineering - 1.0.29-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Feb 26 2015 Jaroslav Kysela - 1.0.29-1 -- Updated to 1.0.29 - -* Thu Jan 29 2015 Peter Robinson 1.0.28-4 -- Add speexdsp-devel as a dep to fix FTBFS - -* Fri Aug 15 2014 Fedora Release Engineering - 1.0.28-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Thu Jul 24 2014 Peter Robinson 1.0.28-2 -- Fix Source1 conditional for src.rpm generation (RHBZ 856543) - -* Thu Jul 24 2014 Peter Robinson 1.0.28-1 -- Update to 1.0.28 - -* Sat Jun 07 2014 Fedora Release Engineering - 1.0.27-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sat Aug 03 2013 Fedora Release Engineering - 1.0.27-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Fri Apr 12 2013 Jaroslav Kysela - 1.0.27-1 -- Updated to 1.0.27 - -* Wed Feb 13 2013 Fedora Release Engineering - 1.0.26-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Sep 6 2012 Jaroslav Kysela - 1.0.26-2 -- Changed dependency on pulseaudio-lib-devel to pulseaudio-libs-devel - * Thu Sep 6 2012 Jaroslav Kysela - 1.0.26-1 - Updated to 1.0.26 -* Wed Jul 18 2012 Fedora Release Engineering - 1.0.25-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Apr 23 2012 Paul Howarth - 1.0.25-3 -- Bump and rebuild to maintain upgrade path (#806218) - -* Wed Feb 1 2012 Jaroslav Kysela - 1.0.25-1 +* Wed Feb 1 2012 Jaroslav Kysela - 1.0.25-3 - Updated to 1.0.25 -- Moved plugin specific configuration from /etc/alsa/pcm to /usr/share/alsa/alsa.conf.d -* Thu Jan 19 2012 Nikola Pajkovsky - 1.0.24-4 +* Thu Jan 19 2012 Nikola Pajkovsky - 1.0.24-3 - 761244 - please disable JACK for RHEL -* Thu Jan 12 2012 Fedora Release Engineering - 1.0.24-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - * Mon Feb 07 2011 Fedora Release Engineering - 1.0.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild -* Fri Jan 28 2011 Jaroslav Kysela - 1.0.24-1 +* Thu Jan 28 2011 Jaroslav Kysela - 1.0.24-1 - Updated to 1.0.24 * Thu Jan 14 2010 Jaroslav Kysela - 1.0.22-1 diff --git a/arcamav.conf b/arcamav.conf new file mode 100644 index 0000000..534663a --- /dev/null +++ b/arcamav.conf @@ -0,0 +1,10 @@ +# arcam-av plugin configuration +# $Id$ + +ctl.arcam_av { + type arcam_av + port /dev/ttyS0 + hint { + description "Arcam-AV Amplifier" + } +} diff --git a/jack.conf b/jack.conf new file mode 100644 index 0000000..e74f5fc --- /dev/null +++ b/jack.conf @@ -0,0 +1,17 @@ +# The jack plugin configuration +# $Id: jack.conf,v 1.3 2008/03/19 20:01:04 emoret Exp $ + +pcm.jack { + type jack + playback_ports { + 0 alsa_pcm:playback_1 + 1 alsa_pcm:playback_2 + } + capture_ports { + 0 alsa_pcm:capture_1 + 1 alsa_pcm:capture_2 + } + hint { + description "JACK Audio Connection Kit" + } +} diff --git a/maemo.conf b/maemo.conf new file mode 100644 index 0000000..737890f --- /dev/null +++ b/maemo.conf @@ -0,0 +1,13 @@ +# PCM +pcm.!default { + type alsa_dsp + playback_device_file ["/dev/dsptask/pcm2"] + recording_device_file ["/dev/dsptask/pcm_rec"] +} + +# Mixer +ctl.!default { + type dsp_ctl + playback_devices ["/dev/dsptask/pcm2"] + recording_devices ["/dev/dsptask/pcm_rec"] +} diff --git a/pcm-oss.conf b/pcm-oss.conf new file mode 100644 index 0000000..b5aac44 --- /dev/null +++ b/pcm-oss.conf @@ -0,0 +1,9 @@ +# pcm-oss plugin configuration + +pcm.oss { + type oss + device /dev/dsp + hint { + description "Open Sound System" + } +} diff --git a/plugin-config.patch b/plugin-config.patch deleted file mode 100644 index f84dd45..0000000 --- a/plugin-config.patch +++ /dev/null @@ -1,2294 +0,0 @@ -From e8fabec7adc70220f52588dc170d90d146b92ba7 Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 5 Apr 2018 09:23:09 +0200 -Subject: [PATCH 1/6] samplerate: fix unused variable warning - -Signed-off-by: Jaroslav Kysela ---- - rate/rate_samplerate.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/rate/rate_samplerate.c b/rate/rate_samplerate.c -index 0b14a59..100d6f2 100644 ---- a/rate/rate_samplerate.c -+++ b/rate/rate_samplerate.c -@@ -154,14 +154,14 @@ static void pcm_src_close(void *obj) - } - - #if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 --static int get_supported_rates(void *obj, unsigned int *rate_min, -+static int get_supported_rates(void *obj ATTRIBUTE_UNUSED, unsigned int *rate_min, - unsigned int *rate_max) - { - *rate_min = *rate_max = 0; /* both unlimited */ - return 0; - } - --static void dump(void *obj, snd_output_t *out) -+static void dump(void *obj ATTRIBUTE_UNUSED, snd_output_t *out) - { - snd_output_printf(out, "Converter: libsamplerate\n"); - } --- -2.13.6 - - -From 6e40eb5fd346207021a95d06bc30205a537926ea Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Wed, 4 Apr 2018 19:57:56 +0200 -Subject: [PATCH 2/6] configure: add --with-alsaaddondir, add default config - files for plugins - -Signed-off-by: Jaroslav Kysela ---- - a52/60-a52-encoder.conf | 38 ++++++++++++++++++++++++++ - a52/Makefile.am | 4 +++ - a52/pcm_a52.c | 2 +- - arcam-av/50-arcam-av-ctl.conf | 16 +++++++++++ - arcam-av/Makefile.am | 4 +++ - configure.ac | 12 +++++++++ - jack/50-jack.conf | 18 +++++++++++++ - jack/Makefile.am | 4 +++ - maemo/98-maemo.conf | 11 ++++++++ - maemo/Makefile.am | 4 +++ - mix/60-upmix.conf | 26 ++++++++++++++++++ - mix/60-vdownmix.conf | 24 +++++++++++++++++ - mix/Makefile.am | 5 +++- - oss/50-oss.conf | 26 ++++++++++++++++++ - oss/Makefile.am | 4 +++ - pph/10-speexrate.conf | 28 +++++++++++++++++++ - pph/Makefile.am | 4 +++ - pulse/50-pulseaudio.conf | 15 ++++++----- - pulse/Makefile.am | 4 +-- - rate-lavc/10-rate-lavc.conf | 28 +++++++++++++++++++ - rate-lavc/Makefile.am | 4 +++ - rate/10-samplerate.conf | 28 +++++++++++++++++++ - rate/Makefile.am | 4 +++ - speex/60-speex.conf | 63 +++++++++++++++++++++++++++++++++++++++++++ - speex/Makefile.am | 4 +++ - usb_stream/98-usb-stream.conf | 27 +++++++++++++++++++ - usb_stream/Makefile.am | 4 +++ - 27 files changed, 401 insertions(+), 10 deletions(-) - create mode 100644 a52/60-a52-encoder.conf - create mode 100644 arcam-av/50-arcam-av-ctl.conf - create mode 100644 jack/50-jack.conf - create mode 100644 maemo/98-maemo.conf - create mode 100644 mix/60-upmix.conf - create mode 100644 mix/60-vdownmix.conf - create mode 100644 oss/50-oss.conf - create mode 100644 pph/10-speexrate.conf - create mode 100644 rate-lavc/10-rate-lavc.conf - create mode 100644 rate/10-samplerate.conf - create mode 100644 speex/60-speex.conf - create mode 100644 usb_stream/98-usb-stream.conf - -diff --git a/a52/60-a52-encoder.conf b/a52/60-a52-encoder.conf -new file mode 100644 -index 0000000..346c94f ---- /dev/null -+++ b/a52/60-a52-encoder.conf -@@ -0,0 +1,38 @@ -+pcm.a52 { -+ @args [ CARD SLAVE RATE BITRATE CHANNELS ] -+ @args.CARD { -+ type integer -+ default { -+ @func refer -+ name defaults.pcm.card -+ } -+ } -+ @args.SLAVE { -+ type string -+ } -+ @args.RATE { -+ type integer -+ default 48000 -+ } -+ @args.BITRATE { -+ type integer -+ default 448 -+ } -+ @args.CHANNELS { -+ type string -+ default 6 -+ } -+ type a52 -+ card $CARD -+ slavepcm $SLAVE -+ rate $RATE -+ bitrate $BITRATE -+ channels $CHANNELS -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Plugin to convert multichannel stream to A52 (AC3) bitstream" -+ } -+} -diff --git a/a52/Makefile.am b/a52/Makefile.am -index 48567b4..cbc1497 100644 ---- a/a52/Makefile.am -+++ b/a52/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 60-a52-encoder.conf -+ - asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la -+asound_module_addon_DATA = 60-a52-encoder.conf - - asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \ - -DAVCODEC_HEADER="@AVCODEC_HEADER@" -diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c -index 348d58f..155da36 100644 ---- a/a52/pcm_a52.c -+++ b/a52/pcm_a52.c -@@ -937,7 +937,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(a52) - goto error; - } - -- if (! pcm_string) { -+ if (! pcm_string || pcm_string[0] == '\0') { - snprintf(devstr, sizeof(devstr), - "iec958:{AES0 0x%x AES1 0x%x AES2 0x%x AES3 0x%x %s%s}", - IEC958_AES0_CON_EMPHASIS_NONE | IEC958_AES0_NONAUDIO | -diff --git a/arcam-av/50-arcam-av-ctl.conf b/arcam-av/50-arcam-av-ctl.conf -new file mode 100644 -index 0000000..b76caa9 ---- /dev/null -+++ b/arcam-av/50-arcam-av-ctl.conf -@@ -0,0 +1,16 @@ -+ctl.arcam_av { -+ @args [ PORT ] -+ @args.PORT { -+ type string -+ default "/dev/ttyUSB0" -+ } -+ type arcam_av -+ port $PORT -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Arcam-AV Amplifier" -+ } -+} -diff --git a/arcam-av/Makefile.am b/arcam-av/Makefile.am -index 5c7855f..4a54ccd 100644 ---- a/arcam-av/Makefile.am -+++ b/arcam-av/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 50-arcam-av-ctl.conf -+ - asound_module_ctl_arcam_av_LTLIBRARIES = libasound_module_ctl_arcam_av.la -+asound_module_addon_DATA = 50-arcam-av-ctl.conf - - asound_module_ctl_arcam_avdir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined -diff --git a/configure.ac b/configure.ac -index ecc265b..ae98caa 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -206,6 +206,18 @@ AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA dat - ALSA_DATA_DIR="$alsadatadir" - AC_SUBST(ALSA_DATA_DIR) - -+dnl ALSA add-on config directory -+AC_ARG_WITH(alsaaddondir, -+ AS_HELP_STRING([--with-alsaaddondir=dir], -+ [path where ALSA add-on config files are stored]), -+ alsaaddondir="$withval", alsaaddondir="") -+if test -z "$alsaaddondir"; then -+ alsaaddondir="/etc/alsa/conf.d" -+fi -+AC_DEFINE_UNQUOTED(ALSA_ADDON_DIR, "$alsaaddondir", [directory containing ALSA add-on config files]) -+ALSA_ADDON_DIR="$alsaaddondir" -+AC_SUBST(ALSA_ADDON_DIR) -+ - SAVE_PLUGINS_VERSION - - AC_OUTPUT([ -diff --git a/jack/50-jack.conf b/jack/50-jack.conf -new file mode 100644 -index 0000000..d780dfc ---- /dev/null -+++ b/jack/50-jack.conf -@@ -0,0 +1,18 @@ -+pcm.jack { -+ type jack -+ playback_ports { -+ 0 alsa_pcm:playback_1 -+ 1 alsa_pcm:playback_2 -+ } -+ capture_ports { -+ 0 alsa_pcm:capture_1 -+ 1 alsa_pcm:capture_2 -+ } -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "JACK Audio Connection Kit" -+ } -+} -diff --git a/jack/Makefile.am b/jack/Makefile.am -index f913cb6..0a3d6ae 100644 ---- a/jack/Makefile.am -+++ b/jack/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 50-jack.conf -+ - asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la -+asound_module_addon_DATA = 50-jack.conf - - asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -diff --git a/maemo/98-maemo.conf b/maemo/98-maemo.conf -new file mode 100644 -index 0000000..a9ad6a0 ---- /dev/null -+++ b/maemo/98-maemo.conf -@@ -0,0 +1,11 @@ -+pcm.!default { -+ type alsa_dsp -+ playback_device_file [ "/dev/dsptask/pcm2" ] -+ recording_device_file [ "/dev/dsptask/pcm_rec" ] -+} -+ -+ctl.!default { -+ type dsp_ctl -+ playback_devices [ "/dev/dsptask/pcm2" ] -+ recording_devices [ "/dev/dsptask/pcm_rec" ] -+} -diff --git a/maemo/Makefile.am b/maemo/Makefile.am -index 2684781..aca481d 100644 ---- a/maemo/Makefile.am -+++ b/maemo/Makefile.am -@@ -1,8 +1,12 @@ -+EXTRA_DIST = 98-maemo.conf -+ - asound_module_pcm_alsa_dsp_LTLIBRARIES = libasound_module_pcm_alsa_dsp.la - asound_module_ctl_dsp_ctl_LTLIBRARIES = libasound_module_ctl_dsp_ctl.la -+asound_module_addon_DATA = 98-maemo.conf - - asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@ - asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS) - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -diff --git a/mix/60-upmix.conf b/mix/60-upmix.conf -new file mode 100644 -index 0000000..028cfe1 ---- /dev/null -+++ b/mix/60-upmix.conf -@@ -0,0 +1,26 @@ -+pcm.upmix { -+ @args [ SLAVE CHANNELS DELAY ] -+ @args.SLAVE { -+ type string -+ default "plug:hw" -+ } -+ @args.CHANNELS { -+ type integer -+ default 6 -+ } -+ @args.DELAY { -+ type integer -+ default 0 -+ } -+ type upmix -+ channels $CHANNELS -+ delay $DELAY -+ slave.pcm $SLAVE -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Plugin for channel upmix (4,6,8)" -+ } -+} -diff --git a/mix/60-vdownmix.conf b/mix/60-vdownmix.conf -new file mode 100644 -index 0000000..32e9c56 ---- /dev/null -+++ b/mix/60-vdownmix.conf -@@ -0,0 +1,24 @@ -+pcm.vdownmix { -+ @args [ SLAVE CHANNELS DELAY ] -+ @args.SLAVE { -+ type string -+ default "plug:hw" -+ } -+ @args.CHANNELS { -+ type integer -+ default 6 -+ } -+ @args.DELAY { -+ type integer -+ default 0 -+ } -+ type vdownmix -+ slave.pcm $SLAVE -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Plugin for channel downmix (stereo) with a simple spacialization" -+ } -+} -diff --git a/mix/Makefile.am b/mix/Makefile.am -index e31839a..710606c 100644 ---- a/mix/Makefile.am -+++ b/mix/Makefile.am -@@ -1,8 +1,12 @@ -+EXTRA_DIST = 60-upmix.conf 60-vdownmix.conf -+ - asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la - asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la -+asound_module_addon_DATA = 60-upmix.conf 60-vdownmix.conf - - asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@ - asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -11,4 +15,3 @@ libasound_module_pcm_upmix_la_SOURCES = pcm_upmix.c - libasound_module_pcm_upmix_la_LIBADD = @ALSA_LIBS@ - libasound_module_pcm_vdownmix_la_SOURCES = pcm_vdownmix.c - libasound_module_pcm_vdownmix_la_LIBADD = @ALSA_LIBS@ -- -diff --git a/oss/50-oss.conf b/oss/50-oss.conf -new file mode 100644 -index 0000000..5b2817b ---- /dev/null -+++ b/oss/50-oss.conf -@@ -0,0 +1,26 @@ -+pcm.oss { -+ @args [ DEVICE ] -+ @args.DEVICE { -+ type string -+ default "/dev/dsp" -+ } -+ type oss -+ port $DEVICE -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Open Sound System" -+ } -+} -+ -+ctl.oss { -+ @args [ DEVICE ] -+ @args.DEVICE { -+ type string -+ default "/dev/mixer" -+ } -+ type oss -+ device $DEVICE -+} -diff --git a/oss/Makefile.am b/oss/Makefile.am -index 302538b..df83d20 100644 ---- a/oss/Makefile.am -+++ b/oss/Makefile.am -@@ -1,8 +1,12 @@ -+EXTRA_DIST = 50-oss.conf -+ - asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la - asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la -+asound_module_addon_DATA = 50-oss.conf - - asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@ - asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -diff --git a/pph/10-speexrate.conf b/pph/10-speexrate.conf -new file mode 100644 -index 0000000..1d9eae9 ---- /dev/null -+++ b/pph/10-speexrate.conf -@@ -0,0 +1,28 @@ -+pcm.speexrate { -+ @args [ SLAVE RATE CONVERTER ] -+ @args.SLAVE { -+ type string -+ default "plug:hw" -+ } -+ @args.RATE { -+ type integer -+ default 48000 -+ } -+ @args.CONVERTER { -+ type string -+ default "speexrate" -+ } -+ type rate -+ converter $CONVERTER -+ slave { -+ pcm $SLAVE -+ rate $RATE -+ } -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Rate Converter Plugin Using Speex Resampler" -+ } -+} -diff --git a/pph/Makefile.am b/pph/Makefile.am -index 551e5bd..abb950b 100644 ---- a/pph/Makefile.am -+++ b/pph/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 10-speexrate.conf -+ - asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la -+asound_module_addon_DATA = 10-speexrate.conf - - asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -diff --git a/pulse/50-pulseaudio.conf b/pulse/50-pulseaudio.conf -index dd85dab..62da207 100644 ---- a/pulse/50-pulseaudio.conf -+++ b/pulse/50-pulseaudio.conf -@@ -1,13 +1,16 @@ - # Add a specific named PulseAudio pcm and ctl (typically useful for testing) - - pcm.pulse { -- type pulse -- hint { -- show on -- description "PulseAudio Sound Server" -- } -+ type pulse -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "PulseAudio Sound Server" -+ } - } - - ctl.pulse { -- type pulse -+ type pulse - } -diff --git a/pulse/Makefile.am b/pulse/Makefile.am -index a5550b9..835808c 100644 ---- a/pulse/Makefile.am -+++ b/pulse/Makefile.am -@@ -3,12 +3,12 @@ EXTRA_DIST = 50-pulseaudio.conf 99-pulseaudio-default.conf.example - asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la - asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la - asound_module_conf_LTLIBRARIES = libasound_module_conf_pulse.la --asound_module_data_DATA = 50-pulseaudio.conf 99-pulseaudio-default.conf.example -+asound_module_addon_DATA = 50-pulseaudio.conf 99-pulseaudio-default.conf.example - - asound_module_pcmdir = @ALSA_PLUGIN_DIR@ - asound_module_ctldir = @ALSA_PLUGIN_DIR@ - asound_module_confdir = @ALSA_PLUGIN_DIR@ --asound_module_datadir = @ALSA_DATA_DIR@/alsa.conf.d -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -diff --git a/rate-lavc/10-rate-lavc.conf b/rate-lavc/10-rate-lavc.conf -new file mode 100644 -index 0000000..bab1694 ---- /dev/null -+++ b/rate-lavc/10-rate-lavc.conf -@@ -0,0 +1,28 @@ -+pcm.lavcrate { -+ @args [ SLAVE RATE CONVERTER ] -+ @args.SLAVE { -+ type string -+ default "plug:hw" -+ } -+ @args.RATE { -+ type integer -+ default 48000 -+ } -+ @args.CONVERTER { -+ type string -+ default "lavcrate" -+ } -+ type rate -+ converter $CONVERTER -+ slave { -+ pcm $SLAVE -+ rate $RATE -+ } -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Rate Converter Plugin Using AVC Library" -+ } -+} -diff --git a/rate-lavc/Makefile.am b/rate-lavc/Makefile.am -index 5cffd44..5f66472 100644 ---- a/rate-lavc/Makefile.am -+++ b/rate-lavc/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 10-rate-lavc.conf -+ - asound_module_rate_lavcrate_LTLIBRARIES = libasound_module_rate_lavcrate.la -+asound_module_addon_DATA = 10-rate-lavc.conf - - asound_module_rate_lavcratedir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \ - -DAVCODEC_HEADER="@AVCODEC_HEADER@" -diff --git a/rate/10-samplerate.conf b/rate/10-samplerate.conf -new file mode 100644 -index 0000000..0d2e604 ---- /dev/null -+++ b/rate/10-samplerate.conf -@@ -0,0 +1,28 @@ -+pcm.samplerate { -+ @args [ SLAVE RATE CONVERTER ] -+ @args.SLAVE { -+ type string -+ default "plug:hw" -+ } -+ @args.RATE { -+ type integer -+ default 48000 -+ } -+ @args.CONVERTER { -+ type string -+ default "samplerate" -+ } -+ type rate -+ converter $CONVERTER -+ slave { -+ pcm $SLAVE -+ rate $RATE -+ } -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Rate Converter Plugin Using Samplerate Library" -+ } -+} -diff --git a/rate/Makefile.am b/rate/Makefile.am -index 0605bfd..25014d8 100644 ---- a/rate/Makefile.am -+++ b/rate/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 10-samplerate.conf -+ - asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la -+asound_module_addon_DATA = 10-samplerate.conf - - asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS) - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -diff --git a/speex/60-speex.conf b/speex/60-speex.conf -new file mode 100644 -index 0000000..bf2ce95 ---- /dev/null -+++ b/speex/60-speex.conf -@@ -0,0 +1,63 @@ -+pcm.speex { -+ @args [ SLAVE AGC AGC_LEVEL DENOISE ECHO -+ DEREVERB DEREVERB_DECAY DEREVERB_LEVEL -+ FRAMES FILTER_LENGTH ] -+ @args.SLAVE { -+ type string -+ default "plug:hw" -+ } -+ @args.AGC { -+ type string -+ default off -+ } -+ @args.AGC_LEVEL { -+ type integer -+ default 8000 -+ } -+ @args.DENOISE { -+ type string -+ default on -+ } -+ @args.ECHO { -+ type string -+ default off -+ } -+ @args.DEREVERB { -+ type string -+ default off -+ } -+ @args.DEREVERB_DECAY { -+ type real -+ default 0 -+ } -+ @args.DEREVERB_LEVEL { -+ type real -+ default 0 -+ } -+ @args.FRAMES { -+ type integer -+ default 64 -+ } -+ @args.FILTER_LENGTH { -+ type integer -+ default 256 -+ } -+ type speex -+ agc $AGC -+ agc_level $AGC_LEVEL -+ denoise $DENOISE -+ echo $ECHO -+ dereverb $DEREVERB -+ dereverb_decay $DEREVERB_DECAY -+ dereverb_level $DEREVERB_LEVEL -+ frames $FRAMES -+ filter_length $FILTER_LENGTH -+ slave.pcm $SLAVE -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)" -+ } -+} -diff --git a/speex/Makefile.am b/speex/Makefile.am -index 7d84190..7891954 100644 ---- a/speex/Makefile.am -+++ b/speex/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 60-speex.conf -+ - asound_module_pcm_speex_LTLIBRARIES = libasound_module_pcm_speex.la -+asound_module_addon_DATA = 60-speex.conf - - asound_module_pcm_speexdir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @speexdsp_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -diff --git a/usb_stream/98-usb-stream.conf b/usb_stream/98-usb-stream.conf -new file mode 100644 -index 0000000..2efc95f ---- /dev/null -+++ b/usb_stream/98-usb-stream.conf -@@ -0,0 +1,27 @@ -+pcm.usbstream { -+ @args [ CARD RATE PERIOD_SIZE ] -+ @args.CARD { -+ type string -+ default { -+ func refer -+ name defaults.pcm.card -+ } -+ } -+ @args.RATE { -+ type integer -+ } -+ @args.PERIOD_SIZE { -+ type integer -+ } -+ type usb_stream -+ card $CARD -+ rate $RATE -+ period_size $PERIOD_SIZE -+ hint { -+ show { -+ @func refer -+ name defaults.namehint.basic -+ } -+ description "USB Stream Output" -+ } -+} -diff --git a/usb_stream/Makefile.am b/usb_stream/Makefile.am -index 50a98a0..b606d3d 100644 ---- a/usb_stream/Makefile.am -+++ b/usb_stream/Makefile.am -@@ -1,6 +1,10 @@ -+EXTRA_DIST = 98-usb-stream.conf -+ - asound_module_pcm_usb_stream_LTLIBRARIES = libasound_module_pcm_usb_stream.la -+asound_module_addon_DATA = 98-usb-stream.conf - - asound_module_pcm_usb_streamdir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic $(LDFLAGS_NOUNDEFINED) --- -2.13.6 - - -From cc6bed233a3167d806834460befca2c6d655f0fb Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Fri, 13 Apr 2018 13:37:36 +0200 -Subject: [PATCH 3/6] config/Makefile: make everything modular - -Signed-off-by: Jaroslav Kysela ---- - Makefile.am | 21 ++++++++++++++++++--- - configure.ac | 20 +++++++++++++++++++- - doc/Makefile.am | 37 ++++++++++++++++++++++++++++++++++--- - 3 files changed, 71 insertions(+), 7 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 69cfe0d..303bc83 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1,4 +1,10 @@ --SUBDIRS = oss mix usb_stream arcam-av doc -+SUBDIRS = doc -+if HAVE_OSS -+SUBDIRS += oss -+endif -+if HAVE_MIX -+SUBDIRS += mix -+endif - if HAVE_JACK - SUBDIRS += jack - endif -@@ -8,8 +14,17 @@ endif - if HAVE_SAMPLERATE - SUBDIRS += rate - endif --if HAVE_AVCODEC --SUBDIRS += a52 rate-lavc -+if HAVE_A52 -+SUBDIRS += a52 -+endif -+if HAVE_AVCRATE -+SUBDIRS += rate-lavc -+endif -+if HAVE_USBSTREAM -+SUBDIRS += usb_stream -+endif -+if HAVE_ARCAMAV -+SUBDIRS += arcam-av - endif - if HAVE_MAEMO_PLUGIN - SUBDIRS += maemo -diff --git a/configure.ac b/configure.ac -index ae98caa..2d7e6aa 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -135,6 +135,22 @@ AC_SUBST(AVCODEC_CFLAGS) - AC_SUBST(AVCODEC_LIBS) - AC_SUBST(AVCODEC_HEADER) - -+AC_ARG_ENABLE([a52], -+ AS_HELP_STRING([--disable-a52], [Disable building of A52 encoder plugin])) -+ -+if test "x$enable_a52" != "xno" -a "$HAVE_AVCODEC" = "yes"; then -+ HAVE_A52=yes -+fi -+AM_CONDITIONAL(HAVE_A52, test x$HAVE_A52 = xyes) -+ -+AC_ARG_ENABLE([avcrate], -+ AS_HELP_STRING([--disable-avcrate], [Disable building of AVC rate plugin])) -+ -+if test "x$enable_avcrate" != "xno" -a "$HAVE_AVCODEC" = "yes"; then -+ HAVE_AVCRATE=yes -+fi -+AM_CONDITIONAL(HAVE_AVCRATE, test x$HAVE_AVCRATE = xyes) -+ - AC_ARG_ENABLE([speexdsp], - AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin])) - -@@ -260,12 +276,14 @@ if test "$HAVE_SAMPLERATE" = "yes"; then - fi - echo "Maemo plugin: $HAVE_MAEMO_PLUGIN" - echo " Using Osso resource manager: $use_maemo_rm" --echo "A52, lavc plugins: $HAVE_AVCODEC" - if test "$HAVE_AVCODEC" = "yes"; then -+ echo "AVCodec config:" - echo " AVCODEC_CFLAGS: $AVCODEC_CFLAGS" - echo " AVCODEC_LIBS: $AVCODEC_LIBS" - echo " AVCODEC_HEADER: $AVCODEC_HEADER" - fi -+echo "A52 plugin: $HAVE_A52" -+echo "AVC rate plugin: $HAVE_AVCRATE" - echo "Speex rate plugin: $PPH" - echo "Speex preprocess plugin: $HAVE_SPEEXDSP" - if test "$HAVE_SPEEX" = "yes"; then -diff --git a/doc/Makefile.am b/doc/Makefile.am -index 19fa0d2..0d6f6e5 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -1,4 +1,35 @@ --EXTRA_DIST = README-pcm-oss README-jack README-pulse README-maemo \ -- upmix.txt vdownmix.txt samplerate.txt a52.txt lavcrate.txt \ -- speexrate.txt speexdsp.txt README-arcam-av -+EXTRA_DIST = - -+if HAVE_OSS -+EXTRA_DIST += README-pcm-oss -+endif -+if HAVE_MIX -+EXTRA_DIST += upmix.txt vdownmix.txt -+endif -+if HAVE_JACK -+EXTRA_DIST += README-jack -+endif -+if HAVE_PULSE -+EXTRA_DIST += README-pulse -+endif -+if HAVE_MAEMO_PLUGIN -+EXTRA_DIST += README-maemo -+endif -+if HAVE_SAMPLERATE -+EXTRA_DIST += samplerate.txt -+endif -+if HAVE_A52 -+EXTRA_DIST += a52.txt -+endif -+if HAVE_AVCRATE -+EXTRA_DIST += lavcrate.txt -+endif -+if HAVE_PPH -+EXTRA_DIST += speexrate.txt -+endif -+if HAVE_SPEEXDSP -+EXTRA_DIST += speexdsp.txt -+endif -+if HAVE_ARCAMAV -+EXTRA_DIST += README-arcam-av -+endif --- -2.13.6 - - -From 24db7f59d76984e2901f2834a297735853cab776 Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Mon, 16 Apr 2018 16:24:29 +0200 -Subject: [PATCH 4/6] Move rate-lavc to rate-lav subdirectory and update to use - libavresample - -- --disable-avcodec renamed to --disable-libav -- --avcodec-includedir renamed to --libav-includedir -- --avcodec-libdir renamed to --libav-libdir -- --disable-lavcrate renamed to --disable-lavrate - -The .c changes are from Anton Khirnov. The rest is from Jaroslav Kysela. - -From: Anton Khirnov -Signed-off-by: Jaroslav Kysela ---- - Makefile.am | 4 +- - a52/Makefile.am | 5 +- - a52/pcm_a52.c | 2 +- - configure.ac | 85 +++--- - doc/Makefile.am | 4 +- - doc/{lavcrate.txt => lavrate.txt} | 10 +- - .../10-rate-lavc.conf => rate-lav/10-rate-lav.conf | 6 +- - rate-lav/Makefile.am | 25 ++ - {rate-lavc => rate-lav}/gcd.h | 0 - rate-lav/rate_lavrate.c | 235 +++++++++++++++++ - rate-lavc/Makefile.am | 26 -- - rate-lavc/rate_lavcrate.c | 291 --------------------- - 12 files changed, 311 insertions(+), 382 deletions(-) - rename doc/{lavcrate.txt => lavrate.txt} (76%) - rename rate-lavc/10-rate-lavc.conf => rate-lav/10-rate-lav.conf (73%) - create mode 100644 rate-lav/Makefile.am - rename {rate-lavc => rate-lav}/gcd.h (100%) - create mode 100644 rate-lav/rate_lavrate.c - delete mode 100644 rate-lavc/Makefile.am - delete mode 100644 rate-lavc/rate_lavcrate.c - -diff --git a/Makefile.am b/Makefile.am -index 303bc83..27f61a4 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -17,8 +17,8 @@ endif - if HAVE_A52 - SUBDIRS += a52 - endif --if HAVE_AVCRATE --SUBDIRS += rate-lavc -+if HAVE_LAVRATE -+SUBDIRS += rate-lav - endif - if HAVE_USBSTREAM - SUBDIRS += usb_stream -diff --git a/a52/Makefile.am b/a52/Makefile.am -index cbc1497..4ac8edd 100644 ---- a/a52/Makefile.am -+++ b/a52/Makefile.am -@@ -6,9 +6,8 @@ asound_module_addon_DATA = 60-a52-encoder.conf - asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@ - asound_module_addondir = @ALSA_ADDON_DIR@ - --AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \ -- -DAVCODEC_HEADER="@AVCODEC_HEADER@" -+AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) - - libasound_module_pcm_a52_la_SOURCES = pcm_a52.c --libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @AVCODEC_LIBS@ -+libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_CODEC_LIBS@ -diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c -index 155da36..29ce45f 100644 ---- a/a52/pcm_a52.c -+++ b/a52/pcm_a52.c -@@ -25,7 +25,7 @@ - #include - #include - #include --#include AVCODEC_HEADER -+#include - #include - - /* some compatibility wrappers */ -diff --git a/configure.ac b/configure.ac -index 2d7e6aa..cb1ae2d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -89,67 +89,55 @@ if test "$use_maemo_rm" = "yes"; then - fi - fi - --AC_ARG_ENABLE([avcodec], -- AS_HELP_STRING([--disable-avcodec], [Don't build plugins depending on avcodec (a52)])) -+AC_ARG_ENABLE([libav], -+ AS_HELP_STRING([--disable-avlib], [Do not build plugins depending on libav/ffmpeg (a52,lavrate...)])) - --if test "x$enable_avcodec" != "xno"; then -- PKG_CHECK_MODULES(AVCODEC, [libavcodec libavutil], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no]) -+if test "x$enable_libav" != "xno"; then -+ PKG_CHECK_MODULES(LIBAV, [libavcodec libavutil libavresample], [HAVE_LIBAV=yes], [HAVE_LIBAV=no]) - fi - --if test "x$HAVE_AVCODEC" = "xno"; then -- AC_ARG_WITH([avcodec-includedir], -- AS_HELP_STRING([--with-avcodec-includedir=dir], -- [AVcodec include directory]), -- [AVCODEC_CFLAGS="-I$withval"], [AVCODEC_CFLAGS=""]) -- AC_ARG_WITH([avcodec-libdir], -- AS_HELP_STRING([--with-avcodec-libdir=dir], -- [AVcodec library directory]), -- [AVCODEC_LIBS="-L$withval"], [AVCODEC_LIBS=""]) -+if test "x$HAVE_LIBAV" = "xno"; then -+ AC_ARG_WITH([libav-includedir], -+ AS_HELP_STRING([--with-libav-includedir=dir], -+ [Libav/ffmpeg include directory]), -+ [LIBAV_CFLAGS="-I$(withval)"], [LIBAV_CFLAGS=""]) -+ AC_ARG_WITH([libav-libdir], -+ AS_HELP_STRING([--with-libav-libdir=dir], -+ [Libav/ffmpeg library directory]), -+ [LIBAV_LIBS="-L$withval"], [LIBAV_LIBS=""]) - - CFLAGS_saved="$CFLAGS" - LDFLAGS_saved="$LDFLAGS" -- CFLAGS="$CFLAGS $AVCODEC_CFLAGS" -- LDFLAGS="$LDFLAGS $AVCODEC_LIBS" -- AVCODEC_LIBS="$AVCODEC_LIBS -lavcodec" -- AC_CHECK_LIB([avcodec], [avcodec_open], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no]) -+ CFLAGS="$CFLAGS $LIBAV_CFLAGS" -+ LDFLAGS="$LDFLAGS $LIBAV_LIBS" -+ AC_CHECK_LIB([avcodec], [avcodec_open], [HAVE_LIBAV=yes], [HAVE_LIBAV=no]) - CFLAGS="$CFLAGS_saved" - LDFLAGS="$LDFLAGS_saved" -+ LIBAV_CODEC_LIBS="-lavcodec" -+ LIBAV_RESAMPLE_LIBS="-lavresample -lavutil" - fi - --if test $HAVE_AVCODEC = yes; then -- AVCODEC_HEADER="" -- CFLAGS_saved="$CFLAGS" -- CFLAGS="$CFLAGS $AVCODEC_CFLAGS" -- AC_CHECK_HEADER([ffmpeg/avcodec.h], [AVCODEC_HEADER='']) -- if test -z "$AVCODEC_HEADER"; then -- AC_CHECK_HEADER([libavcodec/avcodec.h], [AVCODEC_HEADER='']) -- fi -- if test -z "$AVCODEC_HEADER"; then -- HAVE_AVCODEC=no -- fi -- CFLAGS="$CFLAGS_saved" --fi -- --AM_CONDITIONAL(HAVE_AVCODEC, test x$HAVE_AVCODEC = xyes) --AC_SUBST(AVCODEC_CFLAGS) --AC_SUBST(AVCODEC_LIBS) --AC_SUBST(AVCODEC_HEADER) -+AM_CONDITIONAL(HAVE_LIBAV, test x$HAVE_LIBAV = xyes) -+AC_SUBST(LIBAV_CFLAGS) -+AC_SUBST(LIBAV_LIBS) -+AC_SUBST(LIBAV_CODEC_LIBS) -+AC_SUBST(LIBAV_RESAMPLE_LIBS) - - AC_ARG_ENABLE([a52], - AS_HELP_STRING([--disable-a52], [Disable building of A52 encoder plugin])) - --if test "x$enable_a52" != "xno" -a "$HAVE_AVCODEC" = "yes"; then -+if test "x$enable_a52" != "xno" -a "$HAVE_LIBAV" = "yes"; then - HAVE_A52=yes - fi - AM_CONDITIONAL(HAVE_A52, test x$HAVE_A52 = xyes) - --AC_ARG_ENABLE([avcrate], -- AS_HELP_STRING([--disable-avcrate], [Disable building of AVC rate plugin])) -+AC_ARG_ENABLE([lavrate], -+ AS_HELP_STRING([--disable-lavrate], [Disable building of libav/ffmpeg rate plugin])) - --if test "x$enable_avcrate" != "xno" -a "$HAVE_AVCODEC" = "yes"; then -- HAVE_AVCRATE=yes -+if test "x$enable_lavrate" != "xno" -a "$HAVE_LIBAV" = "yes"; then -+ HAVE_LAVRATE=yes - fi --AM_CONDITIONAL(HAVE_AVCRATE, test x$HAVE_AVCRATE = xyes) -+AM_CONDITIONAL(HAVE_LAVRATE, test x$HAVE_LAVRATE = xyes) - - AC_ARG_ENABLE([speexdsp], - AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin])) -@@ -245,7 +233,7 @@ AC_OUTPUT([ - mix/Makefile - rate/Makefile - a52/Makefile -- rate-lavc/Makefile -+ rate-lav/Makefile - maemo/Makefile - doc/Makefile - usb_stream/Makefile -@@ -276,14 +264,13 @@ if test "$HAVE_SAMPLERATE" = "yes"; then - fi - echo "Maemo plugin: $HAVE_MAEMO_PLUGIN" - echo " Using Osso resource manager: $use_maemo_rm" --if test "$HAVE_AVCODEC" = "yes"; then -- echo "AVCodec config:" -- echo " AVCODEC_CFLAGS: $AVCODEC_CFLAGS" -- echo " AVCODEC_LIBS: $AVCODEC_LIBS" -- echo " AVCODEC_HEADER: $AVCODEC_HEADER" -+if test "$HAVE_LIBAV" = "yes"; then -+ echo "Libav/ffmpeg config:" -+ echo " LIBAV_CFLAGS: $LIBAV_CFLAGS" -+ echo " LIBAV_LIBS: $LIBAV_LIBS / $LIBAV_CODEC_LIBS / $LIBAV_RESAMPLE_LIBS" - fi --echo "A52 plugin: $HAVE_A52" --echo "AVC rate plugin: $HAVE_AVCRATE" -+echo "Libav A52 plugin: $HAVE_A52" -+echo "Libav rate plugin: $HAVE_LAVRATE" - echo "Speex rate plugin: $PPH" - echo "Speex preprocess plugin: $HAVE_SPEEXDSP" - if test "$HAVE_SPEEX" = "yes"; then -diff --git a/doc/Makefile.am b/doc/Makefile.am -index 0d6f6e5..7c004e5 100644 ---- a/doc/Makefile.am -+++ b/doc/Makefile.am -@@ -21,8 +21,8 @@ endif - if HAVE_A52 - EXTRA_DIST += a52.txt - endif --if HAVE_AVCRATE --EXTRA_DIST += lavcrate.txt -+if HAVE_LAVRATE -+EXTRA_DIST += lavrate.txt - endif - if HAVE_PPH - EXTRA_DIST += speexrate.txt -diff --git a/doc/lavcrate.txt b/doc/lavrate.txt -similarity index 76% -rename from doc/lavcrate.txt -rename to doc/lavrate.txt -index faf3e25..6575183 100644 ---- a/doc/lavcrate.txt -+++ b/doc/lavrate.txt -@@ -1,14 +1,14 @@ --Rate Converter Plugin Using libavcodec --====================================== -+Rate Converter Plugin Using libavresample -+=========================================0 - --The plugin in rate-lavc subdirectory is an external rate converter using --libavcodec's resampler. You can use this rate converter plugin by defining a -+The plugin in rate-lavr subdirectory is an external rate converter using -+libavresample library. You can use this rate converter plugin by defining a - rate PCM with "converter" parameter, such as: - - pcm.my_rate { - type rate - slave.pcm "hw" -- converter "lavcrate" -+ converter "lavrate" - } - - The plug plugin has also a similar field, "rate_converter". -diff --git a/rate-lavc/10-rate-lavc.conf b/rate-lav/10-rate-lav.conf -similarity index 73% -rename from rate-lavc/10-rate-lavc.conf -rename to rate-lav/10-rate-lav.conf -index bab1694..48ede62 100644 ---- a/rate-lavc/10-rate-lavc.conf -+++ b/rate-lav/10-rate-lav.conf -@@ -1,4 +1,4 @@ --pcm.lavcrate { -+pcm.lavrate { - @args [ SLAVE RATE CONVERTER ] - @args.SLAVE { - type string -@@ -10,7 +10,7 @@ pcm.lavcrate { - } - @args.CONVERTER { - type string -- default "lavcrate" -+ default "lavrate" - } - type rate - converter $CONVERTER -@@ -23,6 +23,6 @@ pcm.lavcrate { - @func refer - name defaults.namehint.basic - } -- description "Rate Converter Plugin Using AVC Library" -+ description "Rate Converter Plugin Using Libav/FFmpeg Library" - } - } -diff --git a/rate-lav/Makefile.am b/rate-lav/Makefile.am -new file mode 100644 -index 0000000..0f6ecb6 ---- /dev/null -+++ b/rate-lav/Makefile.am -@@ -0,0 +1,25 @@ -+EXTRA_DIST = 10-rate-lav.conf -+ -+asound_module_rate_lavrate_LTLIBRARIES = libasound_module_rate_lavrate.la -+asound_module_addon_DATA = 10-rate-lav.conf -+ -+asound_module_rate_lavratedir = @ALSA_PLUGIN_DIR@ -+asound_module_addondir = @ALSA_ADDON_DIR@ -+ -+AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@ -+AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -+ -+libasound_module_rate_lavrate_la_SOURCES = rate_lavrate.c -+libasound_module_rate_lavrate_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_RESAMPLE_LIBS@ -+ -+noinst_HEADERS = gcd.h -+ -+install-exec-hook: -+ rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so -+ $(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_higher.so -+ $(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_high.so -+ $(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_fast.so -+ $(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_faster.so -+ -+uninstall-hook: -+ rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so -diff --git a/rate-lavc/gcd.h b/rate-lav/gcd.h -similarity index 100% -rename from rate-lavc/gcd.h -rename to rate-lav/gcd.h -diff --git a/rate-lav/rate_lavrate.c b/rate-lav/rate_lavrate.c -new file mode 100644 -index 0000000..2b992c5 ---- /dev/null -+++ b/rate-lav/rate_lavrate.c -@@ -0,0 +1,235 @@ -+/* -+ * Rate converter plugin using libavresample -+ * Copyright (c) 2014 by Anton Khirnov -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ */ -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+ -+static unsigned int filter_size = 16; -+static unsigned int phase_shift = 10; /* auto-adjusts */ -+static double cutoff = 0; /* auto-adjusts */ -+ -+struct rate_src { -+ AVAudioResampleContext *avr; -+ -+ unsigned int in_rate; -+ unsigned int out_rate; -+ unsigned int channels; -+}; -+ -+static snd_pcm_uframes_t input_frames(void *obj ATTRIBUTE_UNUSED, -+ snd_pcm_uframes_t frames) -+{ -+ return frames; -+} -+ -+static snd_pcm_uframes_t output_frames(void *obj ATTRIBUTE_UNUSED, -+ snd_pcm_uframes_t frames) -+{ -+ return frames; -+} -+ -+static void pcm_src_free(void *obj) -+{ -+ struct rate_src *rate = obj; -+ avresample_free(&rate->avr); -+} -+ -+static int pcm_src_init(void *obj, snd_pcm_rate_info_t *info) -+{ -+ struct rate_src *rate = obj; -+ int i, ir, or; -+ -+ if (!rate->avr || rate->channels != info->channels) { -+ int ret; -+ -+ pcm_src_free(rate); -+ rate->channels = info->channels; -+ ir = rate->in_rate = info->in.rate; -+ or = rate->out_rate = info->out.rate; -+ i = av_gcd(or, ir); -+ if (or > ir) { -+ phase_shift = or/i; -+ } else { -+ phase_shift = ir/i; -+ } -+ if (cutoff <= 0.0) { -+ cutoff = 1.0 - 1.0/filter_size; -+ if (cutoff < 0.80) -+ cutoff = 0.80; -+ } -+ -+ rate->avr = avresample_alloc_context(); -+ if (!rate->avr) -+ return -ENOMEM; -+ -+ av_opt_set_int(rate->avr, "in_sample_rate", info->in.rate, 0); -+ av_opt_set_int(rate->avr, "out_sample_rate", info->out.rate, 0); -+ av_opt_set_int(rate->avr, "in_sample_format", AV_SAMPLE_FMT_S16, 0); -+ av_opt_set_int(rate->avr, "out_sample_format", AV_SAMPLE_FMT_S16, 0); -+ av_opt_set_int(rate->avr, "in_channel_layout", av_get_default_channel_layout(rate->channels), 0); -+ av_opt_set_int(rate->avr, "out_channel_layout", av_get_default_channel_layout(rate->channels), 0); -+ -+ av_opt_set_int(rate->avr, "filter_size", filter_size, 0); -+ av_opt_set_int(rate->avr, "phase_shift", phase_shift, 0); -+ av_opt_set_double(rate->avr, "cutoff", cutoff, 0); -+ -+ ret = avresample_open(rate->avr); -+ if (ret < 0) { -+ avresample_free(&rate->avr); -+ return -EINVAL; -+ } -+ } -+ -+ return 0; -+} -+ -+static int pcm_src_adjust_pitch(void *obj, snd_pcm_rate_info_t *info) -+{ -+ struct rate_src *rate = obj; -+ -+ if (info->out.rate != rate->out_rate || info->in.rate != rate->in_rate) -+ pcm_src_init(obj, info); -+ return 0; -+} -+ -+static void pcm_src_reset(void *obj) -+{ -+ struct rate_src *rate = obj; -+ -+ if (rate->avr) { -+#if 0 -+ avresample_close(rate->avr); -+ avresample_open(rate->avr); -+#endif -+ } -+} -+ -+static void pcm_src_convert_s16(void *obj, int16_t *dst, -+ unsigned int dst_frames, -+ const int16_t *src, -+ unsigned int src_frames) -+{ -+ struct rate_src *rate = obj; -+ int chans = rate->channels; -+ unsigned int total_in = avresample_get_delay(rate->avr) + src_frames; -+ -+ avresample_convert(rate->avr, (uint8_t **)&dst, dst_frames * chans * 2, dst_frames, -+ (uint8_t **)&src, src_frames * chans * 2, src_frames); -+ -+ avresample_set_compensation(rate->avr, -+ total_in - src_frames > filter_size ? 0 : 1, src_frames); -+} -+ -+static void pcm_src_close(void *obj) -+{ -+ pcm_src_free(obj); -+} -+ -+#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 -+static int get_supported_rates(void *obj ATTRIBUTE_UNUSED, -+ unsigned int *rate_min, -+ unsigned int *rate_max) -+{ -+ *rate_min = *rate_max = 0; /* both unlimited */ -+ return 0; -+} -+ -+static void dump(void *obj ATTRIBUTE_UNUSED, snd_output_t *out) -+{ -+ snd_output_printf(out, "Converter: libavr\n"); -+} -+#endif -+ -+static snd_pcm_rate_ops_t pcm_src_ops = { -+ .close = pcm_src_close, -+ .init = pcm_src_init, -+ .free = pcm_src_free, -+ .reset = pcm_src_reset, -+ .adjust_pitch = pcm_src_adjust_pitch, -+ .convert_s16 = pcm_src_convert_s16, -+ .input_frames = input_frames, -+ .output_frames = output_frames, -+#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 -+ .version = SND_PCM_RATE_PLUGIN_VERSION, -+ .get_supported_rates = get_supported_rates, -+ .dump = dump, -+#endif -+}; -+ -+int pcm_src_open(unsigned int version, void **objp, snd_pcm_rate_ops_t *ops) -+ -+{ -+ struct rate_src *rate; -+ -+#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002 -+ if (version != SND_PCM_RATE_PLUGIN_VERSION) { -+ fprintf(stderr, "Invalid rate plugin version %x\n", version); -+ return -EINVAL; -+ } -+#endif -+ rate = calloc(1, sizeof(*rate)); -+ if (!rate) -+ return -ENOMEM; -+ -+ *objp = rate; -+ rate->avr = NULL; -+#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 -+ if (version == 0x010001) -+ memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); -+ else -+#endif -+ *ops = pcm_src_ops; -+ return 0; -+} -+ -+int SND_PCM_RATE_PLUGIN_ENTRY(lavrate)(unsigned int version, void **objp, -+ snd_pcm_rate_ops_t *ops) -+{ -+ return pcm_src_open(version, objp, ops); -+} -+int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_higher)(unsigned int version, -+ void **objp, snd_pcm_rate_ops_t *ops) -+{ -+ filter_size = 64; -+ return pcm_src_open(version, objp, ops); -+} -+int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_high)(unsigned int version, -+ void **objp, snd_pcm_rate_ops_t *ops) -+{ -+ filter_size = 32; -+ return pcm_src_open(version, objp, ops); -+} -+int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_fast)(unsigned int version, -+ void **objp, snd_pcm_rate_ops_t *ops) -+{ -+ filter_size = 8; -+ return pcm_src_open(version, objp, ops); -+} -+int SND_PCM_RATE_PLUGIN_ENTRY(lavrate_faster)(unsigned int version, -+ void **objp, snd_pcm_rate_ops_t *ops) -+{ -+ filter_size = 4; -+ return pcm_src_open(version, objp, ops); -+} -+ -+ -diff --git a/rate-lavc/Makefile.am b/rate-lavc/Makefile.am -deleted file mode 100644 -index 5f66472..0000000 ---- a/rate-lavc/Makefile.am -+++ /dev/null -@@ -1,26 +0,0 @@ --EXTRA_DIST = 10-rate-lavc.conf -- --asound_module_rate_lavcrate_LTLIBRARIES = libasound_module_rate_lavcrate.la --asound_module_addon_DATA = 10-rate-lavc.conf -- --asound_module_rate_lavcratedir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -- --AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @AVCODEC_CFLAGS@ \ -- -DAVCODEC_HEADER="@AVCODEC_HEADER@" --AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -- --libasound_module_rate_lavcrate_la_SOURCES = rate_lavcrate.c --libasound_module_rate_lavcrate_la_LIBADD = @ALSA_LIBS@ @AVCODEC_LIBS@ -- --noinst_HEADERS = gcd.h -- --install-exec-hook: -- rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_*.so -- $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_higher.so -- $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_high.so -- $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_fast.so -- $(LN_S) libasound_module_rate_lavcrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_faster.so -- --uninstall-hook: -- rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavcrate_*.so -diff --git a/rate-lavc/rate_lavcrate.c b/rate-lavc/rate_lavcrate.c -deleted file mode 100644 -index 14a2198..0000000 ---- a/rate-lavc/rate_lavcrate.c -+++ /dev/null -@@ -1,291 +0,0 @@ --/* -- * Rate converter plugin using libavcodec's resampler -- * Copyright (c) 2007 by Nicholas Kain -- * -- * based on rate converter that uses libsamplerate -- * Copyright (c) 2006 by Takashi Iwai -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Lesser General Public -- * License as published by the Free Software Foundation; either -- * version 2.1 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Lesser General Public License for more details. -- */ -- --#include --#include --#include --#include AVCODEC_HEADER --#include "gcd.h" -- --static int filter_size = 16; --static int phase_shift = 10; /* auto-adjusts */ --static double cutoff = 0; /* auto-adjusts */ -- --struct rate_src { -- struct AVResampleContext *context; -- int in_rate; -- int out_rate; -- int stored; -- int point; -- int16_t **out; -- int16_t **in; -- unsigned int channels; --}; -- --static snd_pcm_uframes_t input_frames(void *obj, snd_pcm_uframes_t frames) --{ -- return frames; --} -- --static snd_pcm_uframes_t output_frames(void *obj, snd_pcm_uframes_t frames) --{ -- return frames; --} -- --static void pcm_src_free(void *obj) --{ -- struct rate_src *rate = obj; -- int i; -- -- if (rate->out) { -- for (i=0; ichannels; i++) { -- free(rate->out[i]); -- } -- free(rate->out); -- } -- if (rate->in) { -- for (i=0; ichannels; i++) { -- free(rate->in[i]); -- } -- free(rate->in); -- } -- rate->out = rate->in = NULL; -- -- if (rate->context) { -- av_resample_close(rate->context); -- rate->context = NULL; -- } --} -- --static int pcm_src_init(void *obj, snd_pcm_rate_info_t *info) --{ -- struct rate_src *rate = obj; -- int i, ir, or; -- -- if (! rate->context || rate->channels != info->channels) { -- pcm_src_free(rate); -- rate->channels = info->channels; -- ir = rate->in_rate = info->in.rate; -- or = rate->out_rate = info->out.rate; -- i = gcd(or, ir); -- if (or > ir) { -- phase_shift = or/i; -- } else { -- phase_shift = ir/i; -- } -- if (cutoff <= 0.0) { -- cutoff = 1.0 - 1.0/filter_size; -- if (cutoff < 0.80) -- cutoff = 0.80; -- } -- rate->context = av_resample_init(info->out.rate, info->in.rate, -- filter_size, phase_shift, -- (info->out.rate >= info->in.rate ? 0 : 1), cutoff); -- if (!rate->context) -- return -EINVAL; -- } -- -- rate->out = malloc(rate->channels * sizeof(int16_t *)); -- rate->in = malloc(rate->channels * sizeof(int16_t *)); -- for (i=0; ichannels; i++) { -- rate->out[i] = calloc(info->out.period_size * 2, -- sizeof(int16_t)); -- rate->in[i] = calloc(info->in.period_size * 2, -- sizeof(int16_t)); -- } -- rate->point = info->in.period_size / 2; -- if (!rate->out || !rate->in) { -- pcm_src_free(rate); -- return -ENOMEM; -- } -- -- return 0; --} -- --static int pcm_src_adjust_pitch(void *obj, snd_pcm_rate_info_t *info) --{ -- struct rate_src *rate = obj; -- -- if (info->out.rate != rate->out_rate || info->in.rate != rate->in_rate) -- pcm_src_init(obj, info); -- return 0; --} -- --static void pcm_src_reset(void *obj) --{ -- struct rate_src *rate = obj; -- rate->stored = 0; --} -- --static void deinterleave(const int16_t *src, int16_t **dst, unsigned int frames, -- unsigned int chans, int overflow) --{ -- int i, j; -- -- if (chans == 1) { -- memcpy(dst + overflow, src, frames*sizeof(int16_t)); -- } else if (chans == 2) { -- for (j=overflow; j<(frames + overflow); j++) { -- dst[0][j] = *(src++); -- dst[1][j] = *(src++); -- } -- } else { -- for (j=overflow; j<(frames + overflow); j++) { -- for (i=0; ichannels, ret=0, i; -- int total_in = rate->stored + src_frames, new_stored; -- -- deinterleave(src, rate->in, src_frames, chans, rate->point); -- for (i=0; icontext, rate->out[i], -- rate->in[i]+rate->point-rate->stored, &consumed, -- total_in, dst_frames, i == (chans - 1)); -- new_stored = total_in-consumed; -- memmove(rate->in[i]+rate->point-new_stored, -- rate->in[i]+rate->point-rate->stored+consumed, -- new_stored*sizeof(int16_t)); -- } -- av_resample_compensate(rate->context, -- total_in-src_frames>filter_size?0:1, src_frames); -- reinterleave(rate->out, dst, ret, chans); -- rate->stored = total_in-consumed; --} -- --static void pcm_src_close(void *obj) --{ -- pcm_src_free(obj); --} -- --#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 --static int get_supported_rates(void *obj, unsigned int *rate_min, -- unsigned int *rate_max) --{ -- *rate_min = *rate_max = 0; /* both unlimited */ -- return 0; --} -- --static void dump(void *obj, snd_output_t *out) --{ -- snd_output_printf(out, "Converter: liblavc\n"); --} --#endif -- --static snd_pcm_rate_ops_t pcm_src_ops = { -- .close = pcm_src_close, -- .init = pcm_src_init, -- .free = pcm_src_free, -- .reset = pcm_src_reset, -- .adjust_pitch = pcm_src_adjust_pitch, -- .convert_s16 = pcm_src_convert_s16, -- .input_frames = input_frames, -- .output_frames = output_frames, --#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 -- .version = SND_PCM_RATE_PLUGIN_VERSION, -- .get_supported_rates = get_supported_rates, -- .dump = dump, --#endif --}; -- --int pcm_src_open(unsigned int version, void **objp, snd_pcm_rate_ops_t *ops) -- --{ -- struct rate_src *rate; -- --#if SND_PCM_RATE_PLUGIN_VERSION < 0x010002 -- if (version != SND_PCM_RATE_PLUGIN_VERSION) { -- fprintf(stderr, "Invalid rate plugin version %x\n", version); -- return -EINVAL; -- } --#endif -- rate = calloc(1, sizeof(*rate)); -- if (!rate) -- return -ENOMEM; -- -- *objp = rate; -- rate->context = NULL; --#if SND_PCM_RATE_PLUGIN_VERSION >= 0x010002 -- if (version == 0x010001) -- memcpy(ops, &pcm_src_ops, sizeof(snd_pcm_rate_old_ops_t)); -- else --#endif -- *ops = pcm_src_ops; -- return 0; --} -- --int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate)(unsigned int version, void **objp, -- snd_pcm_rate_ops_t *ops) --{ -- return pcm_src_open(version, objp, ops); --} --int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_higher)(unsigned int version, -- void **objp, snd_pcm_rate_ops_t *ops) --{ -- filter_size = 64; -- return pcm_src_open(version, objp, ops); --} --int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_high)(unsigned int version, -- void **objp, snd_pcm_rate_ops_t *ops) --{ -- filter_size = 32; -- return pcm_src_open(version, objp, ops); --} --int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_fast)(unsigned int version, -- void **objp, snd_pcm_rate_ops_t *ops) --{ -- filter_size = 8; -- return pcm_src_open(version, objp, ops); --} --int SND_PCM_RATE_PLUGIN_ENTRY(lavcrate_faster)(unsigned int version, -- void **objp, snd_pcm_rate_ops_t *ops) --{ -- filter_size = 4; -- return pcm_src_open(version, objp, ops); --} -- -- --- -2.13.6 - - -From 4afd4ab0b276b26b965bae3aadaa31cdb52b1df0 Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Mon, 16 Apr 2018 17:49:36 +0200 -Subject: [PATCH 5/6] configure: change --with-alsaaddondir to - --with-alsagconfdir and --with-alsalconfdir - -The local add-on configuration directory (/etc/alsa/conf.d) contains -links to the global configuration directory (/usr/share/alsa/alsa.conf.d) now. - -Signed-off-by: Jaroslav Kysela ---- - a52/Makefile.am | 14 +++++++++++--- - arcam-av/Makefile.am | 14 +++++++++++--- - configure.ac | 32 ++++++++++++++++++++++---------- - install-hooks.am | 16 ++++++++++++++++ - jack/Makefile.am | 14 +++++++++++--- - maemo/Makefile.am | 14 +++++++++++--- - mix/Makefile.am | 14 +++++++++++--- - oss/Makefile.am | 14 +++++++++++--- - pph/Makefile.am | 16 ++++++++++++---- - pulse/Makefile.am | 17 ++++++++++++++--- - rate-lav/Makefile.am | 13 ++++++++++--- - rate/Makefile.am | 14 +++++++++++--- - speex/Makefile.am | 14 +++++++++++--- - usb_stream/Makefile.am | 14 +++++++++++--- - 14 files changed, 173 insertions(+), 47 deletions(-) - create mode 100644 install-hooks.am - -diff --git a/a52/Makefile.am b/a52/Makefile.am -index 4ac8edd..cd5ce45 100644 ---- a/a52/Makefile.am -+++ b/a52/Makefile.am -@@ -1,13 +1,21 @@ --EXTRA_DIST = 60-a52-encoder.conf -+GCONF_FILES = 60-a52-encoder.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_pcm_a52_LTLIBRARIES = libasound_module_pcm_a52.la --asound_module_addon_DATA = 60-a52-encoder.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_pcm_a52dir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) - - libasound_module_pcm_a52_la_SOURCES = pcm_a52.c - libasound_module_pcm_a52_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_CODEC_LIBS@ -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/arcam-av/Makefile.am b/arcam-av/Makefile.am -index 4a54ccd..c16aec0 100644 ---- a/arcam-av/Makefile.am -+++ b/arcam-av/Makefile.am -@@ -1,13 +1,21 @@ --EXTRA_DIST = 50-arcam-av-ctl.conf -+GCONF_FILES = 50-arcam-av-ctl.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_ctl_arcam_av_LTLIBRARIES = libasound_module_ctl_arcam_av.la --asound_module_addon_DATA = 50-arcam-av-ctl.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_ctl_arcam_avdir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined - - libasound_module_ctl_arcam_av_la_SOURCES = ctl_arcam_av.c arcam_av.c arcam_av.h - libasound_module_ctl_arcam_av_la_LIBADD = @ALSA_LIBS@ -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/configure.ac b/configure.ac -index cb1ae2d..f49bb6b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -210,17 +210,29 @@ AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA dat - ALSA_DATA_DIR="$alsadatadir" - AC_SUBST(ALSA_DATA_DIR) - --dnl ALSA add-on config directory --AC_ARG_WITH(alsaaddondir, -- AS_HELP_STRING([--with-alsaaddondir=dir], -- [path where ALSA add-on config files are stored]), -- alsaaddondir="$withval", alsaaddondir="") --if test -z "$alsaaddondir"; then -- alsaaddondir="/etc/alsa/conf.d" -+dnl ALSA add-on global config directory -+AC_ARG_WITH(alsagconfdir, -+ AS_HELP_STRING([--with-alsagconfdir=dir], -+ [path where ALSA global add-on config files are stored]), -+ alsagconfdir="$withval", alsagconfdir="") -+if test -z "$alsagconfdir"; then -+ alsagconfdir="$ALSA_DATA_DIR/alsa.conf.d" - fi --AC_DEFINE_UNQUOTED(ALSA_ADDON_DIR, "$alsaaddondir", [directory containing ALSA add-on config files]) --ALSA_ADDON_DIR="$alsaaddondir" --AC_SUBST(ALSA_ADDON_DIR) -+AC_DEFINE_UNQUOTED(ALSA_GCONF_DIR, "$alsagconfdir", [directory containing global ALSA add-on config files]) -+ALSA_GCONF_DIR="$alsagconfdir" -+AC_SUBST(ALSA_GCONF_DIR) -+ -+dnl ALSA add-on local config directory -+AC_ARG_WITH(alsalconfdir, -+ AS_HELP_STRING([--with-alsalconfdir=dir], -+ [path where ALSA local add-on config files are stored]), -+ alsalconfdir="$withval", alsalconfdir="") -+if test -z "$alsalconfdir"; then -+ alsalconfdir="/etc/alsa/conf.d" -+fi -+AC_DEFINE_UNQUOTED(ALSA_LCONF_DIR, "$alsalconfdir", [directory containing local ALSA add-on config files]) -+ALSA_LCONF_DIR="$alsalconfdir" -+AC_SUBST(ALSA_LCONF_DIR) - - SAVE_PLUGINS_VERSION - -diff --git a/install-hooks.am b/install-hooks.am -new file mode 100644 -index 0000000..2d6d383 ---- /dev/null -+++ b/install-hooks.am -@@ -0,0 +1,16 @@ -+install-conf-hook: -+ mkdir -p $(DESTDIR)$(ALSA_LCONF_DIR) -+ @(echo cd $(DESTDIR)$(ALSA_LCONF_DIR); \ -+ cd $(DESTDIR)$(ALSA_LCONF_DIR); \ -+ for i in $(GCONF_FILES); do \ -+ echo $(RM) $$i";" ln -s $(ALSA_GCONF_DIR)/$$i .; \ -+ $(RM) $$i; \ -+ ln -s $(ALSA_GCONF_DIR)/$$i .; \ -+ done) -+uninstall-conf-hook: -+ @(echo cd $(DESTDIR)$(ALSA_LCONF_DIR); \ -+ cd $(DESTDIR)$(ALSA_LCONF_DIR); \ -+ for i in $(GCONF_FILES); do \ -+ echo $(RM) $$i; \ -+ $(RM) $$i; \ -+ done) -diff --git a/jack/Makefile.am b/jack/Makefile.am -index 0a3d6ae..7801194 100644 ---- a/jack/Makefile.am -+++ b/jack/Makefile.am -@@ -1,13 +1,21 @@ --EXTRA_DIST = 50-jack.conf -+GCONF_FILES = 50-jack.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_pcm_jack_LTLIBRARIES = libasound_module_pcm_jack.la --asound_module_addon_DATA = 50-jack.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_pcm_jackdir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @JACK_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) - - libasound_module_pcm_jack_la_SOURCES = pcm_jack.c - libasound_module_pcm_jack_la_LIBADD = @ALSA_LIBS@ @JACK_LIBS@ -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/maemo/Makefile.am b/maemo/Makefile.am -index aca481d..7749926 100644 ---- a/maemo/Makefile.am -+++ b/maemo/Makefile.am -@@ -1,12 +1,14 @@ --EXTRA_DIST = 98-maemo.conf -+GCONF_FILES = 98-maemo.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_pcm_alsa_dsp_LTLIBRARIES = libasound_module_pcm_alsa_dsp.la - asound_module_ctl_dsp_ctl_LTLIBRARIES = libasound_module_ctl_dsp_ctl.la --asound_module_addon_DATA = 98-maemo.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_pcm_alsa_dspdir = @ALSA_PLUGIN_DIR@ - asound_module_ctl_dsp_ctldir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -O2 @ALSA_CFLAGS@ $(DBUS_CFLAGS) - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -19,3 +21,9 @@ libasound_module_ctl_dsp_ctl_la_LIBADD = @ALSA_LIBS@ $(DBUS_LIBS) -lpthread - - noinst_HEADERS = constants.h debug.h dsp-protocol.h list.h reporting.h \ - types.h -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/mix/Makefile.am b/mix/Makefile.am -index 710606c..a74c200 100644 ---- a/mix/Makefile.am -+++ b/mix/Makefile.am -@@ -1,12 +1,14 @@ --EXTRA_DIST = 60-upmix.conf 60-vdownmix.conf -+GCONF_FILES = 60-upmix.conf 60-vdownmix.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_pcm_upmix_LTLIBRARIES = libasound_module_pcm_upmix.la - asound_module_pcm_vdownmix_LTLIBRARIES = libasound_module_pcm_vdownmix.la --asound_module_addon_DATA = 60-upmix.conf 60-vdownmix.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_pcm_upmixdir = @ALSA_PLUGIN_DIR@ - asound_module_pcm_vdownmixdir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -15,3 +17,9 @@ libasound_module_pcm_upmix_la_SOURCES = pcm_upmix.c - libasound_module_pcm_upmix_la_LIBADD = @ALSA_LIBS@ - libasound_module_pcm_vdownmix_la_SOURCES = pcm_vdownmix.c - libasound_module_pcm_vdownmix_la_LIBADD = @ALSA_LIBS@ -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/oss/Makefile.am b/oss/Makefile.am -index df83d20..46dfcac 100644 ---- a/oss/Makefile.am -+++ b/oss/Makefile.am -@@ -1,12 +1,14 @@ --EXTRA_DIST = 50-oss.conf -+GCONF_FILEs = 50-oss.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_pcm_oss_LTLIBRARIES = libasound_module_pcm_oss.la - asound_module_ctl_oss_LTLIBRARIES = libasound_module_ctl_oss.la --asound_module_addon_DATA = 50-oss.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_pcm_ossdir = @ALSA_PLUGIN_DIR@ - asound_module_ctl_ossdir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -16,3 +18,9 @@ libasound_module_pcm_oss_la_LIBADD = @ALSA_LIBS@ - - libasound_module_ctl_oss_la_SOURCES = ctl_oss.c - libasound_module_ctl_oss_la_LIBADD = @ALSA_LIBS@ -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/pph/Makefile.am b/pph/Makefile.am -index abb950b..6938b74 100644 ---- a/pph/Makefile.am -+++ b/pph/Makefile.am -@@ -1,10 +1,12 @@ --EXTRA_DIST = 10-speexrate.conf -+GCONF_FILES = 10-speexrate.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_rate_speexrate_LTLIBRARIES = libasound_module_rate_speexrate.la --asound_module_addon_DATA = 10-speexrate.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_rate_speexratedir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -DVAR_ARRAYS -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -20,6 +22,10 @@ libasound_module_rate_speexrate_la_SOURCES += resample.c - libasound_module_rate_speexrate_la_LIBADD += -lm - endif - -+noinst_HEADERS = speex_resampler.h arch.h fixed_generic.h -+ -+include ../install-hooks.am -+ - install-exec-hook: - rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so - $(LN_S) libasound_module_rate_speexrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_best.so -@@ -28,4 +34,6 @@ install-exec-hook: - uninstall-hook: - rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_speexrate_*.so - --noinst_HEADERS = speex_resampler.h arch.h fixed_generic.h -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/pulse/Makefile.am b/pulse/Makefile.am -index 835808c..c33e702 100644 ---- a/pulse/Makefile.am -+++ b/pulse/Makefile.am -@@ -1,14 +1,19 @@ --EXTRA_DIST = 50-pulseaudio.conf 99-pulseaudio-default.conf.example -+GCONF_FILES = 50-pulseaudio.conf -+LCONF_FILES = 99-pulseaudio-default.conf.example -+ -+EXTRA_DIST = $(GCONF_FILES) $(LCONF_FILES) - - asound_module_pcm_LTLIBRARIES = libasound_module_pcm_pulse.la - asound_module_ctl_LTLIBRARIES = libasound_module_ctl_pulse.la - asound_module_conf_LTLIBRARIES = libasound_module_conf_pulse.la --asound_module_addon_DATA = 50-pulseaudio.conf 99-pulseaudio-default.conf.example -+asound_module_gconf_DATA = $(GCONF_FILES) -+asound_module_lconf_DATA = $(LCONF_FILES) - - asound_module_pcmdir = @ALSA_PLUGIN_DIR@ - asound_module_ctldir = @ALSA_PLUGIN_DIR@ - asound_module_confdir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ -+asound_module_lconfdir = @ALSA_LCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(PTHREAD_CFLAGS) $(pulseaudio_CFLAGS) -D_GNU_SOURCE - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -21,3 +26,9 @@ libasound_module_ctl_pulse_la_LIBADD = @ALSA_LIBS@ $(PTHREAD_LIBS) $(pulseaudio_ - - libasound_module_conf_pulse_la_SOURCES = conf_pulse.c - libasound_module_conf_pulse_la_LIBADD = @ALSA_LIBS@ $(PTHREAD_LIBS) $(pulseaudio_LIBS) -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/rate-lav/Makefile.am b/rate-lav/Makefile.am -index 0f6ecb6..eb672b5 100644 ---- a/rate-lav/Makefile.am -+++ b/rate-lav/Makefile.am -@@ -1,10 +1,12 @@ --EXTRA_DIST = 10-rate-lav.conf -+GCONF_FILES = 10-rate-lav.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_rate_lavrate_LTLIBRARIES = libasound_module_rate_lavrate.la --asound_module_addon_DATA = 10-rate-lav.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_rate_lavratedir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @LIBAV_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -14,6 +16,8 @@ libasound_module_rate_lavrate_la_LIBADD = @ALSA_LIBS@ @LIBAV_LIBS@ @LIBAV_RESAMP - - noinst_HEADERS = gcd.h - -+include ../install-hooks.am -+ - install-exec-hook: - rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so - $(LN_S) libasound_module_rate_lavrate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_higher.so -@@ -23,3 +27,6 @@ install-exec-hook: - - uninstall-hook: - rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_lavrate_*.so -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/rate/Makefile.am b/rate/Makefile.am -index 25014d8..488c12a 100644 ---- a/rate/Makefile.am -+++ b/rate/Makefile.am -@@ -1,10 +1,12 @@ --EXTRA_DIST = 10-samplerate.conf -+GCONF_FILES = 10-samplerate.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_rate_samplerate_LTLIBRARIES = libasound_module_rate_samplerate.la --asound_module_addon_DATA = 10-samplerate.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_rate_sampleratedir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ $(samplerate_CFLAGS) - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) -@@ -12,6 +14,8 @@ AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUN - libasound_module_rate_samplerate_la_SOURCES = rate_samplerate.c - libasound_module_rate_samplerate_la_LIBADD = @ALSA_LIBS@ @samplerate_LIBS@ - -+include ../install-hooks.am -+ - install-exec-hook: - rm -f $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_*.so - $(LN_S) libasound_module_rate_samplerate.so $(DESTDIR)@ALSA_PLUGIN_DIR@/libasound_module_rate_samplerate_best.so -@@ -21,3 +25,7 @@ install-exec-hook: - - uninstall-hook: - rm -f $(DESTDIR)$(libdir)/alsa-lib/libasound_module_rate_samplerate_*.so -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/speex/Makefile.am b/speex/Makefile.am -index 7891954..27c4ea5 100644 ---- a/speex/Makefile.am -+++ b/speex/Makefile.am -@@ -1,13 +1,21 @@ --EXTRA_DIST = 60-speex.conf -+GCONF_FILES = 60-speex.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_pcm_speex_LTLIBRARIES = libasound_module_pcm_speex.la --asound_module_addon_DATA = 60-speex.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_pcm_speexdir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ @speexdsp_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic -no-undefined $(LDFLAGS_NOUNDEFINED) - - libasound_module_pcm_speex_la_SOURCES = pcm_speex.c - libasound_module_pcm_speex_la_LIBADD = @ALSA_LIBS@ @speexdsp_LIBS@ -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook -diff --git a/usb_stream/Makefile.am b/usb_stream/Makefile.am -index b606d3d..203618b 100644 ---- a/usb_stream/Makefile.am -+++ b/usb_stream/Makefile.am -@@ -1,10 +1,12 @@ --EXTRA_DIST = 98-usb-stream.conf -+GCONF_FILES = 98-usb-stream.conf -+ -+EXTRA_DIST = $(GCONF_FILES) - - asound_module_pcm_usb_stream_LTLIBRARIES = libasound_module_pcm_usb_stream.la --asound_module_addon_DATA = 98-usb-stream.conf -+asound_module_gconf_DATA = $(GCONF_FILES) - - asound_module_pcm_usb_streamdir = @ALSA_PLUGIN_DIR@ --asound_module_addondir = @ALSA_ADDON_DIR@ -+asound_module_gconfdir = @ALSA_GCONF_DIR@ - - AM_CFLAGS = -Wall -g @ALSA_CFLAGS@ - AM_LDFLAGS = -module -avoid-version -export-dynamic $(LDFLAGS_NOUNDEFINED) -@@ -13,3 +15,9 @@ libasound_module_pcm_usb_stream_la_SOURCES = pcm_usb_stream.c - libasound_module_pcm_usb_stream_la_LIBADD = @ALSA_LIBS@ - - noinst_HEADERS = usb_stream.h -+ -+include ../install-hooks.am -+ -+install-data-hook: install-conf-hook -+ -+uninstall-local: uninstall-conf-hook --- -2.13.6 - - -From beb24e58763e3b1d831fcd7ef87a478e6ac74fcc Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Mon, 16 Apr 2018 18:14:18 +0200 -Subject: [PATCH 6/6] oss/Makefile.am: fix typo - -Signed-off-by: Jaroslav Kysela ---- - oss/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/oss/Makefile.am b/oss/Makefile.am -index 46dfcac..bff4443 100644 ---- a/oss/Makefile.am -+++ b/oss/Makefile.am -@@ -1,4 +1,4 @@ --GCONF_FILEs = 50-oss.conf -+GCONF_FILES = 50-oss.conf - - EXTRA_DIST = $(GCONF_FILES) - --- -2.13.6 - diff --git a/pulse-default.conf b/pulse-default.conf new file mode 100644 index 0000000..a84bede --- /dev/null +++ b/pulse-default.conf @@ -0,0 +1,35 @@ +# PulseAudio plugin configuration +# $Id$ + +# Let's create a virtual device "pulse" for mixer and PCM + +pcm.pulse { + type pulse + hint { + description "PulseAudio Sound Server" + } +} + +ctl.pulse { + type pulse + hint { + description "PulseAudio Sound Server" + } +} + +# Let's make it the default! + +pcm.!default { + type pulse + hint { + description "Default" + } +} + +ctl.!default { + type pulse + hint { + description "Default" + } +} + diff --git a/samplerate.conf b/samplerate.conf new file mode 100644 index 0000000..8bf7b9a --- /dev/null +++ b/samplerate.conf @@ -0,0 +1,11 @@ +# samplerate plugin configuration +# $Id: samplerate.conf,v 1.2 2008/03/09 15:50:49 lkundrak Exp $ + +pcm.my_rate { + type rate + slave.pcm "hw" + converter "samplerate" + hint { + description "External rate converter" + } +} diff --git a/sources b/sources index 53faed0..54aec69 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (alsa-plugins-1.2.12.tar.bz2) = b2064eb32662662f422f6e7c71f503d82c68d7a7059c8197bdd61ee08735b3ee104c6a5f9e3451e81124634514b91fc89d05d33041d9c2bb0f55b3c2ac3271b1 +4facd408326ef5567a7d4ceb6589e6b0 alsa-plugins-1.0.26.tar.bz2 diff --git a/speex.conf b/speex.conf new file mode 100644 index 0000000..c4f23e3 --- /dev/null +++ b/speex.conf @@ -0,0 +1,11 @@ +# samplerate plugin configuration +# $Id$ + +pcm.my_rate { + type rate + slave.pcm "hw" + converter "speexrate" + hint { + description "Rate Converter Plugin Using Speex Resampler" + } +} diff --git a/tests/run_tests.sh b/tests/run_tests.sh deleted file mode 100755 index 8148361..0000000 --- a/tests/run_tests.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -ex - -# install speaker-test -dnf install -y alsa-utils - -# create patest user -adduser patest - -# run pulseaudio daemon -su - patest -c "pulseaudio --start --log-target=stderr" - -# run pulseaudio test (null sink) -su - patest -c "speaker-test -D pulse -l 1" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index d18fdf5..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,11 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - pulseaudio - tests: - - simple: - dir: . - run: ./run_tests.sh diff --git a/upmix.conf b/upmix.conf new file mode 100644 index 0000000..e15055e --- /dev/null +++ b/upmix.conf @@ -0,0 +1,10 @@ +# upmix plugin configuration +# $Id: upmix.conf,v 1.2 2008/03/09 15:50:49 lkundrak Exp $ + +pcm.upmix51 { + type upmix + slave.pcm "surround51" + hint { + description "Upmixer channel expander" + } +} diff --git a/vdownmix.conf b/vdownmix.conf new file mode 100644 index 0000000..95786b8 --- /dev/null +++ b/vdownmix.conf @@ -0,0 +1,18 @@ +# vdownmix plugin configuration +# $Id$ + +pcm.!surround51 { + type vdownmix + slave.pcm "default" + hint { + description "Downmixer to stereo from surround51" + } +} + +pcm.!surround40 { + type vdownmix + slave.pcm "default" + hint { + description "Downmixer to stereo from surround40" + } +}