alsa/alsa.spec

286 lines
8.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package alsa
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Accepting request 642599 from home:tiwai:branches:multimedia:libs - Updated to alsa-lib 1.1.7: * change the location for add-on configs to /etc/alsa/conf.d * topology: Fix bclk and fsync inversion in set_link_hw_format() * topology: Add missing clock gating parameter when parsing hw_configs * topology: Add definitions for mclk_direction values * topology: Add alias conf parameter names for hw_configs * softvol: Allow up to 90 dB of gain * ucm: adding the folder of card_long_name when finding verb conf file * TLV macro cleanup and fixes * conf: USB-audio: Fix for Xonar U7 SPDIF device * pcm: add missing flags initialization for the fallback control data * pcm ioplug: fix some coverity issues * pcm: dmix: Fix hwptr updates at status call * New UCM files: bytcr-rt5640, chtnau8824, Dell WD-dock * UCM fixes: VEYRON-I2S, bytcr-rt5645, bytcr-rt5651, bytcr-rt5640, chtrt5645 * Comment fixes * pcm: Define refine mask bits for DSD * pcm: snd_interval_refine_first/last fix * pcm: ioplug: Provide avail helper function for plugins * pcm: rate: Add error check for snd_pcm_avail_update() * pcm: Fix header guard in pcm_plugin.h * pcm: ioplug: Transfer all available data * control_hw: Fix issue when applying seccomp policy * seq: Fix signedness in MIDI encoder/decoder - Remove obsoleted patches: 0001-ucm-adding-the-folder-of-card_long_name-when-finding.patch 0002-conf-ucm-increase-the-input-volume-for-LineIn.patch 0003-conf-ucm-chtrt5645-Cleanup-and-playback-fixes.patch 0004-conf-ucm-chtrt5645-Microphone-recording-fixes.patch OBS-URL: https://build.opensuse.org/request/show/642599 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=235
2018-10-17 12:57:57 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
Accepting request 642599 from home:tiwai:branches:multimedia:libs - Updated to alsa-lib 1.1.7: * change the location for add-on configs to /etc/alsa/conf.d * topology: Fix bclk and fsync inversion in set_link_hw_format() * topology: Add missing clock gating parameter when parsing hw_configs * topology: Add definitions for mclk_direction values * topology: Add alias conf parameter names for hw_configs * softvol: Allow up to 90 dB of gain * ucm: adding the folder of card_long_name when finding verb conf file * TLV macro cleanup and fixes * conf: USB-audio: Fix for Xonar U7 SPDIF device * pcm: add missing flags initialization for the fallback control data * pcm ioplug: fix some coverity issues * pcm: dmix: Fix hwptr updates at status call * New UCM files: bytcr-rt5640, chtnau8824, Dell WD-dock * UCM fixes: VEYRON-I2S, bytcr-rt5645, bytcr-rt5651, bytcr-rt5640, chtrt5645 * Comment fixes * pcm: Define refine mask bits for DSD * pcm: snd_interval_refine_first/last fix * pcm: ioplug: Provide avail helper function for plugins * pcm: rate: Add error check for snd_pcm_avail_update() * pcm: Fix header guard in pcm_plugin.h * pcm: ioplug: Transfer all available data * control_hw: Fix issue when applying seccomp policy * seq: Fix signedness in MIDI encoder/decoder - Remove obsoleted patches: 0001-ucm-adding-the-folder-of-card_long_name-when-finding.patch 0002-conf-ucm-increase-the-input-volume-for-LineIn.patch 0003-conf-ucm-chtrt5645-Cleanup-and-playback-fixes.patch 0004-conf-ucm-chtrt5645-Microphone-recording-fixes.patch OBS-URL: https://build.opensuse.org/request/show/642599 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=235
2018-10-17 12:57:57 +02:00
%define package_version 1.1.7
%if 0%{?suse_version} < 1200
%define _udevrulesdir /lib/udev/rules.d/
%endif
Name: alsa
Accepting request 642599 from home:tiwai:branches:multimedia:libs - Updated to alsa-lib 1.1.7: * change the location for add-on configs to /etc/alsa/conf.d * topology: Fix bclk and fsync inversion in set_link_hw_format() * topology: Add missing clock gating parameter when parsing hw_configs * topology: Add definitions for mclk_direction values * topology: Add alias conf parameter names for hw_configs * softvol: Allow up to 90 dB of gain * ucm: adding the folder of card_long_name when finding verb conf file * TLV macro cleanup and fixes * conf: USB-audio: Fix for Xonar U7 SPDIF device * pcm: add missing flags initialization for the fallback control data * pcm ioplug: fix some coverity issues * pcm: dmix: Fix hwptr updates at status call * New UCM files: bytcr-rt5640, chtnau8824, Dell WD-dock * UCM fixes: VEYRON-I2S, bytcr-rt5645, bytcr-rt5651, bytcr-rt5640, chtrt5645 * Comment fixes * pcm: Define refine mask bits for DSD * pcm: snd_interval_refine_first/last fix * pcm: ioplug: Provide avail helper function for plugins * pcm: rate: Add error check for snd_pcm_avail_update() * pcm: Fix header guard in pcm_plugin.h * pcm: ioplug: Transfer all available data * control_hw: Fix issue when applying seccomp policy * seq: Fix signedness in MIDI encoder/decoder - Remove obsoleted patches: 0001-ucm-adding-the-folder-of-card_long_name-when-finding.patch 0002-conf-ucm-increase-the-input-volume-for-LineIn.patch 0003-conf-ucm-chtrt5645-Cleanup-and-playback-fixes.patch 0004-conf-ucm-chtrt5645-Microphone-recording-fixes.patch OBS-URL: https://build.opensuse.org/request/show/642599 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=235
2018-10-17 12:57:57 +02:00
Version: 1.1.7
Release: 0
Summary: Advanced Linux Sound Architecture
License: LGPL-2.1-or-later
Group: System/Libraries
Url: http://www.alsa-project.org/
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
Source2: baselibs.conf
Source8: 40-alsa.rules
Source9: 42-hd-audio-pm.rules
Source11: alsasound
Source12: sysconfig.sound
Source13: joystick
Source14: sysconfig.joystick
Source16: set_default_volume
Source17: test.wav
Source21: README.testwav
Source30: all_notes_off
Source31: all_notes_off.bin
Source32: all_notes_off.mid
Source34: alsa-init.sh
Source40: 50-alsa.conf
Source41: install-snd-module
# upstream fixes
Patch1: 0001-conf-ucm-Dell-WD15-Dock-Fix-incorrect-device-names.patch
Patch2: 0002-pcm-interval-Interpret-x-x-1-correctly-and-return-x-.patch
# rest suse fixes
Source101: chtcx2072x.conf
Source102: chtcx2072x-HiFi.conf
Source103: bytcr-rt5640.conf
Source104: bytcr-rt5640-HiFi.conf
BuildRequires: doxygen
BuildRequires: libtool
BuildRequires: pkgconfig
Requires: alsa-utils
Requires(post): %fillup_prereq
Recommends: alsa-oss
Recommends: alsa-plugins
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1310
Requires(post): %insserv_prereq
%endif
%if 0%{?suse_version} > 1200
BuildRequires: pkgconfig(udev)
%else
BuildRequires: udev
%endif
%description
ALSA stands for Advanced Linux Sound Architecture. It supports many
PCI, ISA PnP and USB sound cards.
This package contains the ALSA init scripts to start the sound system
on your Linux box. To set it up, run yast2 or alsaconf.
%package devel
Summary: Include Files and Libraries mandatory for Development
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libasound2 = %{version}
Obsoletes: alsadev < %{version}
Provides: alsa-lib-devel = %{version}
Provides: alsadev = %{version}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%package docs
Summary: Additional Package Documentation
License: GPL-2.0-or-later
Group: Documentation/Other
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%description docs
This package contains optional documentation provided in addition to
this package's base documentation.
%package -n libasound2
Summary: Advanced Linux Sound Architecture Library
License: LGPL-2.1-or-later
Group: System/Libraries
Provides: alsa-lib
%description -n libasound2
This package contains the library for ALSA, Advanced Linux Sound
Architecture.
%prep
%setup -q -n alsa-lib-%{package_version}
%patch1 -p1
%patch2 -p1
%build
export AUTOMAKE_JOBS="%{?_smp_mflags}"
# build alsa-lib
Accepting request 320429 from home:tiwai:branches:multimedia:libs - Backport upstream fixes: surround41/50 chmap fix, UCM documents, config string fix, PCM timestamp query API, replacement of list.h with LGPL: 0023-surround41-50.conf-Use-chmap-syntax-for-better-flexi.patch 0024-ucm-docs-fix-doxygen-exclude-patch-for-UCM-local-hea.patch 0025-ucm-docs-Fix-doxygen-formatting-for-UCM-main-page.patch 0026-docs-Add-UCM-link-to-main-doxygen-page.patch 0027-Replace-unsafe-characters-with-_-in-card-name.patch 0028-pcm-add-helper-functions-to-query-timestamping-capab.patch 0029-pcm-add-support-for-get-set_audio_htstamp_config.patch 0030-pcm-add-support-for-new-STATUS_EXT-ioctl.patch 0031-test-fix-audio_time-with-new-get-set-audio_tstamp_co.patch 0032-test-audio_time-show-report-validity-and-accuracy.patch 0033-pcm-restore-hw-params-on-set-latency-failed.patch 0034-Replace-list.h-with-its-own-version.patch - Backport topology API addition patches: 0035-topology-uapi-Add-UAPI-headers-for-topology-ABI.patch 0036-topology-Add-topology-core-parser.patch 0037-topology-Add-text-section-parser.patch 0038-topology-Add-PCM-parser.patch 0039-topology-Add-operations-parser.patch 0040-topology-Add-private-data-parser.patch 0041-topology-Add-DAPM-object-parser.patch 0042-topology-Add-CTL-parser.patch 0043-topology-Add-Channel-map-parser.patch 0044-topology-Add-binary-file-builder.patch 0045-topology-autotools-Add-build-support-for-topology-co.patch 0046-topology-doxygen-Add-doxygen-support-for-topology-co.patch 0047-conf-topology-Add-topology-file-for-broadwell-audio-.patch 0048-topology-Fix-missing-inclusion-of-ctype.h.patch OBS-URL: https://build.opensuse.org/request/show/320429 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=186
2015-08-05 07:28:10 +02:00
autoreconf -fi
%configure \
--disable-static \
--enable-symbolic-functions \
--disable-aload \
--disable-alisp \
--disable-python
make V=1 %{?_smp_mflags}
# run doxygen
make -C doc doc %{?_smp_mflags}
%install
# install shared library
%make_install
# additional UCM profiles
mkdir -p %{buildroot}%{_datadir}/alsa/ucm/chtcx2072x
install -c -m 0644 %{S:101} %{buildroot}%{_datadir}/alsa/ucm/chtcx2072x/chtcx2072x.conf
install -c -m 0644 %{S:102} %{buildroot}%{_datadir}/alsa/ucm/chtcx2072x/HiFi.conf
mkdir -p %{buildroot}%{_datadir}/alsa/ucm/bytcr-rt5640
install -c -m 0644 %{S:103} %{buildroot}%{_datadir}/alsa/ucm/bytcr-rt5640/bytcr-rt5640.conf
install -c -m 0644 %{S:104} %{buildroot}%{_datadir}/alsa/ucm/bytcr-rt5640/HiFi.conf
# clean up unneeded files
rm -f %{buildroot}%{_libdir}/*.*a
Accepting request 442719 from home:tiwai:branches:multimedia:libs - Backport upstream fixes (bsc#1012594): - A few PCM bugs have been fixed: * Stall of dmix and others in a wrong PCM state * Refactoring of PCM locking scheme * SHM initialization race fix * plug PCM memory leaks * Improvement of dshare/dmix delay calculation * Fix endless dshare draining * Fix semaphore discard race fix of direct plugins - UCM fixes and updates for DB410c and skylake-r5286 - Mixer code cleanup not to install bogus plugin codes - Documentation fixes / updates 0001-ucm-Add-ucm-files-for-DB410c-board.patch 0002-mixer-Fix-rounding-mode-documentation.patch 0003-pcm-Fix-shm-initialization-race-condition.patch 0004-pcm-Better-understandable-locking-code.patch 0005-ucm-fix-crash-when-calling-snd_use_case_geti-with-no.patch 0006-ucm-docs-typeset-lists-of-identifiers-explicitly.patch 0007-Update-include-sound-tlv.h-from-4.9-pre-kernel-uapi.patch 0008-test-use-actual-information-for-TLV-operation.patch 0009-ctl-improve-API-documentation-for-TLV-operation.patch 0010-ctl-improve-documentation-about-TLV-related-APIs.patch 0011-ctl-correct-documentation-about-TLV-feature.patch 0012-conf-ucm-skylake-add-skylake-rt286-conf-files.patch 0013-pcm_plug-Clear-plugins-on-all-error-conditions.patch 0014-mixer-Don-t-install-smixer-modules-unless-python-is-.patch 0015-pcm_dshare-Do-not-discard-slave-reported-delay-in-st.patch 0016-pcm-direct-Protect-from-freeing-semaphore-when-alrea.patch 0017-pcm-dshare-Fix-endless-playback-of-buffer.patch 0018-pcm-Add-the-PCM-state-checks-to-plugins.patch OBS-URL: https://build.opensuse.org/request/show/442719 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=202
2016-11-29 19:09:28 +01:00
# rm -f %{buildroot}%{_libdir}/alsa-lib/smixer/*.*a
rm -f %{buildroot}%{_bindir}/aserver
#
# install helper scripts
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sbindir}
install -c -m 0755 %{SOURCE16} %{buildroot}%{_bindir}
install -c -m 0755 %{SOURCE34} %{buildroot}%{_sbindir}/alsa-init
%if 0%{?suse_version} < 1140
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_bindir}/set_default_volume
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_sbindir}/alsa-init
%endif
# install test wave file
mkdir -p %{buildroot}%{_datadir}/sounds/alsa
install -c -m 0644 %{SOURCE17} %{buildroot}%{_datadir}/sounds/alsa/test.wav
# install all_notes_off stuff
install -c -m 0755 %{SOURCE30} %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_prefix}/lib
install -c -m 0644 %{SOURCE31} %{buildroot}%{_prefix}/lib
install -c -m 0644 %{SOURCE32} %{buildroot}%{_prefix}/lib
%if 0%{?suse_version} <= 1310
#
# install init scripts
#
mkdir -p %{buildroot}%{_sysconfdir}/init.d
install -c -m 0755 %{SOURCE11} %{buildroot}%{_sysconfdir}/init.d
install -c -m 0755 %{SOURCE13} %{buildroot}%{_sysconfdir}/init.d
%if 0%{?suse_version} < 1140
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_initddir}/alsasound
%endif
rm -f %{buildroot}%{_sbindir}/rcalsasound
ln -s ../..%{_initddir}/alsasound %{buildroot}%{_sbindir}/rcalsasound
rm -f %{buildroot}%{_sbindir}/rcjoystick
ln -s ../..%{_initddir}/joystick %{buildroot}%{_sbindir}/rcjoystick
%endif
#
# udev rules
#
mkdir -p %{buildroot}%{_udevrulesdir}
%if 0%{?suse_version} < 1140
install -c -m 0644 %{SOURCE8} %{buildroot}%{_udevrulesdir}
%endif
install -c -m 0644 %{SOURCE9} %{buildroot}%{_udevrulesdir}
#
# modprobe config and the module install script for loading OSS-emulation
# and sequencer modules automatically
%if 0%{?suse_version} > 1220
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
install -c -m 0644 %{SOURCE40} %{buildroot}%{_sysconfdir}/modprobe.d
mkdir -p %{buildroot}/sbin
install -c -m 0755 %{SOURCE41} %{buildroot}/sbin
%endif
#
# install template to update rc.config and sysconfig files:
# (updating the actual files is done in the %post-script)
#
mkdir -p -m 755 %{buildroot}%{_fillupdir}
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/sysconfig
install -m 644 $RPM_SOURCE_DIR/sysconfig.sound %{buildroot}%{_fillupdir}
%if 0%{?suse_version} <= 1310
install -m 644 $RPM_SOURCE_DIR/sysconfig.joystick %{buildroot}%{_fillupdir}
%endif
#
# documents
#
mkdir -p %{buildroot}%{_docdir}/%{name}
cp $RPM_SOURCE_DIR/README* %{buildroot}%{_docdir}/%{name}
%if 0%{?suse_version} < 1200
cp COPYING %{buildroot}%{_docdir}/%{name}
%endif
mkdir -p %{buildroot}%{_docdir}/%{name}/alsa-lib
Accepting request 593417 from home:tiwai:branches:multimedia:libs - Updated to alsa-lib 1.1.6: * Change FSF address (Franklin Street) * pcm: route: Fix use_getput flag computation for 3 byte formats * test: correct emulation for channel-map TLV * Change snd_dlopen() function to return the error string * configure.ac: build extra mixer modules conditionally * configure.ac: do not enable alisp code by default * conf/ucm: Rearrange Makefile.am * conf/ucm: Add dual HD-audio codecs config for Lenovo * conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs * asound.h: add SNDRV_PCM_FORMAT_{S, U}20 * pcm: add and describe SND_PCM_FORMAT_{S, U}20 * pcm: linear, route: handle linear formats with 20-bit sample on 4 bytes * pcm: plug: add SND_PCM_FORMAT_{S, U}20 to linear_preferred_formats * pcm: remove unused macros of COPY_LABELS/COPY_END * pcm: remove unused macros of GETU_LABELS/GETU_END * pcm: remove unused macros of NORMS_LABELS/NORMS_END * pcm: fix wrong comments for some cases of linear interpolation of PCM samples * topology: Fix to skip writing of header for compound elements * control: Proper reference of internal versioned functions * timer: Proper reference of internal versioned symbols * core: Proper reference of internal snd_dlopen() * conf/ucm: Add chtrt5645-mono-speaker-analog-mic configuration * pcm: Return the consistent error code for unexpected PCM states * pcm: Fix two bugs in snd_pcm_area_silence() * pcm: fix a bug to copy silent samples aligned to 64 * pcm: another fix for the snd_pcm_area_silence() fast path * pcm: ioplug: Use boundary for wrap around * pcm: Do not access lock_enabled if thread safe API * pcm: ioplug: Provide hw_avail helper function for plugins OBS-URL: https://build.opensuse.org/request/show/593417 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=230
2018-04-04 11:21:43 +02:00
cp ChangeLog INSTALL TODO MEMORY-LEAK %{buildroot}%{_docdir}/%{name}/alsa-lib
cp doc/asoundrc.txt %{buildroot}%{_docdir}/%{name}/alsa-lib
%post
%if 0%{?suse_version} > 1310
%{fillup_only -n sound}
%else
%{fillup_and_insserv -ny sound alsasound}
%{fillup_and_insserv -n joystick joystick}
%endif
exit 0
%if 0%{?suse_version} <= 1310
%preun
%stop_on_removal alsasound joystick
exit 0
%postun
%restart_on_update alsasound joystick
%insserv_cleanup
exit 0
%endif
%post -n libasound2 -p /sbin/ldconfig
%postun -n libasound2 -p /sbin/ldconfig
%files
%defattr(-, root, root)
%doc %{_docdir}/%{name}
%if 0%{?suse_version} >= 1200
Accepting request 593417 from home:tiwai:branches:multimedia:libs - Updated to alsa-lib 1.1.6: * Change FSF address (Franklin Street) * pcm: route: Fix use_getput flag computation for 3 byte formats * test: correct emulation for channel-map TLV * Change snd_dlopen() function to return the error string * configure.ac: build extra mixer modules conditionally * configure.ac: do not enable alisp code by default * conf/ucm: Rearrange Makefile.am * conf/ucm: Add dual HD-audio codecs config for Lenovo * conf/ucm: Add Gigabyte mobo UCM profile with dual HD-audio codecs * asound.h: add SNDRV_PCM_FORMAT_{S, U}20 * pcm: add and describe SND_PCM_FORMAT_{S, U}20 * pcm: linear, route: handle linear formats with 20-bit sample on 4 bytes * pcm: plug: add SND_PCM_FORMAT_{S, U}20 to linear_preferred_formats * pcm: remove unused macros of COPY_LABELS/COPY_END * pcm: remove unused macros of GETU_LABELS/GETU_END * pcm: remove unused macros of NORMS_LABELS/NORMS_END * pcm: fix wrong comments for some cases of linear interpolation of PCM samples * topology: Fix to skip writing of header for compound elements * control: Proper reference of internal versioned functions * timer: Proper reference of internal versioned symbols * core: Proper reference of internal snd_dlopen() * conf/ucm: Add chtrt5645-mono-speaker-analog-mic configuration * pcm: Return the consistent error code for unexpected PCM states * pcm: Fix two bugs in snd_pcm_area_silence() * pcm: fix a bug to copy silent samples aligned to 64 * pcm: another fix for the snd_pcm_area_silence() fast path * pcm: ioplug: Use boundary for wrap around * pcm: Do not access lock_enabled if thread safe API * pcm: ioplug: Provide hw_avail helper function for plugins OBS-URL: https://build.opensuse.org/request/show/593417 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=230
2018-04-04 11:21:43 +02:00
%license COPYING
%endif
%if 0%{?suse_version} <= 1310
%{_initddir}/*
%endif
%if 0%{?suse_version} > 1220
%{_sysconfdir}/modprobe.d
/sbin/*
%endif
%{_sbindir}/*
%{_bindir}/*
%{_prefix}/lib/all_notes_off.*
%{_datadir}/sounds/alsa
%{_fillupdir}/*
%{_udevrulesdir}*
%files devel
%defattr(-, root, root)
%{_libdir}/libasound.so
%{_includedir}/sys/*
%{_includedir}/alsa
%{_datadir}/aclocal/*.m4
%{_libdir}/pkgconfig/*.pc
%files docs
%defattr(-, root, root)
%doc doc/doxygen/html/*
%files -n libasound2
%defattr(-, root, root)
%{_libdir}/libasound.so.*
%{_datadir}/alsa
%changelog